diff options
| author | xxanqw <[email protected]> | 2025-11-26 12:13:41 +0200 |
|---|---|---|
| committer | xxanqw <[email protected]> | 2025-11-26 12:13:41 +0200 |
| commit | 7c81912a5864e938c275f1da2e78bd5951efd272 (patch) | |
| tree | a3b222b344a66c3cabaabeab8df4a8b18f77f59e /.github/workflows/package-win.yml | |
| parent | 9085d689e91822e912831728bcc23bc6fa43903f (diff) | |
| download | mikusays-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/workflows/package-win.yml')
| -rw-r--r-- | .github/workflows/package-win.yml | 40 |
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}" |
