Subversion Repositories fastphp

Rev

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

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