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