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