Advertisement
Ra7eN

ISS Script for No Admin PW

Dec 20th, 2024 (edited)
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Inno Script 35.26 KB | Gaming | 0 0
  1. //----------This Installer Uses Inno Setup Unicode Version--------------------------------------------\\
  2. //----------This script is for those that dont have admin to install everywhere. so this fixes that --\\
  3. // -- WARNING: THIS MAY CAUSE AN ERROR WHEN RUNNING THE REDIST STUFF DUE TO THE LOWEST SETTING FOR ADMIN
  4. // -- You game will install but may have issues with directX, PhysX, Framework, and/or redist.
  5. // -- If so, they either get the admin pw to install this, or try another game.
  6. // -- this script it mostly for causual games (eg BIGFISH) AAA game may have issues, not tested.
  7. // -- For detailed info visit: https://howtorepackgames.blogspot.com/
  8. #define AppName "AppName"
  9. #define AppPublisher "your cool ripper name"
  10. #define AppVersion "1.2.3.4"
  11. #define AppExec "hack.exe"
  12. #define AppURL ""
  13. #define AppSize "2000"                
  14. #define SetupName "Setup"  
  15. #define SetupOut "Output"
  16. #define PrecompVer "Inside"
  17.  
  18. [Setup]
  19. AppId={{45B68609-EB9E-44B5-938B-BA846420A031}
  20. SignTool=NobodiSig
  21. PrivilegesRequired=lowest
  22. AllowRootDirectory=False
  23. AppName={#AppName}
  24. AppPublisher={#AppPublisher}
  25. AppVersion={#AppVersion}
  26. AppComments={#AppName}
  27. //If runnng with "lowest" Privilages, do not use {pf}
  28. DefaultDirName=C:\{#AppPublisher}\{#AppName}
  29. DefaultGroupName={#AppName}      
  30. OutputBaseFilename={#SetupName}
  31. OutputDir={#SetupOut}
  32. SetupIconFile=Style\game.ico
  33. WizardImageFile=Style\Background.bmp
  34. WizardSmallImageFile=Style\smallbitmap.bmp
  35. [Icons]
  36. Name: {group}\Uninstall {#AppName}; Filename: {app}\unins000.exe; WorkingDir: {app}; Check: CheckError
  37. Name: {group}\{#AppName}; Filename: {app}\{#AppExec}; WorkingDir: {app}; Check: CheckError
  38. Name: {userdesktop}\{#AppName}; Filename: {app}\{#AppExec}; WorkingDir: {app}; Check: CheckError
  39. [Files]
  40. Source: Include\*.*; DestDir: temp; Flags: dontcopy
  41. Source: Style\*.*; DestDir: temp; Flags: dontcopy
  42. [Messages]
  43. SetupWindowTitle=Welcome to The Setup Wizard «{#AppName}»
  44.  
  45. [CustomMessages]
  46. SoundCtrlButtonCaptionSoundOn=Music on
  47. SoundCtrlButtonCaptionSoundOff=Music off  
  48. [Languages]
  49. Name: eng; MessagesFile: compiler:Default.isl
  50. [Components]
  51. Name: "directx"; Description: "Install DirectX"
  52. Name: "visualc"; Description: "Install Visual C++"
  53. Name: "nvidiaphysx"; Description: "Install Nvidia Physx (nvidia users only)"
  54. Name: "framework"; Description: "Install Framework"
  55. [Tasks]
  56. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
  57. [UninstallDelete]
  58. Type: filesandordirs; Name: {app}
  59. [Code]
  60. const
  61.   BASS_SAMPLE_LOOP = 4;
  62.   BASS_ACTIVE_STOPPED = 0;
  63.   BASS_ACTIVE_PLAYING = 1;
  64.   BASS_ACTIVE_STALLED = 2;
  65.   BASS_ACTIVE_PAUSED  = 3;
  66.   BASS_UNICODE = $80000000;
  67.   BASS_CONFIG_GVOL_STREAM = 5;
  68. const
  69.   #ifndef UNICODE
  70.     EncodingFlag = 0;
  71.   #else
  72.     EncodingFlag = BASS_UNICODE;
  73.   #endif
  74. type
  75.   HSTREAM = DWORD;
  76. function BASS_Init(device: LongInt; freq, flags: DWORD;
  77.   win: HWND; clsid: Cardinal): BOOL;
  78.   external 'BASS_Init@files:bass.dll stdcall';
  79. function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD;
  80.   offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM;
  81.   external 'BASS_StreamCreateFile@files:bass.dll stdcall';
  82. function BASS_Start: BOOL;
  83.   external 'BASS_Start@files:bass.dll stdcall';
  84. function BASS_Pause: BOOL;
  85.   external 'BASS_Pause@files:bass.dll stdcall';
  86. function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL;
  87.   external 'BASS_ChannelPlay@files:bass.dll stdcall';
  88. function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL;
  89.   external 'BASS_SetConfig@files:bass.dll stdcall';
  90. function BASS_ChannelIsActive(handle: DWORD): DWORD;
  91.   external 'BASS_ChannelIsActive@files:bass.dll stdcall';
  92. function BASS_Free: BOOL;
  93.   external 'BASS_Free@files:bass.dll stdcall';
  94. var
  95.   SoundStream: HSTREAM;
  96.   SoundCtrlButton: TNewButton;
  97. procedure SoundCtrlButtonClick(Sender: TObject);
  98. begin
  99.   case BASS_ChannelIsActive(SoundStream) of
  100.     BASS_ACTIVE_PLAYING:
  101.     begin
  102.       if BASS_Pause then
  103.         SoundCtrlButton.Caption :=
  104.           ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOn}');
  105.     end;
  106.     BASS_ACTIVE_PAUSED:
  107.     begin
  108.       if BASS_Start then
  109.         SoundCtrlButton.Caption :=
  110.           ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
  111.     end;
  112.   end;
  113. end;
  114. { RedesignWizardFormBegin } // Don't remove this line
  115. // Don't modify this section. It is generated automatically.
  116. procedure RedesignWizardForm;
  117. begin
  118.   with WizardForm.ProgressGauge do
  119.   begin
  120.     Height := ScaleY(13);
  121.   end;
  122. { ReservationBegin }
  123.   // This part is for you. Add your specialized code here.
  124. { ReservationEnd }
  125. end;
  126. // Don't modify this section. It is generated automatically.
  127. { RedesignWizardFormEnd } // Don't remove this line
  128. type
  129. #ifdef UNICODE
  130.  PChar = PAnsiChar;
  131. #endif
  132. const
  133.   PCFonFLY=true;
  134.   notPCFonFLY=false;
  135. var
  136.   LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2: TLabel;
  137.   ISDoneProgressBar1: TNewProgressBar;
  138.   MyCancelButton: TButton;
  139.   ISDoneCancel:integer;
  140.   ISDoneError:boolean;
  141.   PCFVer:double;
  142. type
  143.   TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
  144. function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
  145. function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
  146. function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
  147. function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
  148. function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
  149. function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
  150. function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile, DeleteDiffFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
  151. function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
  152. function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';
  153. function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
  154. function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
  155. function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
  156. function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
  157. function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
  158. function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
  159. function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
  160. function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
  161. function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
  162. function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
  163. function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
  164. function ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
  165. function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
  166. function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';
  167. function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
  168. begin
  169.   if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
  170.   LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
  171.   LabelCurrFileName.Caption:=' Extracting File: '+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
  172.   LabelTime1.Caption:=' Time Elapsed: '+TimeStr2;
  173.   LabelTime2.Caption:='Time Remaining: '+TimeStr1;
  174.  // LabelTime3.Caption:='Installing time:'+TimeStr3;
  175.   Result := ISDoneCancel;
  176. end;
  177. procedure CancelButtonOnClick(Sender: TObject);
  178. begin
  179.   SuspendProc;
  180.   if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
  181.   ResumeProc;
  182. end;
  183. procedure HideControls;
  184. begin
  185.   WizardForm.FileNamelabel.Hide;
  186.   ISDoneProgressBar1.Hide;
  187.   LabelPct1.Hide;
  188.   LabelCurrFileName.Hide;
  189.   LabelTime1.Hide;
  190.   LabelTime2.Hide;
  191.   MyCancelButton.Hide;
  192. end;
  193. procedure CreateControls;
  194. var PBTop:integer;
  195. begin
  196.   PBTop:=ScaleY(150);
  197.   ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
  198.   with ISDoneProgressBar1 do begin
  199.     Parent   := WizardForm;
  200.     Height   := 25;
  201.     Left     := ScaleX(77);
  202.     Top      := PBTop;
  203.     Width    := ScaleX(500);
  204.     Max      := 1000;
  205.   end;
  206.   LabelCurrFileName := TLabel.Create(WizardForm);
  207.   with LabelCurrFileName do begin
  208.     Parent   := WizardForm;
  209.     AutoSize := False;
  210.     Width    := ISDoneProgressBar1.Width+ScaleX(30);
  211.     Left     := ISDoneProgressBar1.Left;
  212.     Top      := PBTop-20;
  213.   end;
  214.   LabelTime1 := TLabel.Create(WizardForm);
  215.   with LabelTime1 do begin
  216.     Parent   := WizardForm;
  217.     AutoSize := False;
  218.     Width    := ISDoneProgressBar1.Width div 2;
  219.     Left     := ISDoneProgressBar1.Left;
  220.     Top      := PBTop + ScaleY(30);
  221.   end;
  222.   LabelTime2 := TLabel.Create(WizardForm);
  223.   with LabelTime2 do begin
  224.     Parent   := WizardForm;
  225.     AutoSize := False;
  226.     Width    := LabelTime1.Width+ScaleX(40);
  227.     Left     := 400;
  228.     Top      := LabelTime1.Top;
  229.   end;
  230.   LabelPct1 := TLabel.Create(WizardForm);
  231.   with LabelPct1 do begin
  232.     Parent    := WizardForm;
  233.     AutoSize  := true;
  234.     Font.Height:=-24;
  235.     Left      := ISDoneProgressBar1.Left -33 + ISDoneProgressBar1.Width div 2;
  236.     Top       := ISDoneProgressBar1.Top + ScaleY(70);
  237.     //Width     := ScaleX(80);
  238.   end;
  239. //  LabelTime3 := TLabel.Create(WizardForm);
  240. //  with LabelTime3 do begin
  241. //    Parent   := WizardForm;
  242. //    AutoSize := False;
  243. //    Width    := 300;
  244. //    Left     := 180;
  245. //    Top      := 200;
  246. //  end;
  247.   MyCancelButton:=TButton.Create(WizardForm);
  248.   with MyCancelButton do begin
  249.     Parent:=WizardForm;
  250.     Width:=ScaleX(150);
  251.     Caption:='Cancel';
  252.     Left:=ScaleX(347);
  253.     Height:=ScaleX(30);
  254.     Left:=(480);
  255.     Top:=WizardForm.cancelbutton.top;
  256.     OnClick:=@CancelButtonOnClick;
  257.   end;
  258. end;
  259. function CheckError:boolean;
  260. begin
  261.   result:= not ISDoneError;
  262. end;
  263. // Importing LoadSkin API from ISSkin.DLL
  264. procedure LoadSkin(lpszPath: PAnsiChar; lpszIniFileName: PAnsiChar);
  265. external 'LoadSkin@{tmp}\isskin.dll stdcall delayload';
  266. // Importing UnloadSkin API from ISSkin.DLL
  267. procedure UnloadSkin;
  268. external 'UnloadSkin@{tmp}\isskin.dll stdcall delayload';
  269. // Importing ShowWindow Windows API from User32.DLL
  270. function ShowWindow(hWnd: Integer; uType: Integer): Integer;
  271. external 'ShowWindow@user32.dll stdcall';
  272. var
  273.   WelcomeLbl,DirLbl,GroupLbl,TasksLbl,FreeSpaceLabel,NeedSpaceLabel,GameSpaceLabel,PartitionSpaceLabel,Status: TLabel;
  274.   DirBevel,TasksBevel,TasksSeparateBevel,Bevel11,Bevel3,Bevel4,Bevel5,Bevel6,Bevel7,Bevel8,Bevel9,Bevel20,Bevel21,Bevel22,Bevel23: TBevel;
  275.   FreeMB,TotalMB: cardinal;
  276. function InitializeSetup1(): Boolean;
  277. begin
  278.   ExtractTemporaryFile('isskin.dll');
  279.   ExtractTemporaryFile('skin.cjstyles');
  280.     LoadSkin(ExpandConstant('{tmp}\skin.cjstyles'), '');
  281.     Result := True;
  282. end;
  283. Function NumToStr(Float: Extended): String;
  284. Begin
  285.   Result:= Format('%.2n', [Float]); StringChange(Result, ',', '.');
  286.   while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
  287.   SetLength(Result, Length(Result)-1);
  288. End;
  289. Function MbOrTb(Byte: Extended): String;
  290. begin
  291. if Byte < 1024 then Result:= NumToStr(Byte) + ' MB' else
  292.   if Byte/1024 < 1024 then Result:= NumToStr(round(Byte/1024*100)/100) + ' GB' else
  293.      Result:= NumToStr(round((Byte/(1024*1024))*100)/100) + ' TB'
  294. end;
  295. procedure GetFreeSpaceCaption(Sender: TObject);
  296. var Path: String;
  297. begin
  298.   Path := ExtractFileDrive(WizardForm.DirEdit.Text);
  299.   GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
  300.   PartitionSpaceLabel.Caption:= ExpandConstant('Partition Space : ') + MbOrTb(TotalMB);
  301.   FreeSpaceLabel.Caption := ExpandConstant('Free Space : ') + MbOrTb(FreeMB) + ' (' + IntToStr((FreeMB * 100) div TotalMB) + '%)';
  302.   GameSpaceLabel.Caption := ExpandConstant('Game Space : ') + MbOrTb({#AppSize});
  303.   NeedSpaceLabel.Caption := ExpandConstant('Total Needed Space : ') + MbOrTb({#AppSize});
  304.   if (FreeMB<{#AppSize}) then
  305.     FreeSpaceLabel.Font.Color:=clRed
  306.   else
  307.     PartitionSpaceLabel.Font.Color:=NeedSpaceLabel.Font.Color;
  308.     WizardForm.NextButton.Enabled:=FreeMB>{#AppSize};
  309. end;
  310. var
  311.   DirectXCB,VisualCCB,NvidiaPhysx,Framework,IconCB: TNewCheckBox;
  312. //---COMPONENTS POSITION CONTROL---\\
  313. procedure Tasks;
  314. begin
  315.   TasksBevel := TBevel.Create(WizardForm);
  316.   with TasksBevel do
  317.   begin
  318.     Parent := WizardForm;
  319.     Left := ScaleX(90);
  320.     Top := ScaleY(150);
  321.     Width := ScaleX(470);
  322.     Height := ScaleY(73);
  323.   end;
  324. //------------------------\\
  325. //---Top---\\
  326.   Bevel20 := TBevel.Create(WizardForm);
  327.   with Bevel20 do
  328.   begin
  329.     Parent := WizardForm;
  330.     Left := ScaleX(92);
  331.     Top := ScaleY(150);
  332.     Width := ScaleX(470);
  333.     Height := ScaleY(2);
  334.   end;
  335. //---Bottom---\\
  336.     Bevel21 := TBevel.Create(WizardForm);
  337.   with Bevel21 do
  338.   begin
  339.     Parent := WizardForm;
  340.     Left := ScaleX(92);
  341.     Top := ScaleY(308);
  342.     Width := ScaleX(470);
  343.     Height := ScaleY(2);
  344.   end;
  345. //---Left---\\
  346.   Bevel22 := TBevel.Create(WizardForm);
  347.   with Bevel22 do
  348.   begin
  349.     Parent := WizardForm;
  350.     Left := ScaleX(92);
  351.     Top := ScaleY(152);
  352.     Width := ScaleX(2);
  353.     Height := ScaleY(158);
  354.   end;
  355. //---Right---\\
  356.   Bevel23 := TBevel.Create(WizardForm);
  357.   with Bevel23 do
  358.   begin
  359.     Parent := WizardForm;
  360.     Left := ScaleX(560);
  361.     Top := ScaleY(152);
  362.     Width := ScaleX(2);
  363.     Height := ScaleY(156);
  364.   end;
  365. //------------------------\\
  366.  
  367.   DirectXCB := TNewCheckBox.Create(WizardForm);
  368.   with DirectXCB do
  369.   begin
  370.     Parent := WizardForm;
  371.     Left :=(112);
  372.     Top :=(170);
  373.     Width := ScaleX(265);
  374.     Height := ScaleY(17);
  375.     Caption:='Install DirectX';
  376.   end;
  377.  
  378.   VisualCCB := TNewCheckBox.Create(WizardForm);
  379.   with VisualCCB do
  380.   begin
  381.     Parent := WizardForm;
  382.     Left :=(112);
  383.     Top :=(190);
  384.     Width := ScaleX(265);
  385.     Height := ScaleY(17);
  386.     Caption := 'Install Visual C ++';
  387.   end;
  388.  
  389.   NvidiaPhysx := TNewCheckBox.Create(WizardForm);
  390.   with NvidiaPhysx do
  391.   begin
  392.     Parent := WizardForm;
  393.     Left :=(112);
  394.     Top :=(210);
  395.     Width := ScaleX(265);
  396.     Height := ScaleY(17);
  397.     Caption:='Install Nvidia Physx';
  398.   end;
  399.  
  400.   Framework := TNewCheckBox.Create(WizardForm);
  401.   with Framework do
  402.   begin
  403.     Parent := WizardForm;
  404.     Left :=(112);
  405.     Top :=(230);
  406.     Width := ScaleX(265);
  407.     Height := ScaleY(17);
  408.     Caption:='Install Framework';
  409.   end;
  410.  
  411.   TasksSeparateBevel := TBevel.Create(WizardForm);
  412.   with TasksSeparateBevel do
  413.   begin
  414.     Parent := WizardForm;
  415.     Left :=(10);
  416.     Top :=(260);
  417.     Width := TasksBevel.Width - 0;
  418.     Height := ScaleY(2);
  419.     Width := ScaleX(440);
  420.     Left := ScaleX(107);
  421.   end;
  422.  
  423.   IconCB := TNewCheckBox.Create(WizardForm);
  424.   with IconCB do
  425.   begin
  426.     Parent := WizardForm;
  427.     Left := (112);
  428.     Top :=(275);
  429.     Width := ScaleX(255);
  430.     Height := ScaleY(17);
  431.     Caption := 'Create Desktop Shortcut';
  432.   end;
  433. end;
  434. //-----------------------------------\\
  435. procedure LogoLabelOnClick(Sender: TObject);
  436. var
  437.   ErrorCode: Integer;
  438.   begin
  439.   ShellExec('open', '{#AppURL}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
  440. end;
  441. procedure InitializeWizard1();
  442. begin
  443.   WizardForm.WizardBitmapImage2.Cursor:=crHand;
  444.   WizardForm.WizardBitmapImage2.OnClick:=@LogoLabelOnClick;
  445.   WizardForm.ClientWidth:=654;
  446.   WizardForm.ClientHeight:=402;
  447.   WizardForm.InnerNotebook.Hide;
  448.   WizardForm.OuterNotebook.Hide;
  449.   WizardForm.WizardBitmapImage.Stretch:=True;
  450.   WizardForm.WizardBitmapImage.Parent:=WizardForm;
  451.   ExtractTemporaryFile ('logo.bmp');
  452.   WizardForm.WizardBitmapImage2.Width := ScaleX(210);
  453.   WizardForm.WizardBitmapImage2.Height := ScaleX(30);
  454.   WizardForm.WizardBitmapImage2.Top:=331;
  455.   WizardForm.WizardBitmapImage2.Left:=1;
  456.   WizardForm.WizardBitmapImage2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\logo.bmp'));
  457.   WizardForm.WizardBitmapImage2.Parent:=WizardForm;
  458.   WizardForm.WizardSmallBitmapImage.Stretch:=True;
  459.   WizardForm.WizardSmallBitmapImage.Parent:=WizardForm;
  460.   WizardForm.WizardSmallBitmapImage.SetBounds(0,0,WizardForm.ClientWidth,90);
  461.   WizardForm.Bevel1.Parent:=WizardForm;
  462.   WizardForm.Bevel1.Top:=90;
  463.   WizardForm.Bevel1.Width:=WizardForm.ClientWidth;
  464.   WizardForm.Bevel.Parent:=WizardForm;
  465.   WizardForm.Bevel.Top:=330;
  466.   WizardForm.Bevel.Width:=WizardForm.ClientWidth;
  467.   WizardForm.SelectDirBitmapImage.Parent:=WizardForm;
  468.   WizardForm.SelectDirBitmapImage.Top:=125;
  469.   WizardForm.SelectDirBitmapImage.Left:=40;
  470.   WizardForm.DirEdit.Parent:=WizardForm;
  471.   WizardForm.DirEdit.Top:=130;
  472.   WizardForm.DirEdit.Left:=75;
  473.   WizardForm.DirEdit.Width:=430;
  474.   WizardForm.DirEdit.OnChange:=@GetFreeSpaceCaption;
  475.   WizardForm.DirBrowseButton.Parent:=WizardForm;
  476.   WizardForm.DirBrowseButton.Top:=125;
  477.   WizardForm.DirBrowseButton.Left:=515;
  478.   WizardForm.DirBrowseButton.Width:=90;
  479.   WizardForm.DirBrowseButton.Height:=30;
  480.   WizardForm.GroupEdit.Parent:=WizardForm;
  481.   WizardForm.GroupEdit.Top:=255;
  482.   WizardForm.GroupEdit.Left:=75;
  483.   WizardForm.GroupEdit.Width:=430;
  484.   WizardForm.GroupBrowseButton.Parent:=WizardForm;
  485.   WizardForm.GroupBrowseButton.Top:=250;
  486.   WizardForm.GroupBrowseButton.Left:=515;
  487.   WizardForm.GroupBrowseButton.Width:=90;
  488.   WizardForm.GroupBrowseButton.Height:=30;
  489.   WizardForm.NoIconsCheck.Parent:=WizardForm;
  490.   WizardForm.NoIconsCheck.Left:=75;
  491.   WizardForm.NoIconsCheck.Top:=285;
  492.   WizardForm.SelectGroupBitmapImage.Parent:=WizardForm;
  493.   WizardForm.SelectGroupBitmapImage.Top:=250;
  494.   WizardForm.SelectGroupBitmapImage.Left:=40;
  495.   WizardForm.WizardBitmapImage.SetBounds(0,0,WizardForm.ClientWidth,330);
  496.   WizardForm.NextButton.SetBounds(525,347,100,30);
  497.   WizardForm.CancelButton.SetBounds(420,347,100,30);
  498.   WizardForm.BackButton.SetBounds(315,347,100,30);
  499.  
  500.   WelcomeLbl:=TLabel.Create(WizardForm);
  501.   With WelcomeLbl do begin
  502.     Transparent:=true;
  503.     Parent:=WizardForm;
  504.     Alignment:=taCenter;
  505.     Caption:='Welcome to The "{#AppName}" Setup Wizard' + #13#10#13#10 + 'Its recomended that you close all other applications before continuing.' + #13#10#13#10 + 'Click "Next" to continue';
  506.     Font.Color:=clWhite;
  507.     Font.Size:=9;
  508.     SetBounds(126,205,400,90);
  509.   end;
  510. //
  511.   Tasks;
  512.   DirBevel := TBevel.Create(WizardForm);
  513.   with DirBevel do
  514.   begin
  515.     Parent := WizardForm;
  516.     Left := ScaleX(28);
  517.     Top := ScaleY(110);
  518.     Width := ScaleX(594);
  519.     Height := ScaleY(110);
  520.   end;
  521. //-----Bevel Line Page 2 Bottom-----\\
  522. //---Top---\\
  523.   Bevel3 := TBevel.Create(WizardForm);
  524.   with Bevel3 do
  525.   begin
  526.     Parent := WizardForm;
  527.     Left := ScaleX(27);
  528.     Top := ScaleY(235);
  529.     Width := ScaleX(594);
  530.     Height := ScaleY(2);
  531.   end;
  532. //---Bottom---\\
  533.     Bevel4 := TBevel.Create(WizardForm);
  534.   with Bevel4 do
  535.   begin
  536.     Parent := WizardForm;
  537.     Left := ScaleX(27);
  538.     Top := ScaleY(313);
  539.     Width := ScaleX(595);
  540.     Height := ScaleY(2);
  541.   end;
  542. //---Left---\\
  543.   Bevel5 := TBevel.Create(WizardForm);
  544.   with Bevel5 do
  545.   begin
  546.     Parent := WizardForm;
  547.     Left := ScaleX(27);
  548.     Top := ScaleY(236);
  549.     Width := ScaleX(2);
  550.     Height := ScaleY(78);
  551.   end;
  552. //---Right---\\
  553.   Bevel6 := TBevel.Create(WizardForm);
  554.   with Bevel6 do
  555.   begin
  556.     Parent := WizardForm;
  557.     Left := ScaleX(620);
  558.     Top := ScaleY(235);
  559.     Width := ScaleX(2);
  560.     Height := ScaleY(79);
  561.   end;
  562. //------------------------\\
  563. //-----Bevel Line Page 2 Top-----\\
  564. //---Top---\\
  565.     Bevel7 := TBevel.Create(WizardForm);
  566.   with Bevel7 do
  567.   begin
  568.     Parent := WizardForm;
  569.     Left := ScaleX(27);
  570.     Top := ScaleY(110);
  571.     Width := ScaleX(595);
  572.     Height := ScaleY(2);
  573.   end;
  574. //---Bottom---\\
  575.     Bevel8 := TBevel.Create(WizardForm);
  576.   with Bevel8 do
  577.   begin
  578.     Parent := WizardForm;
  579.     Left := ScaleX(27);
  580.     Top := ScaleY(250);
  581.     Width := ScaleX(595);
  582.     Height := ScaleY(2);
  583.   end;
  584. //---Right---\\
  585.     Bevel9 := TBevel.Create(WizardForm);
  586.   with Bevel9 do
  587.   begin
  588.     Parent := WizardForm;
  589.     Left := ScaleX(620);
  590.     Top := ScaleY(110);
  591.     Width := ScaleX(2);
  592.     Height := ScaleY(108);
  593.   end;
  594. //---Left---\\
  595.     Bevel11 := TBevel.Create(WizardForm);
  596.   with Bevel11 do
  597.   begin
  598.     Parent := WizardForm;
  599.     Left := ScaleX(27);
  600.     Top := ScaleY(111);
  601.     Width := ScaleX(2);
  602.     Height := ScaleY(109);
  603.   end;
  604. //------------------------\\
  605.   Status:=TLabel.Create(WizardForm);
  606.   With Status do begin
  607.     //Transparent:=true;
  608.     Parent:=WizardForm;
  609.     Alignment:=taCenter;
  610.     //Font.Color:=clWhite;
  611.     Font.Height:=-15;
  612.     SetBounds(0,218,650,30);
  613.   end;
  614.   DirLbl:=TLabel.Create(WizardForm);
  615.   With DirLbl do begin
  616.     //Transparent:=true;
  617.     Parent:=WizardForm;
  618.     //Alignment:=taCenter;
  619.     Caption:=' Setup will install The game into the following folder ';
  620.     Font.Color:=clWhite;
  621.     SetBounds(52,105,251,15);
  622.   end;
  623.   GroupLbl:=TLabel.Create(WizardForm);
  624.   With GroupLbl do begin
  625.     //Transparent:=true;
  626.     Parent:=WizardForm;
  627.     //Alignment:=taCenter;
  628.     Caption:=' Setup will create shortcuts in the following Start ';
  629.     Font.Color:=clWhite;
  630.     SetBounds(52,230,235,15);
  631.   end;
  632.   TasksLbl:=TLabel.Create(WizardForm);
  633.   With TasksLbl do begin
  634.     //Transparent:=true;
  635.     Parent:=WizardForm;
  636.     //Alignment:=taCenter;
  637.     Caption:='Select the components you want to install; clear the components you do not want to' + #13#10 + 'install. Click Next when you are ready to continue.';
  638.     //Font.Color:=clWhite;
  639.     SetBounds(125,105,407,30);
  640.   end;
  641. //---PARTITION SPACE---\\
  642.   PartitionSpaceLabel:=TLabel.Create(WizardForm);
  643.   With PartitionSpaceLabel do begin
  644.     //Transparent:=true;
  645.     Parent:=WizardForm;
  646.     //Alignment:=taCenter;
  647.     //Font.Color:=clWhite;
  648.     Font.Height:=-13;
  649.     SetBounds(75,160,200,30);
  650.   end;
  651. //---FREE SPACE---\\
  652.   FreeSpaceLabel:=TLabel.Create(WizardForm);
  653.   With FreeSpaceLabel do begin
  654.     //Transparent:=true;
  655.     Parent:=WizardForm;
  656.     //Alignment:=taCenter;
  657.     //Font.Color:=clWhite;
  658.     Font.Height:=-13;
  659.     SetBounds(335,160,200,30);
  660.   end;
  661. //---GAME SPACE---\\
  662.   GameSpaceLabel:=TLabel.Create(WizardForm);
  663.   With GameSpaceLabel do begin
  664.     //Transparent:=true;
  665.     Parent:=WizardForm;
  666.     //Alignment:=taCenter;
  667.     //Font.Color:=clWhite;
  668.     Font.Height:=-13;
  669.     SetBounds(75,190,200,30);
  670.   end;
  671. //---Total Needed Space---\\
  672.   NeedSpaceLabel:=TLabel.Create(WizardForm);
  673.   With NeedSpaceLabel do begin
  674.     //Transparent:=true;
  675.     Parent:=WizardForm;
  676.     //Alignment:=taCenter;
  677.     //Font.Color:=clWhite;
  678.     Font.Height:=-13;
  679.     SetBounds(335,190,200,30);
  680.   end;
  681. end;
  682. Procedure HideComponents();
  683. begin
  684.     WizardForm.WizardSmallBitmapImage.Hide;
  685.     WizardForm.Bevel1.Hide;
  686.     DirBevel.Hide;
  687.     Bevel3.Hide;
  688.     Bevel4.Hide;
  689.     Bevel5.Hide;
  690.     Bevel6.Hide;
  691.     Bevel7.Hide;
  692.     Bevel8.Hide;
  693.     Bevel9.Hide;
  694.     Bevel11.Hide;
  695.     Bevel20.Hide;
  696.     Bevel21.Hide;
  697.     Bevel22.Hide;
  698.     Bevel23.Hide;
  699.     TasksBevel.Hide;
  700.     DirLbl.Hide;
  701.     GroupLbl.Hide;
  702.     TasksLbl.Hide;
  703.     DirectXCB.Hide;
  704.     VisualCCB.Hide;
  705.     NvidiaPhysx.Hide;
  706.     Framework.Hide;
  707.     IconCB.Hide;
  708.     WizardForm.SelectDirBitmapImage.Hide;
  709.     WizardForm.SelectGroupBitmapImage.Hide;
  710.     WizardForm.DirEdit.Hide;
  711.     WizardForm.GroupEdit.Hide;
  712.     WizardForm.DirBrowseButton.Hide;
  713.     WizardForm.GroupBrowseButton.Hide;
  714.     WizardForm.NoIconsCheck.Hide;
  715.     WizardForm.WizardBitmapImage.Hide;
  716.     WelcomeLbl.Hide;
  717. //    WizardForm.ComponentsList.Hide;
  718. //    WizardForm.TasksList.Hide;
  719.     TasksSeparateBevel.Hide;
  720.     PartitionSpaceLabel.Hide;
  721.     FreeSpaceLabel.Hide;
  722.     GameSpaceLabel.Hide;
  723.     NeedSpaceLabel.Hide;
  724.     Status.Hide;
  725. end;
  726. procedure CurStepChanged1(CurStep: TSetupStep);
  727. var Comps1,Comps2,Comps3:cardinal;  
  728. begin
  729.   if CurStep = ssInstall then begin  //If necessary, you can change to ssPostInstall
  730.     WizardForm.ProgressGauge.Hide;
  731.     WizardForm.CancelButton.Hide;
  732.     CreateControls;
  733.     WizardForm.StatusLabel.Caption:='Extracting Files...';
  734.     ISDoneCancel:=0;
  735. #ifdef PrecompVer
  736. #if PrecompVer == "0.38"
  737. ExtractTemporaryFile('precomp038.exe');
  738. #endif
  739. #if PrecompVer == "0.40"
  740. ExtractTemporaryFile('precomp040.exe');
  741. #endif
  742. #if PrecompVer == "0.41"
  743. ExtractTemporaryFile('precomp041.exe');
  744. #endif
  745. #if PrecompVer == "0.42"
  746. ExtractTemporaryFile('precomp042.exe');
  747. #endif
  748. #if PrecompVer == "0.43"
  749. ExtractTemporaryFile('precomp043.exe');
  750. #endif
  751. #if PrecompVer == "Inside"
  752.   ExtractTemporaryFile('CLS-precomp.dll');
  753.   ExtractTemporaryFile('CLS-MSC.dll');
  754.   ExtractTemporaryFile('CLS-srep.dll');
  755.   ExtractTemporaryFile('precomp.exe');
  756. #endif
  757. #endif
  758. ExtractTemporaryFile('arc.ini');
  759. ExtractTemporaryFile('facompress.dll');
  760. ExtractTemporaryFile('facompress_mt.dll');
  761. ExtractTemporaryFile('XDelta3.dll');
  762. ExtractTemporaryFile('7z.dll');
  763. ExtractTemporaryFile('PackZIP.exe');
  764. ExtractTemporaryFile('english.ini');
  765. ExtractTemporaryFile('FreeArc-LZMA-x64.exe');
  766. ExtractTemporaryFile('srep.exe');
  767. ExtractTemporaryFile('srep64.exe');
  768. ExtractTemporaryFile('unarc.dll');
  769. ExtractTemporaryFile('packjpg_dll.dll');
  770. ExtractTemporaryFile('packjpg_dll1.dll');
  771. ExtractTemporaryFile('zlib1.dll');
  772. Comps1:=0; Comps2:=0; Comps3:=0;
  773. #ifdef Components
  774.     TmpValue:=1;
  775.     if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue;     //component 1
  776.     TmpValue:=TmpValue*2;
  777.     if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue;     //component 2
  778.     TmpValue:=TmpValue*2;
  779.     if IsComponentSelected('voice\rus') then Comps1:=Comps1+TmpValue;    //component 3
  780.     TmpValue:=TmpValue*2;
  781.     if IsComponentSelected('voice\eng') then Comps1:=Comps1+TmpValue;    //component 4
  782. #endif
  783. #ifdef precomp
  784.   PCFVer:={#precomp};
  785. #else
  786.   PCFVer:=0;
  787. #endif
  788.     ISDoneError:=true;
  789.     if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, 512, @ProgressCallback) then begin
  790.       repeat
  791.         ChangeLanguage('english');
  792.         if not SrepInit('',512,0) then break;
  793.         if not PrecompInit('',128,PCFVer) then break;
  794.         if not FileSearchInit(true) then break;
  795.         #include 'Archives.ini'
  796.         ISDoneError:=false;
  797.       until true;
  798.       ISDoneStop;
  799.     end;
  800.     HideControls;
  801.     WizardForm.CancelButton.Visible:=true;
  802.     WizardForm.CancelButton.Enabled:=false;
  803.     Status.Show;
  804.   end;
  805.   if CurStep=ssPostInstall then begin
  806.     if DirectXCB.Checked then begin
  807.       Status.Caption:='Installing DirectX...';
  808.       Status.Left := 200;
  809.       Status.Top := 200;
  810.       Status.Width := 223;
  811.       Status.Height := 20;
  812.       Exec2(ExpandConstant('{src}\Redist\runDX.bat'),'/q',false);
  813.     end;
  814.     if NvidiaPhysx.Checked then begin
  815.       Status.Caption:='Installing Nvidia Physx...';
  816.       Status.Left := 200;
  817.       Status.Top := 200;
  818.       Status.Width := 227;
  819.       Status.Height := 20;
  820.       Exec2(ExpandConstant('{src}\Redist\PhysX.exe'),'/q',false);
  821.     end;
  822.     if VisualCCB.Checked then begin
  823.       Status.Caption:='Installing Visual C++...';
  824.       Status.Left := 200;
  825.       Status.Top := 200;
  826.       Status.Width := 227;
  827.       Status.Height := 20;
  828.       Exec2(ExpandConstant('{src}\Redist\install_all.bat'),'/q',false);
  829.     end;
  830.     if Framework.Checked then begin
  831.       Status.Caption:='Installing Framework...';
  832.       Status.Left := 200;
  833.       Status.Top := 200;
  834.       Status.Width := 227;
  835.       Status.Height := 20;
  836.       Exec2(ExpandConstant('{src}\Redist\ndp48-web.exe'),'/q',false);
  837.     end;
  838.   end;
  839.   if (CurStep=ssInstall) and ISDoneError then begin
  840.     Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
  841.   end;
  842. end;
  843. //-------- First Page --------\\
  844. procedure CurPageChanged1(CurPageID: integer);
  845. begin
  846.   if CurPageID=wpWelcome then begin
  847.     HideComponents;    
  848.     WizardForm.Position:=poScreenCenter;
  849.     Bevel3.Hide;
  850.     Bevel4.Hide;
  851.     Bevel5.Hide;
  852.     Bevel6.Hide;
  853.     WizardForm.WizardBitmapImage.Show;
  854.     WelcomeLbl.Show;
  855.     WizardForm.CancelButton.show;
  856.   end;
  857. //-------- Second Page --------\\
  858.   if CurPageID=wpSelectDir then begin
  859.     HideComponents;
  860.     WizardForm.Position:=poScreenCenter;
  861.     WizardForm.WizardSmallBitmapImage.Show;
  862.     WizardForm.Bevel1.Show;
  863.     DirBevel.Show;
  864.     Bevel3.show;
  865.     Bevel4.Show;
  866.     Bevel5.Show;
  867.     Bevel6.Show;
  868.     Bevel7.Show;
  869.     Bevel8.hide;
  870.     Bevel9.Show;
  871.     Bevel11.Show;
  872.     WizardForm.Caption:= 'Select Dir «{#AppName}»';
  873.     WizardForm.SelectDirBitmapImage.Show;
  874.     WizardForm.SelectGroupBitmapImage.Show;
  875.     WizardForm.DirEdit.Show;
  876.     WizardForm.GroupEdit.Show;
  877.     WizardForm.DirBrowseButton.Show;
  878.     WizardForm.GroupBrowseButton.Show;
  879.     WizardForm.NoIconsCheck.Show;
  880.     DirLbl.Show;
  881.     GroupLbl.Show;
  882.     PartitionSpaceLabel.Show;
  883.     FreeSpaceLabel.Show;
  884.     GameSpaceLabel.Show;
  885.     NeedSpaceLabel.Show;
  886.     GetFreeSpaceCaption(nil);
  887.   end;
  888. //--------  Third page  --------\\
  889.   if CurPageID=wpSelectTasks then begin
  890.     HideComponents;
  891.     WizardForm.Position:=poScreenCenter;
  892.     WizardForm.Caption:= 'Select Tasks «{#AppName}»';
  893.     WizardForm.WizardSmallBitmapImage.Show;
  894.     WizardForm.Bevel1.Show;
  895.     Bevel3.Hide;
  896.     Bevel4.Hide;
  897.     Bevel5.Hide;
  898.     Bevel6.Hide;
  899.     Bevel20.Show;
  900.     Bevel21.Show;
  901.     Bevel22.Show;
  902.     Bevel23.Show;
  903.     WizardForm.ComponentsList.Show;
  904.     WizardForm.TasksList.Show;
  905.     DirectXCB.Show;
  906.     DirectXCB.Checked:= False;
  907.     VisualCCB.Show;
  908.     VisualCCB.Checked:= False;
  909.     NvidiaPhysx.Checked:= False;
  910.     NvidiaPhysx.Enabled:= True;
  911.     NvidiaPhysx.Show;
  912.     Framework.Show;
  913.     Framework.Enabled:= True;
  914.     Framework.Checked:= False;
  915.     IconCB.Show;
  916.     IconCB.Checked:= True;
  917.     TasksBevel.Hide;
  918.     TasksLbl.Show;
  919.     WizardForm.NextButton.Caption:='Install';
  920.     TasksSeparateBevel.Show;
  921.   end;
  922. //--------Installation Page--------\\
  923.   if CurPageID=wpInstalling then begin
  924.     TasksSeparateBevel.Hide;
  925.     HideComponents;
  926.     WizardForm.Position:=poScreenCenter;
  927.     WizardForm.WizardSmallBitmapImage.Show;
  928.     WizardForm.Caption:= 'Installing «{#AppName}»';
  929.     WizardForm.Bevel1.Show;
  930.     WizardForm.TasksList.CheckItem(0,IconCB.Checked);
  931.   end;
  932. //--------Game was successfully installed PAGE--------\\
  933.   if CurPageID=wpFinished then begin
  934.     HideComponents;
  935.     WizardForm.Position:=poScreenCenter;
  936.     WizardForm.WizardBitmapImage.Show;
  937.     WelcomeLbl.Show;
  938.     WelcomeLbl.Left:=110;
  939.     WizardForm.Caption:= 'Finish «{#AppName}» Setup Wizard';
  940.     WelcomeLbl.Caption:='«{#AppName}» was successfully installed on your computer.' + #13#10#13#10 + 'Run the game from shortcut in "start" menu or Desktop shortcut.' + #13#10#13#10 + 'Click "Finish" to exit the installation program.';
  941.   end;
  942. //--------Game Fail To Install PAGE--------\\
  943.   if (CurPageID = wpFinished) and ISDoneError then
  944.   begin
  945.     //LabelTime3.Hide;
  946.     WizardForm.Caption:= 'Error «{#AppName}»';
  947.     WelcomeLbl.Font.Color:= clRed;
  948.     WelcomeLbl.Caption:= 'Setup encountered an error while installing «{#AppName}»' + #13#10#13#10 + 'Changes were not saved , please re-run the setup again.';
  949.     WelcomeLbl.Left:=163;
  950.   end;
  951. end;
  952. function ShouldSkipPage1(PageID: Integer): Boolean;
  953. begin
  954.   if (PageID=wpSelectProgramGroup) or (PageID=wpReady) or (PageID=wpSelectComponents) then Result:=true;
  955. end;
  956. procedure DeinitializeSetup1();
  957. begin
  958.     ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
  959.     UnloadSkin();
  960. end;
  961. procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10 :integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
  962. procedure InitializeWizard2();
  963. begin
  964.   ExtractTemporaryFile('Splash.png');
  965.   ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000,3000,1000,0,255,True,$FFFFFF,10);
  966. end;
  967. function InitializeSetup(): Boolean;
  968. begin
  969.   Result := InitializeSetup1(); if not Result then exit;
  970. end;
  971. procedure InitializeWizard();
  972. begin
  973.   ExtractTemporaryFile('music.mp3');
  974.   if BASS_Init(-1, 44100, 0, 0, 0) then
  975.   begin
  976.     SoundStream := BASS_StreamCreateFile(False,
  977.     ExpandConstant('{tmp}\music.mp3'), 0, 0, 0, 0,
  978.     EncodingFlag or BASS_SAMPLE_LOOP);
  979.     BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 2500);
  980.     BASS_ChannelPlay(SoundStream, False);
  981.     SoundCtrlButton := TNewButton.Create(WizardForm);
  982.     SoundCtrlButton.Parent := WizardForm;
  983.     SoundCtrlButton.SetBounds(210,347,100,30);
  984.     SoundCtrlButton.Caption :=
  985.     ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
  986.     SoundCtrlButton.OnClick := @SoundCtrlButtonClick;
  987.   RedesignWizardForm;
  988.   InitializeWizard1();
  989.   InitializeWizard2();
  990. end;
  991. end;
  992. procedure CurStepChanged(CurStep: TSetupStep);
  993. begin
  994.   CurStepChanged1(CurStep);
  995. end;
  996. procedure CurPageChanged(CurPageID: Integer);
  997. begin
  998.   CurPageChanged1(CurPageID);
  999. end;
  1000. function ShouldSkipPage(PageID: Integer): Boolean;
  1001. begin
  1002.   Result := ShouldSkipPage1(PageID); if not Result then exit;
  1003. end;
  1004. procedure DeinitializeSetup();
  1005. begin
  1006.   BASS_Free();
  1007.   DeinitializeSetup1();
  1008. end;
  1009.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement