GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode/patches/[email protected] at dev · drpr/opencode

Expand file tree

/

[email protected]

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
70 lines (67 loc) · 2.69 KB
/

[email protected]

Copy path

File metadata and controls

70 lines (67 loc) · 2.69 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.