Распаковка 32 или 64 бит exe

bosenok

Новичок
Вообщем тема такая:Хочу сделать чтобы при распаковке игры(Hard West - Scars of Freedom)распаковывалась версия по личному выбору.Ну например выбор 64 битной версии то распаковка этой версии а если 32 то 32бит.Экзе -файл одинаковый по названию и обьединить не получается при создании сразу двух ярлыков.У меня запаковано так:
один архив с нужными файлами для 32 бит
один архив с нужными файлами для 64 бит
Я так понял это надо делать в Inno Setup
Плиз Уважаемые помогите решить проблемму.
 

zettend

Старожил
Вот пример:
Код:
[run]
Filename: "{src}\redist\vcredist\vcredist_x86.exe"; WorkingDir: {src}\redist\vcredist; Parameters: /Q; Flags: waituntilterminated; Check: not IsWin64
А именно:
Check: IsWin64 или Check: not IsWin64
 

zettend

Старожил
Могу только такой пример дать:

Код:
function IsNotWin64(): Boolean;
begin
  if IsWin64 then
  begin
    Result := True;
  end else
    MsgBox('Похоже у вас 32-х битная OS. Но данная OS не поддерживается игрой!', mbError, MB_OK);
    Result := False;
end;

function InitializeSetup:boolean;
begin
   Result := IsNotWin64;
end;
 

bosenok

Новичок
;#define SPLASH
#define SecondProgressBar
;==================================================
#define GameName "Hard West(32bit)"
#define GameName2 "Hard West(64bit)"
#define ExeName "\HardWest.exe"
#define ExeName2 "\HardWest.exe"

#define Processor "2600"
#define VideoRAM "512"
#define PhysRAM "2000"
#define OpSystem "512"

#define NeedSpace "5200"
#define NeedMem "2048"

#define records

#define facompress

#define PrecompInside
#define SrepInside
;#define MSCInside
#define precomp "0.42"
#define unrar
;#define XDelta
#define PackZIP

#include "Units\Functions.iss"
#include "Units\botva2.iss"
#include "Units\TLabelEx.iss"
#include "Units\BASS_Module.iss"
#include "Units\ISDone.iss"
#include "Units\Messages.iss"

[Setup]
AppName=Hard West - Scars of Freedom
AppVersion=1.4
DefaultDirName={pf}\Hard West - Scars of Freedom
DefaultGroupName=by bosenok\Hard West - Scars of Freedom
DisableReadyPage=yes
DisableProgramGroupPage=yes
SetupIconFile=Resources\MainIcon.ico

Compression=lzma2/ultra64
OutputDir=.

[Languages]
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"

[Types]
Name: full; Description: Full installation; Flags: iscustom

[Components]
; Game Language
Name: lang; Description: {cm:CompLang}; Types: full; Flags: fixed
Name: lang\rus; Description: {cm:CompLangRus}; Flags: exclusive;
Name: lang\eng; Description: {cm:CompLangEng}; Flags: exclusive;
; Medecine
;Name: medecine; Description: {cm:CompMedecine}; Types: full; Flags: fixed
;Name: medecine\medecine1; Description: {cm:CompMedecine1}; Flags: exclusive;
//Name: medecine\medecine2; Description: {cm:CompMedecine2}; Flags: exclusive;
//Name: medecine\medecine3; Description: {cm:CompMedecine3}; Flags: exclusive;
; Additional Software
Name: soft; Description: {cm:CompSoft}; Types: full;
Name: soft\directx; Description: {cm:CompSoftDirectX}; Types: full;
Name: soft\vcredist; Description: {cm:CompSoftRedist}; Types: full;
; Additional Icons
Name: icons; Description: {cm:CompIcons}; Types: full;
Name: icons\desktop; Description: {cm:CompIconsDesktop}; Types: full;
Name: icons\quicklaunch; Description: {cm:CompIconsQuickLaunch}; Types: full;



[Files]
Source: "Resources\*"; Flags: dontcopy; Attribs: hidden system
Source: "Resources\DLL\*"; Flags: dontcopy; Attribs: hidden system
Source: "Resources\Images\*"; Flags: dontcopy; Attribs: hidden system
Source: "Resources\ISDone\*"; Flags: dontcopy; Attribs: hidden system
//////////////////////////////////////////////////////////////////////////////
#ifdef PrecompInside
Source: Resources\ISDone\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
Source: Resources\ISDone\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Resources\ISDone\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
Source: Resources\ISDone\precomp.exe; DestDir: {tmp}; Flags: dontcopy
Source: Resources\DLL\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: Resources\ISDone\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
Source: Resources\ISDone\srep64.exe; DestDir: {tmp}; Flags: dontcopy
Source: Resources\ISDone\srep.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef facompress
Source: Resources\ISDone\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp
#if precomp == "0.38"
Source: Resources\precomp.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.4"
Source: Resources\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.41"
Source: Resources\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
#else
Source: Resources\ISDone\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
Source: Resources\ISDone\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
Source: Resources\ISDone\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#endif
#endif
#endif
#ifdef unrar
Source: Resources\ISDone\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef XDelta
Source: Resources\ISDone\XDelta3.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PackZIP
Source: Resources\ISDone\7z.dll; DestDir: {tmp}; Flags: dontcopy
Source: Resources\ISDone\packZIP.exe; DestDir: {tmp}; Flags: dontcopy
#endif

[Icons]
Name: "{commondesktop}\{#GameName}"; Filename: "{app}\{#ExeName}";WorkingDir: "{app}"; Parameters:"32bit" ; Components: icons\desktop; Check: CheckError
Name: "{commondesktop}\{#GameName2}"; Filename: "{app}\{#ExeName2}";WorkingDir: "{app}"; Parameters:"64bit" ; Components: icons\desktop; Check: CheckError
Name: "{group}\{#GameName}"; Filename: "{app}\{#ExeName}";Parameters: ; Check: CheckError
Name: "{group}\{#GameName2}"; Filename: "{app}\{#ExeName2}";Parameters:Íàñòðîéêè ; Check: CheckError
Name: "{group}\{cm:UninstallGame,{#GameName}}"; Filename: "{uninstallexe}"; Check: CheckError
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#GameName}"; Filename: "{app}\{#ExeName}"; Components: icons\quicklaunch; Check: CheckError
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#GameName2}"; Filename: "{app}\{#ExeName2}"; Components: icons\quicklaunch; Check: CheckError


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

[Registry]
Root: HKCU; SubKey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueType: string; ValueName: {app}\Compil32.exe; ValueData: RUNASADMIN; Flags: uninsdeletevalue uninsdeletekeyifempty

//Root: HKLM; Subkey: "SOFTWARE\RePack by bosenok\{#ExeName}"; ValueName: "ExePath"; ValueType: String; ValueData: "{app}\Binaries\Win32\Bombshell.exe"; Flags: uninsdeletevalue uninsdeletekeyifempty
//Root: HKLM; Subkey: "SOFTWARE\RePack by bosenok\{#ExeName2}"; ValueName: "LauncherPath"; ValueType: String; ValueData: "{app}\Binaries\Win64\Bombshell.exe"; Flags: uninsdeletevalue uninsdeletekeyifempty


















[Run]
Filename: "{src}\Redist\DirectX Web setup.exe"; Flags: waituntilterminated skipifdoesntexist; Components: soft\directx; Check: CheckError
Filename: "{src}\Redist\vc_redist.x86.exe"; Flags: waituntilterminated skipifdoesntexist; Components: soft\vcredist; Check: CheckError and not IsWin64;
Filename: "{src}\Redist\vc_redist.x86.exe"; Flags: waituntilterminated skipifdoesntexist; Components: soft\vcredist; Check: CheckError and IsWin64

//Filename: "{src}\Redist\dotNetFx40_Full_setup.exe"; Flags: waituntilterminated skipifdoesntexist; Components: soft\directx; Check: CheckError
//Filename: {src}\Soft\PhysX\PhysX-9.12.1031-SystemSoftware.exe; Parameters: /qn; StatusMsg: Óñòàíàâëèâàåì NVIDIA PhysX...; Flags: skipifdoesntexist; Tasks: Soft\PhysXCheck; Check: CheckError
//Filename: {src}\Soft\Ubisoft\UbisoftGameLauncherInstaller.exe; WorkingDir: {src}\Soft\Ubisoft\; StatusMsg: Óñòàíîâêà Ubisoft Game Launcher...; Flags: waituntilterminated; Tasks: Soft\UbisoftGameLauncher
//Filename: {src}\Soft\WinLive\gfwlivesetup.exe; WorkingDir: {src}\Soft\WinLive\; StatusMsg: Óñòàíîâêà Windows Live...; Flags: waituntilterminated; Tasks: Soft\WinLive

[UninstallDelete]
Type: filesandordirs; Name: {app};

Код:
var
  HardwareInfoPage: TWizardPage;
  wpHardware: Integer;
  WizardImg, StatusPanelBlock: array[1..6] of Longint;
  HardwarePanel, DirEdit, DirFolder, GroupEdit, GroupFolder: Longint;
  StatusPanelLabel: array[1..6] of TLabelEx;
  PageNameLabel, PageDescLabel, WelcomeLabel1, WelcomeLabel2,
  HardwareLabel, HardwareClickLabel, ProcessorName, VideoCardName, SoundCardName, PhysRAMSize, OSName,
  Processor, VideoCard, SoundCard, PhysRAM, OS,
  SelectDirBrowseLabel, DirEditText, GroupEditText, SelectDirLabel, SelectStartMenuFolderLabel, FreeSpaceLabel, NeedSpaceLabel,
  SelectComponentsLabel, FinishedHeadingLabel, FinishedLabel,
  StatusLabel, FilenameLabel, ElapsedTimeLabel, RemainingTimeLabel, PctLabel1: TLabelEx;
  ISDoneProgressBar1: TNewProgressBar;
  #ifdef SecondProgressBar
    PctLabel2: TLabelEx;
    ISDoneProgressBar2: TNewProgressBar;
  #endif

procedure DirEditChange(Sender: TObject); forward;
procedure GroupEditChange(Sender: TObject); forward;

function CheckError: Boolean;
begin
  Result := not ISDoneError;
end;

procedure RedesignWizardForm;
var
  i: Integer;
begin
  #ifdef SPLASH
    ExtractTemporaryFile('Splash.png');
    ShowSplashScreen(WizardForm.Handle, ExpandConstant('{tmp}\Splash.png'), 1000, 2000, 1000, 0, 255, False, $FFFFFF, 10);
  #endif

  with WizardForm do
  begin
    InnerNotebook.Hide;
    OuterNotebook.Hide;
    ClientWidth := ScaleX(837);
    ClientHeight := ScaleY(500);
    Center;
    Bevel.Width := ClientWidth;
    Bevel.Top := ScaleY(438);
    BackButton.Left := ScaleX(560);
    BackButton.Top := ScaleY(458);
    NextButton.Left := ScaleX(650);
    NextButton.Top := BackButton.Top;
    CancelButton.Left := ScaleX(740);
    CancelButton.Top := BackButton.Top;
  end;

  for i := 1 to 6 do
    WizardImg[i] := ImgLoad(WizardForm.Handle, 'WizardImg' + IntToStr(i) + '.jpg', 0, 0, WizardForm.ClientWidth, WizardForm.ClientHeight, True, True);
  ImgLoad(WizardForm.Handle, 'StatusPanel.png', 0, ScaleY(32), ScaleX(194), ScaleY(389), True, True);
  ImgLoad(WizardForm.Handle, 'WorkingSpace.png', ScaleX(234), ScaleY(32), ScaleX(603), ScaleY(389), True, True);
  ImgLoad(WizardForm.Handle, 'Logo.png', ScaleX(100), ScaleY(450), ScaleX(316), ScaleY(43), True, True);

  BASS_Init(ExpandConstant('{tmp}\Music.mp3'));
  BASS_CreateOnOffButton(WizardForm, 'MusicButton.png', 20, 450, 36, 36, 4);

  ImgApplyChanges(WizardForm.Handle);
end;

procedure CreateStatusPanel;
var
  i, BlockTop: Integer;
begin
  BlockTop := 70;
  for i := 1 to 6 do
  begin
    StatusPanelBlock[i] := ImgLoad(WizardForm.Handle, 'StatusPanelBlock.png', 0, ScaleY(BlockTop), ScaleX(172), ScaleY(40), True, True);
    BlockTop := BlockTop + 54;
  end;

  StatusPanelLabel[1] := LabelCreateEx(WizardForm, CustomMessage('StatusPanelWelcome'), ScaleX(15), ScaleY(80), ScaleX(142), ScaleY(20),
    'Calibri', 13, 2, [fsBold], clWhite, clBlack, False, False, taLeftJustify);
  StatusPanelLabel[2] := LabelCreateEx(WizardForm, CustomMessage('StatusPanelHardware'), ScaleX(15), ScaleY(134), ScaleX(142), ScaleY(20),
    'Calibri', 13, 2, [fsBold], clWhite, clBlack, False, False, taLeftJustify);
  StatusPanelLabel[3] := LabelCreateEx(WizardForm, CustomMessage('StatusPanelDirs'), ScaleX(15), ScaleY(188), ScaleX(142), ScaleY(20),
    'Calibri', 13, 2, [fsBold], clWhite, clBlack, False, False, taLeftJustify);
  StatusPanelLabel[4] := LabelCreateEx(WizardForm, CustomMessage('StatusPanelComponents'), ScaleX(15), ScaleY(242), ScaleX(142), ScaleY(20),
    'Calibri', 13, 2, [fsBold], clWhite, clBlack, False, False, taLeftJustify);
  StatusPanelLabel[5] := LabelCreateEx(WizardForm, CustomMessage('StatusPanelInstalling'), ScaleX(15), ScaleY(296), ScaleX(142), ScaleY(20),
    'Calibri', 13, 2, [fsBold], clWhite, clBlack, False, False, taLeftJustify);
  StatusPanelLabel[6] := LabelCreateEx(WizardForm, CustomMessage('StatusPanelFinished'), ScaleX(15), ScaleY(350), ScaleX(142), ScaleY(20),
    'Calibri', 13, 2, [fsBold], clWhite, clBlack, False, False, taLeftJustify);
  ImgApplyChanges(WizardForm.Handle);
end;

procedure SetFreeDiscSpace;
var
  FreeMB, TotalMB: Cardinal;
begin
  GetSpaceOnDisk(ExtractFileDrive(WizardForm.DirEdit.Text), True, FreeMB, TotalMB);
  SetLabelExCaption(FreeSpaceLabel, FmtMessage(CustomMessage('FreeSpaceLabel'), [MbOrTb(FreeMB)]));
end;

procedure CreateWizardComponents;
begin
  PageNameLabel := LabelCreateEx(WizardForm, '', ScaleX(270), ScaleY(60), ScaleX(531), ScaleY(30),
    'Calibri', 14, 2, [fsBold], $efefef, $2a2c2d, False, True, taLeftJustify);
  PageDescLabel := LabelCreateEx(WizardForm, '', ScaleX(280), ScaleY(90), ScaleX(511), ScaleY(30),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  // *** "Welcome" wizard page
  WelcomeLabel1 := LabelCreateEx(WizardForm, WizardForm.WelcomeLabel1.Caption, ScaleX(270), ScaleY(70), ScaleX(531), ScaleY(45),
    'Calibri', 14, 2, [fsBold], $efefef, $2a2c2d, False, True, taCenter);
  WelcomeLabel2 := LabelCreateEx(WizardForm, WizardForm.WelcomeLabel2.Caption, ScaleX(270), ScaleY(180), ScaleX(531), ScaleY(160),
    'Calibri', 11, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  // *** "Hardware Information" wizard page
  HardwareInfoPage := CreateCustomPage(wpWelcome, CustomMessage('WizardHardwareInfo'), CustomMessage('HardwareInfoDesc'));
  wpHardware := HardwareInfoPage.ID;

  HardwareLabel := LabelCreateEx(WizardForm, CustomMessage('HardwareLabelGood'), ScaleX(280), ScaleY(130), ScaleX(511), ScaleY(30),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  HardwarePanel := ImgLoad(WizardForm.Handle, 'HardwarePanel.png', ScaleX(280), ScaleY(190), ScaleX(511), ScaleY(146), True, True);

  Processor := LabelCreateEx(WizardForm, CustomMessage('Processor'), ScaleX(286), ScaleY(193), ScaleX(125), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  VideoCard := LabelCreateEx(WizardForm, CustomMessage('VideoCard'), ScaleX(286), ScaleY(224), ScaleX(125), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  SoundCard := LabelCreateEx(WizardForm, CustomMessage('SoundCard'), ScaleX(286), ScaleY(255), ScaleX(125), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  PhysRAM := LabelCreateEx(WizardForm, CustomMessage('PhysRAM'), ScaleX(286), ScaleY(286), ScaleX(125), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  OS := LabelCreateEx(WizardForm, CustomMessage('OS'), ScaleX(286), ScaleY(317), ScaleX(125), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  ProcessorName := LabelCreateEx(WizardForm, GetProcessorName + ' @' + IntToStr(GetProcessorFreq) + ' MHz', ScaleX(432), ScaleY(193), ScaleX(352), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  VideoCardName := LabelCreateEx(WizardForm, DelSp(GetVideoName) + ' ~' + IntToStr(GetVideoRam) + CustomMessage('MB'), ScaleX(432), ScaleY(224), ScaleX(352), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  SoundCardName := LabelCreateEx(WizardForm, GetSoundCardName, ScaleX(432), ScaleY(255), ScaleX(352), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  PhysRAMSize := LabelCreateEx(WizardForm, IntToStr(GetTotalRam + 1) + ' ' + CustomMessage('MB'), ScaleX(432), ScaleY(286), ScaleX(352), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  OSName := LabelCreateEx(WizardForm, GetOsName + ' [x' + IntToStr(GetOsBit) + ']', ScaleX(432), ScaleY(317), ScaleX(352), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  HardwareClickLabel := LabelCreateEx(WizardForm, SetupMessage(msgClickNext), ScaleX(280), ScaleY(350), ScaleX(511), ScaleY(30),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  if (GetProcessorFreq * GetProcessorCoreCount) < {#Processor} then
  begin
    SetLabelExColor(ProcessorName, $2a2c2d, clRed);
    SetLabelExCaption(HardwareLabel, CustomMessage('HardwareLabelRed'));
  end;
  if GetVideoRam < {#VideoRAM} then
  begin
    SetLabelExColor(VideoCardName, $2a2c2d, clRed);
    SetLabelExCaption(HardwareLabel, CustomMessage('HardwareLabelRed'));
  end;
  if GetSoundCards = 0 then
  begin
    SetLabelExColor(ProcessorName, $2a2c2d, clRed);
    SetLabelExCaption(HardwareLabel, CustomMessage('HardwareLabelRed'));
    SetLabelExCaption(SoundCardName, CustomMessage('SoundCardRed'));
  end;
  if (GetTotalRam + 1) < {#PhysRAM} then
  begin
    SetLabelExColor(PhysRAMSize, $2a2c2d, clRed);
    SetLabelExCaption(HardwareLabel, CustomMessage('HardwareLabelRed'));
  end;
  if {#OpSystem} > GetOsNumber then
  begin
    SetLabelExColor(OSName, $2a2c2d, clRed);
    SetLabelExCaption(HardwareLabel, CustomMessage('HardwareLabelRed'));
  end;

  // *** "Select Destination Location" wizard page
  SelectDirBrowseLabel := LabelCreateEx(WizardForm, WizardForm.SelectDirBrowseLabel.Caption, ScaleX(280), ScaleY(130), ScaleX(511), ScaleY(30),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  DirFolder := ImgLoad(WizardForm.Handle, 'Folder.png', ScaleX(280), ScaleY(170), ScaleX(73), ScaleY(57), True, True);
  DirEdit := ImgLoad(WizardForm.Handle, 'Edit.png', ScaleX(370), ScaleY(205), ScaleX(330), ScaleY(22), True, True);

  SelectDirLabel := LabelCreateEx(WizardForm, WizardForm.SelectDirLabel.Caption, ScaleX(370), ScaleY(175), ScaleX(405), ScaleY(30),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  DirEditText := LabelCreateEx(WizardForm, '', ScaleX(376), ScaleY(208), ScaleX(328), ScaleY(22),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  SetLabelExCaption(DirEditText,
    MinimizePathName(WizardForm.DirEdit.Text, DirEditText.Massive[0].Font, DirEditText.Massive[0].Width));

  WizardForm.DirEdit.OnChange := @DirEditChange;
  WizardForm.DirBrowseButton.Parent := WizardForm;
  WizardForm.DirBrowseButton.Left := ScaleX(716);
  WizardForm.DirBrowseButton.Top := ScaleY(205);

  GroupFolder := ImgLoad(WizardForm.Handle, 'Folder.png', ScaleX(280), ScaleY(260), ScaleX(73), ScaleY(57), True, True);
  GroupEdit := ImgLoad(WizardForm.Handle, 'Edit.png', ScaleX(370), ScaleY(295), ScaleX(330), ScaleY(22), True, True);

  SelectStartMenuFolderLabel := LabelCreateEx(WizardForm, WizardForm.SelectStartMenuFolderLabel.Caption, ScaleX(370), ScaleY(265), ScaleX(420), ScaleY(30),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  GroupEditText := LabelCreateEx(WizardForm, '', ScaleX(376), ScaleY(298), ScaleX(328), ScaleY(22),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  SetLabelExCaption(GroupEditText,
    MinimizePathName(WizardForm.GroupEdit.Text, GroupEditText.Massive[0].Font, GroupEditText.Massive[0].Width));

  WizardForm.GroupEdit.OnChange := @GroupEditChange;
  WizardForm.GroupBrowseButton.Parent := WizardForm;
  WizardForm.GroupBrowseButton.Left := ScaleX(716);
  WizardForm.GroupBrowseButton.Top := ScaleY(295);

  NeedSpaceLabel := LabelCreateEx(WizardForm, FmtMessage(CustomMessage('NeedSpaceLabel'), [MbOrTB({#NeedSpace})]),
    ScaleX(280), ScaleY(360), ScaleX(300), ScaleY(16), 'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  FreeSpaceLabel := LabelCreateEx(WizardForm, '', ScaleX(280), ScaleY(380), ScaleX(300), ScaleY(16),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  SetFreeDiscSpace;

  // *** "Select Components" wizard page
  SelectComponentsLabel := LabelCreateEx(WizardForm, WizardForm.SelectComponentsLabel.Caption, ScaleX(280), ScaleY(130), ScaleX(511), ScaleY(50),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  WizardForm.ComponentsList.Parent := WizardForm;
  WizardForm.ComponentsList.SetBounds(ScaleX(280), ScaleY(190), ScaleX(511), ScaleY(180));
  WizardForm.ComponentsList.ItemHeightFixed := True;

  // *** "Installing" wizard page
  WizardForm.ProgressGauge.Parent := WizardForm;
  WizardForm.ProgressGauge.SetBounds(ScaleX(280), ScaleY(190), ScaleX(511), ScaleY(25));

  StatusLabel := LabelCreateEx(WizardForm, SetupMessage(msgStatusExtractFiles), ScaleX(280), ScaleY(140), ScaleX(511), ScaleY(20),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, False, taLeftJustify);

  FilenameLabel := LabelCreateEx(WizardForm, '* * *', ScaleX(280), ScaleY(170), ScaleX(511), ScaleY(20),
    'Calibri', 9, 0, [fsbold], $dddddd, $2a2c2d, False, False, taLeftJustify);

  ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
  with ISDoneProgressBar1 do
  begin
    Parent := WizardForm;
    SetBounds(ScaleX(280), ScaleY(190), ScaleX(460), ScaleY(25));
    Max := 1000;
    Hide;
  end;

  PctLabel1 := LabelCreateEx(WizardForm, '', ScaleX(750), ScaleY(193), ScaleX(50), ScaleY(20),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, False, taLeftJustify);

  #ifdef SecondProgressBar
    ISDoneProgressBar2 := TNewProgressBar.Create(WizardForm);
    with ISDoneProgressBar2 do
    begin
      Parent := WizardForm;
      SetBounds(ScaleX(280), ScaleY(230), ScaleX(460), ScaleY(25));
      Max := 1000;
      Hide;
    end;

    PctLabel2 := LabelCreateEx(WizardForm, '', ScaleX(750), ScaleY(233), ScaleX(50), ScaleY(20),
      'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, False, taLeftJustify);
  #endif

  ElapsedTimeLabel := LabelCreateEx(WizardForm, '', ScaleX(280), ScaleY(270), ScaleX(250), ScaleY(20),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);
  RemainingTimeLabel := LabelCreateEx(WizardForm, '', ScaleX(280), ScaleY(290), ScaleX(250), ScaleY(20),
    'Calibri', 10, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);

  // *** "Setup Completed" wizard page
  FinishedHeadingLabel := LabelCreateEx(WizardForm, WizardForm.FinishedHeadingLabel.Caption, ScaleX(270), ScaleY(70), ScaleX(531), ScaleY(45),
    'Calibri', 14, 2, [fsBold], $efefef, $2a2c2d, False, True, taCenter);

  FinishedLabel := LabelCreateEx(WizardForm, '', ScaleX(270), ScaleY(180), ScaleX(531), ScaleY(160),
    'Calibri', 11, 2, [fsBold], $dddddd, $2a2c2d, False, True, taLeftJustify);
end;

////////////////////////////////////////////////////////////////////////////
procedure HideWizardComponents;
var
  i: Integer;
begin
  for i := 1 to 6 do
    ImgSetVisibility(WizardImg[i], False);
  HideLabelEx(WelcomeLabel1);
  HideLabelEx(WelcomeLabel2);
  ImgSetVisibility(HardwarePanel, False);
  HideLabelEx(HardwareLabel);
  HideLabelEx(Processor);
  HideLabelEx(VideoCard);
  HideLabelEx(SoundCard);
  HideLabelEx(PhysRAM);
  HideLabelEx(OS);
  HideLabelEx(ProcessorName);
  HideLabelEx(VideoCardName);
  HideLabelEx(SoundCardName);
  HideLabelEx(PhysRAMSize);
  HideLabelEx(OSName);
  HideLabelEx(HardwareClickLabel);
  ImgSetVisibility(DirFolder, False);
  ImgSetVisibility(GroupFolder, False);
  ImgSetVisibility(DirEdit, False);
  ImgSetVisibility(GroupEdit, False);
  WizardForm.DirBrowseButton.Hide;
  HideLabelEx(SelectDirLabel);
  HideLabelEx(DirEditText);
  WizardForm.GroupBrowseButton.Hide;
  HideLabelEx(SelectStartMenuFolderLabel);
  HideLabelEx(GroupEditText);
  HideLabelEx(NeedSpaceLabel);
  HideLabelEx(FreeSpaceLabel);
  HideLabelEx(SelectDirBrowseLabel);
  HideLabelEx(SelectComponentsLabel);
  WizardForm.ComponentsList.Hide;
  WizardForm.ProgressGauge.Hide;
  HideLabelEx(PctLabel1);
  #ifdef SecondProgressBar
    HideLabelEx(PctLabel2);
  #endif
  HideLabelEx(ElapsedTimeLabel);
  HideLabelEx(RemainingTimeLabel);
  HideLabelEx(FilenameLabel);
  HideLabelEx(StatusLabel);
  HideLabelEx(FinishedHeadingLabel);
  HideLabelEx(FinishedLabel);
end;

procedure ChangeWizardPages(CurPageID: Integer);
var
  i: Integer;
begin
  HideWizardComponents;
  ShowLabelEx(PageNameLabel);
  ShowLabelEx(PageDescLabel);

  SetLabelExCaption(PageNameLabel, WizardForm.PageNameLabel.Caption);
  SetLabelExCaption(PageDescLabel, WizardForm.PageDescriptionLabel.Caption);

  for i := 1 to 6 do
    SetLabelExColor(StatusPanelLabel[i], clBlack, clSilver);

  case CurPageID of
    wpWelcome:
    begin
      ImgSetVisibility(WizardImg[1], True);
      SetLabelExColor(StatusPanelLabel[1], clBlack, clWhite);
      HideLabelEx(PageNameLabel);
      HideLabelEx(PageDescLabel);
      ShowLabelEx(WelcomeLabel1);
      ShowLabelEx(WelcomeLabel2);
    end;
    wpHardware:
    begin
      ImgSetVisibility(WizardImg[2], True);
      SetLabelExColor(StatusPanelLabel[2], clBlack, clWhite);
      ImgSetVisibility(HardwarePanel, True);
      ShowLabelEx(HardwareLabel);
      ShowLabelEx(Processor);
      ShowLabelEx(VideoCard);
      ShowLabelEx(SoundCard);
      ShowLabelEx(PhysRAM);
      ShowLabelEx(OS);
      ShowLabelEx(ProcessorName);
      ShowLabelEx(VideoCardName);
      ShowLabelEx(SoundCardName);
      ShowLabelEx(PhysRAMSize);
      ShowLabelEx(OSName);
      ShowLabelEx(HardwareClickLabel);
    end;
    wpSelectDir:
    begin
      ImgSetVisibility(WizardImg[3], True);
      SetLabelExColor(StatusPanelLabel[3], clBlack, clWhite);
      ImgSetVisibility(DirFolder, True);
      ImgSetVisibility(GroupFolder, True);
      ImgSetVisibility(DirEdit, True);
      ImgSetVisibility(GroupEdit, True);
      WizardForm.DirBrowseButton.Show;
      ShowLabelEx(SelectDirLabel);
      ShowLabelEx(DirEditText);
      WizardForm.GroupBrowseButton.Show;
      ShowLabelEx(SelectStartMenuFolderLabel);
      ShowLabelEx(GroupEditText);
      ShowLabelEx(FreeSpaceLabel);
      ShowLabelEx(NeedSpaceLabel);
      ShowLabelEx(SelectDirBrowseLabel);
    end;
    wpSelectComponents:
    begin
      ImgSetVisibility(WizardImg[4], True);
      SetLabelExColor(StatusPanelLabel[4], clBlack, clWhite);
      WizardForm.NextButton.Caption := SetupMessage(msgButtonInstall);
      ShowLabelEx(SelectComponentsLabel);
      WizardForm.ComponentsList.Show;
    end;
    wpInstalling:
    begin
      ImgSetVisibility(WizardImg[5], True);
      SetLabelExColor(StatusPanelLabel[5], clBlack, clWhite);
      WizardForm.ProgressGauge.Show;
      ShowLabelEx(StatusLabel);
      ShowLabelEx(FilenameLabel);
    end;
    wpFinished:
    begin
      ImgSetVisibility(WizardImg[6], True);
      SetLabelExColor(StatusPanelLabel[6], clBlack, clWhite);
      ShowLabelEx(FinishedHeadingLabel);
      if not ISDoneError then
        SetLabelExCaption(FinishedLabel, WizardForm.FinishedLabel.Caption)
      else
        SetLabelExCaption(FinishedLabel, SetupMessage(msgSetupAborted));
      ShowLabelEx(FinishedLabel);
    end;
  end;
  ImgApplyChanges(WizardForm.Handle);
end;

////////////////////////////////////////////////////////////////////////////
procedure DirEditChange(Sender: TObject);
begin
  SetLabelExCaption(DirEditText,
    MinimizePathName(WizardForm.DirEdit.Text, DirEditText.Massive[0].Font, DirEditText.Massive[0].Width));
  SetFreeDiscSpace;
end;

procedure GroupEditChange(Sender: TObject);
begin
  SetLabelExCaption(GroupEditText,
    MinimizePathName(WizardForm.GroupEdit.Text, GroupEditText.Massive[0].Font, GroupEditText.Massive[0].Width));
end;

////////////////////////////////////////////////////////////////////////////
function ISDoneProgressCallback(OveralPct, CurrentPct: Integer; CurrentFile, TimeStr1, TimeStr2, TimeStr3: PAnsiChar): LongWord;
begin
  if OveralPct <= 1000 then ISDoneProgressBar1.Position := OveralPct;
  SetLabelExCaption(PctLabel1, IntToStr(OveralPct div 10) + '.' + chr(48 + OveralPct mod 10) + ' %');

  #ifdef SecondProgressBar
    if CurrentPct <= 1000 then ISDoneProgressBar2.Position := CurrentPct;
    SetLabelExCaption(PctLabel2, IntToStr(CurrentPct div 10) + '.' + chr(48 + CurrentPct mod 10) + ' %');
  #endif

  SetLabelExCaption(FilenameLabel, MinimizePathName(CurrentFile, FilenameLabel.Massive[0].Font, FilenameLabel.Massive[0].Width));

  SetLabelExCaption(ElapsedTimeLabel, FmtMessage(CustomMessage('ElapsedTime'), [TimeStr2]));
  SetLabelExCaption(RemainingTimeLabel, FmtMessage(CustomMessage('RemainingTime'), [TimeStr1]));

  Result := ISDoneCancel;
end;

procedure ISDoneSetComponents(var Comps1, Comps2, Comps3, TmpValue: Cardinal);
begin
  Comps1 := 0;
  Comps2 := 0;
  Comps3 := 0;

  TmpValue := 1;
    if IsComponentSelected('lang\rus') then Comps1 := Comps1 + TmpValue;
  TmpValue := TmpValue * 2;
    if IsComponentSelected('lang\eng') then Comps1 := Comps1 + TmpValue;
  TmpValue := TmpValue * 2;
    if IsComponentSelected('medecine\medecine1') then Comps1 := Comps1 + TmpValue;
  TmpValue := TmpValue * 2;
    if IsComponentSelected('medecine\medecine2') then Comps1 := Comps1 + TmpValue;
  TmpValue := TmpValue * 2;
    if IsComponentSelected('medecine\medecine3') then Comps1 := Comps1 + TmpValue;
end;

procedure ISDoneUnPack(CurStep: TSetupStep);
var
  Comps1, Comps2, Comps3, TmpValue: Cardinal;
begin
  WizardForm.ProgressGauge.Hide;
  ISDoneProgressBar1.Show;
  ShowLabelEx(PctLabel1);
  #ifdef SecondProgressBar
    ISDoneProgressBar2.Show;
    ShowLabelEx(PctLabel2);
  #endif
  ShowLabelEx(ElapsedTimeLabel);
  ShowLabelEx(RemainingTimeLabel);

  ISDoneCancel := 0;

  ISDoneExtractTemporaryFiles;
  ISDoneSetComponents(Comps1, Comps2, Comps3, TmpValue);

  #ifdef precomp
    PCFVer := {#precomp};
  #else
    PCFVer := 0;
  #endif

  ISDoneError := True;
  if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1, Comps2, Comps3, MainForm.Handle, {#NeedMem}, @ISDoneProgressCallback) then
  begin
    repeat
      if not SrepInit('', 512, 0) then break;
      if not PrecompInit('', 128, PCFVer) then break;
      if not FileSearchInit(true) then break;

        if not ISArcExtract ( 0,5, ExpandConstant('{src}\data-1.bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        if not ISArcExtract ( 0,5, ExpandConstant('{src}\data-2.bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        if not ISArcExtract ( 0,20 , ExpandConstant('{src}\data-3.bin'), ExpandConstant('{app}\HardWest_Data'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        if not ISArcExtract ( 0,30, ExpandConstant('{src}\data-4.bin'), ExpandConstant('{app}\HardWest_Data'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        if not ISArcExtract ( 0,40, ExpandConstant('{src}\data-5.bin'), ExpandConstant('{app}\Data'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
      //  if not ISArcExtract ( 0, 30, ExpandConstant('{src}\data4.bin'), ExpandConstant('{app}\envs'), '', false, '12345', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
      //  if not ISArcExtract ( 0, 30, ExpandConstant('{src}\data4.bin'), ExpandConstant('{app}\data_win64\worlds\windy_city'), '', false, '12345', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;


      //  if not ISArcExtract ( 0, 10, ExpandConstant('{src}\data6.bin'), ExpandConstant('{app}\Data'), '', false, '12345', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
      //  if not ISArcExtract ( 0, 10, ExpandConstant('{src}\data7.bin'), ExpandConstant('{app}\Data\Win32'), '', false, '12345', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
      //  if not ISArcExtract ( 0, 10, ExpandConstant('{src}\data8.bin'), ExpandConstant('{app}\Data\Win32'), '', false, '12345', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
      //  if not ISArcExtract ( 0, 10, ExpandConstant('{src}\data10.bin'), ExpandConstant('{app}\Data'), '', false, '12345', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
      //  if not ISArcExtract ( 0, 10, ExpandConstant('{src}\data11.bin'), ExpandConstant('{app}\Data'), '', false, '12345', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;


        //if not ISPrecompExtract( 0, 10, ExpandConstant('{app}\1.pcf'),    ExpandConstant('{app}\1.arc'), true) then break;
        //if not ISArcExtract    ( 0, 10, ExpandConstant('{app}\1.arc'), ExpandConstant('{app}\'), '', true, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        #ifdef Components
        //if not ISArcExtract    ( 1, 0, ExpandConstant('{src}\G1.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        //if not ISArcExtract    ( 2, 0, ExpandConstant('{src}\G2.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        //if not ISArcExtract    ( 3, 0, ExpandConstant('{src}\G3.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        //if not ISArcExtract    ( 4, 0, ExpandConstant('{src}\G4.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        //if not ISArcExtract    ( 5, 0, ExpandConstant('{src}\Data-4.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        //if not ISArcExtract    ( 6, 0, ExpandConstant('{src}\G6.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        //if not ISArcExtract    ( 7, 0, ExpandConstant('{src}\G7.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        #endif
////    äàëåå íàõîäÿòñÿ çàêîììåíòèðîâàíûå ïðèìåðû ðàçëè÷íûõ ôóíêöèé ðàñïàêîâêè (÷òîáû êàæäûé ðàç íå ëàçèòü â ñïðàâêó çà ïðèìåðàìè)
(*
        if not ISArcExtract    ( 0, 0, ExpandConstant('{src}\arc.arc'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
        if not IS7ZipExtract   ( 0, 0, ExpandConstant('{src}\CODMW2.7z'), ExpandConstant('{app}\data1'), false, '') then break;
        if not ISRarExtract    ( 0, 0, ExpandConstant('{src}\data_*.rar'), ExpandConstant('{app}'), false, '') then break;
        if not ISSRepExtract   ( 0, 0, ExpandConstant('{app}\data1024_1024.srep'),ExpandConstant('{app}\data1024.arc'), true) then break;
        if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data.pcf'),    ExpandConstant('{app}\data.7z'), true) then break;
        if not ISxDeltaExtract ( 0, 0, 0, 640, ExpandConstant('{app}\in.pcf'), ExpandConstant('{app}\*.diff'),   ExpandConstant('{app}\out.dat'), false) then break;
        if not ISPackZIP       ( 0, 0, ExpandConstant('{app}\1a1\*'), ExpandConstant('{app}\1a1.pak'), 2, false ) then break;
        if not ISExec          ( 0, 0, 0, ExpandConstant('{tmp}\Arc.exe'), ExpandConstant('x -o+ "{src}\001.arc" "{app}\"'), ExpandConstant('{tmp}'), '...',false) then break;
        if not ShowChangeDiskWindow ('Ïîæàëóéñòà, âñòàâüòå âòîðîé äèñê è äîæäèòåñü åãî èíèöèàëèçàöèè.', ExpandConstant('{src}'),'CODMW_2.arc') then break;

//    ðàñïàêîâêà ãðóïïû ôàéëîâ ïîñðåäñòâîì âíåøíåãî ïðèëîæåíèÿ

        FindHandle1:=ISFindFiles(0,ExpandConstant('{app}\*.ogg'),ColFiles1);
        ExecError:=false;
        while not ExecError and ISPickFilename(FindHandle1,ExpandConstant('{app}\'),CurIndex1,true) do begin
          InFilePath:=ISGetName(0);
          OutFilePath:=ISGetName(1);
          OutFileName:=ISGetName(2);
          ExecError:=not ISExec(0, 0, 0, ExpandConstant('{tmp}\oggdec.exe'), '"'+InFilePath+'" "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName,false);
        end;
        ISFindFree(FindHandle1);
        if ExecError then break;
*)

      ISDoneError := False;
    until True;
    ISDoneStop;
  end;
  ISDoneProgressBar1.Hide;
  HideLabelEx(PctLabel1);
  #ifdef SecondProgressBar
    ISDoneProgressBar2.Hide;
    HideLabelEx(PctLabel2);
  #endif
  HideLabelEx(ElapsedTimeLabel);
  HideLabelEx(RemainingTimeLabel);

  if (CurStep = ssPostInstall) and ISDoneError then
  begin
    Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', False);
  end;
end;

////////////////////////////////////////////////////////////////////////////
function InitializeSetup(): Boolean;
begin
  ExtractTemporaryFile('botva2.dll');
  ExtractTemporaryFile('CallbackCtrl.dll');
  ExtractTemporaryFile('ISSkinEx.dll');
    ExtractTemporaryFile('Tiger.cjstyles');
  ExtractTemporaryFile('Music.mp3');
  ExtractTemporaryFile('zlib1.dll');
  LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), '');

  Result := True;
end;

procedure InitializeWizard();
begin
  RedesignWizardForm;
  CreateStatusPanel;
  CreateWizardComponents;
end;

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
  if CurPageID = wpInstalling then
  begin
    SuspendProc;
    Confirm := False;
    Cancel := ExitSetupMsgBox;
    if Cancel then
    begin
      SetLabelExCaption(StatusLabel, SetupMessage(msgStatusRollback));
      HideLabelEx(FilenameLabel);
      ISDoneCancel := 1;
    end;
    ResumeProc;
  end;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  ChangeWizardPages(CurPageID);
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep = ssInstall then
    ISDoneUnPack(CurStep);
end;

procedure DeinitializeSetup();
begin
  gdipShutdown;
  BASS_DeInit;
    // Hide Window before unloading skin so user does not get
    // a glimse of an unskinned window before it is closed.
    ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
    UnloadSkin();
end;[/SPOILER]
или не то?
 

zettend

Старожил
Скорее всего так, могу ошибаться. Попробуй проверить.
Код:
function IsNotWin64(): Boolean;
begin
if IsWin64 then
begin
    Result := True;
endelse
    if not ISArcExtract ( 0, 10, ExpandConstant('{src}\data8.bin'), ExpandConstant('{app}\Data\Win32'), '', false, '12345', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
    Result := False;
end;
 

SBalykov

Старожил
блин ну куда это ставить?
Может быть проще сделать.
На расширенной версии Inno, распаковка в зависимости от версии системы:
Код:
if not IsWin64 then begin
if not ISArcExtract(0,5, ExpandConstant('{src}\data-1(32bit).bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end else begin
if not ISArcExtract(0,5, ExpandConstant('{src}\data-2(64bit).bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end;
 
Последнее редактирование:

bosenok

Новичок
if not IsWin64 then break
if not ISArcExtract(0,5, ExpandConstant('{src}\data-1(32bit).bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end else begin
if not ISArcExtract(0,5, ExpandConstant('{src}\data-2(64bit).bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end;
вот так встало
ну ща буду пробовать
 

SBalykov

Старожил
if not IsWin64 then break
if not ISArcExtract(0,5, ExpandConstant('{src}\data-1(32bit).bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end else begin
if not ISArcExtract(0,5, ExpandConstant('{src}\data-2(64bit).bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end;
вот так встало
ну ща буду пробовать
Это не правильно. Сразу прерываете выполнение на 32-x-битной системе.
Тогда уж так ...
Код:
if not IsWin64 then begin
if not ISArcExtract(0,5, ExpandConstant('{src}\data-1(32bit).bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end;
if IsWin64 then begin
if not ISArcExtract(0,5, ExpandConstant('{src}\data-2(64bit).bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end;
 
Последнее редактирование:

Mickey1s

Ветеран
Модератор
А почему не запаковать всё в один архив? srep уберёт повторы и размер будет меньше, тем более IsDone поддерживает распаковку отдельной подпапки.

Код:
Name: bit; Description: Версия игры; Types: full; Flags: fixed
Name: bit\32bit; Description: 32 bit (x86); Flags: exclusive;
Name: bit\64bit; Description: 64 bit (x64); Flags: exclusive;
Код:
if not ISArcExtract    ( 1, 50, ExpandConstant('{src}\setup-1.bin'), ExpandConstant('{app}\'), '32bit', false, 'krinkels', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract    ( 2, 50, ExpandConstant('{src}\setup-1.bin'), ExpandConstant('{app}\'), '64bit', false, 'krinkels', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
 

bosenok

Новичок
Mickey1s, о это идея
да но \экзешники одинаковые и они не смогут скопироваться в два
 
Последнее редактирование:

sergey3695

Ветеран
Модератор
bosenok, не понял, что написано. как-будто часть предложения отсутствует.
 

bosenok

Новичок
sergey3695, я сделал вот так:
Код:
ifnot IsWin64 thenbegin
ifnot ISArcExtract(0,5, ExpandConstant('{src}\data-1(32bit).bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY})thenbreak;
end;
if IsWin64 thenbegin
ifnot ISArcExtract(0,5, ExpandConstant('{src}\data-2(64bit).bin'), ExpandConstant('{app}\'), '', false, '1g2x3h7421', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY})thenbreak;
end;
и если устанавливается только файлы 64 битной версии
ну конечно хотелось бы сделать с выбором типа
какую версию игры
64 бит
32 бит
это надо писать в скрипте Messages.iss
я пишу так:
;Components
ru.CompLang=Язык игры
ru.CompLangRus=Русский
ru.CompLangEng=Английский



ru.CompSoft=Дополнительное программное обеспечение:
ru.CompSoftDirectX=Обновить Microsoft DirectX
ru.CompSoftRedist=Установить Microsoft Visual C++ 2005 Redist


ru.CompIcons=Дополнительные значки:
ru.CompIconsDesktop=Создать значок на Рабочем столе
ru.CompIconsQuickLaunch=Создать значок в Панели быстрого запуска


;ru.Версия Игры: -как здесь писать?
;ru.Версия Игры:64 бит -здесь?
;ru.Версия Игры:32 бит -здесь?
 
Сверху