@@ -24,6 +24,7 @@ VIAddVersionKey /LANG=1033 "ProductName" "auto-config-ini"
24
24
VIAddVersionKey /LANG= 1033 " FileDescription" " Indetectables Toolkit updater auto config tools.ini"
25
25
VIAddVersionKey /LANG= 1033 " LegalCopyright" " 2023"
26
26
27
+
27
28
Function .onInit
28
29
; read exe params
29
30
${GetParameters} $RAW_PARAMS
@@ -55,22 +56,29 @@ Function .onInit
55
56
${EndIf}
56
57
FunctionEnd
57
58
58
- ; script default action
59
+
60
+ ; Autoloader
59
61
Section " "
60
62
; debug
61
63
; MessageBox MB_OK "$CHECK_TYPE"
62
64
; MessageBox MB_OK "$CONFIG_PATH"
63
65
66
+ ; Synchronizes the updater configuration
64
67
${If} $CHECK_TYPE == " sync"
65
68
Call ConfigSectionSync
66
69
${GetSectionNames} " $CONFIG_PATH" " ReadSectionSyncCallback"
70
+
71
+ ; Set the default updater configuration
67
72
${ElseIf} $CHECK_TYPE == " toolkit"
68
73
Call ConfigToolkitDefault
74
+
75
+ ; Eliminate the tools that are not installed
69
76
${Else}
70
77
${GetSectionNames} " $CONFIG_PATH" " ReadSectionCleanCallback"
71
78
${EndIf}
72
79
SectionEnd
73
80
81
+
74
82
; Synchronizes the updater configuration with the one the user had on their machine
75
83
Function ConfigSectionSync
76
84
; sync "disable_clean" from old file to new
@@ -94,13 +102,15 @@ Function ConfigSectionSync
94
102
WriteINIStr " $CONFIG_PATH" " UpdaterConfig" " use_github_api" " $R0"
95
103
FunctionEnd
96
104
97
- ; Set the default updater configuration within the toolkit
105
+
106
+ ; Set the default updater configuration
98
107
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
100
109
WriteINIStr " $CONFIG_PATH" " UpdaterConfig" " disable_clean" " True"
101
110
WriteINIStr " $CONFIG_PATH" " UpdaterConfig" " disable_repack" " True"
102
111
FunctionEnd
103
112
113
+
104
114
; Callback to synchronize the state of the tools
105
115
Function ReadSectionSyncCallback
106
116
; analyze all except the updater config and updater self updater
@@ -125,6 +135,7 @@ Function ReadSectionSyncCallback
125
135
Push $0
126
136
FunctionEnd
127
137
138
+
128
139
; Callback to eliminate the tools that are not installed in the system
129
140
Function ReadSectionCleanCallback
130
141
; analyze all except the updater config and updater self updater
0 commit comments