Skip to content

Commit 59e1e8e

Browse files
committed
Rebuild sync updater script
1 parent fd610e1 commit 59e1e8e

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

bin/auto-config-ini/auto-config-ini.nsi

+14-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ VIAddVersionKey /LANG=1033 "ProductName" "auto-config-ini"
2424
VIAddVersionKey /LANG=1033 "FileDescription" "Indetectables Toolkit updater auto config tools.ini"
2525
VIAddVersionKey /LANG=1033 "LegalCopyright" "2023"
2626

27+
2728
Function .onInit
2829
; read exe params
2930
${GetParameters} $RAW_PARAMS
@@ -55,22 +56,29 @@ Function .onInit
5556
${EndIf}
5657
FunctionEnd
5758

58-
; script default action
59+
60+
; Autoloader
5961
Section ""
6062
; debug
6163
;MessageBox MB_OK "$CHECK_TYPE"
6264
;MessageBox MB_OK "$CONFIG_PATH"
6365

66+
; Synchronizes the updater configuration
6467
${If} $CHECK_TYPE == "sync"
6568
Call ConfigSectionSync
6669
${GetSectionNames} "$CONFIG_PATH" "ReadSectionSyncCallback"
70+
71+
; Set the default updater configuration
6772
${ElseIf} $CHECK_TYPE == "toolkit"
6873
Call ConfigToolkitDefault
74+
75+
; Eliminate the tools that are not installed
6976
${Else}
7077
${GetSectionNames} "$CONFIG_PATH" "ReadSectionCleanCallback"
7178
${EndIf}
7279
SectionEnd
7380

81+
7482
; Synchronizes the updater configuration with the one the user had on their machine
7583
Function ConfigSectionSync
7684
; sync "disable_clean" from old file to new
@@ -94,13 +102,15 @@ Function ConfigSectionSync
94102
WriteINIStr "$CONFIG_PATH" "UpdaterConfig" "use_github_api" "$R0"
95103
FunctionEnd
96104

97-
; Set the default updater configuration within the toolkit
105+
106+
; Set the default updater configuration
98107
Function ConfigToolkitDefault
99-
; this is the correct updater configuration for use in the toolkit
108+
; this is the correct updater configuration for use in the installed version of toolkit
100109
WriteINIStr "$CONFIG_PATH" "UpdaterConfig" "disable_clean" "True"
101110
WriteINIStr "$CONFIG_PATH" "UpdaterConfig" "disable_repack" "True"
102111
FunctionEnd
103112

113+
104114
; Callback to synchronize the state of the tools
105115
Function ReadSectionSyncCallback
106116
; analyze all except the updater config and updater self updater
@@ -125,6 +135,7 @@ Function ReadSectionSyncCallback
125135
Push $0
126136
FunctionEnd
127137

138+
128139
; Callback to eliminate the tools that are not installed in the system
129140
Function ReadSectionCleanCallback
130141
; analyze all except the updater config and updater self updater

bin/updater/bin/auto-config-ini.exe

-5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)