mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 06:43:44 +08:00
fix: bundle error
This commit is contained in:
parent
c9c46d05d0
commit
402f27b2a3
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@ -66,8 +66,6 @@ jobs:
|
|||||||
tagName: v__VERSION__
|
tagName: v__VERSION__
|
||||||
releaseName: "Clash Verge Rev v__VERSION__"
|
releaseName: "Clash Verge Rev v__VERSION__"
|
||||||
releaseBody: "More new features are now supported."
|
releaseBody: "More new features are now supported."
|
||||||
releaseDraft: false
|
|
||||||
prerelease: false
|
|
||||||
tauriScript: pnpm
|
tauriScript: pnpm
|
||||||
args: --target ${{ matrix.target }}
|
args: --target ${{ matrix.target }}
|
||||||
|
|
||||||
@ -201,7 +199,6 @@ jobs:
|
|||||||
tag_name: v${{steps.build.outputs.appVersion}}
|
tag_name: v${{steps.build.outputs.appVersion}}
|
||||||
name: "Clash Verge Rev v${{steps.build.outputs.appVersion}}"
|
name: "Clash Verge Rev v${{steps.build.outputs.appVersion}}"
|
||||||
body: "More new features are now supported."
|
body: "More new features are now supported."
|
||||||
prerelease: true
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup*
|
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup*
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
"@tauri-apps/cli": "1.5.12",
|
"@tauri-apps/cli": "^1.5.13",
|
||||||
"@types/fs-extra": "^9.0.13",
|
"@types/fs-extra": "^9.0.13",
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
|
90
pnpm-lock.yaml
generated
90
pnpm-lock.yaml
generated
@ -111,8 +111,8 @@ importers:
|
|||||||
specifier: ^5.1.1
|
specifier: ^5.1.1
|
||||||
version: 5.1.1
|
version: 5.1.1
|
||||||
"@tauri-apps/cli":
|
"@tauri-apps/cli":
|
||||||
specifier: 1.5.12
|
specifier: ^1.5.13
|
||||||
version: 1.5.12
|
version: 1.5.13
|
||||||
"@types/fs-extra":
|
"@types/fs-extra":
|
||||||
specifier: ^9.0.13
|
specifier: ^9.0.13
|
||||||
version: 9.0.13
|
version: 9.0.13
|
||||||
@ -1299,100 +1299,100 @@ packages:
|
|||||||
}
|
}
|
||||||
engines: { node: ">= 14.6.0", npm: ">= 6.6.0", yarn: ">= 1.19.1" }
|
engines: { node: ">= 14.6.0", npm: ">= 6.6.0", yarn: ">= 1.19.1" }
|
||||||
|
|
||||||
"@tauri-apps/cli-darwin-arm64@1.5.12":
|
"@tauri-apps/cli-darwin-arm64@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-ud06E547WE7oDZeN5rH4eeB90Rie0aSCFH0Zb6XyNb6qgg0ZIftM+N3OjVONxk84/g//nr4/x7wW6LOwiwvPHw==,
|
integrity: sha512-wXsBp6FIsQ1yoAEJ8dao7BkVdOp5xlfgGyAbJVCFKU3LTUqKw4A+ayxO6CV2lFfSaOdzdU86z+eJsl38nzmoSg==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
"@tauri-apps/cli-darwin-x64@1.5.12":
|
"@tauri-apps/cli-darwin-x64@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-hSz9cuHO4lYora0z2XRFEIblkStT3eJvh/iYmsFfjT3usGBt2fTPMJ4SnL1Uyu64Y59dqyRNBikuBuymAFESjA==,
|
integrity: sha512-1I/8Q8ogr1P1iQhjsXw0DSPjb8r2ggx2h52X1NXODhBknWIG7Y3rPDnRSXg1qoauRi19728BmP/CSW6MugidwQ==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
"@tauri-apps/cli-linux-arm-gnueabihf@1.5.12":
|
"@tauri-apps/cli-linux-arm-gnueabihf@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-FanE15/c7nz64CcTFe7f+8b7+rFQCb3Ivju+4sxVSPkAOJXHc5no3Y/LxFt85SAOMgPTB2FMuxHUdjvLjd2D1w==,
|
integrity: sha512-IHtE8YGZ4KV0fX8w6a8lftFGLsDCr/kbikKIgvUQdypImToCr4MKbyKQ6guwSGPlCExtHpD7+LOtFoRocLCtBw==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
"@tauri-apps/cli-linux-arm64-gnu@1.5.12":
|
"@tauri-apps/cli-linux-arm64-gnu@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-ETVyIcR4xVGnuhTgTY+kPG5LbAJQobPA8OxSLRY203f0cqYuSPffgyahtS65uPJ9egWIN3fflDKGTE1xcgFNAA==,
|
integrity: sha512-U01Jvr0YoBwqRJ1lf+lzFRrNwhfdP4HF/3p1ahFzSoQ6CuYk0pL1jYmsYA7PigKmmovu8ctNq9E9quSdquOIeQ==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
"@tauri-apps/cli-linux-arm64-musl@1.5.12":
|
"@tauri-apps/cli-linux-arm64-musl@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-ZhMagbS50dDV9glHrtRg1bkUa7sUDPsZ9bJ0xnd0vr8Smi8RiJ/dgQbF5eQNp4ahzYl+FtLjBkMTZKACrKgusg==,
|
integrity: sha512-+UVxc5yQavLWnsFCDYXp4HxDxhyuDt+V2IOdy+ClO/xJ8ii5vFz1QYQBm9s1ofXWPXn5BYyBVNhGuPstAYcO9A==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
"@tauri-apps/cli-linux-x64-gnu@1.5.12":
|
"@tauri-apps/cli-linux-x64-gnu@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-H6jXU4AG8g6FZxX+U3M76zigbLvj7bE+wG+xOrS7xCRwkfAEKw0aulymdFfOl44KBZDQQsV5KYA6T6csx3KbIQ==,
|
integrity: sha512-QDIkbpMprEe08V9Yn+XMbQa2ErY9Cj6TlvcSGLzida4gAVHwf42AMxBBFSvjpdMyB7D5lJMsDSq5xhEeRPs/HQ==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
"@tauri-apps/cli-linux-x64-musl@1.5.12":
|
"@tauri-apps/cli-linux-x64-musl@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-Y/0dzBD8oFZ04Xq75LKPJvOI2MbVFdwGY6w41l24OxNiNopF7AzdrZGTJ+MoUbU9PALNP8ABhOP6BYZiV528OA==,
|
integrity: sha512-7JHNrF0b8Y7R693SG8JWhWmt/3d6vhyswEu26NUxQG2IYQlVY51sDPkub7S1cynh4++7CMV5sNK0EUr6hLrR9A==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
"@tauri-apps/cli-win32-arm64-msvc@1.5.12":
|
"@tauri-apps/cli-win32-arm64-msvc@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-fxCS1/zQp+W7Lze+6Sh64RLqWFE57NsU+Y9L30ZKt5Prnt2LXEoa3POSaQpgHLRgwL/WfDW2nkYBRH3fVIrpQg==,
|
integrity: sha512-p+j3IcrPnQ7/iaMlrdDBGT2SlB6MzjTbSdLo1jNE3DAeO98jByIJZyNme07Fv87280+2LXVB5XtusCsgTwIHCw==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
"@tauri-apps/cli-win32-ia32-msvc@1.5.12":
|
"@tauri-apps/cli-win32-ia32-msvc@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-keWSEBOxL8q750AzmL4L3DDJzDzmb6DGT3+0HTjbEfu+a2GRS1lnrkm3EEeAepPoz4r62+cOQbjPRP8YGtGfFw==,
|
integrity: sha512-ypxRAGd8QYOCaBUmqzvHvrzj64OgfhzZQS/TSQlKWeJ9X1oQzQDNUrifsdaZZvZBf9yqSRf8lMYoN5qFjrHZfA==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
cpu: [ia32]
|
cpu: [ia32]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
"@tauri-apps/cli-win32-x64-msvc@1.5.12":
|
"@tauri-apps/cli-win32-x64-msvc@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-+eIvaPVwtVM7puXlCZIS1lSFF0VZ0gAUShKwk/kBZi8xUYQoNEW2RUWSPp+TEdZsMiAxd/zFZ+tGgv83Hxjbjg==,
|
integrity: sha512-B3YDAyZb8f6zKqZj/ydL/cQVkT/KxNyumXsX+UL4oM5E2DM89OD5BxMgqGr7zwmJSaRNRHkXRK+BMluvZjHG9w==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
"@tauri-apps/cli@1.5.12":
|
"@tauri-apps/cli@1.5.13":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-tMvcMVIrvNjoPIVO5pZk7lJrHVXw7NBggpJXRAQsD7VkMW9hT1uX3jVZeoPCmQ5KbpXvjoNXe+Ws8nE2NR/8Ow==,
|
integrity: sha512-wULOJNb/Dxc/E+Z0+7MkaqKYAmdjGJEFpZ5xcNhvC3BVX1O6MbhHjXGfwfu4mgIGhVqY1KJaKoXx7EDZAlk7Pw==,
|
||||||
}
|
}
|
||||||
engines: { node: ">= 10" }
|
engines: { node: ">= 10" }
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@ -4236,48 +4236,48 @@ snapshots:
|
|||||||
|
|
||||||
"@tauri-apps/api@1.5.4": {}
|
"@tauri-apps/api@1.5.4": {}
|
||||||
|
|
||||||
"@tauri-apps/cli-darwin-arm64@1.5.12":
|
"@tauri-apps/cli-darwin-arm64@1.5.13":
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
"@tauri-apps/cli-darwin-x64@1.5.12":
|
"@tauri-apps/cli-darwin-x64@1.5.13":
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
"@tauri-apps/cli-linux-arm-gnueabihf@1.5.12":
|
"@tauri-apps/cli-linux-arm-gnueabihf@1.5.13":
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
"@tauri-apps/cli-linux-arm64-gnu@1.5.12":
|
"@tauri-apps/cli-linux-arm64-gnu@1.5.13":
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
"@tauri-apps/cli-linux-arm64-musl@1.5.12":
|
"@tauri-apps/cli-linux-arm64-musl@1.5.13":
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
"@tauri-apps/cli-linux-x64-gnu@1.5.12":
|
"@tauri-apps/cli-linux-x64-gnu@1.5.13":
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
"@tauri-apps/cli-linux-x64-musl@1.5.12":
|
"@tauri-apps/cli-linux-x64-musl@1.5.13":
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
"@tauri-apps/cli-win32-arm64-msvc@1.5.12":
|
"@tauri-apps/cli-win32-arm64-msvc@1.5.13":
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
"@tauri-apps/cli-win32-ia32-msvc@1.5.12":
|
"@tauri-apps/cli-win32-ia32-msvc@1.5.13":
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
"@tauri-apps/cli-win32-x64-msvc@1.5.12":
|
"@tauri-apps/cli-win32-x64-msvc@1.5.13":
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
"@tauri-apps/cli@1.5.12":
|
"@tauri-apps/cli@1.5.13":
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
"@tauri-apps/cli-darwin-arm64": 1.5.12
|
"@tauri-apps/cli-darwin-arm64": 1.5.13
|
||||||
"@tauri-apps/cli-darwin-x64": 1.5.12
|
"@tauri-apps/cli-darwin-x64": 1.5.13
|
||||||
"@tauri-apps/cli-linux-arm-gnueabihf": 1.5.12
|
"@tauri-apps/cli-linux-arm-gnueabihf": 1.5.13
|
||||||
"@tauri-apps/cli-linux-arm64-gnu": 1.5.12
|
"@tauri-apps/cli-linux-arm64-gnu": 1.5.13
|
||||||
"@tauri-apps/cli-linux-arm64-musl": 1.5.12
|
"@tauri-apps/cli-linux-arm64-musl": 1.5.13
|
||||||
"@tauri-apps/cli-linux-x64-gnu": 1.5.12
|
"@tauri-apps/cli-linux-x64-gnu": 1.5.13
|
||||||
"@tauri-apps/cli-linux-x64-musl": 1.5.12
|
"@tauri-apps/cli-linux-x64-musl": 1.5.13
|
||||||
"@tauri-apps/cli-win32-arm64-msvc": 1.5.12
|
"@tauri-apps/cli-win32-arm64-msvc": 1.5.13
|
||||||
"@tauri-apps/cli-win32-ia32-msvc": 1.5.12
|
"@tauri-apps/cli-win32-ia32-msvc": 1.5.13
|
||||||
"@tauri-apps/cli-win32-x64-msvc": 1.5.12
|
"@tauri-apps/cli-win32-x64-msvc": 1.5.13
|
||||||
|
|
||||||
"@types/babel__core@7.20.5":
|
"@types/babel__core@7.20.5":
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -13,8 +13,9 @@ Unicode true
|
|||||||
!include FileFunc.nsh
|
!include FileFunc.nsh
|
||||||
!include x64.nsh
|
!include x64.nsh
|
||||||
!include WordFunc.nsh
|
!include WordFunc.nsh
|
||||||
!include "LogicLib.nsh"
|
|
||||||
!include "StrFunc.nsh"
|
!include "StrFunc.nsh"
|
||||||
|
!include "Win\COM.nsh"
|
||||||
|
!include "Win\Propkey.nsh"
|
||||||
!addplugindir "$%AppData%\Local\NSIS\"
|
!addplugindir "$%AppData%\Local\NSIS\"
|
||||||
${StrCase}
|
${StrCase}
|
||||||
${StrLoc}
|
${StrLoc}
|
||||||
@ -149,7 +150,6 @@ Function PageReinstall
|
|||||||
; however, this should be fine since the user will have to confirm the uninstallation
|
; however, this should be fine since the user will have to confirm the uninstallation
|
||||||
; and they can chose to abort it if doesn't make sense.
|
; and they can chose to abort it if doesn't make sense.
|
||||||
StrCpy $0 0
|
StrCpy $0 0
|
||||||
|
|
||||||
wix_loop:
|
wix_loop:
|
||||||
EnumRegKey $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" $0
|
EnumRegKey $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" $0
|
||||||
StrCmp $1 "" wix_done ; Exit loop if there is no more keys to loop on
|
StrCmp $1 "" wix_done ; Exit loop if there is no more keys to loop on
|
||||||
@ -571,7 +571,7 @@ Section WebView2
|
|||||||
!if "${INSTALLWEBVIEW2MODE}" == "downloadBootstrapper"
|
!if "${INSTALLWEBVIEW2MODE}" == "downloadBootstrapper"
|
||||||
Delete "$TEMP\MicrosoftEdgeWebview2Setup.exe"
|
Delete "$TEMP\MicrosoftEdgeWebview2Setup.exe"
|
||||||
DetailPrint "$(webview2Downloading)"
|
DetailPrint "$(webview2Downloading)"
|
||||||
nsis_tauri_utils::download "https://go.microsoft.com/fwlink/p/?LinkId=2124703" "$TEMP\MicrosoftEdgeWebview2Setup.exe"
|
NSISdl::download "https://go.microsoft.com/fwlink/p/?LinkId=2124703" "$TEMP\MicrosoftEdgeWebview2Setup.exe"
|
||||||
Pop $0
|
Pop $0
|
||||||
${If} $0 == 0
|
${If} $0 == 0
|
||||||
DetailPrint "$(webview2DownloadSuccess)"
|
DetailPrint "$(webview2DownloadSuccess)"
|
||||||
@ -730,7 +730,8 @@ Function .onInstSuccess
|
|||||||
check_r_flag:
|
check_r_flag:
|
||||||
${GetOptions} $CMDLINE "/R" $R0
|
${GetOptions} $CMDLINE "/R" $R0
|
||||||
IfErrors run_done 0
|
IfErrors run_done 0
|
||||||
Exec '"$INSTDIR\${MAINBINARYNAME}.exe"'
|
${GetOptions} $CMDLINE "/ARGS" $R0
|
||||||
|
Exec '"$INSTDIR\${MAINBINARYNAME}.exe" $R0'
|
||||||
run_done:
|
run_done:
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
@ -744,29 +745,34 @@ Function un.onInit
|
|||||||
!insertmacro MUI_UNGETLANGUAGE
|
!insertmacro MUI_UNGETLANGUAGE
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function un.isDirectoryEmpty
|
!macro DeleteAppUserModelId
|
||||||
Exch $0
|
!insertmacro ComHlpr_CreateInProcInstance ${CLSID_DestinationList} ${IID_ICustomDestinationList} r1 ""
|
||||||
Push $1
|
${If} $1 P<> 0
|
||||||
Push $2
|
${ICustomDestinationList::DeleteList} $1 '("${BUNDLEID}")'
|
||||||
StrCpy $2 0
|
${IUnknown::Release} $1 ""
|
||||||
FindFirst $1 $2 "$0\*.*"
|
${EndIf}
|
||||||
loop:
|
!insertmacro ComHlpr_CreateInProcInstance ${CLSID_ApplicationDestinations} ${IID_IApplicationDestinations} r1 ""
|
||||||
StrCmp $2 "" done
|
${If} $1 P<> 0
|
||||||
StrCmp $2 "." next
|
${IApplicationDestinations::SetAppID} $1 '("${BUNDLEID}")i.r0'
|
||||||
StrCmp $2 ".." next
|
${If} $0 >= 0
|
||||||
StrCpy $0 0
|
${IApplicationDestinations::RemoveAllDestinations} $1 ''
|
||||||
goto done
|
${EndIf}
|
||||||
next:
|
${IUnknown::Release} $1 ""
|
||||||
FindNext $1 $2
|
${EndIf}
|
||||||
goto loop
|
!macroend
|
||||||
done:
|
|
||||||
FindClose $1
|
; From https://stackoverflow.com/a/42816728/16993372
|
||||||
StrCmp $2 "" 0 +2
|
!macro UnpinShortcut shortcut
|
||||||
StrCpy $0 1
|
!insertmacro ComHlpr_CreateInProcInstance ${CLSID_StartMenuPin} ${IID_IStartMenuPinnedList} r0 ""
|
||||||
Pop $2
|
${If} $0 P<> 0
|
||||||
Pop $1
|
System::Call 'SHELL32::SHCreateItemFromParsingName(ws, p0, g "${IID_IShellItem}", *p0r1)' "${shortcut}"
|
||||||
Exch $0
|
${If} $1 P<> 0
|
||||||
FunctionEnd
|
${IStartMenuPinnedList::RemoveFromList} $0 '(r1)'
|
||||||
|
${IUnknown::Release} $1 ""
|
||||||
|
${EndIf}
|
||||||
|
${IUnknown::Release} $0 ""
|
||||||
|
${EndIf}
|
||||||
|
!macroend
|
||||||
|
|
||||||
Section Uninstall
|
Section Uninstall
|
||||||
!insertmacro CheckIfAppIsRunning
|
!insertmacro CheckIfAppIsRunning
|
||||||
@ -789,15 +795,14 @@ Section Uninstall
|
|||||||
; Delete uninstaller
|
; Delete uninstaller
|
||||||
Delete "$INSTDIR\uninstall.exe"
|
Delete "$INSTDIR\uninstall.exe"
|
||||||
|
|
||||||
; Remove InstallDir
|
{{#each resources_ancestors}}
|
||||||
Push "$INSTDIR"
|
RMDir /REBOOTOK "$INSTDIR\\{{this}}"
|
||||||
Call un.isDirectoryEmpty
|
{{/each}}
|
||||||
Pop $0
|
RMDir "$INSTDIR"
|
||||||
${If} $0 == 1
|
|
||||||
RMDir /R /REBOOTOK "$INSTDIR"
|
!insertmacro DeleteAppUserModelId
|
||||||
${Else}
|
!insertmacro UnpinShortcut "$SMPROGRAMS\$AppStartMenuFolder\${MAINBINARYNAME}.lnk"
|
||||||
MessageBox MB_OK "Install Directory is not Empty, Please remove it manually."
|
!insertmacro UnpinShortcut "$DESKTOP\${MAINBINARYNAME}.lnk"
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
; Remove start menu shortcut
|
; Remove start menu shortcut
|
||||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $AppStartMenuFolder
|
!insertmacro MUI_STARTMENU_GETFOLDER Application $AppStartMenuFolder
|
||||||
@ -840,13 +845,39 @@ Function SkipIfPassive
|
|||||||
${IfThen} $PassiveMode == 1 ${|} Abort ${|}
|
${IfThen} $PassiveMode == 1 ${|} Abort ${|}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
!macro SetLnkAppUserModelId shortcut
|
||||||
|
!insertmacro ComHlpr_CreateInProcInstance ${CLSID_ShellLink} ${IID_IShellLink} r0 ""
|
||||||
|
${If} $0 P<> 0
|
||||||
|
${IUnknown::QueryInterface} $0 '("${IID_IPersistFile}",.r1)'
|
||||||
|
${If} $1 P<> 0
|
||||||
|
${IPersistFile::Load} $1 '("${shortcut}", ${STGM_READWRITE})'
|
||||||
|
${IUnknown::QueryInterface} $0 '("${IID_IPropertyStore}",.r2)'
|
||||||
|
${If} $2 P<> 0
|
||||||
|
System::Call 'Oleaut32::SysAllocString(w "${BUNDLEID}") i.r3'
|
||||||
|
System::Call '*${SYSSTRUCT_PROPERTYKEY}(${PKEY_AppUserModel_ID})p.r4'
|
||||||
|
System::Call '*${SYSSTRUCT_PROPVARIANT}(${VT_BSTR},,&i4 $3)p.r5'
|
||||||
|
${IPropertyStore::SetValue} $2 '($4,$5)'
|
||||||
|
|
||||||
|
System::Call 'Oleaut32::SysFreeString($3)'
|
||||||
|
System::Free $4
|
||||||
|
System::Free $5
|
||||||
|
${IPropertyStore::Commit} $2 ""
|
||||||
|
${IUnknown::Release} $2 ""
|
||||||
|
${IPersistFile::Save} $1 '("${shortcut}",1)'
|
||||||
|
${EndIf}
|
||||||
|
${IUnknown::Release} $1 ""
|
||||||
|
${EndIf}
|
||||||
|
${IUnknown::Release} $0 ""
|
||||||
|
${EndIf}
|
||||||
|
!macroend
|
||||||
|
|
||||||
Function CreateDesktopShortcut
|
Function CreateDesktopShortcut
|
||||||
CreateShortcut "$DESKTOP\${MAINBINARYNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
CreateShortcut "$DESKTOP\${MAINBINARYNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
||||||
ApplicationID::Set "$DESKTOP\${MAINBINARYNAME}.lnk" "${BUNDLEID}"
|
!insertmacro SetLnkAppUserModelId "$DESKTOP\${MAINBINARYNAME}.lnk"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function CreateStartMenuShortcut
|
Function CreateStartMenuShortcut
|
||||||
CreateDirectory "$SMPROGRAMS\$AppStartMenuFolder"
|
CreateDirectory "$SMPROGRAMS\$AppStartMenuFolder"
|
||||||
CreateShortcut "$SMPROGRAMS\$AppStartMenuFolder\${MAINBINARYNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
CreateShortcut "$SMPROGRAMS\$AppStartMenuFolder\${MAINBINARYNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
||||||
ApplicationID::Set "$SMPROGRAMS\$AppStartMenuFolder\${MAINBINARYNAME}.lnk" "${BUNDLEID}"
|
!insertmacro SetLnkAppUserModelId "$SMPROGRAMS\$AppStartMenuFolder\${MAINBINARYNAME}.lnk"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user