Subversion Repositories fastphp

Rev

Rev 90 | Rev 100 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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