Skip to content

Commit 431c94f

Browse files
committed
Cleaned up more code, removed unnecessary bitmaps
1 parent 6d829ce commit 431c94f

4 files changed

Lines changed: 38 additions & 16 deletions

File tree

bg.bmp

-66.1 KB
Binary file not shown.

blank.bmp

-526 Bytes
Binary file not shown.

developer_platform_installer.iss

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ DefaultGroupName={#AppName}
2626
OutputBaseFilename=developer_platform
2727
Compression=lzma
2828
SolidCompression=yes
29-
WizardSmallImageFile=blank.bmp
29+
;WizardSmallImageFile=blank.bmp
3030
BackColor=clWhite
3131
BackSolid=yes
3232
DisableWelcomePage=yes
33+
DisableDirPage=no
34+
DisableReadyPage=no
3335

3436
[Files]
35-
Source: "bg.bmp"; Flags: dontcopy
3637

3738
[Languages]
3839
Name: "english"; MessagesFile: "compiler:Default.isl"
@@ -53,7 +54,7 @@ type
5354
5455
var
5556
// Page IDs
56-
AuthPageID, ComponentPageID, DownloadPageID : Integer;
57+
AuthPageID, ComponentPageID, DownloadPageID, GetStartedPageID : Integer;
5758
5859
AuthLabel: TNewStaticText;
5960
@@ -66,6 +67,9 @@ var
6667
// Breadcrumb labels, we store references to these in an array for convenience
6768
BreadcrumbLabel: BcLabelArray;
6869
70+
// Flag indicating whether the user has authenticated successfully
71+
IsAuthenticated: Boolean;
72+
6973
// Converts a color String in the format '$rrggbb' to a TColor value
7074
function StringToColor(Color: String): TColor;
7175
var
@@ -92,11 +96,14 @@ var
9296
begin
9397
Page := PageFromID(AuthPageID);
9498
99+
// Set the flag to true for now
100+
IsAuthenticated := True;
101+
95102
// Display the 'authentication successful' message
96-
AuthLabel.Visible := True;
103+
AuthLabel.Visible := IsAuthenticated;
97104
98105
// Enable the 'Next' button
99-
Wizardform.NextButton.Enabled := True;
106+
Wizardform.NextButton.Enabled := IsAuthenticated;
100107
end;
101108
102109
procedure ForgotLabelOnClick(Sender: TObject);
@@ -277,12 +284,22 @@ begin
277284
'DevOps tooling that helps you easily build and deploy your projects in a PaaS environment.', 40);
278285
end;
279286
287+
// Create the Get Started page
288+
function createGetStartedPage: TWizardPage;
289+
var
290+
Page: TWizardPage;
291+
begin
292+
Page := CreateCustomPage(ComponentPageID, '', '');
293+
294+
// The page has a unique id, we store it in the AuthPageID variable here so that we can refer to it elsewhere
295+
GetStartedPageID := Page.ID;
296+
end;
297+
280298
procedure CreateWizardPages;
281299
begin
282300
createWelcomePage;
283301
createComponentPage;
284-
285-
302+
createGetStartedPage;
286303
end;
287304
288305
procedure activateDownloadForm(Page: TWizardPage);
@@ -578,15 +595,20 @@ procedure CurPageChanged(CurPageID: Integer);
578595
begin
579596
if (CurPageID = AuthPageID) then
580597
begin
581-
Wizardform.NextButton.Enabled := False;
582598
SelectBreadcrumb(1);
599+
WizardForm.NextButton.Enabled := IsAuthenticated;
583600
end else if (CurPageID = ComponentPageID) then
584601
begin
585602
SelectBreadcrumb(2);
586603
end else if (CurPageID = DownloadPageID) then
587604
begin
588605
SelectBreadcrumb(3);
589606
WizardForm.NextButton.Visible := False;
607+
end else if (CurPageID = GetStartedPageID) then
608+
begin
609+
SelectBreadcrumb(4);
610+
WizardForm.NextButton.Visible := False;
611+
WizardForm.BackButton.Visible := False;
590612
end;
591613
end;
592614
@@ -635,10 +657,8 @@ begin
635657
Breadcrumbs.Height := 50;
636658
Breadcrumbs.AutoSize := True;
637659
638-
BitmapFileName := ExpandConstant('{tmp}\bg.bmp');
639-
ExtractTemporaryFile(ExtractFileName(BitmapFileName));
640-
641-
Breadcrumbs.Bitmap.LoadFromFile(BitmapFileName);
660+
Breadcrumbs.Bitmap.Height := 50;
661+
Breadcrumbs.Bitmap.Width := 600;
642662
643663
with Breadcrumbs.Bitmap.Canvas do
644664
begin
@@ -661,14 +681,16 @@ begin
661681
WizardForm.Height := 565;
662682
WizardForm.Position := poScreenCenter;
663683
664-
WizardForm.CancelButton.Top := 500;
665-
WizardForm.CancelButton.Left := 840;
684+
// Let's just hide the cancel button, if the user wishes to cancel they can just close the installer window
685+
WizardForm.CancelButton.Visible := False;
686+
//WizardForm.CancelButton.Top := 500;
687+
//WizardForm.CancelButton.Left := 32;
666688
667689
WizardForm.NextButton.Top := 500;
668-
WizardForm.NextButton.Left := 760;
690+
WizardForm.NextButton.Left := 840;
669691
670692
WizardForm.BackButton.Top := 500;
671-
WizardForm.BackButton.Left := 680;
693+
WizardForm.BackButton.Left := 32;
672694
673695
WizardForm.Bevel.Visible := False;
674696
WizardForm.Bevel1.Visible := False;

redhat.bmp

-9.57 KB
Binary file not shown.

0 commit comments

Comments
 (0)