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