@@ -21,7 +21,7 @@ AppUpdatesURL={#AppURL}
2121CreateAppDir = yes
2222DefaultDirName = {pf} \{#AppName}
2323DefaultGroupName = {#AppName}
24- OutputBaseFilename = developer_platform
24+ OutputBaseFilename = developer_platform_setup
2525Compression = lzma
2626SolidCompression = yes
2727;WizardSmallImageFile=blank.bmp
@@ -34,7 +34,7 @@ DisableFinishedPage=yes
3434ExtraDiskSpaceRequired = 1048576
3535
3636[Files]
37- Source : " EfTidy.dll" ; Flags : dontcopy
37+ Source : " EfTidy.dll" ; Flags : dontcopy ;
3838
3939#include " idp_source\idp.iss"
4040
6868 RelayState: String;
6969 end ;
7070
71+ const
72+ JBDS_URL = ' https://access.redhat.com/jbossnetwork/restricted/softwareDownload.html?softwareId=40371' ;
73+
7174var
7275 // Page IDs
7376 AuthPageID, ComponentPageID, DownloadPageID, GetStartedPageID, InstallPageID : Integer;
8992 // Flag indicating whether the user has authenticated successfully
9093 IsAuthenticated: Boolean;
9194
92- // rh_sso cookie value for downloading JBDS
93- RHSSOCookieValue: String;
95+ // cookie values for downloading JBDS
96+ RHSSOCookieValue, JSessionIdCookieValue : String;
9497
9598// Converts a color String in the format '$rrggbb' to a TColor value
9699function StringToColor (Color: String): TColor;
@@ -279,11 +282,8 @@ begin
279282 AuthLabel.Visible := True;
280283 AuthLabel.Refresh;
281284
282- // Resource := 'https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?product=jbossdeveloperstudio&downloadType=distributions';
283- Resource := ' https://access.redhat.com/jbossnetwork/restricted/softwareDownload.html?softwareId=40371' ;
284-
285285 Url := ' https://idp.redhat.com/idp/authUser?j_username=' + UsernameEdit.Text + ' &j_password=' + PasswordEdit.Text +
286- ' &redirect=' + Resource ;
286+ ' &redirect=' + JBDS_URL ;
287287
288288 // Perform a SAML authentication for redhat.com
289289 WinHttpReq := CreateOleObject(' WinHttp.WinHttpRequest.5.1' );
@@ -296,6 +296,9 @@ begin
296296
297297 WinHttpReq.Send();
298298
299+ // Extract the JSESSIONID cookie
300+ JSessionIdCookieValue := ' JSESSIONID=' + GetCookieValue(WinHttpReq.getResponseHeader(' Set-Cookie' ), ' JSESSIONID' );
301+
299302 if WinHttpReq.Status <> 200 then
300303 begin
301304 AuthLabel.Caption := ' Authentication Failed.' ;
@@ -376,8 +379,13 @@ begin
376379 AuthLabel.Font.Color := clRed;
377380 Exit;
378381 end else begin
379- RHSSOCookieValue := GetCookieValue(WinHttpReq.getResponseHeader(' Set-Cookie' ), ' rh_sso' )
382+ RHSSOCookieValue := ' rh_sso= ' + GetCookieValue(WinHttpReq.getResponseHeader(' Set-Cookie' ), ' rh_sso' );
380383 Log(' Got rh_sso cookie: ' + RHSSOCookieValue);
384+
385+ idpAddFile(JBDS_URL, ExpandConstant(' {tmp}\jboss-devstudio-9.0.0.GA-installer-standalone.jar' ));
386+ idpSetCookie(JBDS_URL, ' http://access.redhat.com/' , JSessionIdCookieValue);
387+ idpSetCookie(JBDS_URL, ' http://access.redhat.com/' , RHSSOCookieValue);
388+
381389 end ;
382390 end ;
383391
@@ -1026,15 +1034,15 @@ begin
10261034
10271035 // Zulu
10281036 // idpSetOption('Referer', 'http://www.azulsystems.com/products/zulu/downloads');
1029- 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' ));
1037+ // 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'));
10301038 // 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'));
10311039
10321040 // VirtualBox
1033- 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' ));
1041+ // 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'));
10341042 // idpAddFile('http://192.168.1.114/~shane/VirtualBox-5.0.2-102096-Win.exe', ExpandConstant('{tmp}\VirtualBox-5.0.2-102096-Win.exe'));
10351043
10361044 // Vagrant
1037- idpAddFile(' https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4.msi' , ExpandConstant(' {tmp}\vagrant_1.7.4.msi' ));
1045+ // idpAddFile('https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4.msi', ExpandConstant('{tmp}\vagrant_1.7.4.msi'));
10381046 // idpAddFile('http://192.168.1.114/~shane/vagrant_1.7.4.msi', ExpandConstant('{tmp}\vagrant_1.7.4.msi'));
10391047
10401048 idpDownloadAfter(wpReady);
0 commit comments