Ru-Board.club
← Вернуться в раздел «Программы»

» Inno Setup (создание инсталяционных пакетов)

Автор: artemabu
Дата сообщения: 29.09.2014 18:43
[q]artemabu
Код видимо собран из разных скриптов, поэтому может и не работать.
Но всё может если переделать здесь  
так
то может быть сработает. Проверять мне некогда. [q/]
 
увы не получается
Автор: artemabu
Дата сообщения: 30.09.2014 08:18

Цитата:

artemabu тебе нужен только ansi компилятор на unicode будет ошибка

где его наййти


Добавлено:
[more]
Код: #define MyAppName "The SIMS 4 Deluxe Edition"
#define MyAppVersion "1.5"
#define MyAppPublisher "саmоdelкiн"
#define NeedSize "5000000000"

#define NeedMem 512

#define SecondProgressBar


;#define records


[Setup]
AppId={{8CC9C439-58E0-4745-BB8A-9210BAFAAE38}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=the sims 4
Compression=lzma/ultra64
SolidCompression=true
WizardImageFile=image/1.bmp
WizardSmallImageFile=image/2.bmp
SetupIconFile=icon.ico
DiskSpanning=true

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

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp04.exe; DestDir: {tmp}; Flags: dontcopy
#ifdef precomp038
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef unrar
Source: Include\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif
Source: Include\ISSkin.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\1.cjstyles; DestDir: {tmp}; Flags: dontcopy
Source: image\logo.bmp; DestDir: {tmp}; Flags: dontcopy
Source: Include\CallbackCtrl.dll; DestDir: {tmp}; Flags: dontcopy
Source: BASS.dll; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: sound.mp3; DestDir: {tmp}; Flags: dontcopy noencryption nocompression

[CustomMessages]
rus.FinishedLabel=Программа {#MyAppName} установлена на Ваш компьютер. Приложение можно запустить с помощью соответствующего значка.%n%nНажмите «Завершить», чтобы выйти из программы установки.
rus.Error2=Установка %n{#MyAppName} %nне завершена.
rus.Error3=%nВо время установки произошла ошибка, пожалуйста отключите сторонние программы и повторите попытку установки.%n%n%nНажмите «Завершить», чтобы выйти.
rus.WelcomeLabel1=Программа установит игру {#MyAppName} на Ваш компьютер.
rus.WelcomeLabel2=Нажмите «Далее», чтобы продолжить, или «Отмена», чтобы выйти
rus.FinisLabel1=Игра %n{#MyAppName}%n установлена на Ваш%n компьютер.
rus.FinisLabel2=%n%nДля ее запуска выберите%n соотвествующий ярлык%n в меню "Пуск" или на Рабочем столе. %n%nНажмите «Завершить», %nчтобы выйти из программы установки.
rus.ExtractedFile=Распаковывается файл:
rus.CancelButton=Отменить распаковку
rus.Error=Ошибка распаковки!



[Code]
procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';

var
PageNameLabel, PageDescriptionLabel, WelcomeLabel1,WelcomeLabel2,FLabel1, FLabel2, WLabel1, WLabel2, WelcomeLabel4,FinishedHeadingLabel, FinishedHeadingLabel1,WelcomeLabel3: TLabel;
LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
LabelPct2: TLabel;
ISDoneProgressBar2:TNewProgressBar;
#endif
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;


mp3Handle: HWND;
mp3Name: String;
//////////////начало музыки////
const
BASS_SAMPLE_LOOP = 4;
PCFonFLY=true;
notPCFonFLY=false;



function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean; external 'BASS_Init@files:BASS.dll stdcall delayload';
function BASS_StreamCreateFile(mem: BOOL; f: PAnsiChar; offset1: DWORD; offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): DWORD; external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';
function BASS_Start: Boolean; external 'BASS_Start@files:BASS.dll stdcall delayload';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean; external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';
function BASS_Stop: Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload';
function BASS_Free: Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload';

function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('sound.mp3');
mp3Name := ExpandConstant('{tmp}\sound.mp3');
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PAnsiChar(mp3Name), 0, 0, 0, 0, BASS_SAMPLE_LOOP);
BASS_Start();
BASS_ChannelPlay(mp3Handle, False);
Result := True;
end;

procedure DeinitializeSetup();
begin
BASS_Stop();
BASS_Free();
end;

/////////////////конец музыки////////



type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;

function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';

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';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';

function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';

function SrepInit(TmpFile:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
#ifdef SecondProgressBar
if CurrentPct<=1000 then ISDoneProgressBar2.Position := CurrentPct;
LabelPct2.Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
#endif
LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
LabelTime2.Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
Result := ISDoneCancel;
end;

procedure CancelButtonOnClick(Sender: TObject);
begin
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
end;



procedure HideControls;
begin
WizardForm.FileNamelabel.Hide;
ISDoneProgressBar1.Hide;
LabelPct1.Hide;
LabelCurrFileName.Hide;
LabelTime1.Hide;
LabelTime2.Hide;
MyCancelButton.Hide;
#ifdef SecondProgressBar
ISDoneProgressBar2.Hide;
LabelPct2.Hide;
#endif
end;

procedure CreateControls;
var PBTop:integer;
begin
PBTop:=ScaleY(50);
ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar1 do begin
Parent := WizardForm.InstallingPage;
Height := WizardForm.ProgressGauge.Height;
Left := ScaleX(0);
Top := PBTop;
Width := ScaleX(365);
Max := 1000;
end;
LabelPct1 := TLabel.Create(WizardForm);
with LabelPct1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar1.Width+ScaleX(5);
Top := ISDoneProgressBar1.Top + ScaleY(2);
Width := ScaleX(80);
end;
LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := ISDoneProgressBar1.Width+ScaleX(30);
Left := ScaleX(0);
Top := ScaleY(30);
end;
#ifdef SecondProgressBar
PBTop:=PBTop+ScaleY(25);
ISDoneProgressBar2 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar2 do begin
Parent := WizardForm.InstallingPage;
Left := ScaleX(0);
Top := PBTop+ScaleY(8);
Width := ISDoneProgressBar1.Width;
Max := 1000;
Height := WizardForm.ProgressGauge.Height;
end;
LabelPct2 := TLabel.Create(WizardForm);
with LabelPct2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar2.Width+ScaleX(5);
Top := ISDoneProgressBar2.Top + ScaleY(2);
Width := ScaleX(80);
end;
#endif
LabelTime1 := TLabel.Create(WizardForm);
with LabelTime1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := ISDoneProgressBar1.Width div 2;
Left := ScaleX(0);
Top := PBTop + ScaleY(35);
end;
LabelTime2 := TLabel.Create(WizardForm);
with LabelTime2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := LabelTime1.Width+ScaleX(40);
Left := ISDoneProgressBar1.Width div 2;
Top := LabelTime1.Top;
end;
LabelTime3 := TLabel.Create(WizardForm);
with LabelTime3 do begin
Parent := WizardForm.FinishedPage;
AutoSize := False;
Width := 300;
Left := 180;
Top := 200;
end;
MyCancelButton:=TButton.Create(WizardForm);
with MyCancelButton do begin
Parent:=WizardForm;
Width:=ScaleX(135);
Caption:=ExpandConstant('{cm:CancelButton}');
Left:=ScaleX(360);
Top:=WizardForm.cancelbutton.top;
OnClick:=@CancelButtonOnClick;
end;
end;


Procedure CurPageChanged(CurPageID: Integer);
Begin
if (CurPageID = wpFinished) and ISDoneError then
begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
WizardForm.FinishedLabel.Font.Color:= clRed;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
end;
end;

function CheckError:boolean;
begin
result:= not ISDoneError;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
FindHandle1,ColFiles1,CurIndex1,tmp:integer;
ExecError:boolean;
InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
if CurStep = ssInstall then begin //Если необходимо, можно поменять на ssPostInstall
WizardForm.ProgressGauge.Hide;
WizardForm.CancelButton.Hide;
CreateControls;
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
ISDoneCancel:=0;


#ifdef records
ExtractTemporaryFile('records.inf');
#endif

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

if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) 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);
end;
ISFindFree(FindHandle1);
if ExecError then break;


ISDoneError:=false;
until true;
ISDoneStop;
end;
HideControls;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
end;








procedure WizardImage();
begin
WizardForm.WizardBitmapImage.Width:= ScaleX(497);
WizardForm.WizardBitmapImage2.Width:= ScaleX(497);

WelcomeLabel1:= TLabel.Create(WizardForm);
WelcomeLabel1.Left := ScaleX(36);
WelcomeLabel1.Top := ScaleY(89);
WelcomeLabel1.Width := ScaleX(205);
WelcomeLabel1.Height := ScaleY(219);
WelcomeLabel1.AutoSize := False;
WelcomeLabel1.WordWrap := True;
WelcomeLabel1.Alignment := taCenter;
WelcomeLabel1.Font.Size := 12;
WelcomeLabel1.Font.Color:= clblack;
WelcomeLabel1.Font.Style:= [fsBold]
WelcomeLabel1.Font.Name:= 'Georgia'
WelcomeLabel1.ShowAccelChar := False;
WelcomeLabel1.Caption :=ExpandConstant('{cm:WelcomeLabel1}');
WelcomeLabel1.Transparent := True;
WelcomeLabel1.Parent := WizardForm.WelcomePage;

WLabel1 := TLabel.Create(WizardForm);
WLabel1.Left := ScaleX(36);
WLabel1.Top := ScaleY(90);
WLabel1.Width := ScaleX(205);
WLabel1.Height := ScaleY(219);
WLabel1.AutoSize := False;
WLabel1.WordWrap := True;
WLabel1.Alignment := taCenter;
WLabel1.Font.Size := 12;
WLabel1.Font.Color:= clwhite;
WLabel1.Font.Style:= [fsBold]
WLabel1.Font.Name:= 'Georgia'
WLabel1.ShowAccelChar := False;
WLabel1.Caption :=ExpandConstant('{cm:WelcomeLabel1}');
WLabel1.Transparent := True;
WLabel1.Parent := WizardForm.WelcomePage;

WelcomeLabel2:= TLabel.Create(WizardForm);
WelcomeLabel2.Left := ScaleX(36);
WelcomeLabel2.Top := ScaleY(160);
WelcomeLabel2.Width := ScaleX(210);
WelcomeLabel2.Height := ScaleY(234);
WelcomeLabel2.AutoSize := False;
WelcomeLabel2.WordWrap := True;
WelcomeLabel2.Alignment := taCenter;
WelcomeLabel2.Font.Size := 12;
WelcomeLabel2.Font.Color:= clblack;
WelcomeLabel2.Font.Style:= [fsBold]
WelcomeLabel2.Font.Name:= 'Georgia'
WelcomeLabel2.ShowAccelChar := False;
WelcomeLabel2.Caption :=ExpandConstant('{cm:WelcomeLabel2}');
WelcomeLabel2.Transparent := True;
WelcomeLabel2.Parent := WizardForm.WelcomePage;

WLabel2 :=TLabel.Create(WizardForm);
WLabel2.Left := ScaleX(36);
WLabel2.Top := ScaleY(159);
WLabel2.Width := ScaleX(210);
WLabel2.Height := ScaleY(234);
WLabel2.AutoSize := False;
WLabel2.WordWrap := True;
WLabel2.Alignment := taCenter;
WLabel2.Font.Size := 12;
WLabel2.Font.Style:= [fsBold]
WLabel2.Font.Color:= clwhite;
WLabel2.Font.Name:= 'Georgia'
WLabel2.ShowAccelChar := False;
WLabel2.Caption := ExpandConstant('{cm:WelcomeLabel2}');
WLabel2.Transparent := True;
WLabel2.Parent := WizardForm.WelcomePage;

FinishedHeadingLabel:= TLabel.Create(WizardForm);
FinishedHeadingLabel.Left := ScaleX(36);
FinishedHeadingLabel.Top := ScaleY(89);
FinishedHeadingLabel.Width := ScaleX(210);
FinishedHeadingLabel.Height := ScaleY(100);
FinishedHeadingLabel.AutoSize := False;
FinishedHeadingLabel.WordWrap := True;
FinishedHeadingLabel.Alignment := taCenter;
FinishedHeadingLabel.Font.Size := 12;
FinishedHeadingLabel.Font.Color:= clblack;
FinishedHeadingLabel.Font.Style:= [fsBold]
FinishedHeadingLabel.Font.Name:= 'Georgia'
FinishedHeadingLabel.ShowAccelChar := False;
FinishedHeadingLabel.Caption :=ExpandConstant('{cm:FinisLabel1}');
FinishedHeadingLabel.Transparent := True;
FinishedHeadingLabel.Parent := WizardForm.FinishedPage;

FLabel1 := TLabel.Create(WizardForm);
FLabel1.Left := ScaleX(36);
FLabel1.Top := ScaleY(36);
FLabel1.Width := ScaleX(210);
FLabel1.Height := ScaleY(100);
FLabel1.AutoSize := False;
FLabel1.Alignment := taCenter;
FLabel1.WordWrap := True;
FLabel1.Font.Size := 12;
FLabel1.Font.Name := 'Georgia'
FLabel1.Font.Color:= clwhite;
FLabel1.Font.Style:= [fsBold]
FLabel1.ShowAccelChar := False;
FLabel1.Caption := ExpandConstant('{cm:FinisLabel1}');
FLabel1.Transparent := True;
FLabel1.Parent := WizardForm.FinishedPage;

FinishedHeadingLabel1:= TLabel.Create(WizardForm);
FinishedHeadingLabel1.Left := ScaleX(36);
FinishedHeadingLabel1.Top := ScaleY(36);
FinishedHeadingLabel1.Width := ScaleX(210);
FinishedHeadingLabel1.Height := ScaleY(234);
FinishedHeadingLabel1.AutoSize := False;
FinishedHeadingLabel1.WordWrap := True;
FinishedHeadingLabel1.Alignment := taCenter;
FinishedHeadingLabel1.Font.Size := 12;
FinishedHeadingLabel1.Font.Color:= clblack;
FinishedHeadingLabel1.Font.Style:= [fsBold]
FinishedHeadingLabel1.Font.Name:= 'Georgia'
FinishedHeadingLabel1.ShowAccelChar := False;
FinishedHeadingLabel1.Caption :=ExpandConstant('{cm:FinisLabel2}');
FinishedHeadingLabel1.Transparent := True;
FinishedHeadingLabel1.Parent := WizardForm.FinishedPage;

FLabel2 :=TLabel.Create(WizardForm);
FLabel2.Top := ScaleY(36);
FLabel2.Left := ScaleX(36);
FLabel2.Width := ScaleX(210);
FLabel2.Height := ScaleY(234);
FLabel2.AutoSize := False;
FLabel2.WordWrap := True;
FLabel2.Alignment := taCenter;
FLabel2.Font.Size := 12;
FLabel2.Font.Name := 'Georgia'
FLabel2.Font.Style:= [fsBold]
FLabel2.Font.Color:= clwhite;
FLabel2.ShowAccelChar := False;
FLabel2.Caption := ExpandConstant('{cm:FinisLabel2}');
FLabel2.Transparent := True;
FLabel2.Parent := WizardForm.FinishedPage;

WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;

WizardForm.FinishedLabel.Hide;
WizardForm.FinishedHeadingLabel.Hide;
end;

procedure WizardSmallImage();
begin
WizardForm.WizardSmallBitmapImage.SetBounds(ScaleX(0), ScaleY(0), WizardForm.MainPanel.Width, WizardForm.MainPanel.Height);

PageNameLabel:= TLabel.Create(WizardForm)
with WizardForm.PageNameLabel do
PageNameLabel.SetBounds(Left, Top, Width, Height);
PageNameLabel.Transparent:= True;
PageNameLabel.Font:= WizardForm.PageNameLabel.Font;
PageNameLabel.Font.Color:= clblack;
PageNameLabel.Parent:= WizardForm.MainPanel;

PageDescriptionLabel:= TLabel.Create(WizardForm);
with PageDescriptionLabel do
begin
Left:= WizardForm.PageDescriptionLabel.Left-12;
Top:= WizardForm.PageDescriptionLabel.Top;
Height:= WizardForm.PageDescriptionLabel.Height;
Width:= ScaleX(280);
AutoSize:= False;
WordWrap:= True;
Font.Name:= WizardForm.PageDescriptionLabel.Font.Name;
Transparent:= True;
Parent:= WizardForm.MainPanel;
end;

WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
end;


function skinsdll(): Boolean;
begin
ExtractTemporaryFile('1.cjstyles');
LoadSkin(ExpandConstant('{tmp}\1.cjstyles'), '');
Result := True;
end;

procedure LogoOnClick(Sender: TObject);
var ResCode: Integer;
begin
ShellExec('', 'http://vk.com/tarantinosmusic', '' , '', SW_SHOW, ewNoWait, ResCode)
end;

procedure Logo();
var
BtnPanel: TPanel;
BtnImage: TBitmapImage;
begin
ExtractTemporaryFile('logo.bmp')

BtnPanel:=TPanel.Create(WizardForm)
with BtnPanel do begin
Left:=20
Top:=325
Width:=132
Height:=27
Cursor:=crHand
OnClick:=@logoOnClick
Parent:=WizardForm
end;
BtnImage:=TBitmapImage.Create(WizardForm)
with BtnImage do begin
AutoSize:=True;
Enabled:=False;
Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo.bmp')
Parent:=BtnPanel
end;

end;

procedure InitializeWizard;
begin
HideControls;
CreateControls;
Logo();
WizardImage();
WizardSmallImage();
end;
Автор: sjwrec
Дата сообщения: 30.09.2014 13:34
artemabu

Цитата:
где его наййти


Даже проще чем вы думаете )) В шапку темы гляньте, всё на виду.
Автор: genetiq
Дата сообщения: 30.09.2014 14:24
у некоторых пользователей кидается ошибка:
Runtime Error (at-1:0):
Cannot Import EXPANDCONSTANT

http://i63.fastpic.ru/big/2014/0930/ae/d037d17895b4f92d730f491d442398ae.png

использую китайский компилятор. есть идеи, почему такое вообще может происходить?
Автор: sjwrec
Дата сообщения: 30.09.2014 15:42
genetiq

Цитата:
у некоторых пользователей кидается ошибка: Runtime Error (at-1:0): Cannot Import EXPANDCONSTANT


Без скрипта ничего не возможно сказать точно - это может быть что угодно. Скрипт нужно глянуть.
Автор: Tobyas Ripper
Дата сообщения: 30.09.2014 16:35
artemabu
Скиньте скрипт
Автор: Kindly
Дата сообщения: 30.09.2014 19:05
Необходимо получить бинарный массив из реестра, использую функцию
RegQueryBinaryValue
все вроде бы нормально, но если в массиве REG_BINARY имеется байт(ы) 00, то функция читает данные только до этого нуля. из-за этого данные получаются не полные и дальнейшие действия будут неправильные. похоже, это баг? найдется у кого правильное решение?

Разобрался.
Автор: artemabu
Дата сообщения: 30.09.2014 19:10

Цитата:
artemabu
Скиньте скрипт

уже все разобрался как вроде

Добавлено:
[more] единственное ни как не могу добавить сплеш #define MyAppName "The SIMS 4 Deluxe Edition"
#define MyAppVersion "1.5"
#define MyAppPublisher "саmоdelкiн"
#define NeedSize "5000000000"

#define NeedMem 512

#define SecondProgressBar

#define records


[Setup]
AppId={{8CC9C439-58E0-4745-BB8A-9210BAFAAE38}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName=саmоdelкiн/{#MyAppName}
OutputBaseFilename=the sims 4
Compression=lzma/ultra64
SolidCompression=true
WizardImageFile=image/1.bmp
WizardSmallImageFile=image/2.bmp
SetupIconFile=icon.ico
DiskSpanning=true


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

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

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\ISSkin.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\1.cjstyles; DestDir: {tmp}; Flags: dontcopy
Source: image\logo.bmp; DestDir: {tmp}; Flags: dontcopy
Source: Include\CallbackCtrl.dll; DestDir: {tmp}; Flags: dontcopy
Source: BASS.dll; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: sound.mp3; DestDir: {tmp}; Flags: dontcopy noencryption nocompression

[CustomMessages]
rus.FinishedLabel=Программа {#MyAppName} установлена на Ваш компьютер. Приложение можно запустить с помощью соответствующего значка.%n%nНажмите «Завершить», чтобы выйти из программы установки.
rus.Error2=Установка %n{#MyAppName} %nне завершена.
rus.Error3=%nВо время установки произошла ошибка, пожалуйста отключите сторонние программы и повторите попытку установки.%n%n%nНажмите «Завершить», чтобы выйти.
rus.WelcomeLabel1=Программа установит игру {#MyAppName} на Ваш компьютер.
rus.WelcomeLabel2=Нажмите «Далее», чтобы продолжить, или «Отмена», чтобы выйти
rus.FinisLabel1=Игра %n{#MyAppName}%n установлена на Ваш%n компьютер.
rus.FinisLabel2=%n%nДля ее запуска выберите%n соотвествующий ярлык%n в меню "Пуск" или на Рабочем столе. %n%nНажмите «Завершить», %nчтобы выйти из программы установки.
rus.ExtractedFile=Извлекается файл:
rus.Extracted=Распаковка архивов...
rus.CancelButton=Отменить распаковку
rus.Error=Ошибка распаковки!
rus.ElapsedTime=Прошло:
rus.RemainingTime=Осталось времени:
rus.EstimatedTime=Всего:
rus.AllElapsedTime=Время установки:


[Code]
procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';

var
PageNameLabel, PageDescriptionLabel, WelcomeLabel1,WelcomeLabel2,FLabel1, FLabel2, WLabel1, WLabel2, WelcomeLabel4,FinishedHeadingLabel, FinishedHeadingLabel1,WelcomeLabel3: TLabel;
LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
LabelPct2: TLabel;
ISDoneProgressBar2:TNewProgressBar;
#endif
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;


mp3Handle: HWND;
mp3Name: String;
/////////////////конец музыки////////
const
BASS_SAMPLE_LOOP = 4;
PCFonFLY=true;
notPCFonFLY=false;



function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean; external 'BASS_Init@files:BASS.dll stdcall delayload';
function BASS_StreamCreateFile(mem: BOOL; f: PAnsiChar; offset1: DWORD; offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): DWORD; external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';
function BASS_Start: Boolean; external 'BASS_Start@files:BASS.dll stdcall delayload';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean; external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';
function BASS_Stop: Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload';
function BASS_Free: Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload';

function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('sound.mp3');
mp3Name := ExpandConstant('{tmp}\sound.mp3');
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PAnsiChar(mp3Name), 0, 0, 0, 0, BASS_SAMPLE_LOOP);
BASS_Start();
BASS_ChannelPlay(mp3Handle, False);
Result := True;
end;

procedure DeinitializeSetup();
begin
BASS_Stop();
BASS_Free();
end;

///////////////////конец музыки/////////////////


type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;

function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';

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';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';

function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';

function SrepInit(TmpFile:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
#ifdef SecondProgressBar
if CurrentPct<=1000 then ISDoneProgressBar2.Position := CurrentPct;
LabelPct2.Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
#endif
LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
LabelTime2.Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
Result := ISDoneCancel;
end;

procedure CancelButtonOnClick(Sender: TObject);
begin
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
end;



procedure HideControls();
begin
WizardForm.FileNamelabel.Hide;
ISDoneProgressBar1.Hide;
LabelPct1.Hide;
LabelCurrFileName.Hide;
LabelTime1.Hide;
LabelTime2.Hide;
MyCancelButton.Hide;
#ifdef SecondProgressBar
ISDoneProgressBar2.Hide;
LabelPct2.Hide;
#endif
end;

procedure CreateControls();
var PBTop:integer;
begin
PBTop:=ScaleY(50);
ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar1 do begin
Parent := WizardForm.InstallingPage;
Height := WizardForm.ProgressGauge.Height;
Left := ScaleX(0);
Top := PBTop;
Width := ScaleX(365);
Max := 1000;
end;
LabelPct1 := TLabel.Create(WizardForm);
with LabelPct1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar1.Width+ScaleX(5);
Top := ISDoneProgressBar1.Top + ScaleY(2);
Width := ScaleX(80);
end;
LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := ISDoneProgressBar1.Width+ScaleX(30);
Left := ScaleX(0);
Top := ScaleY(30);
end;
#ifdef SecondProgressBar
PBTop:=PBTop+ScaleY(25);
ISDoneProgressBar2 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar2 do begin
Parent := WizardForm.InstallingPage;
Left := ScaleX(0);
Top := PBTop+ScaleY(8);
Width := ISDoneProgressBar1.Width;
Max := 1000;
Height := WizardForm.ProgressGauge.Height;
end;
LabelPct2 := TLabel.Create(WizardForm);
with LabelPct2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar2.Width+ScaleX(5);
Top := ISDoneProgressBar2.Top + ScaleY(2);
Width := ScaleX(80);
end;
#endif
LabelTime1 := TLabel.Create(WizardForm);
with LabelTime1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := ISDoneProgressBar1.Width div 2;
Left := ScaleX(0);
Top := PBTop + ScaleY(35);
end;
LabelTime2 := TLabel.Create(WizardForm);
with LabelTime2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := LabelTime1.Width+ScaleX(40);
Left := ISDoneProgressBar1.Width div 2;
Top := LabelTime1.Top;
end;
LabelTime3 := TLabel.Create(WizardForm);
with LabelTime3 do begin
Parent := WizardForm.FinishedPage;
AutoSize := False;
Width := 300;
Left := 180;
Top := 200;
end;
MyCancelButton:=TButton.Create(WizardForm);
with MyCancelButton do begin
Parent:=WizardForm;
Width:=ScaleX(135);
Caption:=ExpandConstant('{cm:CancelButton}');
Left:=ScaleX(360);
Top:=WizardForm.cancelbutton.top;
OnClick:=@CancelButtonOnClick;
end;
end;


Procedure CurPageChanged(CurPageID: Integer);
Begin
if (CurPageID = wpFinished) and ISDoneError then
begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
WizardForm.FinishedLabel.Font.Color:= clRed;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
end;
end;

function CheckError:boolean;
begin
result:= not ISDoneError;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
FindHandle1,ColFiles1,CurIndex1,tmp:integer;
ExecError:boolean;
InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
if CurStep = ssInstall then begin //Если необходимо, можно поменять на ssPostInstall
WizardForm.ProgressGauge.Hide;
WizardForm.CancelButton.Hide;
CreateControls;
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
ISDoneCancel:=0;


#ifdef records
ExtractTemporaryFile('records.inf');
#endif

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

if not ISArcExtract ( 0, 0, ExpandConstant('{src}\The SIMS 4 Deluxe Edition.arc'), ExpandConstant('{app}\'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) 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);
end;
ISFindFree(FindHandle1);
if ExecError then break;


ISDoneError:=false;
until true;
ISDoneStop;
end;
HideControls;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
end;








procedure WizardImage();
begin
WizardForm.WizardBitmapImage.Width:= ScaleX(497);
WizardForm.WizardBitmapImage2.Width:= ScaleX(497);

WelcomeLabel1:= TLabel.Create(WizardForm);
WelcomeLabel1.Left := ScaleX(36);
WelcomeLabel1.Top := ScaleY(89);
WelcomeLabel1.Width := ScaleX(205);
WelcomeLabel1.Height := ScaleY(219);
WelcomeLabel1.AutoSize := False;
WelcomeLabel1.WordWrap := True;
WelcomeLabel1.Alignment := taCenter;
WelcomeLabel1.Font.Size := 12;
WelcomeLabel1.Font.Color:= clblack;
WelcomeLabel1.Font.Style:= [fsBold]
WelcomeLabel1.Font.Name:= 'Georgia'
WelcomeLabel1.ShowAccelChar := False;
WelcomeLabel1.Caption :=ExpandConstant('{cm:WelcomeLabel1}');
WelcomeLabel1.Transparent := True;
WelcomeLabel1.Parent := WizardForm.WelcomePage;

WLabel1 := TLabel.Create(WizardForm);
WLabel1.Left := ScaleX(36);
WLabel1.Top := ScaleY(90);
WLabel1.Width := ScaleX(205);
WLabel1.Height := ScaleY(219);
WLabel1.AutoSize := False;
WLabel1.WordWrap := True;
WLabel1.Alignment := taCenter;
WLabel1.Font.Size := 12;
WLabel1.Font.Color:= clwhite;
WLabel1.Font.Style:= [fsBold]
WLabel1.Font.Name:= 'Georgia'
WLabel1.ShowAccelChar := False;
WLabel1.Caption :=ExpandConstant('{cm:WelcomeLabel1}');
WLabel1.Transparent := True;
WLabel1.Parent := WizardForm.WelcomePage;

WelcomeLabel2:= TLabel.Create(WizardForm);
WelcomeLabel2.Left := ScaleX(36);
WelcomeLabel2.Top := ScaleY(160);
WelcomeLabel2.Width := ScaleX(210);
WelcomeLabel2.Height := ScaleY(234);
WelcomeLabel2.AutoSize := False;
WelcomeLabel2.WordWrap := True;
WelcomeLabel2.Alignment := taCenter;
WelcomeLabel2.Font.Size := 12;
WelcomeLabel2.Font.Color:= clblack;
WelcomeLabel2.Font.Style:= [fsBold]
WelcomeLabel2.Font.Name:= 'Georgia'
WelcomeLabel2.ShowAccelChar := False;
WelcomeLabel2.Caption :=ExpandConstant('{cm:WelcomeLabel2}');
WelcomeLabel2.Transparent := True;
WelcomeLabel2.Parent := WizardForm.WelcomePage;

WLabel2 :=TLabel.Create(WizardForm);
WLabel2.Left := ScaleX(36);
WLabel2.Top := ScaleY(159);
WLabel2.Width := ScaleX(210);
WLabel2.Height := ScaleY(234);
WLabel2.AutoSize := False;
WLabel2.WordWrap := True;
WLabel2.Alignment := taCenter;
WLabel2.Font.Size := 12;
WLabel2.Font.Style:= [fsBold]
WLabel2.Font.Color:= clwhite;
WLabel2.Font.Name:= 'Georgia'
WLabel2.ShowAccelChar := False;
WLabel2.Caption := ExpandConstant('{cm:WelcomeLabel2}');
WLabel2.Transparent := True;
WLabel2.Parent := WizardForm.WelcomePage;

FinishedHeadingLabel:= TLabel.Create(WizardForm);
FinishedHeadingLabel.Left := ScaleX(36);
FinishedHeadingLabel.Top := ScaleY(89);
FinishedHeadingLabel.Width := ScaleX(210);
FinishedHeadingLabel.Height := ScaleY(100);
FinishedHeadingLabel.AutoSize := False;
FinishedHeadingLabel.WordWrap := True;
FinishedHeadingLabel.Alignment := taCenter;
FinishedHeadingLabel.Font.Size := 12;
FinishedHeadingLabel.Font.Color:= clblack;
FinishedHeadingLabel.Font.Style:= [fsBold]
FinishedHeadingLabel.Font.Name:= 'Georgia'
FinishedHeadingLabel.ShowAccelChar := False;
FinishedHeadingLabel.Caption :=ExpandConstant('{cm:FinisLabel1}');
FinishedHeadingLabel.Transparent := True;
FinishedHeadingLabel.Parent := WizardForm.FinishedPage;

FLabel1 := TLabel.Create(WizardForm);
FLabel1.Left := ScaleX(36);
FLabel1.Top := ScaleY(36);
FLabel1.Width := ScaleX(210);
FLabel1.Height := ScaleY(100);
FLabel1.AutoSize := False;
FLabel1.Alignment := taCenter;
FLabel1.WordWrap := True;
FLabel1.Font.Size := 12;
FLabel1.Font.Name := 'Georgia'
FLabel1.Font.Color:= clwhite;
FLabel1.Font.Style:= [fsBold]
FLabel1.ShowAccelChar := False;
FLabel1.Caption := ExpandConstant('{cm:FinisLabel1}');
FLabel1.Transparent := True;
FLabel1.Parent := WizardForm.FinishedPage;

FinishedHeadingLabel1:= TLabel.Create(WizardForm);
FinishedHeadingLabel1.Left := ScaleX(36);
FinishedHeadingLabel1.Top := ScaleY(36);
FinishedHeadingLabel1.Width := ScaleX(210);
FinishedHeadingLabel1.Height := ScaleY(234);
FinishedHeadingLabel1.AutoSize := False;
FinishedHeadingLabel1.WordWrap := True;
FinishedHeadingLabel1.Alignment := taCenter;
FinishedHeadingLabel1.Font.Size := 12;
FinishedHeadingLabel1.Font.Color:= clblack;
FinishedHeadingLabel1.Font.Style:= [fsBold]
FinishedHeadingLabel1.Font.Name:= 'Georgia'
FinishedHeadingLabel1.ShowAccelChar := False;
FinishedHeadingLabel1.Caption :=ExpandConstant('{cm:FinisLabel2}');
FinishedHeadingLabel1.Transparent := True;
FinishedHeadingLabel1.Parent := WizardForm.FinishedPage;

FLabel2 :=TLabel.Create(WizardForm);
FLabel2.Top := ScaleY(36);
FLabel2.Left := ScaleX(36);
FLabel2.Width := ScaleX(210);
FLabel2.Height := ScaleY(234);
FLabel2.AutoSize := False;
FLabel2.WordWrap := True;
FLabel2.Alignment := taCenter;
FLabel2.Font.Size := 12;
FLabel2.Font.Name := 'Georgia'
FLabel2.Font.Style:= [fsBold]
FLabel2.Font.Color:= clwhite;
FLabel2.ShowAccelChar := False;
FLabel2.Caption := ExpandConstant('{cm:FinisLabel2}');
FLabel2.Transparent := True;
FLabel2.Parent := WizardForm.FinishedPage;

WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;

WizardForm.FinishedLabel.Hide;
WizardForm.FinishedHeadingLabel.Hide;
end;

procedure WizardSmallImage();
begin
WizardForm.WizardSmallBitmapImage.SetBounds(ScaleX(0), ScaleY(0), WizardForm.MainPanel.Width, WizardForm.MainPanel.Height);

PageNameLabel:= TLabel.Create(WizardForm)
with WizardForm.PageNameLabel do
PageNameLabel.SetBounds(Left, Top, Width, Height);
PageNameLabel.Transparent:= True;
PageNameLabel.Font:= WizardForm.PageNameLabel.Font;
PageNameLabel.Font.Color:= clblack;
PageNameLabel.Parent:= WizardForm.MainPanel;

PageDescriptionLabel:= TLabel.Create(WizardForm);
with PageDescriptionLabel do
begin
Left:= WizardForm.PageDescriptionLabel.Left-12;
Top:= WizardForm.PageDescriptionLabel.Top;
Height:= WizardForm.PageDescriptionLabel.Height;
Width:= ScaleX(280);
AutoSize:= False;
WordWrap:= True;
Font.Name:= WizardForm.PageDescriptionLabel.Font.Name;
Transparent:= True;
Parent:= WizardForm.MainPanel;
end;

WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
end;


function skinsdll(): Boolean;
begin
ExtractTemporaryFile('1.cjstyles');
LoadSkin(ExpandConstant('{tmp}\1.cjstyles'), '');
Result := True;
end;

procedure LogoOnClick(Sender: TObject);
var ResCode: Integer;
begin
ShellExec('', 'http://vk.com/mr.mass', '' , '', SW_SHOW, ewNoWait, ResCode)
end;

procedure Logo();
var
BtnPanel: TPanel;
BtnImage: TBitmapImage;
begin
ExtractTemporaryFile('logo.bmp')

BtnPanel:=TPanel.Create(WizardForm)
with BtnPanel do begin
Left:=20
Top:=325
Width:=132
Height:=27
Cursor:=crHand
OnClick:=@logoOnClick
Parent:=WizardForm
end;
BtnImage:=TBitmapImage.Create(WizardForm)
with BtnImage do begin
AutoSize:=True;
Enabled:=False;
Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo.bmp')
Parent:=BtnPanel
end;

end;

procedure InitializeWizard;
begin
Logo();
WizardImage();
WizardSmallImage();
end;


[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\Game\Bin\The.Sims.4.Launcher.exe
Name: {commondesktop}\{#MyAppName}; Filename: {app}\Game\Bin\The.Sims.4.Launcher.exe; Tasks: desktopicon


[Registry]
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Setup Version; ValueData: 5.4.2.ee2 (a)
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: App Path; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: InstallLocation; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Icon Group; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: User; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Selected Tasks; ValueData: icons,icons\desktopicon,icons\quicklaunchicon,soft,soft\directx,soft\vccheck,soft\physxcheck
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Deselected Tasks; ValueData:
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Language; ValueData: russian
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: DisplayName; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: DisplayIcon; ValueData: (app)\TS4.exe
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: UninstallString; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: UninstallDataFile; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: QuietUninstallString; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Publisher; ValueData: License by T_ONG_BAK_J
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: dword; ValueName: NoModify; ValueData: $00000001
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: dword; ValueName: NoRepair; ValueData: $00000001
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: InstallDate; ValueData: 20140928
Root: HKLM; SubKey: SOFTWARE\\Maxis\The Sims 4; ValueType: string; ValueName: GDFBinary; ValueData: (app)\GDFBinary_ru_RU.dll
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: GameExplorer; ValueData: {{46F1375C-3A8C-42E1-9A27-0CE809AD35AC}
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: DisplayName; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Locale; ValueData: ru_RU
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Product GUID; ValueData: {{48EBEBBF-B9F8-4520-A3CF-89A730721917}
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Install Dir; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4\InstallOptSelect; ValueType: string; ValueName: ; ValueData: 1
[/more]
Автор: artemabu
Дата сообщения: 02.10.2014 09:42
как добавить кнопки выключения музыки стоп и плей
Автор: tyumenik
Дата сообщения: 03.10.2014 18:13
Октябрский привет, всем!!! Есть ли возможно скрипт/код этот:
Автор: sjwrec
Дата сообщения: 03.10.2014 19:03
tyumenik
Вот эта строка поможет

Код:
WizardForm.NextButton.Caption:= 'Установить';
Автор: tyumenik
Дата сообщения: 03.10.2014 19:32
sjwrec, не пойму... Куда вставить???
[more=скрипт][_Code]
var
MyRadioBtn_1: TCheckBox;

function MyRadioBtnChecked: boolean;
begin
Result:= MyRadioBtn_1.Checked;
end;

procedure InitializeWizard();
begin
MyRadioBtn_1 := TCheckBox.Create(WizardForm);
with MyRadioBtn_1 do
begin
Top:= ScaleY(140);
Width:= ScaleX(417);
Caption:= 'Распаковка портативной версии';
Parent:= WizardForm.SelectDirPage;
end;
end;

function ShouldSkipPage(PageID: Integer): Boolean;
begin
Result:= (PageID > wpSelectDir) and (PageID < wpInstalling) and (MyRadioBtn_1.Checked);
end;[/more]
Автор: vint56
Дата сообщения: 03.10.2014 20:39
tyumenik
[more][Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Code]
var
CheckBox: TNewCheckBox;
Flag: Boolean;

function MyRadioBtnChecked: boolean;
begin
Result:= CheckBox.Checked;
end;

procedure CheckBoxClick(Sender: TObject);
begin
if CheckBox.Checked then
begin
WizardForm.NextButton.Caption:= 'Установить'
end else begin
WizardForm.NextButton.Caption:= 'Далее';
end;
end;

procedure InitializeWizard();
begin
CheckBox := TNewCheckBox.Create(WizardForm);
with CheckBox do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(0);
Top := ScaleY(120);
Width := ScaleX(201);
Height := ScaleY(17);
Caption := 'Распаковка портативной версии';
OnClick := @CheckBoxClick;
end;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
case CurPageID of
wpSelectDir:
if CheckBox.Checked then
begin
WizardForm.NextButton.Caption:= 'Установить'
end else begin
WizardForm.NextButton.Caption:= 'Далее';
end;
end;
end;

function ShouldSkipPage(PageID: Integer): Boolean;
begin
if CheckBox.Checked then
if (PageID = 7) or(PageID = 8) or(PageID = 9)or(PageID = 10) or(PageID = 11)then
// wpWelcome = 1;
// wpLicense = 2;
// wpPassword = 3;
// wpInfoBefore = 4;
// wpUserInfo = 5;
// wpSelectDir = 6;
// wpSelectComponents = 7;
// wpSelectProgramGroup = 8;
// wpSelectTasks = 9;
// wpReady = 10;
// wpPreparing = 11;
// wpInstalling = 12;
// wpInfoAfter = 13;
// wpFinished = 14;
// if (PageID = wpSelectComponents)or(PageID = 10)or(PageID = 14) then
if (PageID = 6) or(PageID = 10) then
Result:= True;
end;[/more]
Автор: tyumenik
Дата сообщения: 04.10.2014 08:17
vint56, большое спасибо!!! ПОЛУЧИЛОСЬ!!!
Автор: artemabu
Дата сообщения: 04.10.2014 10:25
не поможете мне сделать кнопку стоп воспроизведения музыки ?? пожалуйста

Добавлено:
http://s019.radikal.ru/i632/1409/a3/2e68441a614d.jpg
Автор: tyumenik
Дата сообщения: 04.10.2014 11:22
vint56, еще забыл сказать, что при тихой установке по умолчанию "Распаковка портативной версии" как?
/VERYSILENT ........????
Автор: Tima182
Дата сообщения: 04.10.2014 17:58
Как изменять в скрипте имя созданного ярлыка? И как добавить 2 ярлыка на рабочий стол? Что то не помню.
[more]; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "SpinTires_Mod"
#define MyAppVersion "1.0"
#define MyAppExeName "SpinTires.exe"

[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={{E37049B0-FD2F-4F4B-AD08-D186FDFF31D4}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=C:\Users\Тима\Desktop
OutputBaseFilename=SpinTires_Mod
Compression=lzma/ultra
SolidCompression=true
InternalCompressLevel=ultra
PrivilegesRequired=none

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

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\SpinTires.exe; DestDir: {app}; Flags: ignoreversion
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\codex.ini; DestDir: {app}; Flags: ignoreversion
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\Media.zip; DestDir: {app}; Flags: ignoreversion
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\REVOLT.dll; DestDir: {app}; Flags: ignoreversion
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\REVOLT.ini; DestDir: {app}; Flags: ignoreversion
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\Shaders.zip; DestDir: {app}; Flags: ignoreversion
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\SpinTires.exe; DestDir: {app}; Flags: ignoreversion
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\spmmm.exe; DestDir: {app}; Flags: ignoreversion
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\steam_api.dll; DestDir: {app}; Flags: ignoreversion
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\SteamError.log; DestDir: {app}; Flags: ignoreversion
Source: C:\Program Files (x86)\R.G. Mechanics\Spintires\TexturesCache.zip; DestDir: {app}; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\SpinTires.exe; Tasks: desktopicon; WorkingDir: {app}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\spmmm.exe; Tasks: desktopicon; WorkingDir: {app}; IconIndex: 0

[Run]
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}; Flags: nowait postinstall skipifsilent[/more]
Автор: sjwrec
Дата сообщения: 04.10.2014 22:51
Tima182
У Вас константа MyAppName стоит на обоих ярлыках, а это значит что они имеют одинаковое название и будет создан только один. Вот как надо..

Код:
[Icons]
Name: {commondesktop}\{#MyAppName}; Filename: {app}\SpinTires.exe; Tasks: desktopicon; WorkingDir: {app}
Name: {commondesktop}\Другое название; Filename: {app}\spmmm.exe; Tasks: desktopicon; WorkingDir: {app}; IconIndex: 0
Автор: artemabu
Дата сообщения: 05.10.2014 07:56
[more]
Цитата:
Tima182
У Вас константа MyAppName стоит на обоих ярлыках, а это значит что они имеют одинаковое название и будет создан только один. Вот как надо..

Код:
 
[Icons]  
Name: {commondesktop}\{#MyAppName}; Filename: {app}\SpinTires.exe; Tasks: desktopicon; WorkingDir: {app}  
Name: {commondesktop}\Другое название; Filename: {app}\spmmm.exe; Tasks: desktopicon; WorkingDir: {app}; IconIndex: 0


я уже третьи раз спрашиваю как добавить кнопку стоп воспроизведение музыки в инсталятор

вот код

#define MyAppName "The SIMS 4 Deluxe Edition"
#define MyAppVersion "1.5"
#define MyAppPublisher "саmоdelкiн"
#define NeedSize "5000000000"

#define NeedMem 512

#define SecondProgressBar

#define records


[Setup]
AppId={{8CC9C439-58E0-4745-BB8A-9210BAFAAE38}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName=саmоdelкiн/{#MyAppName}
OutputBaseFilename=the sims 4
Compression=lzma/ultra64
SolidCompression=true
WizardImageFile=image/1.bmp
WizardSmallImageFile=image/2.bmp
SetupIconFile=icon.ico
DiskSpanning=true


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

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

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\ISSkin.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\1.cjstyles; DestDir: {tmp}; Flags: dontcopy
Source: image\logo.bmp; DestDir: {tmp}; Flags: dontcopy
Source: Include\CallbackCtrl.dll; DestDir: {tmp}; Flags: dontcopy
Source: BASS.dll; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: sound.mp3; DestDir: {tmp}; Flags: dontcopy noencryption nocompression

[CustomMessages]
rus.FinishedLabel=Программа {#MyAppName} установлена на Ваш компьютер. Приложение можно запустить с помощью соответствующего значка.%n%nНажмите «Завершить», чтобы выйти из программы установки.
rus.Error2=Установка %n{#MyAppName} %nне завершена.
rus.Error3=%nВо время установки произошла ошибка, пожалуйста отключите сторонние программы и повторите попытку установки.%n%n%nНажмите «Завершить», чтобы выйти.
rus.WelcomeLabel1=Программа установит игру {#MyAppName} на Ваш компьютер.
rus.WelcomeLabel2=Нажмите «Далее», чтобы продолжить, или «Отмена», чтобы выйти
rus.FinisLabel1=Игра %n{#MyAppName}%n установлена на Ваш%n компьютер.
rus.FinisLabel2=%n%nДля ее запуска выберите%n соотвествующий ярлык%n в меню "Пуск" или на Рабочем столе. %n%nНажмите «Завершить», %nчтобы выйти из программы установки.
rus.ExtractedFile=Извлекается файл:
rus.Extracted=Распаковка архивов...
rus.CancelButton=Отменить распаковку
rus.Error=Ошибка распаковки!
rus.ElapsedTime=Прошло:
rus.RemainingTime=Осталось времени:
rus.EstimatedTime=Всего:
rus.AllElapsedTime=Время установки:


[Code]
procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';

var
PageNameLabel, PageDescriptionLabel, WelcomeLabel1,WelcomeLabel2,FLabel1, FLabel2, WLabel1, WLabel2, WelcomeLabel4,FinishedHeadingLabel, FinishedHeadingLabel1,WelcomeLabel3: TLabel;
LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
LabelPct2: TLabel;
ISDoneProgressBar2:TNewProgressBar;
#endif
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;


mp3Handle: HWND;
mp3Name: String;
const
BASS_SAMPLE_LOOP = 4;

/////////////////конец музыки////////
PCFonFLY=true;
notPCFonFLY=false;



function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean; external 'BASS_Init@files:BASS.dll stdcall delayload';
function BASS_StreamCreateFile(mem: BOOL; f: PAnsiChar; offset1: DWORD; offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): DWORD; external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';
function BASS_Start: Boolean; external 'BASS_Start@files:BASS.dll stdcall delayload';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean; external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';
function BASS_Stop: Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload';
function BASS_Free: Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload';

function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('sound.mp3');
mp3Name := ExpandConstant('{tmp}\sound.mp3');
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PAnsiChar(mp3Name), 0, 0, 0, 0, BASS_SAMPLE_LOOP);
BASS_Start();
BASS_ChannelPlay(mp3Handle, False);
Result := True;
end;

procedure DeinitializeSetup();
begin
BASS_Stop();
BASS_Free();
end;

///////////////////конец музыки/////////////////


type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;

function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';

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';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';

function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';

function SrepInit(TmpFile:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
#ifdef SecondProgressBar
if CurrentPct<=1000 then ISDoneProgressBar2.Position := CurrentPct;
LabelPct2.Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
#endif
LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
LabelTime2.Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
Result := ISDoneCancel;
end;

procedure CancelButtonOnClick(Sender: TObject);
begin
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
end;



procedure HideControls();
begin
WizardForm.FileNamelabel.Hide;
ISDoneProgressBar1.Hide;
LabelPct1.Hide;
LabelCurrFileName.Hide;
LabelTime1.Hide;
LabelTime2.Hide;
MyCancelButton.Hide;
#ifdef SecondProgressBar
ISDoneProgressBar2.Hide;
LabelPct2.Hide;
#endif
end;

procedure CreateControls();
var PBTop:integer;
begin
PBTop:=ScaleY(50);
ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar1 do begin
Parent := WizardForm.InstallingPage;
Height := WizardForm.ProgressGauge.Height;
Left := ScaleX(0);
Top := PBTop;
Width := ScaleX(365);
Max := 1000;
end;
LabelPct1 := TLabel.Create(WizardForm);
with LabelPct1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar1.Width+ScaleX(5);
Top := ISDoneProgressBar1.Top + ScaleY(2);
Width := ScaleX(80);
end;
LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := ISDoneProgressBar1.Width+ScaleX(30);
Left := ScaleX(0);
Top := ScaleY(30);
end;
#ifdef SecondProgressBar
PBTop:=PBTop+ScaleY(25);
ISDoneProgressBar2 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar2 do begin
Parent := WizardForm.InstallingPage;
Left := ScaleX(0);
Top := PBTop+ScaleY(8);
Width := ISDoneProgressBar1.Width;
Max := 1000;
Height := WizardForm.ProgressGauge.Height;
end;
LabelPct2 := TLabel.Create(WizardForm);
with LabelPct2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar2.Width+ScaleX(5);
Top := ISDoneProgressBar2.Top + ScaleY(2);
Width := ScaleX(80);
end;
#endif
LabelTime1 := TLabel.Create(WizardForm);
with LabelTime1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := ISDoneProgressBar1.Width div 2;
Left := ScaleX(0);
Top := PBTop + ScaleY(35);
end;
LabelTime2 := TLabel.Create(WizardForm);
with LabelTime2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := LabelTime1.Width+ScaleX(40);
Left := ISDoneProgressBar1.Width div 2;
Top := LabelTime1.Top;
end;
LabelTime3 := TLabel.Create(WizardForm);
with LabelTime3 do begin
Parent := WizardForm.FinishedPage;
AutoSize := False;
Width := 300;
Left := 180;
Top := 200;
end;
MyCancelButton:=TButton.Create(WizardForm);
with MyCancelButton do begin
Parent:=WizardForm;
Width:=ScaleX(135);
Caption:=ExpandConstant('{cm:CancelButton}');
Left:=ScaleX(360);
Top:=WizardForm.cancelbutton.top;
OnClick:=@CancelButtonOnClick;
end;
end;


Procedure CurPageChanged(CurPageID: Integer);
Begin
if (CurPageID = wpFinished) and ISDoneError then
begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
WizardForm.FinishedLabel.Font.Color:= clRed;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
end;
end;

function CheckError:boolean;
begin
result:= not ISDoneError;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
FindHandle1,ColFiles1,CurIndex1,tmp:integer;
ExecError:boolean;
InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
if CurStep = ssInstall then begin //Если необходимо, можно поменять на ssPostInstall
WizardForm.ProgressGauge.Hide;
WizardForm.CancelButton.Hide;
CreateControls;
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
ISDoneCancel:=0;


#ifdef records
ExtractTemporaryFile('records.inf');
#endif

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

if not ISArcExtract ( 0, 0, ExpandConstant('{src}\The SIMS 4 Deluxe Edition.arc'), ExpandConstant('{app}\'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) 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);
end;
ISFindFree(FindHandle1);
if ExecError then break;


ISDoneError:=false;
until true;
ISDoneStop;
end;
HideControls;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
end;








procedure WizardImage();
begin
WizardForm.WizardBitmapImage.Width:= ScaleX(497);
WizardForm.WizardBitmapImage2.Width:= ScaleX(497);

WelcomeLabel1:= TLabel.Create(WizardForm);
WelcomeLabel1.Left := ScaleX(36);
WelcomeLabel1.Top := ScaleY(89);
WelcomeLabel1.Width := ScaleX(205);
WelcomeLabel1.Height := ScaleY(219);
WelcomeLabel1.AutoSize := False;
WelcomeLabel1.WordWrap := True;
WelcomeLabel1.Alignment := taCenter;
WelcomeLabel1.Font.Size := 12;
WelcomeLabel1.Font.Color:= clblack;
WelcomeLabel1.Font.Style:= [fsBold]
WelcomeLabel1.Font.Name:= 'Georgia'
WelcomeLabel1.ShowAccelChar := False;
WelcomeLabel1.Caption :=ExpandConstant('{cm:WelcomeLabel1}');
WelcomeLabel1.Transparent := True;
WelcomeLabel1.Parent := WizardForm.WelcomePage;

WLabel1 := TLabel.Create(WizardForm);
WLabel1.Left := ScaleX(36);
WLabel1.Top := ScaleY(90);
WLabel1.Width := ScaleX(205);
WLabel1.Height := ScaleY(219);
WLabel1.AutoSize := False;
WLabel1.WordWrap := True;
WLabel1.Alignment := taCenter;
WLabel1.Font.Size := 12;
WLabel1.Font.Color:= clwhite;
WLabel1.Font.Style:= [fsBold]
WLabel1.Font.Name:= 'Georgia'
WLabel1.ShowAccelChar := False;
WLabel1.Caption :=ExpandConstant('{cm:WelcomeLabel1}');
WLabel1.Transparent := True;
WLabel1.Parent := WizardForm.WelcomePage;

WelcomeLabel2:= TLabel.Create(WizardForm);
WelcomeLabel2.Left := ScaleX(36);
WelcomeLabel2.Top := ScaleY(160);
WelcomeLabel2.Width := ScaleX(210);
WelcomeLabel2.Height := ScaleY(234);
WelcomeLabel2.AutoSize := False;
WelcomeLabel2.WordWrap := True;
WelcomeLabel2.Alignment := taCenter;
WelcomeLabel2.Font.Size := 12;
WelcomeLabel2.Font.Color:= clblack;
WelcomeLabel2.Font.Style:= [fsBold]
WelcomeLabel2.Font.Name:= 'Georgia'
WelcomeLabel2.ShowAccelChar := False;
WelcomeLabel2.Caption :=ExpandConstant('{cm:WelcomeLabel2}');
WelcomeLabel2.Transparent := True;
WelcomeLabel2.Parent := WizardForm.WelcomePage;

WLabel2 :=TLabel.Create(WizardForm);
WLabel2.Left := ScaleX(36);
WLabel2.Top := ScaleY(159);
WLabel2.Width := ScaleX(210);
WLabel2.Height := ScaleY(234);
WLabel2.AutoSize := False;
WLabel2.WordWrap := True;
WLabel2.Alignment := taCenter;
WLabel2.Font.Size := 12;
WLabel2.Font.Style:= [fsBold]
WLabel2.Font.Color:= clwhite;
WLabel2.Font.Name:= 'Georgia'
WLabel2.ShowAccelChar := False;
WLabel2.Caption := ExpandConstant('{cm:WelcomeLabel2}');
WLabel2.Transparent := True;
WLabel2.Parent := WizardForm.WelcomePage;

FinishedHeadingLabel:= TLabel.Create(WizardForm);
FinishedHeadingLabel.Left := ScaleX(36);
FinishedHeadingLabel.Top := ScaleY(89);
FinishedHeadingLabel.Width := ScaleX(210);
FinishedHeadingLabel.Height := ScaleY(100);
FinishedHeadingLabel.AutoSize := False;
FinishedHeadingLabel.WordWrap := True;
FinishedHeadingLabel.Alignment := taCenter;
FinishedHeadingLabel.Font.Size := 12;
FinishedHeadingLabel.Font.Color:= clblack;
FinishedHeadingLabel.Font.Style:= [fsBold]
FinishedHeadingLabel.Font.Name:= 'Georgia'
FinishedHeadingLabel.ShowAccelChar := False;
FinishedHeadingLabel.Caption :=ExpandConstant('{cm:FinisLabel1}');
FinishedHeadingLabel.Transparent := True;
FinishedHeadingLabel.Parent := WizardForm.FinishedPage;

FLabel1 := TLabel.Create(WizardForm);
FLabel1.Left := ScaleX(36);
FLabel1.Top := ScaleY(36);
FLabel1.Width := ScaleX(210);
FLabel1.Height := ScaleY(100);
FLabel1.AutoSize := False;
FLabel1.Alignment := taCenter;
FLabel1.WordWrap := True;
FLabel1.Font.Size := 12;
FLabel1.Font.Name := 'Georgia'
FLabel1.Font.Color:= clwhite;
FLabel1.Font.Style:= [fsBold]
FLabel1.ShowAccelChar := False;
FLabel1.Caption := ExpandConstant('{cm:FinisLabel1}');
FLabel1.Transparent := True;
FLabel1.Parent := WizardForm.FinishedPage;

FinishedHeadingLabel1:= TLabel.Create(WizardForm);
FinishedHeadingLabel1.Left := ScaleX(36);
FinishedHeadingLabel1.Top := ScaleY(36);
FinishedHeadingLabel1.Width := ScaleX(210);
FinishedHeadingLabel1.Height := ScaleY(234);
FinishedHeadingLabel1.AutoSize := False;
FinishedHeadingLabel1.WordWrap := True;
FinishedHeadingLabel1.Alignment := taCenter;
FinishedHeadingLabel1.Font.Size := 12;
FinishedHeadingLabel1.Font.Color:= clblack;
FinishedHeadingLabel1.Font.Style:= [fsBold]
FinishedHeadingLabel1.Font.Name:= 'Georgia'
FinishedHeadingLabel1.ShowAccelChar := False;
FinishedHeadingLabel1.Caption :=ExpandConstant('{cm:FinisLabel2}');
FinishedHeadingLabel1.Transparent := True;
FinishedHeadingLabel1.Parent := WizardForm.FinishedPage;

FLabel2 :=TLabel.Create(WizardForm);
FLabel2.Top := ScaleY(36);
FLabel2.Left := ScaleX(36);
FLabel2.Width := ScaleX(210);
FLabel2.Height := ScaleY(234);
FLabel2.AutoSize := False;
FLabel2.WordWrap := True;
FLabel2.Alignment := taCenter;
FLabel2.Font.Size := 12;
FLabel2.Font.Name := 'Georgia'
FLabel2.Font.Style:= [fsBold]
FLabel2.Font.Color:= clwhite;
FLabel2.ShowAccelChar := False;
FLabel2.Caption := ExpandConstant('{cm:FinisLabel2}');
FLabel2.Transparent := True;
FLabel2.Parent := WizardForm.FinishedPage;

WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;

WizardForm.FinishedLabel.Hide;
WizardForm.FinishedHeadingLabel.Hide;
end;

procedure WizardSmallImage();
begin
WizardForm.WizardSmallBitmapImage.SetBounds(ScaleX(0), ScaleY(0), WizardForm.MainPanel.Width, WizardForm.MainPanel.Height);

PageNameLabel:= TLabel.Create(WizardForm)
with WizardForm.PageNameLabel do
PageNameLabel.SetBounds(Left, Top, Width, Height);
PageNameLabel.Transparent:= True;
PageNameLabel.Font:= WizardForm.PageNameLabel.Font;
PageNameLabel.Font.Color:= clblack;
PageNameLabel.Parent:= WizardForm.MainPanel;

PageDescriptionLabel:= TLabel.Create(WizardForm);
with PageDescriptionLabel do
begin
Left:= WizardForm.PageDescriptionLabel.Left-12;
Top:= WizardForm.PageDescriptionLabel.Top;
Height:= WizardForm.PageDescriptionLabel.Height;
Width:= ScaleX(280);
AutoSize:= False;
WordWrap:= True;
Font.Name:= WizardForm.PageDescriptionLabel.Font.Name;
Transparent:= True;
Parent:= WizardForm.MainPanel;
end;

WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
end;


function skinsdll(): Boolean;
begin
ExtractTemporaryFile('1.cjstyles');
LoadSkin(ExpandConstant('{tmp}\1.cjstyles'), '');
Result := True;
end;

procedure LogoOnClick(Sender: TObject);
var ResCode: Integer;
begin
ShellExec('', 'http://vk.com/mr.mass', '' , '', SW_SHOW, ewNoWait, ResCode)
end;

procedure Logo();
var
BtnPanel: TPanel;
BtnImage: TBitmapImage;
begin
ExtractTemporaryFile('logo.bmp')

BtnPanel:=TPanel.Create(WizardForm)
with BtnPanel do begin
Left:=20
Top:=325
Width:=132
Height:=27
Cursor:=crHand
OnClick:=@logoOnClick
Parent:=WizardForm
end;
BtnImage:=TBitmapImage.Create(WizardForm)
with BtnImage do begin
AutoSize:=True;
Enabled:=False;
Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo.bmp')
Parent:=BtnPanel
end;

end;

procedure InitializeWizard;
begin
Logo();
WizardImage();
WizardSmallImage();
end;


[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\Game\Bin\The.Sims.4.Launcher.exe
Name: {commondesktop}\{#MyAppName}; Filename: {app}\Game\Bin\The.Sims.4.Launcher.exe; Tasks: desktopicon


[Registry]
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Setup Version; ValueData: 5.4.2.ee2 (a)
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: App Path; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: InstallLocation; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Icon Group; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: User; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Selected Tasks; ValueData: icons,icons\desktopicon,icons\quicklaunchicon,soft,soft\directx,soft\vccheck,soft\physxcheck
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Deselected Tasks; ValueData:
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Language; ValueData: russian
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: DisplayName; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: DisplayIcon; ValueData: (app)\Game\Bin\TS4.exe
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: UninstallString; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: UninstallDataFile; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: QuietUninstallString; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Publisher; ValueData: License by T_ONG_BAK_J
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: dword; ValueName: NoModify; ValueData: $00000001
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: dword; ValueName: NoRepair; ValueData: $00000001
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: InstallDate; ValueData: 20140928
Root: HKLM; SubKey: SOFTWARE\\Maxis\The Sims 4; ValueType: string; ValueName: GDFBinary; ValueData: (app)\__Installer\GDFBinary_ru_RU.dll
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: GameExplorer; ValueData: {{46F1375C-3A8C-42E1-9A27-0CE809AD35AC}
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: DisplayName; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Locale; ValueData: ru_RU
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Product GUID; ValueData: {{48EBEBBF-B9F8-4520-A3CF-89A730721917}
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Install Dir; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4\InstallOptSelect; ValueType: string; ValueName: ; ValueData: 1
[/more]

Добавлено:
я уже третьи раз спрашиваю как добавить кнопку стоп воспроизведение музыки в инсталятор

вот код
Автор: nik1967
Дата сообщения: 05.10.2014 12:18

Цитата:
я уже третьи раз спрашиваю как добавить кнопку стоп воспроизведение музыки в инсталятор

Ты пишешь в таком тоне, как будь то тебе кто-то что-то должен. А тут так: если кто нибудь знает, и тем более если хочет, то ответит. Так, что поуменьши свой пыл.
Вот тебе пример с вкл./выкл. музыки + регулятор громкости. Ну а дальше разбирайся сам.
Автор: innonewbie
Дата сообщения: 05.10.2014 14:59

Цитата:
я уже третьи раз спрашиваю

Да хоть четвёртый - здесь никто никому ничем не обязан, не отвечают, значит не знают или не хотят отвечать. И нечего клепать посты один за другим. Вот простенький пример: http://rghost.ru/58365138 . Дальше сам разбирайся.

nik1967, не видел ваш пост, когда писал свой.
Автор: artemabu
Дата сообщения: 06.10.2014 08:08

Цитата:
Да хоть четвёртый - здесь никто никому ничем не обязан, не отвечают, значит не знают или не хотят отвечать. И нечего клепать посты один за другим. Вот простенький пример: http://rghost.ru/58365138 . Дальше сам разбирайся.
 


извините пожалуйста за наглость конечно, просто жалобы на мой репак поступили насчет музыки и вот именно поэтому я не знал что делать. именно поэтому такая паника извините еще раз и еще у меня ошибка ввозникает http://i64.fastpic.ru/big/2014/1006/f2/d2c953ac69e346551772a551222edcf2.jpeg
Автор: innonewbie
Дата сообщения: 06.10.2014 09:40
artemabu, у тебя юникод версия inno setup? Замени PChar на PAnsiChar - должно помочь.
Автор: MISHANCHYK
Дата сообщения: 06.10.2014 09:47
Подскажите пожалуйста, можно ли при деинсталяции программы внести данные в реестр?
Как внести

Код: Root: HKLM; SubKey: SOFTWARE\Classes\batfile\shell\edit\command; ValueType: expandsz; ValueData: %SystemRoot%\SysWow64\NOTEPAD.EXE %1;
Автор: artemabu
Дата сообщения: 06.10.2014 11:32

Цитата:
artemabu, у тебя юникод версия inno setup? Замени PChar на PAnsiChar - должно помочь.

спасибо огромное я ваш должник на веки но при запуска инсталятора возникла ошибка http://i67.fastpic.ru/big/2014/1006/30/6231e1830e1d2d8848ce9f8862801430.jpeg
Автор: innonewbie
Дата сообщения: 06.10.2014 15:19
artemabu, кидай полностью скрипт с файлами, гляну на досуге, а так без скрипта гадать бесполезно.
Автор: artemabu
Дата сообщения: 06.10.2014 16:59
[more]
Цитата:
artemabu, кидай полностью скрипт с файлами, гляну на досуге, а так без скрипта гадать бесполезно.

#define MyAppName "The SIMS 4 Deluxe Edition"
#define MyAppVersion "1.5"
#define MyAppPublisher "саmоdelкiн"
#define NeedSize "5000000000"

#define NeedMem 512

#define SecondProgressBar

#define records


[Setup]
AppId={{8CC9C439-58E0-4745-BB8A-9210BAFAAE38}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName=саmоdelкiн/{#MyAppName}
OutputBaseFilename=the sims 4
Compression=lzma/ultra64
SolidCompression=true
WizardImageFile=image/1.bmp
WizardSmallImageFile=image/2.bmp
SetupIconFile=icon.ico
DiskSpanning=true


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

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

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
#endif
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: Include\ISSkin.dll; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: Include\1.cjstyles; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: image\logo.bmp; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: Include\CallbackCtrl.dll; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: BASS.dll; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: sound.mp3; DestDir: {tmp}; Flags: dontcopy noencryption nocompression

[CustomMessages]
rus.FinishedLabel=Программа {#MyAppName} установлена на Ваш компьютер. Приложение можно запустить с помощью соответствующего значка.%n%nНажмите «Завершить», чтобы выйти из программы установки.
rus.Error2=Установка %n{#MyAppName} %nне завершена.
rus.Error3=%nВо время установки произошла ошибка, пожалуйста отключите сторонние программы и повторите попытку установки.%n%n%nНажмите «Завершить», чтобы выйти.
rus.WelcomeLabel1=Программа установит игру {#MyAppName} на Ваш компьютер.
rus.WelcomeLabel2=Нажмите «Далее», чтобы продолжить, или «Отмена», чтобы выйти
rus.FinisLabel1=Игра %n{#MyAppName}%n установлена на Ваш%n компьютер.
rus.FinisLabel2=%n%nДля ее запуска выберите%n соотвествующий ярлык%n в меню "Пуск" или на Рабочем столе. %n%nНажмите «Завершить», %nчтобы выйти из программы установки.
rus.ExtractedFile=Извлекается файл:
rus.Extracted=Распаковка архивов...
rus.CancelButton=Отменить распаковку
rus.Error=Ошибка распаковки!
rus.ElapsedTime=Прошло:
rus.RemainingTime=Осталось времени:
rus.EstimatedTime=Всего:
rus.AllElapsedTime=Время установки:


[Code]
procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';

var
PageNameLabel, PageDescriptionLabel, WelcomeLabel1,WelcomeLabel2,FLabel1, FLabel2, WLabel1, WLabel2, WelcomeLabel4,FinishedHeadingLabel, FinishedHeadingLabel1,WelcomeLabel3: TLabel;
LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
LabelPct2: TLabel;
ISDoneProgressBar2:TNewProgressBar;
#endif
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;
mp3Handle: HWND;
mp3Name: String;
PlayButton, PauseButton: tbutton;


const
BASS_ACTIVE_PAUSED = 3;
BASS_SAMPLE_LOOP = 4;

///////////////// начало Музыки ////////
PCFonFLY=true;
notPCFonFLY=false;



function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean;
external 'BASS_Init@files:BASS.dll stdcall delayload';

function BASS_StreamCreateFile(mem: BOOL; f: PAnsiChar; offset: DWORD; length: DWORD; flags: DWORD): DWORD;
external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';

function BASS_Start(): Boolean;
external 'BASS_Start@files:BASS.dll stdcall delayload';

function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean;
external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';

function BASS_ChannelIsActive(handle: DWORD): Integer;
external 'BASS_ChannelIsActive@files:BASS.dll stdcall delayload';

function BASS_ChannelPause(handle: DWORD): Boolean;
external 'BASS_ChannelPause@files:BASS.dll stdcall delayload';

function BASS_Stop(): Boolean;
external 'BASS_Stop@files:BASS.dll stdcall delayload';

function BASS_Pause(): Boolean;
external 'BASS_Pause@files:BASS.dll stdcall delayload';

function BASS_Free(): Boolean;
external 'BASS_Free@files:BASS.dll stdcall delayload';

procedure PlayButtonOnClick(Sender: TObject);
begin
case BASS_ChannelIsActive(mp3Handle) of
BASS_ACTIVE_PAUSED:
begin
BASS_ChannelPlay(mp3Handle, False);
PlayButton.Hide
PauseButton.Show
end;
end;
end;

procedure PauseButtonOnClick(Sender: TObject);
begin
BASS_ChannelPause(mp3Handle);
PauseButton.Hide
PlayButton.Show
end;

function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('sound.mp3');
mp3Name := ExpandConstant('{tmp}\sound.mp3');
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PAnsiChar(mp3Name), 0, 0, BASS_SAMPLE_LOOP);
BASS_Start();
BASS_ChannelPlay(mp3Handle, False);
Result := True;
end;

procedure musicbass();
begin
PlayButton:=TButton.Create(WizardForm)
with PlayButton do begin
Left:=11 //положение кнопки
Top:=327 //
Width:=80 //размер кнопки
Height:=23 //
Cursor:=crHand
OnClick:=@PlayButtonOnClick
Parent:=WizardForm
Caption:= 'Play'; //надпись на кнопке
Hint := 'Воспроизвести музыку';
ShowHint := True;
PauseButton:=TButton.Create(WizardForm)
with PauseButton do begin
Left:=11 //положение кнопки
Top:=327 //
Width:=80 //размер кнопки
Height:=23 //
Cursor:=crHand
OnClick:=@PauseButtonOnClick
Parent:=WizardForm
Caption:= 'Pause'; //надпись на кнопке
Hint := 'Приостановить музыку';
ShowHint := True;
end;
end;
end;

#ifdef welcome
Procedure CurPageChanged(CurPageID: Integer);
Begin
Case CurPageID of
wpWelcome:
begin
PlayButton.Hide;
PauseButton.Hide;
end;

wpSelectDir:
begin
if BASS_ChannelIsActive(mp3Handle) = BASS_ACTIVE_PAUSED then
PlayButton.Show else
PauseButton.Show;
end;

wpFinished:
begin
PlayButton.Hide;
PauseButton.Hide;
end;
end;
end;
#endif

procedure DeinitializeSetup();
begin
BASS_Stop();
BASS_Free();
end;
///////////////////конец музыки/////////////////


type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;

function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';

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';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';

function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';

function SrepInit(TmpFile:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
#ifdef SecondProgressBar
if CurrentPct<=1000 then ISDoneProgressBar2.Position := CurrentPct;
LabelPct2.Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
#endif
LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
LabelTime2.Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
Result := ISDoneCancel;
end;

procedure CancelButtonOnClick(Sender: TObject);
begin
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
end;



procedure HideControls();
begin
WizardForm.FileNamelabel.Hide;
ISDoneProgressBar1.Hide;
LabelPct1.Hide;
LabelCurrFileName.Hide;
LabelTime1.Hide;
LabelTime2.Hide;
MyCancelButton.Hide;
#ifdef SecondProgressBar
ISDoneProgressBar2.Hide;
LabelPct2.Hide;
#endif
end;

procedure CreateControls();
var PBTop:integer;
begin
PBTop:=ScaleY(50);
ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar1 do begin
Parent := WizardForm.InstallingPage;
Height := WizardForm.ProgressGauge.Height;
Left := ScaleX(0);
Top := PBTop;
Width := ScaleX(365);
Max := 1000;
end;
LabelPct1 := TLabel.Create(WizardForm);
with LabelPct1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar1.Width+ScaleX(5);
Top := ISDoneProgressBar1.Top + ScaleY(2);
Width := ScaleX(80);
end;
LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := ISDoneProgressBar1.Width+ScaleX(30);
Left := ScaleX(0);
Top := ScaleY(30);
end;
#ifdef SecondProgressBar
PBTop:=PBTop+ScaleY(25);
ISDoneProgressBar2 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar2 do begin
Parent := WizardForm.InstallingPage;
Left := ScaleX(0);
Top := PBTop+ScaleY(8);
Width := ISDoneProgressBar1.Width;
Max := 1000;
Height := WizardForm.ProgressGauge.Height;
end;
LabelPct2 := TLabel.Create(WizardForm);
with LabelPct2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar2.Width+ScaleX(5);
Top := ISDoneProgressBar2.Top + ScaleY(2);
Width := ScaleX(80);
end;
#endif
LabelTime1 := TLabel.Create(WizardForm);
with LabelTime1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := ISDoneProgressBar1.Width div 2;
Left := ScaleX(0);
Top := PBTop + ScaleY(35);
end;
LabelTime2 := TLabel.Create(WizardForm);
with LabelTime2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := LabelTime1.Width+ScaleX(40);
Left := ISDoneProgressBar1.Width div 2;
Top := LabelTime1.Top;
end;
LabelTime3 := TLabel.Create(WizardForm);
with LabelTime3 do begin
Parent := WizardForm.FinishedPage;
AutoSize := False;
Width := 300;
Left := 180;
Top := 200;
end;
MyCancelButton:=TButton.Create(WizardForm);
with MyCancelButton do begin
Parent:=WizardForm;
Width:=ScaleX(135);
Caption:=ExpandConstant('{cm:CancelButton}');
Left:=ScaleX(360);
Top:=WizardForm.cancelbutton.top;
OnClick:=@CancelButtonOnClick;
end;
end;


Procedure CurPageChanged(CurPageID: Integer);
Begin
if (CurPageID = wpFinished) and ISDoneError then
begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
WizardForm.FinishedLabel.Font.Color:= clRed;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
end;
end;

function CheckError:boolean;
begin
result:= not ISDoneError;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
FindHandle1,ColFiles1,CurIndex1,tmp:integer;
ExecError:boolean;
InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
if CurStep = ssInstall then begin //Если необходимо, можно поменять на ssPostInstall
WizardForm.ProgressGauge.Hide;
WizardForm.CancelButton.Hide;
CreateControls;
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
ISDoneCancel:=0;


#ifdef records
ExtractTemporaryFile('records.inf');
#endif

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

if not ISArcExtract ( 0, 0, ExpandConstant('{src}\The SIMS 4 Deluxe Edition.arc'), ExpandConstant('{app}\'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) 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);
end;
ISFindFree(FindHandle1);
if ExecError then break;


ISDoneError:=false;
until true;
ISDoneStop;
end;
HideControls;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
end;








procedure WizardImage();
begin
WizardForm.WizardBitmapImage.Width:= ScaleX(497);
WizardForm.WizardBitmapImage2.Width:= ScaleX(497);

WelcomeLabel1:= TLabel.Create(WizardForm);
WelcomeLabel1.Left := ScaleX(36);
WelcomeLabel1.Top := ScaleY(89);
WelcomeLabel1.Width := ScaleX(205);
WelcomeLabel1.Height := ScaleY(219);
WelcomeLabel1.AutoSize := False;
WelcomeLabel1.WordWrap := True;
WelcomeLabel1.Alignment := taCenter;
WelcomeLabel1.Font.Size := 12;
WelcomeLabel1.Font.Color:= clblack;
WelcomeLabel1.Font.Style:= [fsBold]
WelcomeLabel1.Font.Name:= 'Georgia'
WelcomeLabel1.ShowAccelChar := False;
WelcomeLabel1.Caption :=ExpandConstant('{cm:WelcomeLabel1}');
WelcomeLabel1.Transparent := True;
WelcomeLabel1.Parent := WizardForm.WelcomePage;

WLabel1 := TLabel.Create(WizardForm);
WLabel1.Left := ScaleX(36);
WLabel1.Top := ScaleY(90);
WLabel1.Width := ScaleX(205);
WLabel1.Height := ScaleY(219);
WLabel1.AutoSize := False;
WLabel1.WordWrap := True;
WLabel1.Alignment := taCenter;
WLabel1.Font.Size := 12;
WLabel1.Font.Color:= clwhite;
WLabel1.Font.Style:= [fsBold]
WLabel1.Font.Name:= 'Georgia'
WLabel1.ShowAccelChar := False;
WLabel1.Caption :=ExpandConstant('{cm:WelcomeLabel1}');
WLabel1.Transparent := True;
WLabel1.Parent := WizardForm.WelcomePage;

WelcomeLabel2:= TLabel.Create(WizardForm);
WelcomeLabel2.Left := ScaleX(36);
WelcomeLabel2.Top := ScaleY(160);
WelcomeLabel2.Width := ScaleX(210);
WelcomeLabel2.Height := ScaleY(234);
WelcomeLabel2.AutoSize := False;
WelcomeLabel2.WordWrap := True;
WelcomeLabel2.Alignment := taCenter;
WelcomeLabel2.Font.Size := 12;
WelcomeLabel2.Font.Color:= clblack;
WelcomeLabel2.Font.Style:= [fsBold]
WelcomeLabel2.Font.Name:= 'Georgia'
WelcomeLabel2.ShowAccelChar := False;
WelcomeLabel2.Caption :=ExpandConstant('{cm:WelcomeLabel2}');
WelcomeLabel2.Transparent := True;
WelcomeLabel2.Parent := WizardForm.WelcomePage;

WLabel2 :=TLabel.Create(WizardForm);
WLabel2.Left := ScaleX(36);
WLabel2.Top := ScaleY(159);
WLabel2.Width := ScaleX(210);
WLabel2.Height := ScaleY(234);
WLabel2.AutoSize := False;
WLabel2.WordWrap := True;
WLabel2.Alignment := taCenter;
WLabel2.Font.Size := 12;
WLabel2.Font.Style:= [fsBold]
WLabel2.Font.Color:= clwhite;
WLabel2.Font.Name:= 'Georgia'
WLabel2.ShowAccelChar := False;
WLabel2.Caption := ExpandConstant('{cm:WelcomeLabel2}');
WLabel2.Transparent := True;
WLabel2.Parent := WizardForm.WelcomePage;

FinishedHeadingLabel:= TLabel.Create(WizardForm);
FinishedHeadingLabel.Left := ScaleX(36);
FinishedHeadingLabel.Top := ScaleY(89);
FinishedHeadingLabel.Width := ScaleX(210);
FinishedHeadingLabel.Height := ScaleY(100);
FinishedHeadingLabel.AutoSize := False;
FinishedHeadingLabel.WordWrap := True;
FinishedHeadingLabel.Alignment := taCenter;
FinishedHeadingLabel.Font.Size := 12;
FinishedHeadingLabel.Font.Color:= clblack;
FinishedHeadingLabel.Font.Style:= [fsBold]
FinishedHeadingLabel.Font.Name:= 'Georgia'
FinishedHeadingLabel.ShowAccelChar := False;
FinishedHeadingLabel.Caption :=ExpandConstant('{cm:FinisLabel1}');
FinishedHeadingLabel.Transparent := True;
FinishedHeadingLabel.Parent := WizardForm.FinishedPage;

FLabel1 := TLabel.Create(WizardForm);
FLabel1.Left := ScaleX(36);
FLabel1.Top := ScaleY(36);
FLabel1.Width := ScaleX(210);
FLabel1.Height := ScaleY(100);
FLabel1.AutoSize := False;
FLabel1.Alignment := taCenter;
FLabel1.WordWrap := True;
FLabel1.Font.Size := 12;
FLabel1.Font.Name := 'Georgia'
FLabel1.Font.Color:= clwhite;
FLabel1.Font.Style:= [fsBold]
FLabel1.ShowAccelChar := False;
FLabel1.Caption := ExpandConstant('{cm:FinisLabel1}');
FLabel1.Transparent := True;
FLabel1.Parent := WizardForm.FinishedPage;

FinishedHeadingLabel1:= TLabel.Create(WizardForm);
FinishedHeadingLabel1.Left := ScaleX(36);
FinishedHeadingLabel1.Top := ScaleY(36);
FinishedHeadingLabel1.Width := ScaleX(210);
FinishedHeadingLabel1.Height := ScaleY(234);
FinishedHeadingLabel1.AutoSize := False;
FinishedHeadingLabel1.WordWrap := True;
FinishedHeadingLabel1.Alignment := taCenter;
FinishedHeadingLabel1.Font.Size := 12;
FinishedHeadingLabel1.Font.Color:= clblack;
FinishedHeadingLabel1.Font.Style:= [fsBold]
FinishedHeadingLabel1.Font.Name:= 'Georgia'
FinishedHeadingLabel1.ShowAccelChar := False;
FinishedHeadingLabel1.Caption :=ExpandConstant('{cm:FinisLabel2}');
FinishedHeadingLabel1.Transparent := True;
FinishedHeadingLabel1.Parent := WizardForm.FinishedPage;

FLabel2 :=TLabel.Create(WizardForm);
FLabel2.Top := ScaleY(36);
FLabel2.Left := ScaleX(36);
FLabel2.Width := ScaleX(210);
FLabel2.Height := ScaleY(234);
FLabel2.AutoSize := False;
FLabel2.WordWrap := True;
FLabel2.Alignment := taCenter;
FLabel2.Font.Size := 12;
FLabel2.Font.Name := 'Georgia'
FLabel2.Font.Style:= [fsBold]
FLabel2.Font.Color:= clwhite;
FLabel2.ShowAccelChar := False;
FLabel2.Caption := ExpandConstant('{cm:FinisLabel2}');
FLabel2.Transparent := True;
FLabel2.Parent := WizardForm.FinishedPage;

WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;

WizardForm.FinishedLabel.Hide;
WizardForm.FinishedHeadingLabel.Hide;
end;

procedure WizardSmallImage();
begin
WizardForm.WizardSmallBitmapImage.SetBounds(ScaleX(0), ScaleY(0), WizardForm.MainPanel.Width, WizardForm.MainPanel.Height);

PageNameLabel:= TLabel.Create(WizardForm)
with WizardForm.PageNameLabel do
PageNameLabel.SetBounds(Left, Top, Width, Height);
PageNameLabel.Transparent:= True;
PageNameLabel.Font:= WizardForm.PageNameLabel.Font;
PageNameLabel.Font.Color:= clblack;
PageNameLabel.Parent:= WizardForm.MainPanel;

PageDescriptionLabel:= TLabel.Create(WizardForm);
with PageDescriptionLabel do
begin
Left:= WizardForm.PageDescriptionLabel.Left-12;
Top:= WizardForm.PageDescriptionLabel.Top;
Height:= WizardForm.PageDescriptionLabel.Height;
Width:= ScaleX(280);
AutoSize:= False;
WordWrap:= True;
Font.Name:= WizardForm.PageDescriptionLabel.Font.Name;
Transparent:= True;
Parent:= WizardForm.MainPanel;
end;

WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
end;


function skinsdll(): Boolean;
begin
ExtractTemporaryFile('1.cjstyles');
LoadSkin(ExpandConstant('{tmp}\1.cjstyles'), '');
Result := True;
end;

procedure LogoOnClick(Sender: TObject);
var ResCode: Integer;
begin
ShellExec('', 'http://vk.com/mr.mass', '' , '', SW_SHOW, ewNoWait, ResCode)
end;

procedure Logo();
var
BtnPanel: TPanel;
BtnImage: TBitmapImage;
begin
ExtractTemporaryFile('logo.bmp')

BtnPanel:=TPanel.Create(WizardForm)
with BtnPanel do begin
Left:=20
Top:=325
Width:=132
Height:=27
Cursor:=crHand
OnClick:=@logoOnClick
Parent:=WizardForm
end;
BtnImage:=TBitmapImage.Create(WizardForm)
with BtnImage do begin
AutoSize:=True;
Enabled:=False;
Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo.bmp')
Parent:=BtnPanel
end;

end;

procedure InitializeWizard;
begin
musicbass();
Logo();
WizardImage();
WizardSmallImage();
end;


[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\Game\Bin\The.Sims.4.Launcher.exe
Name: {commondesktop}\{#MyAppName}; Filename: {app}\Game\Bin\The.Sims.4.Launcher.exe; Tasks: desktopicon


[Registry]
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Setup Version; ValueData: 5.4.2.ee2 (a)
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: App Path; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: InstallLocation; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Icon Group; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: User; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Selected Tasks; ValueData: icons,icons\desktopicon,icons\quicklaunchicon,soft,soft\directx,soft\vccheck,soft\physxcheck
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Deselected Tasks; ValueData:
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Language; ValueData: russian
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: DisplayName; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: DisplayIcon; ValueData: (app)\Game\Bin\TS4.exe
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: UninstallString; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: UninstallDataFile; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: QuietUninstallString; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Publisher; ValueData: License by T_ONG_BAK_J
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: dword; ValueName: NoModify; ValueData: $00000001
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: dword; ValueName: NoRepair; ValueData: $00000001
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: InstallDate; ValueData: 20140928
Root: HKLM; SubKey: SOFTWARE\\Maxis\The Sims 4; ValueType: string; ValueName: GDFBinary; ValueData: (app)\__Installer\GDFBinary_ru_RU.dll
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: GameExplorer; ValueData: {{46F1375C-3A8C-42E1-9A27-0CE809AD35AC}
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: DisplayName; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Locale; ValueData: ru_RU
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Product GUID; ValueData: {{48EBEBBF-B9F8-4520-A3CF-89A730721917}
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Install Dir; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4\InstallOptSelect; ValueType: string; ValueName: ; ValueData: 1
[/more]

Добавлено:
innonewbie

Цитата:
artemabu, кидай полностью скрипт с файлами, гляну на досуге, а так без скрипта гадать бесполезно.

http://rghost.ru/58382250
Автор: sjwrec
Дата сообщения: 07.10.2014 15:58
Всем привет!

Наверное мой модульный скрипт уже никому нафиг не нужен, но если кто-то ждал нового релиза модульника. То представляю Вам:

ENGINE 6.3 R7 - в примере использовалась игра Unreal Tournament III

Скачать 10.3 МБ

Работа скрипта проверена на: Windows 8.1 x64
Необходимая версия для компилляции: Inno Setup 5.5.1.ee1 (ANSI) ResTools
Автор: innonewbie
Дата сообщения: 07.10.2014 16:09
artemabu, глянул я твой скрипт: пример, который я давал на музыку, написан для bass.dll версии 2.3.0.3, а у тебя 2.4.10.0. Вот, переделал под 2.4.10 http://rghost.ru/58396679 - у меня работает.
P.S.: ты где ТАК учился скрипты писать? Там чёрт голову свернёт.
Автор: artemabu
Дата сообщения: 07.10.2014 16:18

Цитата:
artemabu, глянул я твой скрипт: пример, который я давал на музыку, написан для bass.dll версии 2.3.0.3, а у тебя 2.4.10.0. Вот, переделал под 2.4.10 http://rghost.ru/58396679 - у меня работает.  
P.S.: ты где ТАК учился скрипты писать? Там чёрт голову свернёт.



ни где просто брал готовые элементы и соединял их вместе

Добавлено:
Спасибо с меня бутылка

Страницы: 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758

Предыдущая тема: Только инсталлятор


Форум Ru-Board.club — поднят 15-09-2016 числа. Цель - сохранить наследие старого Ru-Board, истории становления российского интернета. Сделано для людей.