Rev 106 | Rev 108 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
49 | daniel-mar | 1 | ; FastPHP Setup Script for InnoSetup |
2 | ; by Daniel Marschall, ViaThinkSoft |
||
80 | daniel-mar | 3 | ; http://www.viathinksoft.com/ |
49 | daniel-mar | 4 | |
5 | [Setup] |
||
6 | AppName=FastPHP |
||
107 | daniel-mar | 7 | AppVerName=FastPHP 0.8 |
8 | AppVersion=0.8 |
||
106 | daniel-mar | 9 | AppCopyright=© Copyright 2016 - 2024 ViaThinkSoft. |
49 | daniel-mar | 10 | AppPublisher=ViaThinkSoft |
11 | AppPublisherURL=http://www.viathinksoft.de/ |
||
12 | AppSupportURL=http://www.daniel-marschall.de/ |
||
13 | AppUpdatesURL=http://www.viathinksoft.de/ |
||
80 | daniel-mar | 14 | DefaultDirName={commonpf}\FastPHP |
49 | daniel-mar | 15 | DefaultGroupName=FastPHP |
16 | VersionInfoCompany=ViaThinkSoft |
||
106 | daniel-mar | 17 | VersionInfoCopyright=© Copyright 2016 - 2024 ViaThinkSoft. |
49 | daniel-mar | 18 | VersionInfoDescription=FastPHP Setup |
19 | VersionInfoTextVersion=1.0.0.0 |
||
107 | daniel-mar | 20 | VersionInfoVersion=0.8 |
49 | daniel-mar | 21 | Compression=zip/9 |
22 | ChangesAssociations=yes |
||
23 | OutputBaseFilename=FastPHP |
||
81 | daniel-mar | 24 | LicenseFile=LICENSE |
106 | daniel-mar | 25 | ; Configure Sign Tool in InnoSetup at "Tools => Configure Sign Tools" (adjust the path to your SVN repository location) |
26 | ; Name = sign_single |
||
27 | ; Command = "C:\SVN\...\sign_single.bat" $f |
||
28 | SignTool=sign_single |
||
29 | SignedUninstaller=yes |
||
49 | daniel-mar | 30 | |
31 | [CustomMessages] |
||
32 | Assoc=File associations: |
||
33 | |||
34 | [Languages] |
||
35 | ;Name: de; MessagesFile: "compiler:Languages\German.isl" |
||
36 | |||
37 | [LangOptions] |
||
38 | LanguageName=English |
||
39 | LanguageID=$0409 |
||
40 | |||
41 | [Components] |
||
42 | Name: "editor"; Description: "FastPHP Editor"; Types: full compact custom |
||
43 | Name: "browser"; Description: "FastPHP Browser"; Types: full |
||
44 | |||
45 | [Tasks] |
||
46 | Name: fileassocEditor; Description: "{cm:AssocFileExtension,'FastPHP Editor','.php(s)'}"; GroupDescription: "{cm:Assoc}"; Components: editor |
||
47 | Name: fileassocBrowser; Description: "{cm:AssocFileExtension,'FastPHP Browser','.xphp'}"; GroupDescription: "{cm:Assoc}"; Components: browser |
||
48 | |||
49 | [Files] |
||
106 | daniel-mar | 50 | Source: "Icons\Icons.dll"; DestDir: "{app}"; Flags: ignoreversion signonce |
50 | daniel-mar | 51 | |
106 | daniel-mar | 52 | Source: "FastPHPEditor.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Components: editor |
49 | daniel-mar | 53 | Source: "codeexplorer.bmp"; DestDir: "{app}"; Flags: ignoreversion; Components: editor |
54 | Source: "codeexplorer.php"; DestDir: "{app}"; Flags: ignoreversion; Components: editor |
||
55 | Source: "codeexplorer_api.inc.php"; DestDir: "{app}"; Flags: ignoreversion; Components: editor |
||
56 | |||
106 | daniel-mar | 57 | Source: "FastPHPBrowser.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Components: browser |
50 | daniel-mar | 58 | Source: "fastphp_server.inc.php"; DestDir: "{app}"; Flags: ignoreversion; Components: browser |
49 | daniel-mar | 59 | |
60 | [Dirs] |
||
61 | |||
62 | [Icons] |
||
63 | Name: "{group}\FastPHP Editor"; Filename: "{app}\FastPHPEditor.exe"; Components: editor |
||
64 | Name: "{group}\FastPHP Browser"; Filename: "{app}\FastPHPBrowser.exe"; Components: browser |
||
65 | |||
66 | [Run] |
||
67 | Filename: "{app}\FastPHPEditor.exe"; Description: "Run FastPHP Editor"; Flags: nowait postinstall skipifsilent; Components: editor |
||
68 | Filename: "{app}\FastPHPBrowser.exe"; Description: "Run FastPHP Browser"; Flags: nowait postinstall skipifsilent unchecked; Components: browser |
||
69 | |||
70 | [Registry] |
||
53 | daniel-mar | 71 | Root: HKCR; Subkey: ".php"; ValueName: ""; ValueType: string; ValueData: "FastPHPScript"; Flags: uninsdeletevalue; Components: editor; Tasks: fileassocEditor |
72 | Root: HKCR; Subkey: ".phps"; ValueName: ""; ValueType: string; ValueData: "FastPHPScript"; Flags: uninsdeletevalue; Components: editor; Tasks: fileassocEditor |
||
73 | ;Root: HKCR; Subkey: ".inc"; ValueName: ""; ValueType: string; ValueData: "FastPHPScript"; Flags: uninsdeletevalue; Components: editor; Tasks: fileassocEditor |
||
74 | ;Root: HKCR; Subkey: ".phtml"; ValueName: ""; ValueType: string; ValueData: "FastPHPScript"; Flags: uninsdeletevalue; Components: editor; Tasks: fileassocEditor |
||
75 | ;Root: HKCR; Subkey: ".php2"; ValueName: ""; ValueType: string; ValueData: "FastPHPScript"; Flags: uninsdeletevalue; Components: editor; Tasks: fileassocEditor |
||
76 | ;Root: HKCR; Subkey: ".php3"; ValueName: ""; ValueType: string; ValueData: "FastPHPScript"; Flags: uninsdeletevalue; Components: editor; Tasks: fileassocEditor |
||
77 | ;Root: HKCR; Subkey: ".php4"; ValueName: ""; ValueType: string; ValueData: "FastPHPScript"; Flags: uninsdeletevalue; Components: editor; Tasks: fileassocEditor |
||
78 | ;Root: HKCR; Subkey: ".php5"; ValueName: ""; ValueType: string; ValueData: "FastPHPScript"; Flags: uninsdeletevalue; Components: editor; Tasks: fileassocEditor |
||
79 | Root: HKCR; Subkey: "FastPHPScript"; ValueName: ""; ValueType: string; ValueData: "PHP script"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocEditor |
||
80 | Root: HKCR; Subkey: "FastPHPScript\DefaultIcon"; ValueName: ""; ValueType: string; ValueData: "{app}\Icons.dll,0"; Components: editor; Tasks: fileassocEditor |
||
81 | Root: HKCR; Subkey: "FastPHPScript\shell\open\command"; ValueName: ""; ValueType: string; ValueData: """{app}\FastPHPEditor.exe"" ""%1"""; Components: editor; Tasks: fileassocEditor |
||
49 | daniel-mar | 82 | |
53 | daniel-mar | 83 | Root: HKCR; Subkey: ".php\ShellNew"; ValueName: "ItemName"; ValueType: string; ValueData: "PHP script"; Components: editor; Tasks: fileassocEditor |
84 | Root: HKCR; Subkey: ".php\ShellNew"; ValueName: "NullFile"; ValueType: string; ValueData: ""; Components: editor; Tasks: fileassocEditor |
||
49 | daniel-mar | 85 | |
53 | daniel-mar | 86 | ; xphp = executable PHP (only for PHP browser) |
87 | Root: HKCR; Subkey: ".xphp"; ValueName: ""; ValueType: string; ValueData: "FastPHPExecutableScript"; Flags: uninsdeletevalue; Components: browser; Tasks: fileassocBrowser |
||
88 | Root: HKCR; Subkey: "FastPHPExecutableScript"; ValueName: ""; ValueType: string; ValueData: "Executable PHP application"; Flags: uninsdeletekey; Components: browser; Tasks: fileassocBrowser |
||
89 | Root: HKCR; Subkey: "FastPHPExecutableScript\DefaultIcon"; ValueName: ""; ValueType: string; ValueData: "{app}\Icons.dll,1"; Components: browser; Tasks: fileassocBrowser |
||
90 | Root: HKCR; Subkey: "FastPHPExecutableScript\shell\open\command"; ValueName: ""; ValueType: string; ValueData: """{app}\FastPHPBrowser.exe"" ""%1"""; Components: browser; Tasks: fileassocBrowser |
||
91 | Root: HKCR; Subkey: "FastPHPExecutableScript\shell\edit\command"; ValueName: ""; ValueType: string; ValueData: """{app}\FastPHPEditor.exe"" ""%1"""; Components: browser; Tasks: fileassocBrowser |
||
49 | daniel-mar | 92 | |
93 | [Code] |
||
94 | function InitializeSetup(): Boolean; |
||
95 | begin |
||
96 | if CheckForMutexes('FastPHPSetup')=false then |
||
97 | begin |
||
98 | Createmutex('FastPHPSetup'); |
||
99 | Result := true; |
||
100 | end |
||
101 | else |
||
102 | begin |
||
103 | Result := False; |
||
104 | end; |
||
105 | end; |
||
50 | daniel-mar | 106 | function IsAnyComponentSelected: Boolean; |
107 | var |
||
108 | I: Integer; |
||
109 | begin |
||
110 | // Source: https://stackoverflow.com/questions/20691583/innosetup-if-no-components-are-selected-go-back-to-components-page |
||
111 | Result := False; |
||
112 | for I := 0 to WizardForm.ComponentsList.Items.Count - 1 do |
||
113 | if WizardForm.ComponentsList.Checked[I] then |
||
114 | begin |
||
115 | Result := True; |
||
116 | Exit; |
||
117 | end; |
||
118 | end; |
||
119 | function NextButtonClick(PageID: Integer): Boolean; |
||
120 | begin |
||
121 | Result:= True; |
||
122 | if PageID = wpSelectComponents then |
||
123 | begin |
||
124 | if not IsAnyComponentSelected then |
||
125 | begin |
||
126 | MsgBox('No items selected, please select at least one item', mbError, MB_OK); |
||
127 | Result := False; |
||
128 | end; |
||
129 | end; |
||
130 | end; |