[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
AppPublisher=YURSHAT
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Files]
Source: files\botva2.dll; Flags: dontcopy
Source: files\DirImage.png; Flags: dontcopy
Source: files\GroupImage.png; Flags: dontcopy
[Icons]
Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"
Name: "{group}\{cm:UninstallProgram,My Program}"; Filename: "{uninstallexe}"
[Code_]
var
SelectDirBitmapImage, SelectGroupBitmapImage: Longint;
function ImgLoad(Wnd :HWND; FileName: PAnsiChar; Left, Top, Width, Height :integer; Stretch, IsBkg :boolean) :Longint; external 'ImgLoad@{tmp}\botva2.dll stdcall delayload';
procedure ImgSetVisibility(img :Longint; Visible :boolean); external 'ImgSetVisibility@{tmp}\botva2.dll stdcall delayload';
procedure ImgApplyChanges(h:HWND); external 'ImgApplyChanges@{tmp}\botva2.dll stdcall delayload';
procedure gdipShutdown; external 'gdipShutdown@{tmp}\botva2.dll stdcall delayload';
function InitializeSetup:boolean;
begin
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
Result:=True;
end;
procedure InitializeWizard();
begin
ExtractTemporaryFile('DirImage.png');
ExtractTemporaryFile('GroupImage.png');
WizardForm.SelectDirBitmapImage.Hide;
WizardForm.SelectGroupBitmapImage.Hide;
SelectDirBitmapImage:=ImgLoad(WizardForm.SelectDirPage.Handle,ExpandConstant('{tmp}\DirImage.png'),ScaleX(0), ScaleY(0),ScaleX(48),ScaleY(48),True,True);
SelectGroupBitmapImage:=ImgLoad(WizardForm.SelectProgramGroupPage.Handle,ExpandConstant('{tmp}\GroupImage.png'),ScaleX(0), ScaleY(0),ScaleX(48),ScaleY(48),True,True);
ImgApplyChanges(WizardForm.SelectDirPage.Handle);
ImgApplyChanges(WizardForm.SelectProgramGroupPage.Handle);
end;
procedure DeinitializeSetup();
begin
gdipShutdown;
end;
#include "Modules\Xvid.iss"
[Setup]
AppName=#MyAppName
AppVersion=MyAppVersion
DefaultDirName={pf}\MyAppName
[Files]
Source: Files\xvidcore.dll; DestDir: "{tmp}"; Flags: dontcopy sortfilesbyextension
Source: Files\xvidvfw.dll; DestDir: "{tmp}"; Flags: dontcopy sortfilesbyextension
Source: Files\1.avi; DestDir: "{tmp}"; Flags: dontcopy sortfilesbyextension
[*Code]
function InitializeSetup:boolean;
begin
FileCopy(ExpandConstant('{tmp}\xvidcore.dll'), ExpandConstant('{tmp}\xvidcore.dll'), False);
FileCopy(ExpandConstant('{tmp}\xvidvfw.dll'), ExpandConstant('{tmp}\xvidvfw.dll'), False);
Result:=True;
end;
procedure InitializeWizard;
begin
XvidInstall;
ExtractTemporaryFile('1.avi');
end;
procedure CurPageChanged(CurPageID: Integer);
begin
case CurPageID of
wpInstalling:begin
mciSendString('open '+ExpandConstant('{tmp}\1.avi')+' type AVIVideo alias Video1 parent '+IntToStr(WizardForm.Handle)+' style child','',0,0);
mciSendString('put Video1 window at 200 160 150 120','',0,0);
mciSendString('play video1 repeat','',0,0);
end;
wpFinished:begin
mciSendString('Close Video1','',0,0);
end;
end;
end;
procedure DeinitializeSetup;
begin
mciSendString('Close Video1','',0,0);
end;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\x264.arc'), ExpandConstant('{app}\data1'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
if not ISSRepExtract ( 0, 0, ExpandConstant('{src}\data1\x264.srep'), ExpandConstant('{app}\data1\x264.pcf'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
if not ISPrecompExtract ( 0, 0, ExpandConstant('{src}\data1\x264.pcf'), ExpandConstant('{app\data1\x264.exe}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
Invalid number of parameters
Два:if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data1\x264.srep'),ExpandConstant('{app}\data1\x264.pcf'), true) then break;
Обрати внимание на константы {app} и {src}if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data1\x264.pcf'), ExpandConstant('{app}\data1\x264.exe'), true) then break;
[*code]
procedure InitializeWizard();
begin
InfoPage := CreateCustomPage(wpLicense, 'Аппаратное и программное обеспечение','Программа установки обнаружила следующие наобходимые компоненты.')
CreateCheckForm(); // Создание объектов TMemo, в которых будет выводится информация о системе
UpdateInfo(); // Обновление информации о системе
PercentsLabel:= TLabel.Create(WizardForm);
with PercentsLabel do begin
Left:= WizardForm.ProgressGauge.Left;
Top:= WizardForm.ProgressGauge.Top + WizardForm.ProgressGauge.Height + ScaleY(10);
Width:= WizardForm.StatusLabel.Width;
Height:= WizardForm.StatusLabel.Height;
AutoSize:= False;
Transparent := True;
Parent:= WizardForm.InstallingPage;
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = InfoPage.ID then UpdateInfo(); // Обновление информации о системе
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssInstall then begin
PercentsTimer:= SetTimer(0, 0, 100, WrapTimerProc(@PercentsProc, 4));
end;
end;
Вотанаа InnoSetup Script JoinerГде то был джойнер, поищи
Хреновая эта штука, лучше ручками...InnoSetup Script Joiner