aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorxxanqw <[email protected]>2025-11-26 12:13:41 +0200
committerxxanqw <[email protected]>2025-11-26 12:13:41 +0200
commit7c81912a5864e938c275f1da2e78bd5951efd272 (patch)
treea3b222b344a66c3cabaabeab8df4a8b18f77f59e /.github
parent9085d689e91822e912831728bcc23bc6fa43903f (diff)
downloadmikusays-c-7c81912a5864e938c275f1da2e78bd5951efd272.tar.gz
mikusays-c-7c81912a5864e938c275f1da2e78bd5951efd272.zip
Refactor NSIS script to call uninstall-specific string replacement function and remove redundant code
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/package-win.yml40
1 files changed, 1 insertions, 39 deletions
diff --git a/.github/workflows/package-win.yml b/.github/workflows/package-win.yml
index 68e8dc3..2b2f607 100644
--- a/.github/workflows/package-win.yml
+++ b/.github/workflows/package-win.yml
@@ -124,48 +124,10 @@ jobs:
Push "${String}"
Push "${SubString}"
Push "${RepString}"
- Call StrRep
+ Call un.StrRep
Pop "${ResultVar}"
!macroend
- Function StrRep
- Exch $R2
- Exch
- Exch $R1
- Exch
- Exch $R0
- Push $R3
- Push $R4
- Push $R5
- Push $R6
- Push $R7
- StrCpy $R3 0
- StrLen $R4 $R1
- StrLen $R6 $R0
- Start:
- StrCpy $R5 $R0 $R4 $R3
- StrCmp $R5 $R1 Found
- IntOp $R3 $R3 + 1
- IntCmp $R3 $R6 End End Start
- Found:
- StrCpy $R5 $R0 $R3
- IntOp $R7 $R3 + $R4
- StrCpy $R7 $R0 "" $R7
- StrCpy $R0 "$R5$R2$R7"
- StrLen $R6 $R0
- IntOp $R3 $R3 + $R4
- Goto Start
- End:
- Pop $R7
- Pop $R6
- Pop $R5
- Pop $R4
- Pop $R3
- Pop $R2
- Pop $R1
- Exch $R0
- FunctionEnd
-
; --- Uninstall-Specific Functions ---
!macro un.StrRep ResultVar String SubString RepString
Push "${String}"