35 lines
945 B
Plaintext
35 lines
945 B
Plaintext
#Include options.ahk
|
|
|
|
;CHECK CONFIG
|
|
Gosub, CheckConfig
|
|
|
|
return
|
|
|
|
|
|
CheckConfig:
|
|
IfExist, %k_config%
|
|
{
|
|
IniRead, k_ver, %k_config%, System, Version, 0.0.0
|
|
If (k_version != k_ver)
|
|
{
|
|
IfExist, %k_base%\Uninstall.bat
|
|
{
|
|
MsgBox, 16, Navigator, Please run the uninstaller before updating Navigator!`nThis ensures a clean install with no orphaned objects.`n`nUninstaller location: %k_base%\Uninstall.bat
|
|
ExitApp
|
|
}
|
|
}
|
|
}
|
|
FileCreateDir, %k_base%
|
|
FileInstall, config.ini, %k_config%, 0
|
|
IniWrite, %k_version%, %k_config%, System, Version
|
|
FileInstall, Navigator.exe, %k_base%\Navigator.exe, 1
|
|
FileInstall, NavigatorUtil.exe, %k_base%\NavigatorUtil.exe, 1
|
|
FileInstall, CheckReg.bat, %k_base%\CheckReg.bat, 1
|
|
FileInstall, Uninstall.bat, %k_base%\Uninstall.bat, 1
|
|
#Include CheckReg.ahk
|
|
MsgBox, 36, Navigator, Installed successfully!`nWould you like to start Navigator?
|
|
IfMsgBox, Yes
|
|
{
|
|
Run, %k_base%\Navigator.exe
|
|
}
|
|
return |