; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! [Setup] ; NOTE: The value of AppId uniquely identifies this application. ; Do not use the same AppId value in installers for other applications. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) AppId={{7AB4E8F1-614D-406F-A293-3A3D9C6E6917} AppName=Scol Windows Pack AppVersion=1.12.0 AppVerName=Scol Windows Pack 1.12.0 AppPublisher=I-maginer AppPublisherURL=https://www.openspace3d.com AppSupportURL=https://www.openspace3d.com AppUpdatesURL=https://www.openspace3d.com DefaultDirName={code:GetScolInstallDir} DefaultGroupName=Scol Voy@ger OutputDir=release OutputBaseFilename=scol_windows SetupIconFile=../../install_scol_voyager/scol.ico Compression=lzma SolidCompression=true UninstallDisplayIcon={app}\scol.ico InternalCompressLevel=max VersionInfoVersion=1.12.0 VersionInfoCompany=I-maginer VersionInfoDescription=Scol Windows Pack for OpenSpace3D VersionInfoCopyright=I-maginer 2023 MinVersion=0,5.01.2600 AppCopyright=I-maginer 2023 DisableProgramGroupPage=true CreateAppDir=true DisableDirPage=true UsePreviousAppDir=false SignTool=i-maginer ;sign setup i-maginer "C:\Program Files (x86)\Windows Kits\8.1\bin\x86\signtool" sign /a /t http://timestamp.globalsign.com/scripts/timestamp.dll $f [Languages] Name: english; MessagesFile: compiler:Default.isl Name: french; MessagesFile: compiler:Languages\French.isl [Tasks] [Files] Source: "..\..\..\scol_sdk\bin\windows\x86\*"; DestDir: "{app}\windows\x86"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: ".svn, *.pdb, *.tmp, *.ilk, *.exp" Source: "..\..\..\scol_sdk\bin\windows\x64\*"; DestDir: "{app}\windows\x64"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: ".svn, *.pdb, *.tmp, *.ilk, *.exp" Source: "..\..\..\scol_sdk\bin\windows\Ogre_Redist\*"; DestDir: "{app}\windows\ogre_redist"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: ".svn" Source: "..\..\..\scol_sdk\bin\windows\btdata\*"; DestDir: "{app}\windows\btdata"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: ".svn" Source: "..\..\..\scol_sdk\bin\windows\cefres\*"; DestDir: "{app}\windows\cefres"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: ".svn" [Icons] Name: {group}\{cm:UninstallProgram,Windows Pack}; Filename: {uninstallexe} [Run] [CustomMessages] french.NoScolInstalled=L'installation de Scol Voy@ger n'a pas été trouvée. Installez le Scol Voy@ger depuis www.scolring.org puis réessayez. english.NoScolInstalled=The Scol Voy@ger installation can not be found. Install the Scol Voy@ger from www.scolring.org and retry. french.BadScolInstalled=La version trouvée du Scol Voy@ger est obselète. Installez la dernière version du Scol Voy@ger depuis www.scolring.org puis réessayez. english.BadScolInstalled=You must install the last version of Scol Voy@ger from www.scolring.org. [Code] #include "../../common/common_type.iss" var InternalMsgs: array of TInternalMsg; var NeedVoyager: Boolean; var ScolUserPartition: String; var ScolLockedPartition: String; var ScolDir: String; #include "../../common/common_code.iss" function VoyagerIsNeeded(): Boolean; begin Result := NeedVoyager; end; function GetScolUserDir(Default: String): String; begin Result := ScolUserPartition; end; function GetScolLockedDir(Default: String): String; begin Result := ScolLockedPartition; end; function GetVoyagerDir(): String; begin Result := ScolDir; end; /////////////////////////////// // Scol install directory function GetScolInstallDir(Default: String): String; var UsmIni: String; UsmFile: String; ArrUsmIni: array of String; Value: String; begin Value := GetScolDir(ExpandConstant('{pf}') + '\Scol Voyager'); if (CheckScolVer(Value) = False) then begin NeedVoyager := True; end else begin NeedVoyager := False; end; ScolDir := Value; ScolUserPartition := GetScolUserPartitionDir(Value, ExpandConstant('{userdocs}') + '\OpenSpace3D'); ScolLockedPartition := GetScolLockedPartitionDir(Value, Value + '\Partition_LockedApp'); Result := Value; end; var ResultCode: Integer; procedure CurStepChanged(CurStep: TSetupStep); var Uninstall: String; begin if (CurStep = ssInstall) then begin if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{7AB4E8F1-614D-406F-A293-3A3D9C6E6917}_is1', 'UninstallString', Uninstall) then begin Exec(RemoveQuotes(Uninstall), ' /SILENT', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode); end; end end; procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin //if (CurUninstallStep = usUninstall) then end; procedure InitializeWizard(); begin if NeedVoyager = True then begin MsgBox(ExpandConstant('{cm:NoScolInstalled}'), mbInformation, MB_OK); Abort; end; end;