Subversion Repositories fastphp

Rev

Rev 90 | Rev 100 | 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
95 daniel-mar 7
AppVerName=FastPHP 0.6
8
AppVersion=0.6     
90 daniel-mar 9
AppCopyright=© Copyright 2016 - 2022 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
90 daniel-mar 17
VersionInfoCopyright=© Copyright 2016 - 2022 ViaThinkSoft.
49 daniel-mar 18
VersionInfoDescription=FastPHP Setup
19
VersionInfoTextVersion=1.0.0.0
95 daniel-mar 20
VersionInfoVersion=0.6
49 daniel-mar 21
Compression=zip/9
22
ChangesAssociations=yes
23
OutputBaseFilename=FastPHP
81 daniel-mar 24
LicenseFile=LICENSE
49 daniel-mar 25
 
26
[CustomMessages]
27
Assoc=File associations:
28
 
29
[Languages]
30
;Name: de; MessagesFile: "compiler:Languages\German.isl"
31
 
32
[LangOptions]
33
LanguageName=English
34
LanguageID=$0409
35
 
36
[Components]
37
Name: "editor";  Description: "FastPHP Editor";  Types: full compact custom
38
Name: "browser"; Description: "FastPHP Browser"; Types: full
39
 
40
[Tasks]
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]
53 daniel-mar 66
Root: HKCR; Subkey: ".php";                                       ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
67
Root: HKCR; Subkey: ".phps";                                      ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
68
;Root: HKCR; Subkey: ".inc";                                      ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
69
;Root: HKCR; Subkey: ".phtml";                                    ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
70
;Root: HKCR; Subkey: ".php2";                                     ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
71
;Root: HKCR; Subkey: ".php3";                                     ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
72
;Root: HKCR; Subkey: ".php4";                                     ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
73
;Root: HKCR; Subkey: ".php5";                                     ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
74
Root: HKCR; Subkey: "FastPHPScript";                              ValueName: ""; ValueType: string; ValueData: "PHP script";                          Flags: uninsdeletekey;   Components: editor;  Tasks: fileassocEditor
75
Root: HKCR; Subkey: "FastPHPScript\DefaultIcon";                  ValueName: ""; ValueType: string; ValueData: "{app}\Icons.dll,0";                                            Components: editor;  Tasks: fileassocEditor
76
Root: HKCR; Subkey: "FastPHPScript\shell\open\command";           ValueName: ""; ValueType: string; ValueData: """{app}\FastPHPEditor.exe"" ""%1""";                           Components: editor;  Tasks: fileassocEditor
49 daniel-mar 77
 
53 daniel-mar 78
Root: HKCR; Subkey: ".php\ShellNew";                              ValueName: "ItemName"; ValueType: string; ValueData: "PHP script";                                           Components: editor;  Tasks: fileassocEditor
79
Root: HKCR; Subkey: ".php\ShellNew";                              ValueName: "NullFile"; ValueType: string; ValueData: "";                                                     Components: editor;  Tasks: fileassocEditor
49 daniel-mar 80
 
53 daniel-mar 81
; xphp = executable PHP (only for PHP browser)
82
Root: HKCR; Subkey: ".xphp";                                      ValueName: ""; ValueType: string; ValueData: "FastPHPExecutableScript";             Flags: uninsdeletevalue; Components: browser; Tasks: fileassocBrowser
83
Root: HKCR; Subkey: "FastPHPExecutableScript";                    ValueName: ""; ValueType: string; ValueData: "Executable PHP application";          Flags: uninsdeletekey;   Components: browser; Tasks: fileassocBrowser
84
Root: HKCR; Subkey: "FastPHPExecutableScript\DefaultIcon";        ValueName: ""; ValueType: string; ValueData: "{app}\Icons.dll,1";                                            Components: browser; Tasks: fileassocBrowser
85
Root: HKCR; Subkey: "FastPHPExecutableScript\shell\open\command"; ValueName: ""; ValueType: string; ValueData: """{app}\FastPHPBrowser.exe"" ""%1""";                          Components: browser; Tasks: fileassocBrowser
86
Root: HKCR; Subkey: "FastPHPExecutableScript\shell\edit\command"; ValueName: ""; ValueType: string; ValueData: """{app}\FastPHPEditor.exe"" ""%1""";                           Components: browser; Tasks: fileassocBrowser
49 daniel-mar 87
 
88
[Code]
89
function InitializeSetup(): Boolean;
90
begin
91
  if CheckForMutexes('FastPHPSetup')=false then
92
  begin
93
    Createmutex('FastPHPSetup');
94
    Result := true;
95
  end
96
  else
97
  begin
98
    Result := False;
99
  end;
100
end;
50 daniel-mar 101
function IsAnyComponentSelected: Boolean;
102
var
103
  I: Integer;
104
begin
105
  // Source: https://stackoverflow.com/questions/20691583/innosetup-if-no-components-are-selected-go-back-to-components-page
106
  Result := False;
107
  for I := 0 to WizardForm.ComponentsList.Items.Count - 1 do
108
    if WizardForm.ComponentsList.Checked[I] then
109
    begin
110
      Result := True;
111
      Exit;
112
    end;
113
end;
114
function NextButtonClick(PageID: Integer): Boolean;
115
begin
116
  Result:= True;
117
  if PageID = wpSelectComponents then
118
  begin
119
    if not IsAnyComponentSelected then
120
    begin
121
      MsgBox('No items selected, please select at least one item', mbError, MB_OK);
122
      Result := False;
123
    end;
124
  end;
125
end;