Subversion Repositories fastphp

Rev

Rev 73 | Rev 81 | 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
80 daniel-mar 7
AppVerName=FastPHP 0.4
8
AppVersion=0.4
9
AppCopyright=© Copyright 2017 - 2021 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
80 daniel-mar 17
VersionInfoCopyright=© Copyright 2017 - 2021 ViaThinkSoft.
49 daniel-mar 18
VersionInfoDescription=FastPHP Setup
19
VersionInfoTextVersion=1.0.0.0
80 daniel-mar 20
VersionInfoVersion=0.4
49 daniel-mar 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
Name: fileassocEditor;  Description: "{cm:AssocFileExtension,'FastPHP Editor','.php(s)'}"; GroupDescription: "{cm:Assoc}"; Components: editor
41
Name: fileassocBrowser; Description: "{cm:AssocFileExtension,'FastPHP Browser','.xphp'}";  GroupDescription: "{cm:Assoc}"; Components: browser
42
 
43
[Files]
50 daniel-mar 44
Source: "Icons\Icons.dll";          DestDir: "{app}"; Flags: ignoreversion
45
 
49 daniel-mar 46
Source: "FastPHPEditor.exe";        DestDir: "{app}"; Flags: ignoreversion; Components: editor
47
Source: "codeexplorer.bmp";         DestDir: "{app}"; Flags: ignoreversion; Components: editor
48
Source: "codeexplorer.php";         DestDir: "{app}"; Flags: ignoreversion; Components: editor
49
Source: "codeexplorer_api.inc.php"; DestDir: "{app}"; Flags: ignoreversion; Components: editor
50
 
51
Source: "FastPHPBrowser.exe";       DestDir: "{app}"; Flags: ignoreversion; Components: browser
50 daniel-mar 52
Source: "fastphp_server.inc.php";   DestDir: "{app}"; Flags: ignoreversion; Components: browser
49 daniel-mar 53
 
54
[Dirs]
55
 
56
[Icons]
57
Name: "{group}\FastPHP Editor";  Filename: "{app}\FastPHPEditor.exe";  Components: editor
58
Name: "{group}\FastPHP Browser"; Filename: "{app}\FastPHPBrowser.exe"; Components: browser
59
 
60
[Run]
61
Filename: "{app}\FastPHPEditor.exe";  Description: "Run FastPHP Editor";  Flags: nowait postinstall skipifsilent; Components: editor
62
Filename: "{app}\FastPHPBrowser.exe"; Description: "Run FastPHP Browser"; Flags: nowait postinstall skipifsilent unchecked; Components: browser
63
 
64
[Registry]
53 daniel-mar 65
Root: HKCR; Subkey: ".php";                                       ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
66
Root: HKCR; Subkey: ".phps";                                      ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
67
;Root: HKCR; Subkey: ".inc";                                      ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
68
;Root: HKCR; Subkey: ".phtml";                                    ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
69
;Root: HKCR; Subkey: ".php2";                                     ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
70
;Root: HKCR; Subkey: ".php3";                                     ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
71
;Root: HKCR; Subkey: ".php4";                                     ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
72
;Root: HKCR; Subkey: ".php5";                                     ValueName: ""; ValueType: string; ValueData: "FastPHPScript";                       Flags: uninsdeletevalue; Components: editor;  Tasks: fileassocEditor
73
Root: HKCR; Subkey: "FastPHPScript";                              ValueName: ""; ValueType: string; ValueData: "PHP script";                          Flags: uninsdeletekey;   Components: editor;  Tasks: fileassocEditor
74
Root: HKCR; Subkey: "FastPHPScript\DefaultIcon";                  ValueName: ""; ValueType: string; ValueData: "{app}\Icons.dll,0";                                            Components: editor;  Tasks: fileassocEditor
75
Root: HKCR; Subkey: "FastPHPScript\shell\open\command";           ValueName: ""; ValueType: string; ValueData: """{app}\FastPHPEditor.exe"" ""%1""";                           Components: editor;  Tasks: fileassocEditor
49 daniel-mar 76
 
53 daniel-mar 77
Root: HKCR; Subkey: ".php\ShellNew";                              ValueName: "ItemName"; ValueType: string; ValueData: "PHP script";                                           Components: editor;  Tasks: fileassocEditor
78
Root: HKCR; Subkey: ".php\ShellNew";                              ValueName: "NullFile"; ValueType: string; ValueData: "";                                                     Components: editor;  Tasks: fileassocEditor
49 daniel-mar 79
 
53 daniel-mar 80
; xphp = executable PHP (only for PHP browser)
81
Root: HKCR; Subkey: ".xphp";                                      ValueName: ""; ValueType: string; ValueData: "FastPHPExecutableScript";             Flags: uninsdeletevalue; Components: browser; Tasks: fileassocBrowser
82
Root: HKCR; Subkey: "FastPHPExecutableScript";                    ValueName: ""; ValueType: string; ValueData: "Executable PHP application";          Flags: uninsdeletekey;   Components: browser; Tasks: fileassocBrowser
83
Root: HKCR; Subkey: "FastPHPExecutableScript\DefaultIcon";        ValueName: ""; ValueType: string; ValueData: "{app}\Icons.dll,1";                                            Components: browser; Tasks: fileassocBrowser
84
Root: HKCR; Subkey: "FastPHPExecutableScript\shell\open\command"; ValueName: ""; ValueType: string; ValueData: """{app}\FastPHPBrowser.exe"" ""%1""";                          Components: browser; Tasks: fileassocBrowser
85
Root: HKCR; Subkey: "FastPHPExecutableScript\shell\edit\command"; ValueName: ""; ValueType: string; ValueData: """{app}\FastPHPEditor.exe"" ""%1""";                           Components: browser; Tasks: fileassocBrowser
49 daniel-mar 86
 
87
[Code]
88
function InitializeSetup(): Boolean;
89
begin
90
  if CheckForMutexes('FastPHPSetup')=false then
91
  begin
92
    Createmutex('FastPHPSetup');
93
    Result := true;
94
  end
95
  else
96
  begin
97
    Result := False;
98
  end;
99
end;
50 daniel-mar 100
function IsAnyComponentSelected: Boolean;
101
var
102
  I: Integer;
103
begin
104
  // Source: https://stackoverflow.com/questions/20691583/innosetup-if-no-components-are-selected-go-back-to-components-page
105
  Result := False;
106
  for I := 0 to WizardForm.ComponentsList.Items.Count - 1 do
107
    if WizardForm.ComponentsList.Checked[I] then
108
    begin
109
      Result := True;
110
      Exit;
111
    end;
112
end;
113
function NextButtonClick(PageID: Integer): Boolean;
114
begin
115
  Result:= True;
116
  if PageID = wpSelectComponents then
117
  begin
118
    if not IsAnyComponentSelected then
119
    begin
120
      MsgBox('No items selected, please select at least one item', mbError, MB_OK);
121
      Result := False;
122
    end;
123
  end;
124
end;