| 1 |
; Script generated by the Inno Setup Script Wizard. |
| 2 |
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! |
| 3 |
|
| 4 |
[Setup] |
| 5 |
; NOTE: The value of AppId uniquely identifies this application. |
| 6 |
; Do not use the same AppId value in installers for other applications. |
| 7 |
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) |
| 8 |
AppID={{4714199A-0D66-4E69-97FF-7B54BFF80B88} |
| 9 |
AppCopyright=%(AppCopyright)s |
| 10 |
AppName=%(AppName)s |
| 11 |
AppVerName=%(AppName)s %(AppVerName)s |
| 12 |
AppPublisher=%(AppPublisher)s |
| 13 |
AppPublisherURL=%(AppPublisherURL)s |
| 14 |
AppReadmeFile={app}\README.html |
| 15 |
AppSupportURL=%(AppSupportURL)s |
| 16 |
AppUpdatesURL=%(AppUpdatesURL)s |
| 17 |
ArchitecturesInstallIn64BitMode=%(InnoArch)s |
| 18 |
ArchitecturesAllowed=%(InnoArch)s |
| 19 |
DefaultDirName={pf}\%(AppName)s |
| 20 |
DefaultGroupName=%(AppName)s |
| 21 |
LicenseFile=..\LICENSE.txt |
| 22 |
OutputDir=. |
| 23 |
OutputBaseFilename=%(AppName)s-%(AppVersion)s-Setup |
| 24 |
SetupIconFile=..\%(AppName)s\theme\icons\%(AppName)s.ico |
| 25 |
Compression=lzma/Max |
| 26 |
SolidCompression=true |
| 27 |
VersionInfoVersion=%(VersionInfoVersion)s |
| 28 |
VersionInfoDescription=%(AppName)s Setup |
| 29 |
VersionInfoTextVersion=%(VersionInfoTextVersion)s |
| 30 |
WizardImageFile=..\misc\media\install.bmp |
| 31 |
WizardSmallImageFile=..\misc\media\icon-install.bmp |
| 32 |
AppVersion=%(AppVersion)s |
| 33 |
UninstallDisplayName=%(AppName)s |
| 34 |
UninstallDisplayIcon={app}\%(AppName)s.exe |
| 35 |
AlwaysShowComponentsList=false |
| 36 |
ShowLanguageDialog=auto |
| 37 |
MinVersion=0,6.1.2600 |
| 38 |
;SignTool=sign.cmd |
| 39 |
;SignedUninstaller=yes |
| 40 |
|
| 41 |
[Languages] |
| 42 |
Name: english; MessagesFile: ..\misc\InnoSetup\v5\Default.isl; |
| 43 |
Name: french; MessagesFile: ..\misc\InnoSetup\v5\Languages\French.isl; |
| 44 |
Name: german; MessagesFile: ..\misc\InnoSetup\v5\Languages\German.isl; |
| 45 |
Name: italian; MessagesFile: ..\misc\InnoSetup\v5\Languages\Italian.isl; |
| 46 |
Name: spanish; MessagesFile: ..\misc\InnoSetup\v5\Languages\Spanish.isl; |
| 47 |
|
| 48 |
[Tasks] |
| 49 |
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked |
| 50 |
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked |
| 51 |
Name: calibrationloadinghandledbydisplaycal; Description: {cm:CalibrationLoadingHandledByDisplayCAL}; Flags: exclusive; GroupDescription: {cm:CalibrationLoading}; |
| 52 |
Name: calibrationloadinghandledbyos; Description: {cm:CalibrationLoadingHandledByOS}; Flags: exclusive unchecked; GroupDescription: {cm:CalibrationLoading}; MinVersion: 0,6.1.7600; |
| 53 |
|
| 54 |
[Files] |
| 55 |
Source: py2exe.%(Platform)s-py%(PythonVersion)s\%(AppName)s-%(AppVersion)s\*; DestDir: {app}; Flags: recursesubdirs replacesameversion; Excludes: \%(AppName)s.exe,\README.html,\README-fr.html; |
| 56 |
Source: py2exe.%(Platform)s-py%(PythonVersion)s\%(AppName)s-%(AppVersion)s\%(AppName)s.exe; DestDir: {app}; Flags: replacesameversion; |
| 57 |
Source: py2exe.%(Platform)s-py%(PythonVersion)s\%(AppName)s-%(AppVersion)s\README.html; DestDir: {app}; Flags: isreadme; |
| 58 |
Source: py2exe.%(Platform)s-py%(PythonVersion)s\%(AppName)s-%(AppVersion)s\README-fr.html; DestDir: {app}; Flags: isreadme; Languages: french |
| 59 |
;Source: ..\..\ccss\*.ccss; DestDir: {commonappdata}\ArgyllCMS; Flags: replacesameversion; |
| 60 |
|
| 61 |
[Icons] |
| 62 |
Name: {group}\%(AppName)s; Filename: {app}\%(AppName)s.exe; IconFilename: {app}\%(AppName)s.exe |
| 63 |
Name: "{group}\%(AppName)s Profile Loader"; Filename: {app}\%(AppName)s-apply-profiles.exe; IconFilename: {app}\%(AppName)s-apply-profiles.exe; |
| 64 |
Name: "{group}\3DLUT Maker"; Filename: {app}\%(AppName)s-3DLUT-maker.exe; IconFilename: {app}\%(AppName)s-3DLUT-maker.exe; |
| 65 |
Name: "{group}\Curve Viewer"; Filename: {app}\%(AppName)s-curve-viewer.exe; IconFilename: {app}\%(AppName)s-curve-viewer.exe; |
| 66 |
Name: "{group}\Profile Info"; Filename: {app}\%(AppName)s-profile-info.exe; IconFilename: {app}\%(AppName)s-profile-info.exe; |
| 67 |
Name: "{group}\Synthetic Profile Creator"; Filename: {app}\%(AppName)s-synthprofile.exe; IconFilename: {app}\%(AppName)s-synthprofile.exe; |
| 68 |
Name: "{group}\Scripting Client"; Filename: {app}\%(AppName)s-scripting-client.exe; IconFilename: {app}\%(AppName)s-scripting-client.exe; |
| 69 |
Name: "{group}\Testchart Editor"; Filename: {app}\%(AppName)s-testchart-editor.exe; IconFilename: {app}\%(AppName)s-testchart-editor.exe; |
| 70 |
Name: "{group}\VRML to X3D converter"; Filename: {app}\%(AppName)s-VRML-to-X3D-converter.exe; IconFilename: {app}\%(AppName)s-VRML-to-X3D-converter.exe; |
| 71 |
Name: {group}\{cm:UninstallProgram,%(AppName)s}; Filename: {uninstallexe}; IconFilename: {app}\theme\icons\%(AppName)s-uninstall.ico; Tasks: ; Languages: |
| 72 |
Name: {commondesktop}\%(AppName)s; Filename: {app}\%(AppName)s.exe; Tasks: desktopicon; IconFilename: {app}\%(AppName)s.exe |
| 73 |
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\%(AppName)s; Filename: {app}\%(AppName)s.exe; Tasks: quicklaunchicon; IconFilename: {app}\%(AppName)s.exe |
| 74 |
Name: {group}\LICENSE; Filename: {app}\LICENSE.txt |
| 75 |
Name: {group}\README (EN); Filename: {app}\README.html; Tasks: ; Languages: |
| 76 |
Name: {group}\README (FR); Filename: {app}\README-fr.html; Tasks: ; Languages: french |
| 77 |
Name: "{commonstartup}\%(AppName)s Profile Loader"; Filename: {app}\%(AppName)s-apply-profiles.exe; OnlyBelowVersion: 0,6.0; Tasks: calibrationloadinghandledbydisplaycal; |
| 78 |
|
| 79 |
[Run] |
| 80 |
Filename: {app}\%(AppName)s.exe; Description: {cm:LaunchProgram,%(AppName)s}; Flags: nowait postinstall skipifsilent; |
| 81 |
MinVersion: 0,6.1.7600; Filename: {app}\lib\python.exe; Parameters: "-S -c ""import sys; sys.path.insert(0, '\\'.join(sys.executable.replace('/', '\\').split('\\')[:-1]) + '\\library.zip'); from %(AppName)s import util_win; None if not util_win.calibration_management_isenabled() else util_win.disable_calibration_management();"""; Flags: RunHidden RunAsCurrentUser; Description: {cm:CalibrationLoadingHandledByDisplayCAL}; Tasks: calibrationloadinghandledbydisplaycal; |
| 82 |
MinVersion: 0,6.0; Filename: schtasks.exe; parameters: "/Delete /TN ""%(AppName)s Profile Loader Launcher"" /F"; Flags: RunHidden RunAsCurrentUser; |
| 83 |
MinVersion: 0,6.0; Filename: schtasks.exe; parameters: "/Delete /TN ""%(AppName)s Profile Loader Launcher - Daily Restart"" /F"; Flags: RunHidden RunAsCurrentUser; |
| 84 |
MinVersion: 0,6.0; Filename: {app}\lib\python.exe; Parameters: "-S -c ""import sys; sys.path.insert(0, '\\'.join(sys.executable.replace('/', '\\').split('\\')[:-1]) + '\\library.zip'); from %(AppName)s.util_str import safe_unicode; from %(AppName)s.profile_loader import setup_profile_loader_task; setup_profile_loader_task(safe_unicode(r'{app}\%(AppName)s-apply-profiles.exe'), safe_unicode(r'{app}'), safe_unicode(r'{app}'))"""; Flags: RunHidden RunAsCurrentUser; Tasks: calibrationloadinghandledbydisplaycal; |
| 85 |
Filename: {app}\%(AppName)s-apply-profiles.exe; Flags: nowait runasoriginaluser; Tasks: calibrationloadinghandledbydisplaycal; |
| 86 |
MinVersion: 0,6.1.7600; Filename: {app}\lib\python.exe; Parameters: "-S -c ""import sys; sys.path.insert(0, '\\'.join(sys.executable.replace('/', '\\').split('\\')[:-1]) + '\\library.zip'); from %(AppName)s import util_win; None if util_win.calibration_management_isenabled() else util_win.enable_calibration_management();"""; Flags: RunHidden RunAsCurrentUser; Description: {cm:CalibrationLoadingHandledByOS}; Tasks: calibrationloadinghandledbyos; |
| 87 |
|
| 88 |
[InstallDelete] |
| 89 |
Type: files; Name: "{commonstartup}\dispcalGUI Profile Loader.lnk" |
| 90 |
Type: files; Name: "{group}\*dispcalGUI*" |
| 91 |
Type: files; Name: "{app}\dispcalGUI*.exe" |
| 92 |
Type: files; Name: "{app}\lib\dispcalGUI*" |
| 93 |
Type: files; Name: "{app}\screenshots\dispcalGUI*.png" |
| 94 |
Type: files; Name: "{app}\theme\dispcalGUI*.png" |
| 95 |
Type: files; Name: "{app}\theme\icons\dispcalGUI*.ico" |
| 96 |
Type: files; Name: "{app}\theme\icons\16x16\dispcalGUI*.png" |
| 97 |
Type: files; Name: "{app}\theme\icons\32x32\dispcalGUI*.png" |
| 98 |
Type: files; Name: "{userstartup}\%(AppName)s Profile Loader.lnk" |
| 99 |
Type: files; Name: "{commonstartup}\%(AppName)s Profile Loader.lnk" |
| 100 |
Type: filesandordirs; Name: "{userprograms}\{groupname}" |
| 101 |
Type: filesandordirs; Name: "{commonprograms}\{groupname}" |
| 102 |
|
| 103 |
[UninstallDelete] |
| 104 |
Type: filesandordirs; Name: "{app}\usb_driver" |
| 105 |
Type: dirifempty; Name: "{app}" |
| 106 |
Type: dirifempty; Name: "{commonappdata}\ArgyllCMS" |
| 107 |
Type: files; Name: "{userstartup}\%(AppName)s Profile Loader.lnk" |
| 108 |
Type: files; Name: "{commonstartup}\%(AppName)s Profile Loader.lnk" |
| 109 |
Type: filesandordirs; Name: "{userprograms}\{groupname}" |
| 110 |
Type: filesandordirs; Name: "{commonprograms}\{groupname}" |
| 111 |
|
| 112 |
[UninstallRun] |
| 113 |
MinVersion: 0,6.0; Filename: schtasks.exe; parameters: "/Delete /TN ""%(AppName)s Profile Loader Launcher"" /F"; Flags: RunHidden RunAsCurrentUser; |
| 114 |
MinVersion: 0,6.0; Filename: schtasks.exe; parameters: "/Delete /TN ""%(AppName)s Profile Loader Launcher - Daily Restart"" /F"; Flags: RunHidden RunAsCurrentUser; |
| 115 |
|
| 116 |
[Code] |
| 117 |
function Get_RunEntryShellExec_Message(Value: string): string; |
| 118 |
begin |
| 119 |
Result := FmtMessage(SetupMessage(msgRunEntryShellExec), [Value]); |
| 120 |
end; |
| 121 |
|
| 122 |
function Get_UninstallString(AppId: string): string; |
| 123 |
var |
| 124 |
UninstallString: string; |
| 125 |
begin |
| 126 |
if not RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + AppId + '_is1', 'UninstallString', UninstallString) and |
| 127 |
not RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\' + AppId + '_is1', 'UninstallString', UninstallString) and |
| 128 |
not RegQueryStringValue(HKCU, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + AppId + '_is1', 'UninstallString', UninstallString) then |
| 129 |
RegQueryStringValue(HKCU, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\' + AppId + '_is1', 'UninstallString', UninstallString); |
| 130 |
Result := RemoveQuotes(UninstallString); |
| 131 |
end; |
| 132 |
|
| 133 |
procedure CurStepChanged(CurStep: TSetupStep); |
| 134 |
var |
| 135 |
ErrorCode: integer; |
| 136 |
UninstallString: string; |
| 137 |
begin |
| 138 |
if CurStep=ssInstall then begin |
| 139 |
UninstallString := Get_UninstallString(ExpandConstant('{#emit SetupSetting("AppId")}')); |
| 140 |
if UninstallString <> '' then begin |
| 141 |
if not Exec(UninstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode) then begin |
| 142 |
SuppressibleMsgBox(SysErrorMessage(ErrorCode), mbError, MB_OK, MB_OK); |
| 143 |
end; |
| 144 |
end; |
| 145 |
end; |
| 146 |
end; |
| 147 |
|
| 148 |
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); |
| 149 |
var |
| 150 |
ErrorCode: integer; |
| 151 |
begin |
| 152 |
if CurUninstallStep=usUninstall then begin |
| 153 |
if Exec(ExpandConstant('{sys}\taskkill.exe'), '/im %(AppName)s-apply-profiles.exe', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then begin |
| 154 |
if ErrorCode=0 then begin |
| 155 |
Sleep(2000); |
| 156 |
end; |
| 157 |
end; |
| 158 |
end; |
| 159 |
end; |