Advertisement
the_Ma5TeR

New Modified Inno Script

Nov 24th, 2014
3,242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;InnoSetupVersion=5.5.0
  2.  
  3. #define MyAppId "Adobe Shockwave Player"
  4.  
  5. [Setup]
  6. AppName=Adobe Runtimes AiO
  7. AppVersion=15.12.15
  8. AppPublisher=Adobe Systems, Inc.
  9. AppPublisherURL=www.adobe.com
  10. OutputBaseFilename=AdobeRuntimes_AiO_15.12.15_niTe.RiDeR_Nov24.2014
  11. Compression=lzma2/ultra64
  12. Uninstallable=no
  13. DisableProgramGroupPage=yes
  14. WizardImageFile=embedded\WizardImage.bmp
  15. LicenseFile=embedded\LicenseAgreement.rtf
  16. SolidCompression=yes
  17. InternalCompressLevel=ultra
  18. SetupIconFile=embedded\SetupIcon.ico
  19. WizardSmallImageFile=embedded\WizardSmallImage.bmp
  20. VersionInfoVersion=15.12.15
  21. VersionInfoCompany=Adobe Systems Incorporated
  22. VersionInfoDescription=Adobe Runtimes AiO (Adobe Shockwave Player v12.1.4.154 + Flash Player v15.0.0.223 + Adobe AIR) RePacked Setup
  23. VersionInfoProductName=Adobe Runtimes AiO
  24. VersionInfoProductVersion=15.12.15
  25. VersionInfoProductTextVersion=12.12.15
  26. CreateAppDir=False
  27.  
  28. [Files]
  29. Source: "{app}\install_flash_player_15_active_x.exe"; DestDir: "{tmp}"; Components: flashactivex; MinVersion: 0.0,5.01; Flags: deleteafterinstall
  30. Source: "{app}\install_flash_player_15_plugin.exe"; DestDir: "{tmp}"; Components: flashplugin; MinVersion: 0.0,5.01; Flags: deleteafterinstall
  31. Source: "{app}\sw_lic_full_installer.msi"; DestDir: "{tmp}"; Components: shockwave; MinVersion: 0.0,5.01; Flags: deleteafterinstall
  32. Source: "{app}\AdobeAIRInstaller.exe"; DestDir: "{tmp}"; Components: air; MinVersion: 0.0,5.01; Flags: deleteafterinstall
  33. Source: "embedded\ISWin7.dll"; DestDir: "{tmp}"; Flags: dontcopy nocompression
  34.  
  35. [Run]
  36. Filename: "{tmp}\install_flash_player_15_active_x.exe"; Parameters: "-install"; StatusMsg: "Installing Flash Player 15 ActiveX; Please wait..."; Components: flashactivex; MinVersion: 0.0,5.01;
  37. Filename: "{tmp}\install_flash_player_15_plugin.exe"; Parameters: "-install"; StatusMsg: "Installing Flash Player 15 Plugin; Please wait..."; Components: flashplugin; MinVersion: 0.0,5.01;
  38. Filename: "{tmp}\sw_lic_full_installer.msi"; Parameters: "/qn"; StatusMsg: "Installing Shockwave Player 12; Please wait..."; Components: shockwave; MinVersion: 0.0,5.01; Flags: shellexec
  39. Filename: "{tmp}\AdobeAIRInstaller.exe"; Parameters: "-silent"; StatusMsg: "Installing Adobe AIR 15; Please wait..."; Components: air; MinVersion: 0.0,5.01;
  40.  
  41. [Components]
  42. Name: "flashplugin"; Description: "Adobe Flash Player v15.0.0.223 Plugin"; Types: "compact full"; MinVersion: 0.0,5.01; ExtraDiskSpaceRequired: 10485760
  43. Name: "flashactivex"; Description: "Adobe Flash Player v15.0.0.223 ActiveX"; Types: "compact full"; MinVersion: 0.0,5.01; ExtraDiskSpaceRequired: 10485760
  44. Name: "shockwave"; Description: "Adobe Shockwave Player v12.1.4.154"; Types: "compact full"; MinVersion: 0.0,5.01; ExtraDiskSpaceRequired: 10485760
  45. Name: "air"; Description: "Adobe AIR v15.0.0.356"; Types: "full"; MinVersion: 0.0,5.01; ExtraDiskSpaceRequired: 10485760
  46.  
  47. [Messages]
  48. SelectComponentsLabel2=Select the runtimes you want to install; clear the runtimes you do not want to install. Click Next when you are ready to continue.
  49. WizardSelectComponents=Select Runtimes
  50. SelectComponentsDesc=Which runtimes should be installed?
  51.  
  52. [Code]
  53. { RedesignWizardFormBegin } // Don't remove this line!
  54. var
  55.   ISCustomPage2: TWizardPage;
  56.   ISCustomPage3: TWizardPage;
  57.   ISCustomPage1: TWizardPage;
  58.   ISCustomPage4: TWizardPage;
  59.   Label1: TLabel;
  60.   Label2: TLabel;
  61.   Label3: TLabel;
  62.   Label4: TLabel;
  63.   Label5: TLabel;
  64.   Label6: TLabel;
  65.   Label7: TLabel;
  66.   ResultCode: Integer;
  67.   ResultStr: string;
  68.  
  69. procedure RedesignWizardForm;
  70. begin
  71.   { Creates custom wizard page }
  72.   ISCustomPage4 := CreateCustomPage(wpWelcome, 'Description', 'A Description of the Runtimes (Components)');
  73.  
  74.   with WizardForm do
  75.   begin
  76.     AutoScroll := False;
  77.     ClientHeight := ScaleY(363);
  78.     ClientWidth := ScaleX(490);
  79.     Caption := 'Setup - Adobe Runtimes AiO RePack';
  80.   end;
  81.  
  82.   with WizardForm.CancelButton do
  83.   begin
  84.     Left := ScaleX(404);
  85.   end;
  86.  
  87.   with WizardForm.NextButton do
  88.   begin
  89.     Left := ScaleX(319);
  90.   end;
  91.  
  92.   with WizardForm.BackButton do
  93.   begin
  94.     Left := ScaleX(244);
  95.   end;
  96.  
  97.   with WizardForm.WizardBitmapImage do
  98.   begin
  99.     Width := ScaleX(180);
  100.   end;
  101.  
  102.   with WizardForm.WelcomeLabel2 do
  103.   begin
  104.     Caption := 'This AiO RePack will install Adobe Flash Player v15.0.0.223 + Shockwave Player v12.1.4.154 + Adobe AIR v15.0.0.356 on your computer.' + #13#10 +
  105.          '' + #13#10 +
  106.          'It is strongly recommended to close other web browsers.' + #13#10 +
  107.          'You can choose which runtimes to install.' + #13#10 +
  108.          '' + #13#10 +
  109.          'Click Next to continue, or Cancel to exit Setup.';
  110.     Left := ScaleX(184);
  111.     Top := ScaleY(94);
  112.     Width := ScaleX(293);
  113.     Height := ScaleY(212)
  114.   end;
  115.  
  116.   with WizardForm.WelcomeLabel1 do
  117.   begin
  118.     Caption := 'Welcome to the Adobe Runtimes AiO Setup Wizard by -=niTe_RiDeR_Pro=-';
  119.     Left := ScaleX(184);
  120.     Width := ScaleX(307);
  121.     Height := ScaleY(78);
  122.   end;
  123.  
  124.   with WizardForm.ComponentsList do
  125.   begin
  126.     Top := ScaleY(69);
  127.   end;
  128.  
  129.   { Label7 }
  130.   Label7 := TLabel.Create(WizardForm);
  131.   with Label7 do
  132.   begin
  133.     Name := 'Label7';
  134.     Parent := WizardForm;
  135.     Caption := 'RePack by niTe_RiDeR_Pro';
  136.     Font.Color := clWindowText;
  137.     Font.Height := -11;
  138.     Font.Name := 'Tahoma';
  139.     Font.Style := [fsItalic];
  140.     ParentFont := False;
  141.     Left := ScaleX(14);
  142.     Top := ScaleY(331);
  143.     Width := ScaleX(130);
  144.     Height := ScaleY(13);
  145.   end;
  146.  
  147.   { ISCustomPage4 }
  148.   with ISCustomPage4.Surface do
  149.   begin
  150.     Color := clBtnFace;
  151.   end;
  152.  
  153.   { Label1 }
  154.   Label1 := TLabel.Create(WizardForm);
  155.   with Label1 do
  156.   begin
  157.     Parent := ISCustomPage4.Surface;
  158.     Caption := 'Adobe Flash Player:';
  159.     Font.Color := clWindowText;
  160.     Font.Height := -11;
  161.     Font.Name := 'Tahoma';
  162.     Font.Style := [fsBold];
  163.     ParentFont := False;
  164.     Left := ScaleX(8);
  165.     Top := ScaleY(8);
  166.     Width := ScaleX(110);
  167.     Height := ScaleY(13);
  168.   end;
  169.  
  170.   { Label2 }
  171.   Label2 := TLabel.Create(WizardForm);
  172.   with Label2 do
  173.   begin
  174.     Parent := ISCustomPage4.Surface;
  175.     AutoSize := False;
  176.     Caption := 'Adobe Flash Player is the standard for delivering high-impact, rich Web content. ' + #13#10 +
  177.          'Designs, animation, and application user interfaces are deployed immediately across' + #13#10 +
  178.          'attracting and engaging users with a rich Web experience.';
  179.     Left := ScaleX(8);
  180.     Top := ScaleY(24);
  181.     Width := ScaleX(407);
  182.     Height := ScaleY(61);
  183.   end;
  184.  
  185.   { Label3 }
  186.   Label3 := TLabel.Create(WizardForm);
  187.   with Label3 do
  188.   begin
  189.     Parent := ISCustomPage4.Surface;
  190.     Caption := 'Adobe Shockwave Player:';
  191.     Font.Color := clWindowText;
  192.     Font.Height := -11;
  193.     Font.Name := 'Tahoma';
  194.     Font.Style := [fsBold];
  195.     ParentFont := False;
  196.     Left := ScaleX(8);
  197.     Top := ScaleY(80);
  198.     Width := ScaleX(145);
  199.     Height := ScaleY(13);
  200.   end;
  201.  
  202.   { Label4 }
  203.   Label4 := TLabel.Create(WizardForm);
  204.   with Label4 do
  205.   begin
  206.     Parent := ISCustomPage4.Surface;
  207.     Caption := 'Shockwave Player is the web standard for powerful multimedia playback. The ' + #13#10 +
  208.          'Shockwave Player allows you to view interactive web content like games,' + #13#10 +
  209.          ' business presentations, entertainment, and advertisements from your web browser. ';
  210.     Left := ScaleX(8);
  211.     Top := ScaleY(96);
  212.     Width := ScaleX(412);
  213.     Height := ScaleY(39);
  214.   end;
  215.  
  216.   { Label5 }
  217.   Label5 := TLabel.Create(WizardForm);
  218.   with Label5 do
  219.   begin
  220.     Parent := ISCustomPage4.Surface;
  221.     Caption := 'Adobe AIR:';
  222.     Font.Color := clWindowText;
  223.     Font.Height := -11;
  224.     Font.Name := 'Tahoma';
  225.     Font.Style := [fsBold];
  226.     ParentFont := False;
  227.     Left := ScaleX(8);
  228.     Top := ScaleY(152);
  229.     Width := ScaleX(63);
  230.     Height := ScaleY(13);
  231.   end;
  232.  
  233.   { Label6 }
  234.   Label6 := TLabel.Create(WizardForm);
  235.   with Label6 do
  236.   begin
  237.     Parent := ISCustomPage4.Surface;
  238.     Caption := 'Adobe AIR is a cross-operating-system runtime that lets developers combine HTML, ' + #13#10 +
  239.          'JavaScript, Adobe Flash® and Flex technologies, and ActionScript®; and also lets ' + #13#10 +
  240.          'users to deploy rich Internet applications (RIAs) on a broad range of devices including ' + #13#10 +
  241.          'desktop computers, netbooks, tablets, smartphones, and TVs. ';
  242.     Left := ScaleX(8);
  243.     Top := ScaleY(168);
  244.     Width := ScaleX(415);
  245.     Height := ScaleY(52);
  246.   end;
  247.  
  248.   with WizardForm.MainPanel do
  249.   begin
  250.     Left := ScaleX(0);
  251.     Top := ScaleY(0);
  252.   end;
  253.  
  254.   with WizardForm.PageDescriptionLabel do
  255.   begin
  256.     Transparent := True;
  257.     Left := ScaleX(24);
  258.     Top := ScaleY(29);
  259.   end;
  260.  
  261.   with WizardForm.PageNameLabel do
  262.   begin
  263.     AutoSize := True;
  264.     Left := ScaleX(16);
  265.     Top := ScaleY(8);
  266.     Width := ScaleX(4);
  267.   end;
  268. end;
  269. { RedesignWizardFormEnd } // Don't remove this line!
  270.  
  271. procedure ISCustomPage1Activate(Sender: TWizardPage);
  272. begin
  273.  
  274. end;
  275.  
  276. procedure iswin7_add_glass(Handle:HWND; Left, Top, Right, Bottom : Integer; GDIPLoadMode: boolean);
  277. external 'iswin7_add_glass@files:iswin7.dll stdcall';
  278. procedure iswin7_add_button(Handle:HWND);
  279. external 'iswin7_add_button@files:iswin7.dll stdcall';
  280. procedure iswin7_free;
  281. external 'iswin7_free@files:iswin7.dll stdcall';
  282.  
  283. procedure InitializeWizard();
  284. begin
  285.   RedesignWizardForm;
  286.     iswin7_add_button(WizardForm.BackButton.Handle);
  287.     iswin7_add_button(WizardForm.NextButton.Handle);
  288.     iswin7_add_button(WizardForm.CancelButton.Handle);
  289.     iswin7_add_glass(WizardForm.Handle, 0, 0, 0, ScaleY(50), True);
  290. end;
  291.  
  292. function InitializeSetup(): Boolean;
  293. begin
  294.   // Check if the application is already install
  295.   // MsgBox('MyAppId = ' + '{#MyAppId}', mbInformation, mb_Ok);
  296.   begin
  297.     If RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppId}_is1', 'UninstallString', ResultStr) then begin
  298.       If ResultStr<>'' then begin
  299.         ResultStr:=RemoveQuotes(ResultStr);
  300.           if MsgBox('The previous version of Shockwave Player application is already installed. ' #13#13 'Uninstall it ?', mbConfirmation, MB_YESNO) = idYes then
  301.           if not Exec(ResultStr, '/S', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
  302.             MsgBox('Error !!! ' #13#13 '' + SysErrorMessage(ResultCode) + '.', mbError, MB_OK);
  303.       end;
  304.     end;
  305.   end ;
  306.   Result := True;
  307. end;
  308.  
  309. procedure DeinitializeSetup();
  310. begin
  311.     iswin7_free;
  312. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement