| 1 | ; Script generated by the Inno Setup Script Wizard. |
|---|
| 2 | |
|---|
| 3 | #define MyAppName "Logtalk" |
|---|
| 4 | #define MyAppVerName "Logtalk 2.35.0" |
|---|
| 5 | #define MyAppPublisher "Logtalk.org" |
|---|
| 6 | #define MyAppURL "http://logtalk.org" |
|---|
| 7 | #define MyAppUrlName "Logtalk Web Site.url" |
|---|
| 8 | #define MyAppRegURL "http://logtalk.org/regform.html" |
|---|
| 9 | #define MyAppRegUrlName "Logtalk Registration.url" |
|---|
| 10 | |
|---|
| 11 | #define LOGTALKHOME "{reg:HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment,LOGTALKHOME|{pf}\Logtalk}" |
|---|
| 12 | #define LOGTALKUSER "{reg:HKCU\Environment,LOGTALKUSER|{userdocs}\Logtalk}" |
|---|
| 13 | |
|---|
| 14 | #define MyBaseDir "C:\lgtsvn" |
|---|
| 15 | |
|---|
| 16 | [Setup] |
|---|
| 17 | AppName={#MyAppName} |
|---|
| 18 | AppVerName={#MyAppVerName} |
|---|
| 19 | AppPublisher={#MyAppPublisher} |
|---|
| 20 | AppPublisherURL={#MyAppURL} |
|---|
| 21 | AppSupportURL={#MyAppURL} |
|---|
| 22 | AppUpdatesURL={#MyAppURL} |
|---|
| 23 | ChangesEnvironment=yes |
|---|
| 24 | DefaultDirName={#LOGTALKHOME} |
|---|
| 25 | DefaultGroupName={#MyAppName} |
|---|
| 26 | DisableProgramGroupPage=yes |
|---|
| 27 | LicenseFile={#MyBaseDir}\LICENSE.txt |
|---|
| 28 | InfoBeforeFile={#MyBaseDir}\README.txt |
|---|
| 29 | OutputBaseFilename=lgt2350 |
|---|
| 30 | Compression=lzma |
|---|
| 31 | SolidCompression=yes |
|---|
| 32 | PrivilegesRequired=none |
|---|
| 33 | |
|---|
| 34 | VersionInfoVersion=2.35.0 |
|---|
| 35 | VersionInfoCopyright=© Paulo Moura, 1998-2009 |
|---|
| 36 | |
|---|
| 37 | AllowRootDirectory=yes |
|---|
| 38 | UninstallFilesDir="{userdocs}\Logtalk uninstaller" |
|---|
| 39 | |
|---|
| 40 | MinVersion=0,5.0 |
|---|
| 41 | |
|---|
| 42 | [Types] |
|---|
| 43 | Name: "full"; Description: "Full installation (recommended)" |
|---|
| 44 | Name: "base"; Description: "Base system installation" |
|---|
| 45 | Name: "user"; Description: "User data files installation (must be run by all end-users)" |
|---|
| 46 | Name: "prolog"; Description: "Prolog integration (see documentation for compatibility details)" |
|---|
| 47 | Name: "custom"; Description: "Custom installation"; Flags: iscustom |
|---|
| 48 | |
|---|
| 49 | [Components] |
|---|
| 50 | Name: "base"; Description: "Base system"; Types: full base custom; Flags: disablenouninstallwarning |
|---|
| 51 | Name: "user"; Description: "User data files"; Types: full user custom; Flags: checkablealone disablenouninstallwarning |
|---|
| 52 | Name: "user\backup"; Description: "Backup current user data files"; Types: full user custom; Flags: disablenouninstallwarning |
|---|
| 53 | Name: "prolog"; Description: "Prolog integration"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 54 | Name: "prolog\bp"; Description: "B-Prolog integration (version 7.1 or later)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 55 | Name: "prolog\ciao"; Description: "Ciao Prolog integration (version 1.10#5 or later)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 56 | Name: "prolog\cxprolog"; Description: "CxProlog integration (version 0.97.2 or later)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 57 | Name: "prolog\eclipse"; Description: "ECLiPSe integration (versions 5.10, 6.0)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 58 | Name: "prolog\gprolog"; Description: "GNU Prolog integration (version 1.3.0 or later)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 59 | Name: "prolog\plc"; Description: "K-Prolog integration (version 6.0.4)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 60 | Name: "prolog\quintus"; Description: "Quintus Prolog integration (version 3.5; implies patching Logtalk)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 61 | Name: "prolog\sicstus"; Description: "SICStus Prolog integration (versions 3.12.x, 4.0.x)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 62 | Name: "prolog\swi"; Description: "SWI-Prolog integration (version 5.6.44 or later)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 63 | Name: "prolog\xsb"; Description: "XSB integration (version 3.1 or later)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 64 | Name: "prolog\yap"; Description: "YAP integration (version 5.1.3 or later)"; Types: full prolog custom; Flags: disablenouninstallwarning |
|---|
| 65 | |
|---|
| 66 | [Tasks] |
|---|
| 67 | Name: registration; Description: "&Register {#MyAppName} (opens a web page; requires an Internet connection)"; Components: base user |
|---|
| 68 | Name: shortcut; Description: "&Create a desktop shortcut to the Logtalk user folder"; Components: user |
|---|
| 69 | |
|---|
| 70 | [Languages] |
|---|
| 71 | Name: "english"; MessagesFile: "compiler:Default.isl" |
|---|
| 72 | |
|---|
| 73 | [Messages] |
|---|
| 74 | BeveledLabel=Logtalk 2.35.0 © Paulo Moura, 1998-2009 |
|---|
| 75 | |
|---|
| 76 | [Dirs] |
|---|
| 77 | Name: {code:GetLgtUserDir}; Components: user; Flags: uninsneveruninstall |
|---|
| 78 | Name: "{userdocs}\Logtalk uninstaller" |
|---|
| 79 | |
|---|
| 80 | [Files] |
|---|
| 81 | Source: "{#MyBaseDir}\*"; Excludes: ".*,CVS"; DestDir: "{app}"; Components: base; Flags: ignoreversion recursesubdirs createallsubdirs |
|---|
| 82 | |
|---|
| 83 | Source: "{#MyBaseDir}\configs\*"; Excludes: ".*,CVS"; DestDir: "{code:GetLgtUserDir}\configs"; Components: user; Flags: ignoreversion recursesubdirs createallsubdirs uninsneveruninstall |
|---|
| 84 | Source: "{#MyBaseDir}\contributions\*"; Excludes: ".*,CVS"; DestDir: "{code:GetLgtUserDir}\contributions"; Components: user; Flags: ignoreversion recursesubdirs createallsubdirs uninsneveruninstall |
|---|
| 85 | Source: "{#MyBaseDir}\examples\*"; Excludes: ".*,CVS"; DestDir: "{code:GetLgtUserDir}\examples"; Components: user; Flags: ignoreversion recursesubdirs createallsubdirs uninsneveruninstall |
|---|
| 86 | Source: "{#MyBaseDir}\libpaths\*"; Excludes: ".*,CVS"; DestDir: "{code:GetLgtUserDir}\libpaths"; Components: user; Flags: ignoreversion recursesubdirs createallsubdirs uninsneveruninstall |
|---|
| 87 | Source: "{#MyBaseDir}\library\*"; Excludes: ".*,CVS"; DestDir: "{code:GetLgtUserDir}\library"; Components: user; Flags: ignoreversion recursesubdirs createallsubdirs uninsneveruninstall |
|---|
| 88 | Source: "{#MyBaseDir}\xml\*"; Excludes: ".*,CVS"; DestDir: "{code:GetLgtUserDir}\xml"; Components: user; Flags: ignoreversion recursesubdirs createallsubdirs uninsneveruninstall |
|---|
| 89 | |
|---|
| 90 | Source: "{#MyBaseDir}\VERSION.txt"; DestDir: "{code:GetLgtUserDir}"; DestName: "VERSION.txt"; Components: user; Flags: ignoreversion uninsneveruninstall |
|---|
| 91 | Source: "{#MyBaseDir}\configs\amzi.pl"; DestDir: "{code:GetLgtUserDir}\configs"; DestName: "amzi.pro"; Components: user; Flags: ignoreversion uninsneveruninstall |
|---|
| 92 | Source: "{#MyBaseDir}\libpaths\libpaths.pl"; DestDir: "{code:GetLgtUserDir}\libpaths"; DestName: "libpaths_no_env_var.pl"; Components: user; Flags: ignoreversion uninsneveruninstall |
|---|
| 93 | |
|---|
| 94 | Source: "{#MyBaseDir}\scripts\*.bat"; DestDir: "{win}"; Components: base; Flags: ignoreversion |
|---|
| 95 | Source: "{#MyBaseDir}\xml\*.bat"; DestDir: "{win}"; Components: base; Flags: ignoreversion |
|---|
| 96 | |
|---|
| 97 | [INI] |
|---|
| 98 | Filename: "{app}\{#MyAppUrlName}"; Section: "InternetShortcut"; Key: "URL"; String: "{#MyAppURL}"; Components: base |
|---|
| 99 | Filename: "{app}\{#MyAppRegUrlName}"; Section: "InternetShortcut"; Key: "URL"; String: "{#MyAppRegURL}"; Components: base |
|---|
| 100 | |
|---|
| 101 | [Icons] |
|---|
| 102 | Name: "{group}\Bibliography"; Filename: "{app}\BIBLIOGRAPHY.bib"; Components: base |
|---|
| 103 | Name: "{group}\Documentation"; Filename: "{app}\manuals\index.html"; Components: base |
|---|
| 104 | Name: "{group}\License"; Filename: "{app}\LICENSE.txt"; Components: base |
|---|
| 105 | Name: "{group}\Release Notes"; Filename: "{app}\RELEASE_NOTES.txt"; Components: base |
|---|
| 106 | Name: "{group}\Read Me"; Filename: "{app}\README.txt"; Components: base |
|---|
| 107 | Name: "{group}\Customization instructions"; Filename: "{app}\CUSTOMIZE.txt"; Components: base |
|---|
| 108 | |
|---|
| 109 | Name: "{group}\Web Site"; Filename: "{#MyAppUrl}"; Components: base |
|---|
| 110 | |
|---|
| 111 | Name: "{group}\Logtalk - B-Prolog"; Filename: "{code:GetBPExePath}"; Parameters: "-g ""consult('$LOGTALKHOME/integration/logtalk_bp.pl'), $bp_top_level"""; Comment: "Runs Logtalk with B-Prolog"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\bp; Flags: createonlyiffileexists |
|---|
| 112 | |
|---|
| 113 | Name: "{group}\Logtalk - Ciao Prolog"; Filename: "{code:GetCiaoExePath}"; Parameters: "-l ""$LOGTALKHOME/integration/logtalk_ciao.pl"""; Comment: "Runs Logtalk with Ciao Prolog"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\ciao; Flags: createonlyiffileexists |
|---|
| 114 | |
|---|
| 115 | Name: "{group}\Logtalk - CxProlog"; Filename: "{code:GetCxExePath}"; Parameters: "--goal ""silent_consult('%LOGTALKHOME%/integration/logtalk_cx.pl')"""; Comment: "Runs Logtalk with CxProlog"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\cxprolog; Flags: createonlyiffileexists |
|---|
| 116 | |
|---|
| 117 | Name: "{group}\Logtalk - ECLiPSe 5.10"; Filename: "{code:GetEclipse5ExePath}"; Parameters: "-b ""%LOGTALKHOME%\integration\logtalk_eclipse5.pl"""; Comment: "Runs Logtalk with ECLiPSe 5.10"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\eclipse; Flags: createonlyiffileexists |
|---|
| 118 | |
|---|
| 119 | Name: "{group}\Logtalk - ECLiPSe 6.0"; Filename: "{code:GetEclipse6ExePath}"; Parameters: "-b ""%LOGTALKHOME%\integration\logtalk_eclipse6.pl"""; Comment: "Runs Logtalk with ECLiPSe 6.0"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\eclipse; Flags: createonlyiffileexists |
|---|
| 120 | |
|---|
| 121 | Name: "{group}\Logtalk - GNU Prolog"; Filename: "{code:GetGPExePath}"; Parameters: "--init-goal ""['$LOGTALKUSER/configs/gnu.pl', '$LOGTALKHOME/integration/logtalk_gp.pl', '$LOGTALKUSER/libpaths/libpaths.pl']"""; Comment: "Runs Logtalk with GNU Prolog"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\gprolog; Flags: createonlyiffileexists |
|---|
| 122 | |
|---|
| 123 | Name: "{group}\Logtalk - K-Prolog"; Filename: "{code:GetKPExePath}"; Parameters: "-h 4096k -l 2048k -g 4096k -e ""(consult('$LOGTALKHOME/integration/logtalk_plc6.pl'), '$root')."""; Comment: "Runs Logtalk with K-Prolog"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\plc; Flags: createonlyiffileexists |
|---|
| 124 | |
|---|
| 125 | Name: "{group}\Logtalk - Quintus Prolog"; Filename: "{code:GetQuintusExePath}"; Parameters: "+l ""%LOGTALKHOME%\integration\logtalk_quintus.pl"" +z ""%LOGTALKHOME%"" ""%LOGTALKUSER%"""; Comment: "Runs Logtalk with Quintus Prolog"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\quintus; Flags: createonlyiffileexists |
|---|
| 126 | |
|---|
| 127 | Name: "{group}\Logtalk - SICStus Prolog 3.12"; Filename: "{code:GetSP3ExePath}"; Parameters: "-l ""%LOGTALKHOME%\integration\logtalk_sicstus3.pl"""; Comment: "Runs Logtalk with SICStus Prolog 3.12"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\sicstus; Flags: createonlyiffileexists |
|---|
| 128 | |
|---|
| 129 | Name: "{group}\Logtalk - SICStus Prolog 4.0"; Filename: "{code:GetSP4ExePath}"; Parameters: "-l ""%LOGTALKHOME%\integration\logtalk_sicstus4.pl"""; Comment: "Runs Logtalk with SICStus Prolog 4.0"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\sicstus; Flags: createonlyiffileexists |
|---|
| 130 | |
|---|
| 131 | Name: "{group}\Logtalk - SWI-Prolog"; Filename: "{code:GetSWIExePath}"; Parameters: "-f ""%LOGTALKHOME%\integration\logtalk_swi.pl"""; Comment: "Runs Logtalk with SWI-Prolog"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\swi; Flags: createonlyiffileexists |
|---|
| 132 | |
|---|
| 133 | Name: "{group}\Logtalk - XSB"; Filename: "C:\XSB\config\x86-pc-windows\bin\xsb.exe"; Parameters: "-l -e ""['%LOGTALKUSER%\\configs\\xsb.pl', '%LOGTALKHOME%\\compiler\\logtalk.pl', '%LOGTALKUSER%\\libpaths\\libpaths.pl']."""; Comment: "Runs Logtalk with XSB"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\xsb; Flags: createonlyiffileexists |
|---|
| 134 | |
|---|
| 135 | Name: "{group}\Logtalk - XSB-MT"; Filename: "C:\XSB\config\i686-pc-cygwin-mt\bin\xsb.exe"; Parameters: "--shared_predicates -l -e ""['%LOGTALKUSER%\\configs\\xsb.pl', '%LOGTALKHOME%\\compiler\\logtalk.pl', '%LOGTALKUSER%\\libpaths\\libpaths.pl']."""; Comment: "Runs Logtalk with XSB-MT"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\xsb; Flags: createonlyiffileexists |
|---|
| 136 | |
|---|
| 137 | Name: "{group}\Logtalk - YAP"; Filename: "{code:GetYAPExePath}"; Parameters: "-l ""$LOGTALKHOME/integration/logtalk_yap.pl"""; Comment: "Runs Logtalk with YAP"; WorkingDir: "{code:GetLgtUserDir}"; Components: prolog\yap; Flags: createonlyiffileexists |
|---|
| 138 | |
|---|
| 139 | Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; Components: base |
|---|
| 140 | |
|---|
| 141 | Name: "{code:GetLgtUserDir}\manuals"; Filename: "{app}\manuals"; Components: user |
|---|
| 142 | Name: "{code:GetLgtUserDir}\wenv"; Filename: "{app}\wenv"; Components: user |
|---|
| 143 | |
|---|
| 144 | Name: "{userdesktop}\Logtalk user files"; Filename: "{code:GetLgtUserDir}"; Components: user; Tasks: shortcut |
|---|
| 145 | |
|---|
| 146 | [Registry] |
|---|
| 147 | Root: HKLM; Subkey: "Software\Logtalk"; ValueType: dword; ValueName: "Version"; ValueData: "2350"; Components: base; Flags: deletevalue uninsdeletevalue |
|---|
| 148 | Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "LOGTALKHOME"; ValueData: "{app}"; Components: base; Flags: deletevalue uninsdeletevalue |
|---|
| 149 | Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "LOGTALKUSER"; ValueData: "{code:GetLgtUserDir}"; Flags: deletevalue uninsdeletevalue |
|---|
| 150 | |
|---|
| 151 | [Run] |
|---|
| 152 | Filename: "{app}\RELEASE_NOTES.txt"; Description: "View the release notes"; Components: base user; Flags: postinstall shellexec skipifsilent |
|---|
| 153 | Filename: "{app}\CUSTOMIZE.txt"; Description: "Read the customization instructions for completing your setup"; Components: base user; Flags: postinstall shellexec skipifsilent |
|---|
| 154 | |
|---|
| 155 | Filename: "{app}\{#MyAppRegUrlName}"; Flags: shellexec nowait; Tasks: registration |
|---|
| 156 | |
|---|
| 157 | [UninstallDelete] |
|---|
| 158 | Type: filesandordirs; Name: "{app}"; Components: base |
|---|
| 159 | Type: filesandordirs; Name: "{group}"; Components: base |
|---|
| 160 | |
|---|
| 161 | [Code] |
|---|
| 162 | var |
|---|
| 163 | LgtUserDirPage: TInputDirWizardPage; |
|---|
| 164 | WarningPage: TOutputMsgWizardPage; |
|---|
| 165 | Explanation, Warning: String; |
|---|
| 166 | |
|---|
| 167 | procedure InitializeWizard; |
|---|
| 168 | var |
|---|
| 169 | Version, InstalledVersion: Cardinal; |
|---|
| 170 | LOGTALKHOME: String; |
|---|
| 171 | begin |
|---|
| 172 | Explanation := 'Select the folder in which Setup should install Logtalk user data files, then click Next.' |
|---|
| 173 | + Chr(13) + Chr(13) |
|---|
| 174 | + 'These files allows each user to independently customize Logtalk and to freely modify the provided programming examples.' |
|---|
| 175 | + Chr(13) + Chr(13) |
|---|
| 176 | + 'A copy of these files must exist in the user home folder in order to use the Logtalk-Prolog integration scripts available from the Start Menu.' |
|---|
| 177 | + Chr(13) + Chr(13) |
|---|
| 178 | + 'Addtional end-users may use this installer to make a copy of these files on their home folders after a full installation of Logtalk.'; |
|---|
| 179 | LgtUserDirPage := CreateInputDirPage(wpSelectDir, |
|---|
| 180 | 'Select folder for Logtalk user data files', 'Where should Logtalk user data files be installed?', |
|---|
| 181 | Explanation, |
|---|
| 182 | False, 'New Folder'); |
|---|
| 183 | LgtUserDirPage.Add(''); |
|---|
| 184 | LgtUserDirPage.Values[0] := ExpandConstant('{#LOGTALKUSER}'); |
|---|
| 185 | if not IsAdminLoggedOn then |
|---|
| 186 | begin |
|---|
| 187 | Warning := 'Full installation of Logtalk requires an administrative user.' |
|---|
| 188 | + Chr(13) + Chr(13) |
|---|
| 189 | + 'If the base Logtalk system is already installed, you may proceed in order to setup Logtalk for you as an end-user.' |
|---|
| 190 | + Chr(13) + Chr(13) |
|---|
| 191 | + 'If Logtalk is already set for you, this installer will make a backup copy of your current files (if you choose the same installation folder) and will restore all user data files to their default, pristine state.'; |
|---|
| 192 | WarningPage := CreateOutputMsgPage(wpWelcome, |
|---|
| 193 | 'Information', 'Please read the following important information before continuing.', Warning); |
|---|
| 194 | end; |
|---|
| 195 | if RegQueryDWordValue(HKLM, 'Software\Logtalk\', 'Version', Version) then |
|---|
| 196 | InstalledVersion := Version |
|---|
| 197 | else if RegQueryStringValue(HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\', 'LOGTALKHOME', LOGTALKHOME) and DirExists(LOGTALKHOME) then |
|---|
| 198 | InstalledVersion := 0 |
|---|
| 199 | else |
|---|
| 200 | InstalledVersion := -1; |
|---|
| 201 | if IsAdminLoggedOn and (InstalledVersion >= 0) and (InstalledVersion < 2340) then |
|---|
| 202 | begin |
|---|
| 203 | Warning := 'You have an older version of Logtalk installed whose configuration files are incompatible with this new version (configuration files are stored in your Logtalk user data folder).' |
|---|
| 204 | + Chr(13) + Chr(13) |
|---|
| 205 | + 'You must updade your Logtalk user data folder by performing a full installation.' |
|---|
| 206 | + Chr(13) + Chr(13) |
|---|
| 207 | + 'All aditional Logtalk users on your computer must also use this installer to update their Logtalk user data folders.'; |
|---|
| 208 | WarningPage := CreateOutputMsgPage(wpWelcome, |
|---|
| 209 | 'Warning', 'Logtalk user data folder update required.', Warning); |
|---|
| 210 | end |
|---|
| 211 | end; |
|---|
| 212 | |
|---|
| 213 | function GetLgtUserDir(Param: String): String; |
|---|
| 214 | begin |
|---|
| 215 | Result := LgtUserDirPage.Values[0] |
|---|
| 216 | end; |
|---|
| 217 | |
|---|
| 218 | function GetCurrentDate(Param: String): String; |
|---|
| 219 | begin |
|---|
| 220 | Result := GetDateTimeString('dddddd tt', '-', '-') |
|---|
| 221 | end; |
|---|
| 222 | |
|---|
| 223 | function ShouldSkipPage(PageID: Integer): Boolean; |
|---|
| 224 | begin |
|---|
| 225 | if (PageID = wpSelectDir) and not IsAdminLoggedOn then |
|---|
| 226 | Result := True |
|---|
| 227 | else if (PageID = wpSelectComponents) and not IsAdminLoggedOn then |
|---|
| 228 | begin |
|---|
| 229 | WizardForm.TypesCombo.ItemIndex := 2; |
|---|
| 230 | WizardForm.TypesCombo.OnChange(nil); |
|---|
| 231 | Result := True |
|---|
| 232 | end |
|---|
| 233 | else if (PageID = wpReady) and not IsAdminLoggedOn then |
|---|
| 234 | Result := True |
|---|
| 235 | else |
|---|
| 236 | Result := False; |
|---|
| 237 | end; |
|---|
| 238 | |
|---|
| 239 | procedure CurStepChanged(CurStep: TSetupStep); |
|---|
| 240 | begin |
|---|
| 241 | if (CurStep = ssInstall) and DirExists(LgtUserDirPage.Values[0]) and (pos('backup', WizardSelectedComponents(False)) > 0) then |
|---|
| 242 | RenameFile(LgtUserDirPage.Values[0], LgtUserDirPage.Values[0] + ' backup ' + GetDateTimeString('dddddd tt', '-', '-')) |
|---|
| 243 | end; |
|---|
| 244 | |
|---|
| 245 | function GetBPExePath(Param: String): String; |
|---|
| 246 | var |
|---|
| 247 | BPDIR: String; |
|---|
| 248 | Warning: String; |
|---|
| 249 | begin |
|---|
| 250 | if RegQueryStringValue(HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\', 'BPDIR', BPDIR) then |
|---|
| 251 | Result := BPDIR + '\bp.bat' |
|---|
| 252 | else begin |
|---|
| 253 | Warning := 'Failed to detect B-Prolog installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 254 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 255 | Result := 'lgt_exe_does_not_exist' |
|---|
| 256 | end |
|---|
| 257 | end; |
|---|
| 258 | |
|---|
| 259 | function GetCiaoExePath(Param: String): String; |
|---|
| 260 | var |
|---|
| 261 | CiaoDir: String; |
|---|
| 262 | Warning: String; |
|---|
| 263 | begin |
|---|
| 264 | if RegQueryStringValue(HKLM, 'Software\Ciao Prolog\', 'ciao_dir', CiaoDir) then |
|---|
| 265 | Result := CiaoDir + '\shell\ciaosh.cpx' |
|---|
| 266 | else begin |
|---|
| 267 | Warning := 'Failed to detect Ciao Prolog installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 268 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 269 | Result := 'lgt_exe_does_not_exist' |
|---|
| 270 | end |
|---|
| 271 | end; |
|---|
| 272 | |
|---|
| 273 | function GetCxExePath(Param: String): String; |
|---|
| 274 | var |
|---|
| 275 | CxDir: String; |
|---|
| 276 | Warning: String; |
|---|
| 277 | begin |
|---|
| 278 | if RegQueryStringValue(HKLM, 'SOFTWARE\CxProlog\', 'CXPROLOGDIR', CxDir) then |
|---|
| 279 | Result := CxDir + '\cxprolog.exe' |
|---|
| 280 | else begin |
|---|
| 281 | Warning := 'Failed to detect CxProlog installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 282 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 283 | Result := 'lgt_exe_does_not_exist' |
|---|
| 284 | end |
|---|
| 285 | end; |
|---|
| 286 | |
|---|
| 287 | function GetEclipse5ExePath(Param: String): String; |
|---|
| 288 | var |
|---|
| 289 | ECLIPSEDIR: String; |
|---|
| 290 | Warning: String; |
|---|
| 291 | begin |
|---|
| 292 | if RegQueryStringValue(HKLM, 'Software\IC-Parc\Eclipse\5.10\', 'ECLIPSEDIR', ECLIPSEDIR) then |
|---|
| 293 | Result := ECLIPSEDIR + '\lib\i386_nt\eclipse.exe' |
|---|
| 294 | else begin |
|---|
| 295 | Warning := 'Failed to detect ECLiPSe Prolog 5 installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 296 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 297 | Result := 'lgt_exe_does_not_exist' |
|---|
| 298 | end |
|---|
| 299 | end; |
|---|
| 300 | |
|---|
| 301 | function GetEclipse6ExePath(Param: String): String; |
|---|
| 302 | var |
|---|
| 303 | ECLIPSEDIR: String; |
|---|
| 304 | Warning: String; |
|---|
| 305 | begin |
|---|
| 306 | if RegQueryStringValue(HKLM, 'Software\IC-Parc\Eclipse\6.0\', 'ECLIPSEDIR', ECLIPSEDIR) then |
|---|
| 307 | Result := ECLIPSEDIR + '\lib\i386_nt\eclipse.exe' |
|---|
| 308 | else begin |
|---|
| 309 | Warning := 'Failed to detect ECLiPSe Prolog 6 installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 310 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 311 | Result := 'lgt_exe_does_not_exist' |
|---|
| 312 | end |
|---|
| 313 | end; |
|---|
| 314 | |
|---|
| 315 | function GetGPExePath(Param: String): String; |
|---|
| 316 | var |
|---|
| 317 | RootPath: String; |
|---|
| 318 | Warning: String; |
|---|
| 319 | begin |
|---|
| 320 | if RegQueryStringValue(HKCU, 'Software\GnuProlog\', 'RootPath', RootPath) then |
|---|
| 321 | Result := RootPath + '\bin\gprolog.exe' |
|---|
| 322 | else begin |
|---|
| 323 | Warning := 'Failed to detect GNU Prolog installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 324 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 325 | Result := 'lgt_exe_does_not_exist' |
|---|
| 326 | end |
|---|
| 327 | end; |
|---|
| 328 | |
|---|
| 329 | function GetKPExePath(Param: String): String; |
|---|
| 330 | var |
|---|
| 331 | Path: String; |
|---|
| 332 | Warning: String; |
|---|
| 333 | begin |
|---|
| 334 | Path := GetEnv('PLC') + '\plc.exe'; |
|---|
| 335 | if FileExists(Path) then |
|---|
| 336 | Result := Path |
|---|
| 337 | else begin |
|---|
| 338 | Warning := 'Failed to detect K-Prolog installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 339 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 340 | Result := 'lgt_exe_does_not_exist' |
|---|
| 341 | end |
|---|
| 342 | end; |
|---|
| 343 | |
|---|
| 344 | function GetQuintusExePath(Param: String): String; |
|---|
| 345 | var |
|---|
| 346 | Path: String; |
|---|
| 347 | Warning: String; |
|---|
| 348 | begin |
|---|
| 349 | Path := GetEnv('Quintus') + '\bin\ix86\qpwin.exe'; |
|---|
| 350 | if FileExists(Path) then |
|---|
| 351 | Result := Path |
|---|
| 352 | else begin |
|---|
| 353 | Warning := 'Failed to detect Quintus Prolog installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 354 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 355 | Result := 'lgt_exe_does_not_exist' |
|---|
| 356 | end |
|---|
| 357 | end; |
|---|
| 358 | |
|---|
| 359 | function GetSP3ExePath(Param: String): String; |
|---|
| 360 | var |
|---|
| 361 | SP_PATH: String; |
|---|
| 362 | Warning: String; |
|---|
| 363 | begin |
|---|
| 364 | if RegQueryStringValue(HKLM, 'Software\SICS\SICStus3.12_win32\', 'SP_PATH', SP_PATH) then |
|---|
| 365 | Result := SP_PATH + '\bin\spwin.exe' |
|---|
| 366 | else begin |
|---|
| 367 | Warning := 'Failed to detect SICStus Prolog 3 installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 368 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 369 | Result := 'lgt_exe_does_not_exist' |
|---|
| 370 | end |
|---|
| 371 | end; |
|---|
| 372 | |
|---|
| 373 | function GetSP4ExePath(Param: String): String; |
|---|
| 374 | var |
|---|
| 375 | SP_PATH: String; |
|---|
| 376 | Warning: String; |
|---|
| 377 | begin |
|---|
| 378 | if RegQueryStringValue(HKLM, 'Software\SICS\SICStus4.0_win32\', 'SP_PATH', SP_PATH) then |
|---|
| 379 | Result := SP_PATH + '\bin\spwin.exe' |
|---|
| 380 | else begin |
|---|
| 381 | Warning := 'Failed to detect SICStus Prolog 4 installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 382 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 383 | Result := 'lgt_exe_does_not_exist' |
|---|
| 384 | end |
|---|
| 385 | end; |
|---|
| 386 | |
|---|
| 387 | function GetSWIExePath(Param: String): String; |
|---|
| 388 | var |
|---|
| 389 | Home: String; |
|---|
| 390 | Warning: String; |
|---|
| 391 | begin |
|---|
| 392 | if RegQueryStringValue(HKLM, 'Software\SWI\Prolog\', 'home', Home) then |
|---|
| 393 | Result := Home + '\bin\plwin.exe' |
|---|
| 394 | else begin |
|---|
| 395 | Warning := 'Failed to detect SWI-Prolog installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 396 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 397 | Result := 'lgt_exe_does_not_exist' |
|---|
| 398 | end |
|---|
| 399 | end; |
|---|
| 400 | |
|---|
| 401 | function GetYAPExePath(Param: String): String; |
|---|
| 402 | var |
|---|
| 403 | Home: String; |
|---|
| 404 | Warning: String; |
|---|
| 405 | begin |
|---|
| 406 | if RegQueryStringValue(HKLM, 'Software\YAP\Prolog\', 'home', Home) then |
|---|
| 407 | Result := Home + '\bin\yap.exe' |
|---|
| 408 | else begin |
|---|
| 409 | Warning := 'Failed to detect YAP installation.' + Chr(13) + 'Logtalk integration shortcut not created.'; |
|---|
| 410 | MsgBox(Warning, mbError, MB_OK); |
|---|
| 411 | Result := 'lgt_exe_does_not_exist' |
|---|
| 412 | end |
|---|
| 413 | end; |
|---|