добрый день! вот скрипт сделал все по нему но инсталлятор тупо виснит и не запускаеться... надеюсь на вашу помощь!
читать дальше »
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define TIME_FOR_VIEW 1
#define MyAppName "Call of Juarez - Bound in Blood"
#define MyAppVerName "Call of Juarez - Bound in Blood v1.0"
#define MyAppPublisher "Ubisoft"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{FC3AFBDD-4969-4D22-991F-015173A92550}
AppName={#MyAppName}
AppVerName={#MyAppVerName}
AppPublisher={#MyAppPublisher}
DefaultDirName=D:\Games\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
InfoBeforeFile=D:\Games\Call of Juarez - Bound in Blood\Readme.txt
OutputDir=D:\22\juarez222
OutputBaseFilename=setup
SetupIconFile=C:\Icon #1.ico
Compression=lzma/ultra64
InternalCompressLevel=ultra64
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64 x86
SolidCompression=yes
SlicesPerDisk=1
DiskSliceSize=2034000000
DiskClusterSize=4096
ReserveBytes=0
DiskSpanning=yes
WizardImageFile=C:\WizardImage.bmp
WizardSmallImageFile=C:\WizardSmallImage.bmp
UninstallFilesDir={app}\Uninstall
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[Files]
Source: D:\Games\Call of Juarez - Bound in Blood\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: C:\1.bmp; Flags: dontcopy
Source: C:\2.bmp; Flags: dontcopy
Source: C:\3.bmp; Flags: dontcopy
Source: C:\4.bmp; Flags: dontcopy
Source: C:\5.bmp; Flags: dontcopy
Source: C:\6.bmp; Flags: dontcopy
Source: C:\7.bmp; Flags: dontcopy
Source: C:\8.bmp; Flags: dontcopy
Source: C:\9.bmp; Flags: dontcopy
Source: C:\InnoCallback.dll; Flags: dontcopy
[Run]
Filename: {src}\DirectX\DXSETUP.exe; Parameters: /silent; WorkingDir: {src}\DirectX; Tasks: DirectX; StatusMsg: Установка DirectX® подождите ...; Flags: waituntilterminated
Filename: {src}\Redist\vcredist_x86.exe; Parameters: /q; WorkingDir: {src}Redist\; Tasks: VCRedist; StatusMsg: Установка Visual C++ 2005 Redistributable подождите ...; Flags: waituntilterminated shellexec
[Tasks]
Name: DirectX; Description: DirectX®; GroupDescription: Необходимые компоненты:
Name: Vcredist; Description: Visual C++ 2005 Redistributable; GroupDescription: Необходимые компоненты:
[Icons]
Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}
Name: {userdesktop}\Call of Juarez - Bound in Blood; Filename: {app}\CoJBiBGame_x86.exe; WorkingDir: {app}\
[code]
type
TProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);
var
WelcomeLabel1,WelcomeLabel2,FinishedHeadingLabel,RunLabel,
FinishedLabel,PageNameLabel,PageDescriptionLabel:TLabel;
RunMyProg: TCheckBox;
TimerID: LongWord;
currTime: Integer;
SplashImage: TBitmapImage;
function WrapTimerProc(callback:TProc; paramcount:integer):longword;
external 'wrapcallback@files:InnoCallback.dll stdcall';
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord;
external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd: LongWord; nIDEvent: LongWord): LongWord;
external 'KillTimer@user32.dll stdcall';
procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
begin
currTime := currTime + 1;
case currTime of
1{#TIME_FOR_VIEW}: begin SplashImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\2.bmp')) end;
2{#TIME_FOR_VIEW}: begin SplashImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\3.bmp')) end;
3{#TIME_FOR_VIEW}: begin SplashImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\4.bmp')) end;
4{#TIME_FOR_VIEW}: begin SplashImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\5.bmp')) end;
5{#TIME_FOR_VIEW}: begin SplashImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\6.bmp')) end;
6{#TIME_FOR_VIEW}: begin SplashImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\7.bmp')) end;
7{#TIME_FOR_VIEW}: begin SplashImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\8.bmp')) end;
8{#TIME_FOR_VIEW}: begin SplashImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\9.bmp')) end;
end;
if CurrTime = 2*{#TIME_FOR_VIEW} then CurrTime := -1;
end;
procedure RLabelOnClick(Sender: TObject);
begin
if RunMyProg.Checked=false then
begin
RunMyProg.Checked := true;
end else
RunMyProg.Checked := false;
end;
// функция для запуска программы если отмечен чебокс
procedure CurStepChanged(CurStep: TSetupStep);
var
ErrorCode: Integer;
begin
if CurStep = ssDone then
begin
end;
end;
procedure InitializeWizard();
begin
ExtractTemporaryFile('1.bmp')
ExtractTemporaryFile('2.bmp')
ExtractTemporaryFile('3.bmp')
ExtractTemporaryFile('4.bmp')
ExtractTemporaryFile('5.bmp')
ExtractTemporaryFile('6.bmp')
ExtractTemporaryFile('7.bmp')
ExtractTemporaryFile('8.bmp')
ExtractTemporaryFile('9.bmp')
currTime := 0;
WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;
WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
WizardForm.FinishedHeadingLabel.Hide;
WizardForm.FinishedLabel.Hide;
// низнаю почему, но Hide не действует. Поэтому просто уменьшил размер
WizardForm.RunList.Height := 0;
WizardForm.RunList.Width := 0;
WizardForm.FilenameLabel.Hide;
WizardForm.StatusLabel.Parent := WizardForm;
WizardForm.StatusLabel.Top := ScaleY(315);
WizardForm.StatusLabel.Left := ScaleX(10);
WizardForm.StatusLabel.Width := ScaleX(200);
WizardForm.StatusLabel.Hide;
WizardForm.ProgressGauge.Parent := WizardForm;
WizardForm.ProgressGauge.Top := ScaleY(330);
WizardForm.ProgressGauge.Left := ScaleX(10);
WizardForm.ProgressGauge.Width := ScaleX(380);
WizardForm.ProgressGauge.Height := ScaleX(18);
WizardForm.ProgressGauge.Hide;
SplashImage := TBitmapImage.Create(WizardForm);
SplashImage.Top := 0;
SplashImage.Left := 0;
SplashImage.Width := WizardForm.MainPanel.Width;
SplashImage.Height := WizardForm.Bevel.Top;
SplashImage.Parent := WizardForm.InnerPage;
SplashImage.Stretch := True;
SplashImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp'));
SplashImage.Hide;
WizardForm.WizardBitmapImage.Align:=true;
WizardForm.WizardBitmapImage2.Align:=true;
WizardForm.WizardSmallBitmapImage.Align:=true;
WelcomeLabel1:=TLabel.Create(WizardForm);
WelcomeLabel1.Left:=ScaleX(25);
WelcomeLabel1.Top := ScaleY(75);
WelcomeLabel1.Width := ScaleX(450);
WelcomeLabel1.Height := ScaleY(95);
WelcomeLabel1.AutoSize := False;
WelcomeLabel1.WordWrap := true;
WelcomeLabel1.Font.Color := clred;
// здесь можно поиграть шрифтом
WelcomeLabel1.Font.Style := [fsBold];
WelcomeLabel1.Font.Name:='MS Sans Serif';
WelcomeLabel1.Font.Size := 16;
WelcomeLabel1.Transparent := True;
WelcomeLabel1.Parent := WizardForm.WelcomePage;
WelcomeLabel2:=TLabel.Create(WizardForm);
WelcomeLabel2.Left := ScaleX(150);
WelcomeLabel2.Top := ScaleY(90);
WelcomeLabel2.Width := ScaleX(320);
WelcomeLabel2.Height := ScaleY(200);
WelcomeLabel2.AutoSize := False;
WelcomeLabel2.WordWrap := True;
WelcomeLabel2.Font.Color := clBlack;
WelcomeLabel2.Font.Size := 8;
WelcomeLabel2.Transparent := True;
//WelcomeLabel2.Parent := WizardForm.WelcomePage;
PageNameLabel := TLabel.Create(WizardForm);
PageNameLabel.Left := ScaleX(25);
PageNameLabel.Top := ScaleY(10);
PageNameLabel.Width := ScaleX(300);
PageNameLabel.Height := ScaleY(14);
PageNameLabel.AutoSize := False;
PageNameLabel.WordWrap := True;
PageNameLabel.Font.Color := clBlack;
PageNameLabel.Font.Style := [fsBold];
PageNameLabel.Transparent := True;
//PageNameLabel.Parent := WizardForm.MainPanel;
PageDescriptionLabel := TLabel.Create(WizardForm);
PageDescriptionLabel.Left := ScaleX(40);
PageDescriptionLabel.Top := ScaleY(25);
PageDescriptionLabel.Width := ScaleX(475);
PageDescriptionLabel.Height := ScaleY(30);
PageDescriptionLabel.AutoSize := False;
PageDescriptionLabel.WordWrap := True;
PageDescriptionLabel.Font.Color := clBlack;
PageDescriptionLabel.Transparent := True;
//PageDescriptionLabel.Parent := WizardForm.MainPanel;
FinishedHeadingLabel:=TLabel.Create(WizardForm);
FinishedHeadingLabel.Left:=ScaleX(25);
FinishedHeadingLabel.Top := ScaleY(75);
FinishedHeadingLabel.Width := ScaleX(450);
FinishedHeadingLabel.Height := ScaleY(95);;
FinishedHeadingLabel.AutoSize := False;
FinishedHeadingLabel.WordWrap := True;
FinishedHeadingLabel.Font.Color := clblue;
// здесь тоже можно поиграть шрифтом
FinishedHeadingLabel.Font.Style := [fsBold];
FinishedHeadingLabel.Font.Name:='MS Sans Serif';
FinishedHeadingLabel.Font.Size := 16;
FinishedHeadingLabel.Transparent := True;
FinishedHeadingLabel.Parent := WizardForm.FinishedPage;
FinishedLabel:=TLabel.Create(WizardForm);
FinishedLabel.Left := ScaleX(450);
FinishedLabel.Top := ScaleY(90);
FinishedLabel.Width := ScaleX(320);
FinishedLabel.Height := ScaleY(200);
FinishedLabel.AutoSize := False;
FinishedLabel.WordWrap := True;
FinishedLabel.Font.Color := clBlack;
FinishedLabel.Font.Size := 8;
FinishedLabel.Transparent := True;
//FinishedLabel.Parent := WizardForm.FinishedPage;
end;
procedure CurPageChanged(CurPageID: Integer);
var
pfunc: LongWord;
begin
WelcomeLabel1.Caption := WizardForm.WelcomeLabel1.Caption;
WelcomeLabel2.Caption := WizardForm.WelcomeLabel2.Caption;
PageNameLabel.Caption := WizardForm.PageNameLabel.Caption;
PageDescriptionLabel.Caption := WizardForm.PageDescriptionLabel.Caption;
FinishedHeadingLabel.Caption := WizardForm.FinishedHeadingLabel.Caption;
FinishedLabel.Caption := WizardForm.FinishedLabel.Caption;
// здесь придётся вручную вводить требуемый текст
//RunLabel.Caption := 'Запустить программу';
if (CurPageID = wpInstalling) then
begin
pfunc := WrapTimerProc(@OnTimer, 4);
TimerID := SetTimer(0, 0, 1000, pfunc);
WizardForm.InnerNotebook.Hide;
WizardForm.Bevel1.Hide;
WizardForm.MainPanel.Hide;
WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
WizardForm.ProgressGauge.Show;
WizardForm.StatusLabel.Show;
SplashImage.Show;
end
else
begin
WizardForm.ProgressGauge.Hide;
WizardForm.StatusLabel.Hide;
SplashImage.Hide;
if (CurPageID > wpInstalling) and (CurPageID < wpFinished) then
begin
WizardForm.InnerNotebook.Show;
WizardForm.Bevel1.Show;
WizardForm.MainPanel.Show;
WizardForm.PageNameLabel.Show;
WizardForm.PageDescriptionLabel.Show;
end;
end;
end;
procedure DeinitializeSetup();
begin
KillTimer(0, TimerID);
end;
[Registry]
Root: HKLM; SubKey: SOFTWARE\Techland\CallofJuarez2; ValueType: string; ValueName: AlreadyRunningCaption; ValueData: Information
Root: HKLM; SubKey: SOFTWARE\Techland\CallofJuarez2; ValueType: string; ValueName: AlreadyRunningText; ValueData: Call of Juarez - Bound in Blood is already running.
Root: HKLM; SubKey: SOFTWARE\Techland\CallofJuarez2; ValueType: string; ValueName: FreeDiskSpaceWarningCaption; ValueData: Warning!
Root: HKLM; SubKey: SOFTWARE\Techland\CallofJuarez2; ValueType: string; ValueName: FreeDiskSpaceWarningText; ValueData: "Out of disk space - volume: %s; required space: %d MB. Free some disk space and retry."
Root: HKLM; SubKey: SOFTWARE\Techland\CallofJuarez2; ValueType: string; ValueName: RemoteSessionCaption; ValueData: Call of Juarez - Bound in Blood
Root: HKLM; SubKey: SOFTWARE\Techland\CallofJuarez2; ValueType: string; ValueName: RemoteSessionText; ValueData: Launching game in a remote session is not allowed!
Root: HKLM; SubKey: SOFTWARE\Techland\CallofJuarez2; ValueType: string; ValueName: WriteDir; ValueData: Call of Juarez - Bound in Blood\
Root: HKLM; SubKey: SOFTWARE\Techland\CallofJuarez2; ValueType: string; ValueName: DestinationDir; ValueData: "{app}\";
Root: HKLM; SubKey: SOFTWARE\Techland\CallofJuarez2; ValueType: string; ValueName: ISGUID; ValueData: {{FEFAF112-4DA8-479C-89E2-7DE25091711A}