[Setup]
SourceDir=.
OutputDir=Setup
AppName=The Book of Unwritten Tales
AppVerName=The Book of Unwritten Tales
AppVersion=The Book of Unwritten Tales
AppPublisher=HMN Interactive
AppCopyright=HMN Interactive
DefaultDirName={pf}\The Book of Unwritten Tales
DefaultGroupName=The Book of Unwritten Tales
AllowNoIcons=yes
InfoBeforeFile=D:\Картинки\Лицензия.rtf
OutputBaseFilename=setup
WizardImageFile=D:\Картинки\InstallLeft.bmp
WizardSmallImageFile=D:\Картинки\InstallCorner.bmp
SetupIconFile=C:\Program Files (x86)\The Book of Unwritten Tales\Book.ico
WindowVisible=no
WindowShowCaption=no
WindowResizable=no
Compression=lzma/ultra
DiskSpanning=yes
DiskSliceSize=524288000
SlicesPerDisk=1
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
[Files]
Source: "D:\Картинки\1.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Картинки\10.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Картинки\2.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Картинки\3.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Картинки\4.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Картинки\5.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Картинки\6.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Картинки\7.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Картинки\8.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Картинки\9.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "isgsg.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "bass.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "T:\The Book of Unwritten Tales\Soundtarck\OST-The_Book_Of_Unwritten_Tales-READNFO-2011-I_KnoW\20-abspann-ik.mp3"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "T:\The Book of Unwritten Tales\Soundtarck\OST-The_Book_Of_Unwritten_Tales-READNFO-2011-I_KnoW\08-erzmagier_alastair-ik.mp3"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "T:\The Book of Unwritten Tales\Soundtarck\OST-The_Book_Of_Unwritten_Tales-READNFO-2011-I_KnoW\10-das_lied_vom_tod-ik.mp3"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "T:\The Book of Unwritten Tales\Soundtarck\OST-The_Book_Of_Unwritten_Tales-READNFO-2011-I_KnoW\12-unknown-ik.mp3"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "T:\The Book of Unwritten Tales\Soundtarck\OST-The_Book_Of_Unwritten_Tales-READNFO-2011-I_KnoW\15-unknown-ik.mp3"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "T:\The Book of Unwritten Tales\Soundtarck\OST-The_Book_Of_Unwritten_Tales-READNFO-2011-I_KnoW\16-ivo-ik.mp3"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: C:\Users\SASHA\Desktop\Game.reg; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "C:\Program Files (x86)\The Book of Unwritten Tales\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension
[Icons]
Name: "{group}\The Book of Unwritten Tales"; Filename: "{app}\bout.exe"; WorkingDir: "{app}";
Name: "{userdesktop}\The Book of Unwritten Tales"; Filename: "{app}\bout.exe"; WorkingDir: "{app}"; Tasks: desktopicon;
Name: "{group}\{cm:UninstallProgram,The Book of Unwritten Tales}"; Filename: "{uninstallexe}"
[Run]
Description: "{cm:LaunchProgram, The Book of Unwritten Tales}"; Filename: "{app}\bout.exe"; WorkingDir: "{app}"; Flags: nowait postinstall skipifsilent unchecked
Filename: {win}\regedit.exe; Parameters: /s {tmp}\Game.reg; StatusMsg: "Вносим изменения в реестр ..."; Flags: waituntilterminated runasoriginaluser
[UninstallDelete]
Type: filesandordirs; Name: "{app}"
Код:
const
Indent=25;
function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall delayload';
function ssInitialize(hParent:HWND;ssTimeShow:integer;FadeOut:boolean;StretchMode:integer;BkgColor:DWORD):boo lean; external 'ssInitialize@files:isgsg.dll stdcall delayload';
procedure ssDeInitialize; external 'ssDeInitialize@files:isgsg.dll stdcall delayload';
procedure ssAddImage(FileName:PAnsiChar); external 'ssAddImage@files:isgsg.dll stdcall delayload';
procedure ssStartShow; external 'ssStartShow@files:isgsg.dll stdcall delayload';
procedure ssStopShow; external 'ssStopShow@files:isgsg.dll stdcall delayload';
function GetSystemMetrics(nIndex:Integer):integer; external 'GetSystemMetrics@user32.dll stdcall delayload';
procedure ShowMP3Panel(hMainFrm:HWND;StartVolume:integer;DefMP3Dir,BASSDir,MLabel:PAnsiChar;IsShowMP3Info,IsBk gFrmVisible:boolean;ShowTimeMP3Info:integer;dBottom:integer);external 'ShowMP3Panel@files:isgsg.dll stdcall';
procedure KillMP3Panel;external 'KillMP3Panel@files:isgsg.dll stdcall';
function InitializeSetup:boolean;
begin
ExtractTemporaryFile('Game.reg');
ExtractTemporaryFile('20-abspann-ik.mp3');
ExtractTemporaryFile('08-erzmagier_alastair-ik.mp3');
ExtractTemporaryFile('10-das_lied_vom_tod-ik.mp3');
ExtractTemporaryFile('12-unknown-ik.mp3');
ExtractTemporaryFile('15-unknown-ik.mp3');
ExtractTemporaryFile('16-ivo-ik.mp3');
ExtractTemporaryFile('bass.dll');
Result:=True;
end;
procedure InitializeWizard;
begin
ShowMP3Panel(WizardForm.Handle,80,ExpandConstant('{tmp}'),ExpandConstant('{tmp}'),'Repack by BlackPhoenix',True,True,7000,Indent);
ssInitialize(GetWindowLong(MainForm.Handle,-8),10,False,1,$FF000000);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep=ssInstall then begin
ExtractTemporaryFile('1.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\1.jpg');
ExtractTemporaryFile('2.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\2.jpg');
ExtractTemporaryFile('3.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\3.jpg');
ExtractTemporaryFile('4.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\4.jpg');
ExtractTemporaryFile('5.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\5.jpg');
ExtractTemporaryFile('6.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\6.jpg');
ExtractTemporaryFile('7.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\7.jpg');
ExtractTemporaryFile('8.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\8.jpg');
ExtractTemporaryFile('9.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\9.jpg');
ExtractTemporaryFile('10.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\10.jpg');
ssStartShow;
end;
if CurStep=ssPostInstall then ssStopShow;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID=wpInstalling then begin
WizardForm.MainPanel.Visible:=False;
WizardForm.Bevel1.Visible:=False;
WizardForm.Width:=ScaleX(395);
WizardForm.Height:=ScaleY(142);
WizardForm.Left:=ScaleX(GetSystemMetrics(0)-WizardForm.Width-Indent);
WizardForm.Top:=ScaleY(GetSystemMetrics(1)-WizardForm.Height-Indent);
WizardForm.InnerNotebook.Left:=ScaleX(10);
WizardForm.InnerNotebook.Top:=ScaleY(10);
WizardForm.InnerNotebook.Width:=ScaleX(370);
WizardForm.StatusLabel.Left:=ScaleX(0);
WizardForm.StatusLabel.Top:=ScaleY(0);
WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.FileNameLabel.Left:=ScaleX(0);
WizardForm.FileNameLabel.Top:=ScaleY(20);
WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.ProgressGauge.Top:=ScaleY(40);
WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width;
WizardForm.CancelButton.Left:=ScaleX(154);
WizardForm.CancelButton.Top:=ScaleY(80);
end;
if (CurPageID=wpFinished) or (CurPageID=wpInfoAfter) then begin
if WizardForm.Width<>502 then begin
WizardForm.Visible:=False;
WizardForm.Width:=ScaleX(502);
WizardForm.Height:=ScaleY(392);
WizardForm.Left:=(GetSystemMetrics(0)-WizardForm.Width) div 2;
WizardForm.Top:=(GetSystemMetrics(1)-WizardForm.Height) div 2;
WizardForm.MainPanel.Visible:=True;
WizardForm.Bevel1.Visible:=True;
WizardForm.InnerNotebook.Left:=ScaleX(40);
WizardForm.InnerNotebook.Top:=ScaleY(72);
WizardForm.InnerNotebook.Width:=ScaleX(417);
WizardForm.Visible:=True;
end;
end;
end;
procedure DeinitializeSetup;
begin
KillMP3Panel;
ssDeInitialize;
end;[/spoiler]
P.S. Очень прошу не отсылать читать хелпы, статьи и тд. а реально помочь. Так же прошу меня сильно не пинать т.к. я в этом пока очень слабо разбираюсь.