mirror of
https://github.com/indetectables-net/toolkit.git
synced 2025-06-21 18:30:51 +00:00
Rebuild sync updater script
This commit is contained in:
parent
fd610e1d60
commit
59e1e8e1e8
@ -24,6 +24,7 @@ VIAddVersionKey /LANG=1033 "ProductName" "auto-config-ini"
|
|||||||
VIAddVersionKey /LANG=1033 "FileDescription" "Indetectables Toolkit updater auto config tools.ini"
|
VIAddVersionKey /LANG=1033 "FileDescription" "Indetectables Toolkit updater auto config tools.ini"
|
||||||
VIAddVersionKey /LANG=1033 "LegalCopyright" "2023"
|
VIAddVersionKey /LANG=1033 "LegalCopyright" "2023"
|
||||||
|
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
; read exe params
|
; read exe params
|
||||||
${GetParameters} $RAW_PARAMS
|
${GetParameters} $RAW_PARAMS
|
||||||
@ -55,22 +56,29 @@ Function .onInit
|
|||||||
${EndIf}
|
${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
; script default action
|
|
||||||
|
; Autoloader
|
||||||
Section ""
|
Section ""
|
||||||
; debug
|
; debug
|
||||||
;MessageBox MB_OK "$CHECK_TYPE"
|
;MessageBox MB_OK "$CHECK_TYPE"
|
||||||
;MessageBox MB_OK "$CONFIG_PATH"
|
;MessageBox MB_OK "$CONFIG_PATH"
|
||||||
|
|
||||||
|
; Synchronizes the updater configuration
|
||||||
${If} $CHECK_TYPE == "sync"
|
${If} $CHECK_TYPE == "sync"
|
||||||
Call ConfigSectionSync
|
Call ConfigSectionSync
|
||||||
${GetSectionNames} "$CONFIG_PATH" "ReadSectionSyncCallback"
|
${GetSectionNames} "$CONFIG_PATH" "ReadSectionSyncCallback"
|
||||||
|
|
||||||
|
; Set the default updater configuration
|
||||||
${ElseIf} $CHECK_TYPE == "toolkit"
|
${ElseIf} $CHECK_TYPE == "toolkit"
|
||||||
Call ConfigToolkitDefault
|
Call ConfigToolkitDefault
|
||||||
|
|
||||||
|
; Eliminate the tools that are not installed
|
||||||
${Else}
|
${Else}
|
||||||
${GetSectionNames} "$CONFIG_PATH" "ReadSectionCleanCallback"
|
${GetSectionNames} "$CONFIG_PATH" "ReadSectionCleanCallback"
|
||||||
${EndIf}
|
${EndIf}
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|
||||||
; Synchronizes the updater configuration with the one the user had on their machine
|
; Synchronizes the updater configuration with the one the user had on their machine
|
||||||
Function ConfigSectionSync
|
Function ConfigSectionSync
|
||||||
; sync "disable_clean" from old file to new
|
; sync "disable_clean" from old file to new
|
||||||
@ -94,13 +102,15 @@ Function ConfigSectionSync
|
|||||||
WriteINIStr "$CONFIG_PATH" "UpdaterConfig" "use_github_api" "$R0"
|
WriteINIStr "$CONFIG_PATH" "UpdaterConfig" "use_github_api" "$R0"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
; Set the default updater configuration within the toolkit
|
|
||||||
|
; Set the default updater configuration
|
||||||
Function ConfigToolkitDefault
|
Function ConfigToolkitDefault
|
||||||
; this is the correct updater configuration for use in the toolkit
|
; this is the correct updater configuration for use in the installed version of toolkit
|
||||||
WriteINIStr "$CONFIG_PATH" "UpdaterConfig" "disable_clean" "True"
|
WriteINIStr "$CONFIG_PATH" "UpdaterConfig" "disable_clean" "True"
|
||||||
WriteINIStr "$CONFIG_PATH" "UpdaterConfig" "disable_repack" "True"
|
WriteINIStr "$CONFIG_PATH" "UpdaterConfig" "disable_repack" "True"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
||||||
; Callback to synchronize the state of the tools
|
; Callback to synchronize the state of the tools
|
||||||
Function ReadSectionSyncCallback
|
Function ReadSectionSyncCallback
|
||||||
; analyze all except the updater config and updater self updater
|
; analyze all except the updater config and updater self updater
|
||||||
@ -125,6 +135,7 @@ Function ReadSectionSyncCallback
|
|||||||
Push $0
|
Push $0
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
||||||
; Callback to eliminate the tools that are not installed in the system
|
; Callback to eliminate the tools that are not installed in the system
|
||||||
Function ReadSectionCleanCallback
|
Function ReadSectionCleanCallback
|
||||||
; analyze all except the updater config and updater self updater
|
; analyze all except the updater config and updater self updater
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user