; 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={{7AA590AB-748B-4C44-A192-A88297BB383C} AppName=OpenSpace3D Editor AppVerName=OpenSpace3D Editor 0.2.6 (alpha) AppPublisher=I-maginer AppPublisherURL=http://www.openspace3d.com AppSupportURL=http://www.openspace3d.com AppUpdatesURL=http://www.openspace3d.com DefaultDirName={code:GetScolInstallDir} DefaultGroupName=OpenSpace3D OutputDir=release OutputBaseFilename=openspace3d_editor_setup SetupIconFile=..\..\scol_applications\openspace3d\os3deditor\os3deditor.ico Compression=lzma SolidCompression=true UninstallDisplayIcon={app}\scol.ico InternalCompressLevel=max VersionInfoVersion=0.2.6 VersionInfoCompany=I-maginer VersionInfoDescription=OpenSpace3D Editor VersionInfoCopyright=I-maginer 2011 MinVersion=0,5.01.2600 AppCopyright=I-maginer 2011 DisableProgramGroupPage=false CreateAppDir=true DisableDirPage=true UsePreviousAppDir=false [Languages] Name: english; MessagesFile: compiler:Default.isl Name: french; MessagesFile: compiler:Languages\French.isl [Tasks] Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons} Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked [Files] Source: ..\..\scol_applications\openspace3d\os3deditor\*; DestDir: {code:GetScolLockedDir}\tools\os3deditor; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn,*.log,*.psd,*.max,*.docx,guide_OpenSpace3D_*.pdf Source: ..\..\scol_applications\openspace3d\os3dplayer\*; DestDir: {code:GetScolLockedDir}\tools\os3dplayer; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn,*.log,*.psd,*.max,*.docx Source: ..\..\scol_applications\openspace3d\os3dlib\*; DestDir: {code:GetScolLockedDir}\tools\os3dlib; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn,*.log,*.psd,*.max Source: ..\..\scol_applications\openspace3d\os3dplugins\*; DestDir: {code:GetScolLockedDir}\tools\os3dplugins; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn,*.log,anr,studec,gametools,epoc,eyetracking,fusion,respirationbelt,glove,nonin,vlc,avatar,materialreflection,domotic,kinect*,webNavigator Source: ..\..\scol_applications\openspace3d\demos\*; DestDir: {code:GetScolUserDir}\demos; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn,*.log,kinectdemo Source: ..\..\scol_applications\openspace3d\examples\*; DestDir: {code:GetScolUserDir}\examples; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: .svn,*.log [Icons] Name: {group}\OpenSpace3D Editor; Filename: {code:GetScolLockedDir}\tools\os3deditor\os3deditor.scol; IconIndex: 0; IconFilename: {code:GetScolLockedDir}\tools\os3deditor\os3deditor.ico Name: {group}\OpenSpace3D Player; Filename: {code:GetScolLockedDir}\tools\os3dplayer\os3dplayer.scol; IconIndex: 0; IconFilename: {code:GetScolLockedDir}\tools\os3deditor\os3deditor.ico Name: {group}\Demos\Kid Kitchen Demo; Filename: {code:GetScolUserDir}\demos\kidkitchen\kidkitchen.scol; IconIndex: 0 Name: {group}\Demos\Car Showroom Demo; Filename: {code:GetScolUserDir}\demos\car_showroom\car_showroom.scol; IconIndex: 0 Name: {group}\Demos\Scene 3D Demo; Filename: {code:GetScolUserDir}\demos\scene3d\scene3d.scol; IconIndex: 0 Name: {group}\Demos\NeuroSky Demo; Filename: {code:GetScolUserDir}\demos\neurosky\neurosky.scol; IconIndex: 0 Name: {group}\Demos\Tutorial Demo; Filename: {code:GetScolUserDir}\demos\tutorial\tutorial.scol; IconIndex: 0 Name: {group}\GPL licence; Filename: {code:GetScolLockedDir}\tools\os3deditor\COPYING.txt Name: {group}\LGPL licence; Filename: {code:GetScolLockedDir}\tools\os3deditor\COPYING.LESSER.txt Name: {group}\{cm:ProgramOnTheWeb,OpenSpace3D}; Filename: http://www.openspace3d.com Name: {group}\{cm:UninstallProgram,OpenSpace3D Editor}; Filename: {uninstallexe} Name: {commondesktop}\OpenSpace3D Editor; Filename: {code:GetScolLockedDir}\tools\os3deditor\os3deditor.scol; IconFilename: {code:GetScolLockedDir}\tools\os3deditor\os3deditor.ico; IconIndex: 0; Tasks: desktopicon Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\OpenSpace3D Editor; Filename: {code:GetScolLockedDir}\tools\os3deditor\os3deditor.scol; IconFilename: {code:GetScolLockedDir}\tools\os3deditor\os3deditor.ico; Tasks: quicklaunchicon Name: {group}\Documentation\OgreMax 01-Réglages; Filename: {code:GetScolLockedDir}\tools\os3deditor\documentation\OgreMax 01-Réglages.pdf; Languages: french Name: {group}\Documentation\OgreMax 02-Materiaux; Filename: {code:GetScolLockedDir}\tools\os3deditor\documentation\OgreMax 02-Materiaux.pdf; Languages: french Name: {group}\Documentation\OgreMax 03-Définitions; Filename: {code:GetScolLockedDir}\tools\os3deditor\documentation\OgreMax 03-Définitions.pdf; Languages: french Name: {group}\Documentation\OgreMax 04-Exemples; Filename: {code:GetScolLockedDir}\tools\os3deditor\documentation\OgreMax 04-Exemples.pdf; Languages: french Name: {group}\Documentation\OgreMax Settings; Filename: {code:GetScolLockedDir}\tools\os3deditor\documentation\OgreMax Settings.pdf; Languages: english Name: {group}\Documentation\{cm:ProgramOnTheWeb,Online documentation}; Filename: http://www.openspace3d.com/documentation/; Tasks: ; Languages: Name: {group}\examples; Filename: {code:GetScolUserDir}\examples\; WorkingDir: {code:GetScolUserDir}\examples\; Languages: english Name: {group}\exemples; Filename: {code:GetScolUserDir}\examples\; WorkingDir: {code:GetScolUserDir}\examples\; Languages: french [Run] Filename: {tmp}\scolplug.exe; Parameters: /VERYSILENT; Check: VoyagerIsNeeded; StatusMsg: Installing Scol Voy@ger... [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','') #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}') + '\Scol Voyager\Partition_LocalUsr'); 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 // 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\{7AA590AB-748B-4C44-A192-A88297BB383C}_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 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 ITD_Init(); ITD_AddFile('http://www.scolring.org/rsc/scol_plugin.exe', ExpandConstant('{tmp}\scolplug.exe')); ITD_AddMirror('http://www.openspace3d.com/rsc/scol_plugin.exe', ExpandConstant('{tmp}\scolplug.exe')); ITD_DownloadAfter(wpReady); end; end;