-
Notifications
You must be signed in to change notification settings - Fork 4
/
installer.iss
65 lines (59 loc) · 2.12 KB
/
installer.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
[Setup]
AppName=wxCrafter Integration with Code::Blocks
AppVerName=wxCrafterCB
AppPublisherURL=http://wxcrafter.codelite.org
AppSupportURL=http://wxcrafter.codelite.org
AppUpdatesURL=http://wxcrafter.codelite.org
DefaultDirName={reg:HKCU\Software\CodeBlocks,Path}
DefaultGroupName=wxCrafter
OutputDir=.
OutputBaseFilename=wxcrafter-codeblocks
ChangesEnvironment=yes
FlatComponentsList=yes
SetupIconFile=installer.ico
Compression=lzma/ultra
SolidCompression=true
InternalCompressLevel=ultra
PrivilegesRequired=none
DirExistsWarning=no
DisableDirPage=no
ChangesAssociations=yes
[Components]
Name: "wxCrafterCB"; Description: "Integrating wxCrafter with Code::Blocks IDE"; Types: full; Flags: fixed
[Messages]
SelectDirLabel3 = Please select Code::Blocks installation folder
[Files]
Source: "C:\src\codelite\wxcrafter\Installer\wxcrafter-standlone-setup.exe"; DestDir: "{tmp}"; AfterInstall: RunWxCrafterInstaller
Source: "wxCrafterCB.zip"; DestDir: "{app}\share\codeblocks"; Flags: ignoreversion; Components: wxCrafterCB
Source: "Release\wxCrafterCB.dll"; DestDir: "{app}\share\codeblocks\plugins"; Flags: ignoreversion; Components: wxCrafterCB
Source: "wx-config.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: wxCrafterCB
[code]
function HasDefaultDir(): Boolean;
var
PluginsPath: String;
begin
RegQueryStringValue(HKCU, 'Software\CodeBlocks', 'Path', PluginsPath);
Result := Length( PluginsPath ) > 0;
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
Result := false;
//if PageID = wpSelectDir Then
//begin
// Result := (PageID = wpSelectDir) and HasDefaultDir();
// if not Result Then
// begin
// MsgBox('codelite 5.0 could not be located on this machine' + #10#13 + 'Please select codelite plugins directory manualy', mbInformation, MB_OK);
// end;
//end;
end;
procedure RunWxCrafterInstaller;
var
ResultCode: Integer;
begin
if not Exec(ExpandConstant('{tmp}\wxcrafter-standlone-setup.exe'), '', '', SW_SHOWNORMAL,
ewWaitUntilTerminated, ResultCode)
then
MsgBox('wxCrafter installer failed to run!' + #13#10 +
SysErrorMessage(ResultCode), mbError, MB_OK);
end;