mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-26 23:28:43 +00:00
Some checks are pending
deploy / deploy (push) Waiting to run
publish / version (push) Waiting to run
publish / build-cli-beta (windows-arm64) (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--cpu=* cli:windows-arm64 host:${{ (github.ref_name == 'beta' && 'blacksmith-4vcpu-windows-2025') || 'windows-2025' }} platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=arm64 cli:darwin-arm64 host:macos-26 platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[cli:linux-arm64 host:blacksmith-4vcpu-ubuntu-2404-arm platform_flag:--linux --arm64 target:aarch64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[cli:linux-x64-baseline host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[cli:windows-x64-baseline host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
publish / publish (push) Blocked by required conditions
publish / build-cli (push) Blocked by required conditions
publish / build-cli-beta (darwin-arm64) (push) Blocked by required conditions
publish / build-cli-beta (darwin-x64-baseline) (push) Blocked by required conditions
publish / build-cli-beta (linux-arm64) (push) Blocked by required conditions
publish / build-cli-beta (linux-x64-baseline) (push) Blocked by required conditions
publish / build-cli-beta (windows-x64-baseline) (push) Blocked by required conditions
publish / sign-cli-macos (push) Blocked by required conditions
publish / build-node-app-archive (push) Blocked by required conditions
publish / build-node-cli (map[bun_install_flags:--cpu=* host:blacksmith-4vcpu-windows-2025 target:windows-arm64]) (push) Blocked by required conditions
publish / build-node-cli (map[host:blacksmith-4vcpu-ubuntu-2404 target:linux-x64]) (push) Blocked by required conditions
publish / build-node-cli (map[host:blacksmith-4vcpu-ubuntu-2404-arm target:linux-arm64]) (push) Blocked by required conditions
publish / build-node-cli (map[host:blacksmith-4vcpu-windows-2025 target:windows-x64]) (push) Blocked by required conditions
publish / build-node-cli (map[host:macos-26 target:darwin-arm64]) (push) Blocked by required conditions
publish / sign-cli-windows (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:${{ (github.ref_name == 'beta' && '--os=darwin --cpu=*') || '--os=darwin --cpu=x64' }} cli:darwin-x64-baseline host:${{ (github.ref_name == 'beta' && 'macos-26') || 'macos-26-intel' }} platform_flag:--mac --x64 tar… (push) Blocked by required conditions
publish / notify-discord-v2 (push) Blocked by required conditions
70 lines
2.7 KiB
Diff
70 lines
2.7 KiB
Diff
diff --git a/templates/nsis/include/extractAppPackage.nsh b/templates/nsis/include/extractAppPackage.nsh
|
|
index f5470bf52e923dc47266cea4684c76ef78ced451..6c4a4c193a2ca1dc2413482606b9be5c1c2aa1a9 100644
|
|
--- a/templates/nsis/include/extractAppPackage.nsh
|
|
+++ b/templates/nsis/include/extractAppPackage.nsh
|
|
@@ -1,4 +1,11 @@
|
|
!macro extractEmbeddedAppPackage
|
|
+ # OpenCode: the custom include can install an update the running app already unpacked, and sets
|
|
+ # $R0 to "installed" when it did.
|
|
+ !ifmacrodef customInstallStagedApp
|
|
+ !insertmacro customInstallStagedApp
|
|
+ StrCmp $R0 "installed" extractEmbeddedAppPackageDone
|
|
+ !endif
|
|
+
|
|
!ifdef COMPRESS
|
|
SetCompress off
|
|
!endif
|
|
@@ -13,6 +20,10 @@
|
|
!endif
|
|
|
|
!insertmacro decompress
|
|
+
|
|
+ !ifmacrodef customInstallStagedApp
|
|
+ extractEmbeddedAppPackageDone:
|
|
+ !endif
|
|
!insertmacro custom_files_post_decompression
|
|
!macroend
|
|
|
|
@@ -90,6 +101,15 @@
|
|
!macroend
|
|
|
|
!macro extractUsing7za FILE
|
|
+ # OpenCode: extract straight into an empty install directory. The copy through $PLUGINSDIR below
|
|
+ # only protects files that a running old version still holds, and an empty directory has none,
|
|
+ # so it would write the whole app a second time and delete it again on exit.
|
|
+ ${DirState} $OUTDIR $R0
|
|
+ ${if} $R0 != 1
|
|
+ Nsis7z::Extract "${FILE}"
|
|
+ Goto DoneExtract7za
|
|
+ ${endIf}
|
|
+
|
|
Push $OUTDIR
|
|
CreateDirectory "$PLUGINSDIR\7z-out"
|
|
ClearErrors
|
|
diff --git a/templates/nsis/include/installer.nsh b/templates/nsis/include/installer.nsh
|
|
index 300ef3dd699d0f5a081b1934fcc22dbe12025bdb..6bc1c7f368208024c52aff9ae53f299ce4b632f3 100644
|
|
--- a/templates/nsis/include/installer.nsh
|
|
+++ b/templates/nsis/include/installer.nsh
|
|
@@ -90,7 +90,21 @@
|
|
${if} $installMode == "all"
|
|
SetShellVarContext current
|
|
${endif}
|
|
- !insertmacro copyFile "$EXEPATH" "$LOCALAPPDATA\${APP_INSTALLER_STORE_FILE}"
|
|
+ # OpenCode: an update runs from the updater's pending download next to this cache file, so hard
|
|
+ # link it instead of copying a few hundred MB. The updater replaces that download rather than
|
|
+ # rewriting it, so the link never changes under the cache.
|
|
+ ${StdUtils.GetParentPath} $R5 "$LOCALAPPDATA\${APP_INSTALLER_STORE_FILE}"
|
|
+ StrLen $R6 "$R5\"
|
|
+ StrCpy $R6 $EXEPATH $R6
|
|
+ ${if} $R6 == "$R5\"
|
|
+ Delete "$LOCALAPPDATA\${APP_INSTALLER_STORE_FILE}"
|
|
+ System::Call 'kernel32::CreateHardLinkW(w "$LOCALAPPDATA\${APP_INSTALLER_STORE_FILE}", w "$EXEPATH", p 0) i .R6'
|
|
+ ${else}
|
|
+ StrCpy $R6 0
|
|
+ ${endIf}
|
|
+ ${if} $R6 == 0
|
|
+ !insertmacro copyFile "$EXEPATH" "$LOCALAPPDATA\${APP_INSTALLER_STORE_FILE}"
|
|
+ ${endIf}
|
|
${if} $installMode == "all"
|
|
SetShellVarContext all
|
|
${endif}
|