Skip to content

Commit bb0b88f

Browse files
committed
Both Zulu and VirtualBox now install in correct dir
1 parent ffe69a8 commit bb0b88f

1 file changed

Lines changed: 37 additions & 13 deletions

File tree

windows/developer_platform_installer.iss

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,18 @@ Root: HKLM; Subkey: "Software\Red Hat\{#AppName}"; ValueType: string; ValueName:
4848
[Code]
4949
5050
type
51-
ComponentEntry = record
51+
ComponentGroup = record
5252
Container: TPanel;
5353
Content: TPanel;
5454
end;
5555
BcLabelArray = array[1..4] of TLabel;
5656
57+
Component = record
58+
Name: String;
59+
DownloadUrl: String;
60+
Install: Boolean;
61+
end;
62+
5763
var
5864
// Page IDs
5965
AuthPageID, ComponentPageID, DownloadPageID, GetStartedPageID, InstallPageID : Integer;
@@ -96,7 +102,8 @@ end;
96102
97103
procedure LoginButtonOnClick(Sender: TObject);
98104
var
99-
Url, Resource: String;
105+
Url, Resource: String;
106+
100107
Page: TWizardPage;
101108
Button: TNewButton;
102109
WinHttpReq: Variant;
@@ -212,8 +219,8 @@ begin
212219
result := Page;
213220
end;
214221
215-
function createComponentEntry(Page: TWizardPage; Top: integer; ComponentName: String; ComponentVersion: String;
216-
ComponentDescription: String; ContentHeight: integer): ComponentEntry;
222+
function createComponentGroup(Page: TWizardPage; Top: integer; ComponentName: String; ComponentVersion: String;
223+
ComponentDescription: String; ContentHeight: integer): ComponentGroup;
217224
var
218225
Panel, PanelHeader, PanelContent: TPanel;
219226
NameLabel, VersionLabel, DescriptionLabel: TNewStaticText;
@@ -284,7 +291,7 @@ function createComponentPage: TWizardPage;
284291
var
285292
Page: TWizardPage;
286293
HeadingLabel: TNewStaticText;
287-
Entry: ComponentEntry;
294+
Entry: ComponentGroup;
288295
begin
289296
Page := PageFromID(wpReady);
290297
@@ -297,15 +304,15 @@ begin
297304
HeadingLabel.Parent := Page.Surface;
298305
HeadingLabel.Font.Size := 8;
299306
300-
Entry := createComponentEntry(Page, HeadingLabel.Top + HeadingLabel.Height + ScaleY(8),
307+
Entry := createComponentGroup(Page, HeadingLabel.Top + HeadingLabel.Height + ScaleY(8),
301308
'RED HAT ENTERPRISE LINUX ATOMIC PLATFORM', 'v2.0',
302309
'Host Linux containers in a minimal version of Red Hat Enterprise Linux.', 80);
303310
304-
Entry := createComponentEntry(Page, Entry.Container.Top + Entry.Container.Height + ScaleY(8),
311+
Entry := createComponentGroup(Page, Entry.Container.Top + Entry.Container.Height + ScaleY(8),
305312
'RED HAT JBOSS DEVELOPER STUDIO', 'v9.0',
306313
'An IDE with tooling that will help you easily code, test, and deploy your projects.', 60);
307314
308-
Entry := createComponentEntry(Page, Entry.Container.Top + Entry.Container.Height + ScaleY(8),
315+
Entry := createComponentGroup(Page, Entry.Container.Top + Entry.Container.Height + ScaleY(8),
309316
'RED HAT OPENSHIFT ENTERPRISE', 'v3.0',
310317
'DevOps tooling that helps you easily build and deploy your projects in a PaaS environment.', 40);
311318
end;
@@ -646,6 +653,7 @@ begin
646653
SelectBreadcrumb(4);
647654
WizardForm.NextButton.Visible := True;
648655
WizardForm.BackButton.Visible := False;
656+
WizardForm.NextButton.Caption := 'Close';
649657
end;
650658
651659
if (CurPageID = wpInstalling) then
@@ -660,9 +668,19 @@ var
660668
begin
661669
if CurStep = ssInstall then
662670
begin
663-
ShellExec('', 'msiexec', ExpandConstant('/i {tmp}\zulu1.8.0_51-8.8.0.3-win64.msi /passive /norestart TARGETDIR="{app}\zulu-8"'),
671+
// Install Zulu JDK
672+
ShellExec('', 'msiexec', ExpandConstant('/i {tmp}\zulu1.8.0_60-8.9.0.4-win64.msi INSTALLDIR="{app}\zulu-8" /passive /norestart'),
673+
'', SW_SHOW, ewWaitUntilTerminated, ErrorCode);
674+
675+
// Extract the VirtualBox msi files from the downloaded exe
676+
Shellexec('', ExpandConstant('{tmp}\VirtualBox-5.0.2-102096-Win.exe'), ExpandConstant('--extract -path {tmp} --silent'),
664677
'', SW_SHOW, ewWaitUntilTerminated, ErrorCode);
665678
679+
// Install VirtualBox
680+
ShellExec('', 'msiexec', ExpandConstant('/i {tmp}\VirtualBox-5.0.2-r102096-MultiArch_x86.msi INSTALLDIR="{app}\VirtualBox" /passive /norestart'),
681+
'', SW_SHOW, ewWaitUntilTerminated, ErrorCode);
682+
683+
//ShellExec('', 'msiexec', ExpandConstant('/i {tmp}\VirtualBox-5.0.2-102096-Win.exe IN
666684
//ShellExec('', 'msiexec', ExpandConstant('/i {tmp}\zulu1.8.0_51-8.8.0.3-win64.msi /passive /norestart /log "{app}\zulu_install_log.txt"'),
667685
// '', SW_SHOW, ewWaitUntilTerminated, ErrorCode);
668686
end;
@@ -763,10 +781,16 @@ begin
763781
// Hide the 'Details' button
764782
idpSetOption('DetailsButton', '0');
765783
766-
idpSetOption('Referer', 'http://www.azulsystems.com/products/zulu/downloads');
767-
idpAddFile('http://cdn.azulsystems.com/zulu/2015-07-8.8-bin/zulu1.8.0_51-8.8.0.3-win64.msi', ExpandConstant('{tmp}\zulu1.8.0_51-8.8.0.3-win64.msi'));
768-
769-
//idpAddFile('http://download.virtualbox.org/virtualbox/5.0.2/VirtualBox-5.0.2-102096-Win.exe', 'VirtualBox');
784+
// Zulu
785+
//idpSetOption('Referer', 'http://www.azulsystems.com/products/zulu/downloads');
786+
//idpAddFile('http://cdn.azulsystems.com/zulu/2015-07-8.8-bin/zulu1.8.0_51-8.8.0.3-win64.msi', ExpandConstant('{tmp}\zulu1.8.0_51-8.8.0.3-win64.msi'));
787+
idpAddFile('http://192.168.1.114/~shane/zulu1.8.0_60-8.9.0.4-win64.msi', ExpandConstant('{tmp}\zulu1.8.0_60-8.9.0.4-win64.msi'));
788+
789+
// VirtualBox
790+
//idpAddFile('http://download.virtualbox.org/virtualbox/5.0.2/VirtualBox-5.0.2-102096-Win.exe', ExpandConstant('{tmp}\VirtualBox-5.0.2-102096-Win.exe'));
791+
idpAddFile('http://192.168.1.114/~shane/VirtualBox-5.0.2-102096-Win.exe', ExpandConstant('{tmp}\VirtualBox-5.0.2-102096-Win.exe'));
792+
793+
770794
//idpAddFile('https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4.msi', 'Vagrant');
771795
772796
idpDownloadAfter(wpReady);

0 commit comments

Comments
 (0)