chore: use default nsis template
This commit is contained in:
parent
7f09c36a92
commit
53707a5083
@ -95,8 +95,8 @@ jobs:
|
|||||||
# Update tauri.conf.json
|
# Update tauri.conf.json
|
||||||
jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
|
jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
|
||||||
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
|
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
|
||||||
jq '.bundle.windows.nsis.template = "tauri.bundle.windows.nsis.template"' ./src-tauri/tauri.windows.conf.json > /tmp/tauri.windows.conf.json
|
# jq '.bundle.windows.nsis.template = "tauri.bundle.windows.nsis.template"' ./src-tauri/tauri.windows.conf.json > /tmp/tauri.windows.conf.json
|
||||||
mv /tmp/tauri.windows.conf.json ./src-tauri/tauri.windows.conf.json
|
# mv /tmp/tauri.windows.conf.json ./src-tauri/tauri.windows.conf.json
|
||||||
jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json
|
jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json
|
||||||
mv /tmp/package.json web-app/package.json
|
mv /tmp/package.json web-app/package.json
|
||||||
|
|
||||||
|
|||||||
@ -4,10 +4,12 @@
|
|||||||
"resources": ["resources/pre-install/**/*"],
|
"resources": ["resources/pre-install/**/*"],
|
||||||
"externalBin": ["resources/bin/bun", "resources/bin/uv"],
|
"externalBin": ["resources/bin/bun", "resources/bin/uv"],
|
||||||
"windows": {
|
"windows": {
|
||||||
"signCommand": "powershell -ExecutionPolicy Bypass -File ./sign.ps1 %1",
|
|
||||||
"webviewInstallMode": {
|
"webviewInstallMode": {
|
||||||
"silent": true,
|
"silent": true,
|
||||||
"type": "downloadBootstrapper"
|
"type": "downloadBootstrapper"
|
||||||
|
},
|
||||||
|
"nsis": {
|
||||||
|
"installerHooks": "./windows/hooks.nsh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
30
src-tauri/windows/hooks.nsh
Normal file
30
src-tauri/windows/hooks.nsh
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
!macro NSIS_HOOK_POSTINSTALL
|
||||||
|
; Check if Visual C++ 2019 Redistributable is installed (via Windows Registry)
|
||||||
|
ReadRegDWord $0 HKLM "SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" "Installed"
|
||||||
|
|
||||||
|
${If} $0 == 1
|
||||||
|
DetailPrint "Visual C++ Redistributable already installed"
|
||||||
|
Goto vcredist_done
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
; Install from bundled MSI if not installed
|
||||||
|
${If} ${FileExists} "$INSTDIR\resources\vc_redist.x64.msi"
|
||||||
|
DetailPrint "Installing Visual C++ Redistributable..."
|
||||||
|
; Copy to TEMP folder and then execute installer
|
||||||
|
CopyFiles "$INSTDIR\resources\vc_redist.x64.msi" "$TEMP\vc_redist.x64.msi"
|
||||||
|
ExecWait 'msiexec /i "$TEMP\vc_redist.x64.msi" /passive /norestart' $0
|
||||||
|
|
||||||
|
; Check wether installation process exited successfully (code 0) or not
|
||||||
|
${If} $0 == 0
|
||||||
|
DetailPrint "Visual C++ Redistributable installed successfully"
|
||||||
|
${Else}
|
||||||
|
MessageBox MB_ICONEXCLAMATION "Visual C++ installation failed. Some features may not work."
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
; Clean up setup files from TEMP and your installed app
|
||||||
|
Delete "$TEMP\vc_redist.x64.msi"
|
||||||
|
Delete "$INSTDIR\resources\vc_redist.x64.msi"
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
vcredist_done:
|
||||||
|
!macroend
|
||||||
Loading…
x
Reference in New Issue
Block a user