; 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={{E2D7B543-D5B9-4C86-834D-9B718E26369D} AppName=OpenNI (Kinect) plugin for Scol AppVersion=2.7.0 AppVerName=OpenNI (Kinect) plugin 2.7.0 for Scol AppPublisher=I-Maginer AppPublisherURL=https://www.openspace3d.com AppSupportURL=https://www.openspace3d.com AppUpdatesURL=https://www.openspace3d.com DefaultDirName={code:GetScolInstallDir} DefaultGroupName=OpenSpace3D OutputDir=release OutputBaseFilename=scol_kinect SetupIconFile=../../install_scol_voyager/scol.ico Compression=lzma/Max SolidCompression=true InternalCompressLevel=Max VersionInfoVersion=2.7.0 VersionInfoCompany=I-Maginer VersionInfoDescription=Kinect plugin for Scol VersionInfoCopyright=I-Maginer 2023 MinVersion=0,5.01.2600 AppCopyright=I-Maginer 2023 UsePreviousAppDir=false AppendDefaultGroupName=true InfoBeforeFile= AlwaysRestart=true 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] ; download Source: "..\..\common\isxdlfiles\isxdl.dll"; Flags: dontcopy ; NOTE: Don't use "Flags: ignoreversion" on any shared system files Source: redist\*; DestDir: {tmp}\kinect_redist\; Flags: ignoreversion Source: ..\..\..\scol_sdk\x86\bin\Release\Plugins\OpenNiSCOL.dll; DestDir: {app}\Plugins; Flags: ignoreversion Source: ..\..\..\scol_sdk\x86\bin\Release\OpenNI2.dll; DestDir: {app}; Flags: ignoreversion Source: ..\..\..\scol_sdk\x86\bin\Release\OpenNI.ini; DestDir: {app}; Flags: ignoreversion Source: ..\..\..\scol_sdk\x86\bin\Release\Plugins\OpenNI2\*; DestDir: {app}\Plugins\OpenNI2; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn *.pdb Source: ..\..\..\scol_sdk\x86\bin\Release\NiTE2.dll; DestDir: {app}; Flags: ignoreversion Source: ..\..\..\scol_sdk\x86\bin\Release\NiTE.ini; DestDir: {app}; Flags: ignoreversion Source: ..\..\..\scol_sdk\x86\bin\Release\Plugins\NiTE2\*; DestDir: {app}\Plugins\NiTE2; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn *.pdb Source: ..\..\..\scol_applications\openspace3d\os3dplugins\input\kinectdevice\*; DestDir: {code:GetScolLockedDir}\tools\os3dplugins\input\kinectdevice; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn Source: ..\..\..\scol_applications\openspace3d\os3dplugins\input\kinectuser\*; DestDir: {code:GetScolLockedDir}\tools\os3dplugins\input\kinectuser; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn Source: ..\..\..\scol_applications\openspace3d\demos\kinectdemo\*; DestDir: {code:GetScolUserDir}\demos\kinectdemo; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn [Icons] Name: {group}\Demos\K'Andy nect; Filename: {code:GetScolUserDir}\demos\kinectdemo\kandynect.scol; IconIndex: 0 Name: {group}\Demos\Kinect skeleton; Filename: {code:GetScolUserDir}\demos\kinectdemo\skeleton.scol; IconIndex: 0 Name: {group}\Demos\Kinect control; Filename: {code:GetScolUserDir}\demos\kinectdemo\kinect_control.scol; IconIndex: 0 Name: {group}\Demos\Kinect Hand AR; Filename: {code:GetScolUserDir}\demos\kinectdemo\kinect_hand_ar.scol; IconIndex: 0 Name: Scol Voy@ger\{cm:UninstallProgram,Kinect plugin}; Filename: {uninstallexe} [Run] Filename: {tmp}\scolplug.exe; Parameters: /VERYSILENT; Check: VoyagerIsNeeded; StatusMsg: Installing Scol Voy@ger... Filename: {tmp}\kinect_redist\KinectRuntime-v1.8-Setup.exe; StatusMsg: Installing Microsoft Kinect redist... [Registry] [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] //use http://www.sherlocksoftware.org/page.php?id=51 for http download //#include ReadReg(HKEY_LOCAL_MACHINE,'Software\Sherlock Software\InnoTools\Downloader','ScriptPath','') var FilesDownloaded: Boolean; procedure isxdl_AddFile(URL, Filename: AnsiString); external 'isxdl_AddFile@files:isxdl.dll stdcall'; function isxdl_DownloadFiles(hWnd: Integer): Integer; external 'isxdl_DownloadFiles@files:isxdl.dll stdcall'; function isxdl_SetOption(Option, Value: AnsiString): Integer; external 'isxdl_SetOption@files:isxdl.dll stdcall'; #include "../../common/common_type.iss" var InternalMsgs: array of TInternalMsg; var NeedVoyager: Boolean; var ScolUserPartition: String; var ScolLockedPartition: 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; /////////////////////////////// // Scol install directory function GetScolInstallDir(Default: String): String; var Value: String; begin Value := GetScolDir(ExpandConstant('{pf}') + '\Scol Voyager'); if (CheckScolVer(Value) = False) then begin NeedVoyager := True; end else begin NeedVoyager := False; end; 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; UsmIni: String; UsmFile: String; ArrUsmIni: array of String; hWnd: Integer; begin if (CurStep = ssInstall) then begin // Kill Scol Voyager and wait for it to terminate if Exec(ExpandConstant('tskill'), 'scol', '', SW_HIDE, ewNoWait, ResultCode) OR Exec(ExpandConstant('taskkill'), '/IM ' + GetScolExe() + ' /F', '', SW_HIDE, ewNoWait, ResultCode) then begin // handle success if necessary; ResultCode contains the exit code //MsgBox('ok', mbInformation, MB_OK); end else begin // handle failure if necessary; ResultCode contains the error code //MsgBox('pas ok', mbInformation, MB_OK); end; if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{E2D7B543-D5B9-4C86-834D-9B718E26369D}_is1', 'UninstallString', Uninstall) then begin Exec(RemoveQuotes(Uninstall), ' /SILENT', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode); end; if NeedVoyager = True then begin hWnd := StrToInt(ExpandConstant('{wizardhwnd}')); if isxdl_DownloadFiles(hWnd) <> 0 then begin FilesDownloaded := True end else begin SuppressibleMsgBox('Setup could not download the extra files. Try again later or download and install the extra files manually.' + #13#13 + 'Setup will now continue installing normally.', mbError, mb_Ok, idOk); end; end; end else begin if (CurStep = ssDone) then begin UsmFile := ExpandConstant('{app}\usm.ini'); // update usm.ini LoadStringFromFile(UsmFile, UsmIni); if FileExists (UsmFile)= true then begin FileCopy (UsmFile, ExpandConstant('{app}\usm.bak'), false); end; // load file in array SetArrayLength(ArrUsmIni, 0); Strings2Array(UsmIni, ArrUsmIni); if InstallPluginDll(ArrUsmIni, 'OpenNiSCOL.dll', '') then begin SaveStringsToFile(UsmFile, ArrUsmIni, false); //MsgBox(UsmFile, mbInformation, MB_OK); end else begin //MsgBox('KO', mbInformation, MB_OK); end; end; end; end; procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin if (CurUninstallStep = usUninstall) then begin // Kill Scol Voyager and wait for it to terminate if Exec(ExpandConstant('tskill'), 'scol', '', SW_HIDE, ewNoWait, ResultCode) OR Exec(ExpandConstant('taskkill'), '/IM ' + GetScolExe() + ' /F', '', SW_HIDE, ewNoWait, ResultCode) then begin // handle success if necessary; ResultCode contains the exit code //MsgBox('ok', mbInformation, MB_OK); end else begin // handle failure if necessary; ResultCode contains the error code //MsgBox('pas ok', mbInformation, MB_OK); end; end; end; procedure InitializeWizard(); begin if NeedVoyager = True then begin MsgBox(ExpandConstant('{cm:NoScolInstalled}'), mbInformation, MB_OK); Abort; end; end;