PDA

Показать полную графическую версию : Скрипты Inno Setup. Помощь и советы [часть 5]


Страниц : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 [78] 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

audiofeel
12-01-2013, 16:26
по отдельности если компилировать оба скрипта что я "выложил" выше = ошибки нет - проблема в объединение этих скриптов в один . с "#include" тоже не выходит

Mailchik
12-01-2013, 17:00
audiofeel, рабочий вариант: #define MyAppName "Assassin's Creed III"
#define MyAppVerName "Assassin's Creed III [v 1.01]"

#define NeedSize 10752

#define Components

;#define records
;#define facompress
;#define PrecompInside
#define SrepInside

[Setup]
AppName={#MyAppName}
AppVerName={#MyAppName}
AppPublisher=Fakt_37
DefaultDirName={pf}\Fakt_37\{#MyAppName}
DefaultGroupName=Fakt_37\{#MyAppName}
DirExistsWarning=no
AppID={{0872DB47-24CB-4C7F-AC4B-E6EFC27BD244}
VersionInfoDescription={#MyAppName}
DisableReadyPage=yes
LZMAAlgorithm=1
LZMAMatchFinder=BT
LZMANumFastBytes=273

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

[CustomMessages]
rus.Welcome=Вас приветствует Мастер установки игры «{#MyAppName}» %nРекомендуется закрыть антивирусные программы, а также все прочие приложения перед тем, как продолжить.%nНажмите «Далее», чтобы продолжить, или «Отмена», чтобы выйти из программы установки.
rus.Dir1=Программа установит «{#MyAppName}» в следующую папку.
rus.Group1=Программа создаст ярлыки в следующей папке меню «Пуск».
rus.FreeSpace=Доступно места на диске:
rus.NeedSpace=Требуется места для установки:
rus.nic=Не создавать папку в меню «Пуск»
rus.Fin=%nУстановка игры «{#MyAppName}» успешно завершена. %nНажмите "Завершить", чтобы выйти из программы установки.
rus.FinError=Установка игры «{#MyAppName}» не завершена. %nВо время установки произошла ошибка, пожалуйста отключите сторонние программы и повторите попытку установки. %nНажмите "Завершить", чтобы выйти из программы установки.
rus.Extracted=Распаковка файлов...
rus.rbc=Откат установки...
rus.Dir2=Нажмите «Далее», чтобы продолжить. Если Вы хотите выбрать другую папку, нажмите «Обзор»

#ifdef Components

[Registry]

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

[Components]
Name: Dector; Description: Дополнительные ярлыки:; Types: full
Name: Dector\a; Description: Добавить ярлык на рабочий стол; Types: full
Name: PO; Description: Дополнительное програмное обеспечения:; Types: full
Name: PO\a; Description: Обновить DirectX; Types: full
Name: PO\b; Description: Установить/обновить Microsoft Visual C++; Types: full
Name: PO\c; Description: Установить/обновить Microsoft Visual C++; Types: full
#endif

[Files]
Source: Files\fon.png; Flags: dontcopy
Source: Files\pb1.png; Flags: dontcopy
Source: Files\pb2.png; Flags: dontcopy
Source: Files\1.bmp; Flags: dontcopy
Source: Files\form.png; Flags: dontcopy
Source: Files\form1.png; Flags: dontcopy
Source: Files\logo.png; Flags: dontcopy
Source: Files\button.png; Flags: dontcopy
Source: dll\*.*; Flags: dontcopy
Source: ISDone\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: ISDone\ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PrecompInside
Source: ISDone\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
Source: ISDone\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: ISDone\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
Source: ISDone\precomp.exe; DestDir: {tmp}; Flags: dontcopy
Source: ISDone\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: ISDone\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef facompress
Source: ISDone\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif

[Icons]
Name: {userdesktop}\{#MyAppName}; Filename: {app}\AC3SP.exe; WorkingDir: {app}; IconFilename: {app}\AC3SP.exe; Components: Dector\a; Check: CheckError
Name: {group}\{#MyAppName}; Filename: {app}\AC3SP.exe; WorkingDir: {app}; IconFilename: {app}\AC3SP.exe; Comment: Запустить игру; Check: CheckError
Name: {group}\Удалить игру; Filename: {uninstallexe}; Comment: Удалить игру; Check: CheckError

[Run]
Filename: {src}\Redist\directx.exe; WorkingDir: {src}\Redist\; Parameters: /Q; Flags: waituntilterminated runminimized; Components: PO\a; Check: CheckError
Filename: {src}\Redist\vcredist_x86.exe; WorkingDir: {src}\Redist\; Parameters: /Q; Flags: waituntilterminated; Components: PO\b; Check: CheckError
Filename: {src}\Redist\PhysX.msi; Parameters: /Q; WorkingDir: {src}\Redist; Components: PO\c; Check: CheckError
[code]
const
PCFonFLY=true;
notPCFonFLY=false;

var
Enabled: Boolean;
hCancelBtn, hNextBtn, hBackBtn, hDirBrowseBtn, hGroupBrowseBtn: HWND;
Welcomelbl1, Selectlbl1, Selectlbl2, MainLabel, Mb1, Mb2, NoIconsLabel, islbl1, islbl2, islbl3: TLabel;
WFButtonFont: TFont;
form, form1: Longint;
NoIconsCheck: TNewCheckBox;
IntList, VoiceList: TNewCheckListBox;
ISDoneCancel: Integer;
ISDoneError: Boolean;
PCFVer: Double;
s: AnsiString;

function ReleaseCapture: Longint; external 'ReleaseCapture@user32.dll stdcall';

procedure LabelOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(WizardForm.Handle, $0112, $F012, 0)
end;

#include "AddIss\botva2.iss"
#include "AddIss\progressbar.iss"

var
ISDonePB: TImgPB;
ResultStr: string;
ResultCode: Integer;

function InitializeSetup:boolean;
begin
RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0872DB47-24CB-4C7F-AC4B-E6EFC27BD244}_is1', 'UninstallString', ResultStr)
if ResultStr='' then
begin
Result := True;
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
if not FileExists(ExpandConstant('{tmp}\b2p.dll')) then ExtractTemporaryFile('b2p.dll');
end
else begin
ResultStr := RemoveQuotes(ResultStr);
Exec(ResultStr, '', '', SW_SHOWNORMAL, ewNoWait, ResultCode);
end;
end;

function cm(s: PAnsiChar): String;
begin
Result:= ExpandConstant('{cm:'+s+'}');
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, DeleteDiffFile: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;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';

function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;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 ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ImgPBSetPosition(ISDonePB, OveralPct);
WizardForm.Caption:= s + ' - ' + IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
islbl1.Caption:= cm('Extracted') + ' ' + IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
islbl2.Caption:= MinimizePathName(ExpandConstant('{app}\')+CurrentFile, islbl2.Font, ScaleX(400));
Result := ISDoneCancel;
end;

procedure CancelButtonOnClick(hBtn: HWND);
begin
SuspendProc;
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then begin
ISDoneCancel:=1;
islbl1.Caption:= cm('rbc');
end;
ResumeProc;
end;


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

procedure CreateWizardImg;
begin
with WizardForm do begin
ClientWidth:=ScaleX(623);
ClientHeight:=ScaleY(382);
InnerNotebook.Hide;
OuterNotebook.Hide;
Bevel.Hide;
Center;
Color:= $191919;
end;

ImgLoad(WizardForm.Handle, 'fon.png', ScaleX(0), ScaleY(0), WizardForm.ClientWidth, WizardForm.ClientHeight, True, True);
form:= ImgLoad(WizardForm.Handle, 'form.png', ScaleX(0), ScaleY(0), WizardForm.ClientWidth, WizardForm.ClientHeight, True, True);
form1:= ImgLoad(WizardForm.Handle, 'form1.png', ScaleX(0), ScaleY(0), WizardForm.ClientWidth, WizardForm.ClientHeight, True, True);
ImgLoad(WizardForm.Handle, 'logo.png', ScaleX(20), ScaleY(326), ScaleX(190), ScaleY(39), True, True);

ImgSetVisibility(form1, false);

ImgApplyChanges(WizardForm.Handle);
end;

procedure SetStateNewButtons;
begin
with WizardForm.BackButton do begin
BtnSetText(hBackBtn,PAnsiChar(Caption));
BtnSetVisibility(hBackBtn,Visible);
BtnSetEnabled(hBackBtn,Enabled);
end;
with WizardForm.NextButton do begin
BtnSetText(hNextBtn,PAnsiChar(Caption));
BtnSetVisibility(hNextBtn,Visible);
BtnSetEnabled(hNextBtn,Enabled);
end;
with WizardForm.CancelButton do begin
BtnSetText(hCancelBtn,PAnsiChar(Caption));
BtnSetVisibility(hCancelBtn,Visible);
BtnSetEnabled(hCancelBtn,Enabled);
end;
BtnSetText(hDirBrowseBtn,PAnsiChar(WizardForm.DirBrowseButton.Caption));
BtnSetText(hGroupBrowseBtn,PAnsiChar(WizardForm.GroupBrowseButton.Caption));
end;

procedure WizardFormBtnClick(hBtn:HWND);
var
Btn: TButton;
begin
case hBtn of
hCancelBtn: Btn:=WizardForm.CancelButton;
hNextBtn: Btn:=WizardForm.NextButton;
hBackBtn: Btn:=WizardForm.BackButton;
hDirBrowseBtn: Btn:=WizardForm.DirBrowseButton;
hGroupBrowseBtn: Btn:=WizardForm.GroupBrowseButton;
end;
Btn.OnClick(Btn);
SetStateNewButtons;
BtnRefresh(hBtn);
end;

procedure NoIconsCheckClick(Sender: TObject);
begin
if NoIconsCheck.Checked then begin
WizardForm.GroupEdit.Enabled:= false;
WizardForm.GroupBrowseButton.Enabled:= false;
BtnSetEnabled(hGroupBrowseBtn, false);
end else begin
WizardForm.GroupEdit.Enabled:= true;
WizardForm.GroupBrowseButton.Enabled:= true;
BtnSetEnabled(hGroupBrowseBtn, true);
end;
WizardForm.NoIconsCheck.Checked:= NoIconsCheck.Checked;
WizardForm.GroupEdit.Color:= clblack;
end;

procedure NoIconsLabelClick(Sender: TObject);
begin
NoIconsCheck.Checked:= not NoIconsCheck.Checked;
NoIconsCheckClick(nil);

end;

procedure ButtonsTextures;
begin
WFButtonFont:=TFont.Create;
WFButtonFont.Style:=[fsBold];
WFButtonFont.Name:= 'Arial';
WFButtonFont.Size:= 8;

with WizardForm.BackButton do begin
hBackBtn:= BtnCreate(WizardForm.Handle, ScaleX(Left+28), ScaleY(Top+3), ScaleX(100), ScaleY(35), 'button.png', 1, False);
BtnSetEvent(hBackBtn, BtnClickEventID, CallbackAddr('WizardFormBtnClick'));
BtnSetFont(hBackBtn, WFButtonFont.Handle);
BtnSetFontColor(hBackBtn, clblack, clblack, clblack, clblack);
Width:=0;
Height:=0;
end;

with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle, ScaleX(Left+55), ScaleY(Top+3), ScaleX(100), ScaleY(35), 'button.png', 1, False);
BtnSetEvent(hNextBtn,BtnClickEventID, CallbackAddr('WizardFormBtnClick'));
BtnSetFont(hNextBtn,WFButtonFont.Handle);
BtnSetFontColor(hNextBtn, clblack, clblack, clblack, clblack);
Width:=0;
Height:=0;
end;

with WizardForm.CancelButton do begin
hCancelBtn:=BtnCreate(WizardForm.Handle, ScaleX(Left+85), ScaleY(Top+3), ScaleX(100), ScaleY(35), 'button.png', 1, False);
BtnSetEvent(hCancelBtn,BtnClickEventID, CallbackAddr('WizardFormBtnClick'));
BtnSetFont(hCancelBtn,WFButtonFont.Handle);
BtnSetFontColor(hCancelBtn, clblack, clblack, clblack, clblack);
Width:=0;
Height:=0;
end;

with WizardForm.DirBrowseButton do begin
hDirBrowseBtn:=BtnCreate(WizardForm.Handle, ScaleX(Left+90), ScaleY(Top+164), ScaleX(100), ScaleY(35), 'button.png', 1, False);
BtnSetEvent(hDirBrowseBtn,BtnClickEventID, CallbackAddr('WizardFormBtnClick'));
BtnSetFont(hDirBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hDirBrowseBtn, clblack, clblack, clblack, clblack);
Width:=0;
Height:=0;
end;

with WizardForm.GroupBrowseButton do begin
hGroupBrowseBtn:=BtnCreate(WizardForm.Handle, ScaleX(Left+90), ScaleY(Top+164), ScaleX(100), ScaleY(35), 'button.png', 1, False);
BtnSetEvent(hGroupBrowseBtn,BtnClickEventID, CallbackAddr('WizardFormBtnClick'));
BtnSetFont(hGroupBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hGroupBrowseBtn, clblack, clblack, clblack, clblack);
Width:=0;
Height:=0;
end;
end;


function NumToStr(Float: Extended): string;
begin
Result:=Format('%.2n', [Float]);
StringChange(Result, ',', '.');
while ((Result[Length(Result)]='0') or (Result[Length(Result)]='.')) and (Pos('.',Result)>0) do SetLength(Result,Length(Result)-1);
end;

function MbOrTB(Float: Extended): string;
begin
if Float<1024 then Result:=NumToStr(Float)+' MB'
else if (Float/1024)<1024 then Result:=NumToStr(Float/1024)+' GB'
else if (Float/(1024*1024))<1024 then Result:=NumToStr(Float/(1024*1024))+' TB'
end;

procedure GetFreeSpaceCaption(Sender: TObject);
var
Enable: Boolean;
Path: AnsiString;
FreeMB, TotalMB: Cardinal;
begin
Path:= ExtractFileDrive(WizardForm.DirEdit.Text);
Enable:= GetSpaceOnDisk(Path, True, FreeMB, TotalMB);

if not Enable then begin
mb1.Caption:= cm('FreeSpace') + ' ' + '0 Мб';
mb2.Caption:= cm('NeedSpace') + ' ' + MborTb({#NeedSize});
WizardForm.NextButton.Enabled:= false;
BtnSetEnabled(hNextBtn, false);
Exit;
end;

if Enable then begin
mb1.Caption:= cm('FreeSpace') + ' ' + MbOrTb(FreeMB);
mb2.Caption:= cm('NeedSpace') + ' ' + MborTb({#NeedSize});
WizardForm.NextButton.Enabled:= true;
BtnSetEnabled(hNextBtn, true);
end;

if FreeMB < {#NeedSize} then begin WizardForm.NextButton.Enabled:= false; BtnSetEnabled(hNextBtn, false); end else begin WizardForm.NextButton.Enabled:= true; BtnSetEnabled(hNextBtn, true); end;
end;

procedure CreateLabel;
begin
Welcomelbl1:= TLabel.Create(WizardForm);
with Welcomelbl1 do
begin
Left:= ScaleX(80);
Top:= ScaleY(244);
Width:= ScaleX(450);
Height:= ScaleY(450);
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
Font.Name:= 'Arial';
Font.Size:= 8;
Font.Color:= clwhite;
Font.Style := [fsBold];
Alignment := taCenter;
Parent:= WizardForm;
Caption:= cm('Welcome');
end;

with WizardForm.DirEdit do begin
Parent:= WizardForm;
Left:= ScaleX(100);
Top:= ScaleY(250);
Color:= clblack;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:= clwhite;
Width:= ScaleX(324);
Height:= ScaleY(18);
end;

with WizardForm.GroupEdit do begin
Parent:= WizardForm;
Left:= ScaleX(100);
Top:= ScaleY(250);
Color:= clblack;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:= clwhite;
Width:= ScaleX(324);
Height:= ScaleY(18);
end;

Selectlbl1:=TLabel.Create(WizardForm);
with Selectlbl1 do
begin
Left:= ScaleX(100);
Top:= ScaleY(200);
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Name:= 'Arial';
Font.Size:= 8
Font.Style := [fsBold];
Transparent:= true;
Font.Color:= clwhite;
Parent:= WizardForm;
Caption:= cm('dir1');
end;

Selectlbl2:=TLabel.Create(WizardForm);
with Selectlbl2 do
begin
Left:= ScaleX(100);
Top:= ScaleY(216);
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Name:= 'Arial';
Font.Size:= 8
Font.Style := [fsBold];
Transparent:= true;
Font.Color:= clwhite;
Parent:= WizardForm;
Caption:= cm('dir2');
end;


mb1:=TLabel.Create(WizardForm);
with mb1 do
begin
Left:= ScaleX(100);
Top:= ScaleY(278);
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Name:= 'Arial';
Font.Size:= 8
Font.Style := [fsBold];
Transparent:= true;
Font.Color:= clwhite;
Parent:= WizardForm;
end;

mb2:=TLabel.Create(WizardForm);
with mb2 do
begin
Left:= ScaleX(100);
Top:= ScaleY(295);
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Name:= 'Arial';
Font.Size:= 8
Font.Style := [fsBold];
Transparent:= true;
Font.Color:= clwhite;
Parent:= WizardForm;
end;

WizardForm.DirEdit.OnChange:= @GetFreeSpaceCaption;

NoIconsCheck:= TNewCheckbox.Create(WizardForm);
with NoIconsCheck do
begin
Left:= ScaleX(100);
Top:= ScaleY(280);
Width:= ScaleX(13);
Height:= ScaleY(13);
Parent:= WizardForm;
OnClick:= @NoIconsCheckClick;
end;

ExtractTemporaryFile('1.bmp');

with WizardForm.ComponentsList do begin
LoadBGBmpFromFile(ExpandConstant('{tmp}\1.bmp'), Left+100, Top+150);
Parent:= WizardForm;
Font.Name:= 'Arial';
Font.Size:= 8
Font.Style := [fsBold];
Font.Color:= clwhite;
left:= ScaleX(100);
BorderStyle:= bsNone;
Top:= ScaleY(200);
Height:= Height - 50;
end;
DeleteFile(ExpandConstant('{tmp}\1.bmp'));

islbl1:=TLabel.Create(WizardForm);
with islbl1 do
begin
Left:= ScaleX(100);
Top:= ScaleY(255);
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Name:= 'Arial';
Font.Size:= 8
Font.Style := [fsBold];
Transparent:= true;
Font.Color:= clwhite;
Parent:= WizardForm;
Caption:= cm('Extracted');
end;

islbl2:=TLabel.Create(WizardForm);
with islbl2 do
begin
Left:= ScaleX(100);
Top:= ScaleY(270);
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Name:= 'Arial';
Font.Size:= 8
Font.Style := [fsBold];
Transparent:= true;
Font.Color:= clwhite;
Parent:= WizardForm;
end;

NoIconsLabel:=TLabel.Create(WizardForm);
with NoIconsLabel do
begin
Left:= ScaleX(120);
Top:= ScaleY(280);
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
Font.Name:= 'Arial';
Font.Size:= 8
Font.Style := [fsBold];
Transparent:= true;
Font.Color:= clwhite;
Parent:= WizardForm;
Caption:= cm('nic');
OnClick:= @NoIconsLabelClick;
end;
end;

procedure InitializeWizard;
begin
s:= WizardForm.Caption;
Enabled:= true;
CreateLabel;
CreateWizardImg;
ButtonsTextures;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
SetStateNewButtons;

Welcomelbl1.Hide;
WizardForm.DirEdit.Hide;
WizardForm.GroupEdit.Hide;
Selectlbl1.Hide;
Selectlbl2.Hide;
BtnSetVisibility(hDirBrowseBtn, false);
BtnSetVisibility(hGroupBrowseBtn, false);
mb1.Hide;
mb2.Hide;
NoIconsCheck.Hide;
NoIconsLabel.Hide;
WizardForm.ComponentsList.Hide;
islbl1.Hide;

if CurPageID = wpWelcome then
begin
Welcomelbl1.Show;
ImgSetVisibility(form, true);
ImgSetVisibility(form1, false);
end;

if CurPageID = wpSelectDir then
begin
GetFreeSpaceCaption(nil);
Selectlbl2.Caption:= cm('Dir2');
WizardForm.DirEdit.Show;
Selectlbl1.Show;
Selectlbl1.Caption:= cm('Dir1');
Selectlbl2.Show;
BtnSetVisibility(hDirBrowseBtn, true);
ImgSetVisibility(form1, true);
ImgSetVisibility(form, false);
mb1.Show;
mb2.Show;
end;

if CurPageID = wpSelectComponents then WizardForm.ComponentsList.Show;

if CurPageID = wpSelectProgramGroup then
begin
Selectlbl1.Caption:= cm('Group1');
Selectlbl1.Show;
Selectlbl2.Show;
Selectlbl2.Caption:= cm('Dir2');
WizardForm.GroupEdit.Show;
BtnSetVisibility(hGroupBrowseBtn, true);
NoIconsCheck.Show;
NoIconsLabel.Show;
WizardForm.NextButton.Caption:= 'Установить';
end;

if CurPageID = wpSelectTasks then
begin

end;

if CurPageID = wpReady then
begin
ImgSetVisibility(form1, true);
end;

if CurPageID = wpInstalling then
begin
ImgSetVisibility(form, true);
ImgSetVisibility(form1, false);
islbl1.Show;
end;

if CurPageID = wpFinished then
begin
ImgSetVisibility(form, true);
islbl2.Hide;
Welcomelbl1.Show;
Welcomelbl1.Caption:= cm('Fin');
Welcomelbl1.Top:= Welcomelbl1.Top+ScaleY(5);
end;

if (CurPageID = wpFinished) and ISDoneError then
begin
Welcomelbl1.Show;
Welcomelbl1.Font.Color:= clred;
Welcomelbl1.Caption:= cm('FinError');
end;
ImgApplyChanges(WizardForm.Handle);
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
WizardForm.ProgressGauge.Hide;
WizardForm.CancelButton.Hide;
ISDonePB:= ImgPBCreate(WizardForm.Handle, ExpandConstant('pb2.png'),ExpandConstant('pb1.png'), ScaleX(100), ScaleY(290), ScaleX(420), ScaleY(19));

WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
ISDoneCancel:=0;

ExtractTemporaryFile('unarc.dll');

#ifdef PrecompInside
ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef SrepInside
ExtractTemporaryFile('CLS-srep.dll');
#endif
#ifdef facompress
ExtractTemporaryFile('facompress.dll');
#endif
#ifdef records
ExtractTemporaryFile('records.inf');
#endif

Comps1:=0; Comps2:=0; Comps3:=0;
#ifdef Components
TmpValue:=1;
if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('voice\rus') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('voice\eng') then Comps1:=Comps1+TmpValue;
#endif

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

(* if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data-1.fakt'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data-2.fakt'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data-3.fakt'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data-4.fakt'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ShowChangeDiskWindow ('Пожалуйста, вставьте второй диск и дождитесь его инициализации.', ExpandConstant('{src}'),'sound.fakt') then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\sound.fakt'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\video.fakt'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
*)
ISDoneError:=false;
until true;
ImgPBDelete(ISDonePB);
islbl2.Hide;
islbl1.Caption:= SetupMessage(msgStatusRunProgram);
ISDoneStop;
end;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
end;

procedure DeinitializeSetup;
begin
if Enabled then gdipShutdown;
if ResultStr='' then
WizardForm.Free;
end;в процедуре деинициализации инсталла, вы освобождали WizardForm в любом случае. А если строка в реестре найдена, то инициализации не происходит, поэтому WizardForm не создаётся, и сразу же идёт освобождение не созданного объекта.. Поэтому в деинициализацию нужно было добавить условие.

R.i.m.s.k.y.
12-01-2013, 20:46
Подскажите, пожалуйста: установщик сам определяет нужно ли перезагружаться по окончании установки (файлы были заняты, или еще что)
И если нужно перегрузиться то последняя страница wpFinished заменяется его "перегрузить сейчас/позже"
Можно эту страницу как-то показывать после wpFinished или еще каким образом сделать так чтобы wpFinished отображалась всегда, а страница перезагрузки - при необходимости?

Gnom_aka_Lexander
12-01-2013, 21:03
R.i.m.s.k.y., это та-же страница, на которой находится RunList и два радиобаттона NeedRestart. есть встроенная функция, с помощью которой ты можешь сам регламентировать необходимость перезагрузки
function NeedRestart(): Boolean;
Возвращает True для указания инсталлятору предложить пользователю перезагрузить систему в конце успешной установки; иначе возвращает False.

управляется точно так-же, как например, InitializeSetup, тоесть как-то так:
function NeedRestart(): Boolean;
begin
Result := твое условие, при выполнении которого необходимо перезагрузиться.
end;

R.i.m.s.k.y.
12-01-2013, 21:09
Gnom_aka_Lexander, я в курсе про needrestart
пусть эта страница отображается, можно wpwelcome отобразить раньше страницы необходимости перезагрузки? или как-то дополнить ее своими чекбоксами?

Gnom_aka_Lexander
12-01-2013, 21:12
раньше страницы необходимости перезагрузки? »
нету. страницы. необходимости. перезагрузки.

R.i.m.s.k.y.
12-01-2013, 21:17
нету. страницы. необходимости. перезагрузки. »
я что-то понять не могу
смотрю на редактор форм и вижу что два радиобатона перезагрузки под runlist находятся
если я их сдвигаю - мои чекбоксы в [run] postinstall не отображаются, но работают

Gnom_aka_Lexander
12-01-2013, 21:22
R.i.m.s.k.y., именно. и показываются они в зависимости от необходимости перезагрузки, каковую необходимость ты можешь задавать сам.
function NeedRestart(): Boolean; как раз показывает-скрывает эти радиобаттноны, каковые лежат на финишной странице, ID каковой таки да, именно wpFinished.

R.i.m.s.k.y.
12-01-2013, 21:42
Gnom_aka_Lexander, вот этого я и не понимаю, если в редакторе форм радиобатоны сдвигаю - перестают отображаться чекбоксы которые я делаю в секции run флагами postinstall
Пусть все вместе отображаются, мне не жалко
Просто у инно продвинутая система определения необходимости перезагрузки и нет нужды ее подменять
Мне нужно на последней финишедпаге вывести пару чекбоксов независимо от результатов needrestart

R.i.m.s.k.y.
13-01-2013, 07:21
Ладно переформулируем вопрос: как создать свою страницу c чекбоксами перед wpFinished и на nextButtonClick своей страницы повесить свое действие?

Mailchik
13-01-2013, 10:04
R.i.m.s.k.y., пример: [Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Code]
var
BeforeFinishedPage: TInputOptionWizardPage;

function NextButtonClick(CurPageID: Integer): Boolean;
begin
if CurPageID <> BeforeFinishedPage.ID then
Result := True else begin
MsgBox('Вы нажали Далее' + #13#10 + 'Название выбранного чекбокса: '
+ BeforeFinishedPage.CheckListBox.ItemCaption[BeforeFinishedPage.CheckListBox.ItemIndex],
mbInformation, MB_OK);
Result := True;
end;
end;

procedure InitializeWizard();
begin
BeforeFinishedPage := CreateInputOptionPage(wpInfoAfter,
'Страница перед wpFinished', 'Моё описание страницы', 'Выберите действие и нажмите Далее', False, False);
with BeforeFinishedPage do begin
Add('Действие:');
with CheckListBox do begin
ItemEnabled[0] := False;
Checked[0] := True;
end;
AddEx('ЧекБокс 1', 1, True);
AddEx('ЧекБокс 2', 1, True);
end;
end;
Скажите пожалуйста как добавлять цветные строки в TListBox.Items.Add »может уже не нужно, но всё же (версия inno от restools от 121216):
#ifdef IS_ENHANCED
#if (Ver < 0x5020300) || (Pos('ee', IS_Ver_Str) < 1)
#pragma error 'Enhanced edition of Inno Setup (5.2.3.ee1 or higher) is required to compile this script'
#endif
#else
#error Enhanced edition of Inno Setup (restools) is required to compile this script
#endif

[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Code]
var
TestListBox: TListBox;

procedure ListBoxDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
begin
with TListBox(Control).Canvas do
begin
case Index of
0:
begin
Font.Color := clBlue;
Brush.Color := clYellow;
end;
1:
begin
Font.Color := clRed;
Brush.Color := clLime;
end;
2:
begin
Font.Color := clGreen;
Brush.Color := clFuchsia;
end;
end;
FillRect(Rect);
TextOut(Rect.Left, Rect.Top, (Control as TListBox).Items[Index]);
end;
end;

procedure InitializeWizard();
begin
with WizardForm do begin
OuterNotebook.Hide;
end;
TestListBox := TListBox.Create(WizardForm);
with TestListBox do begin
Parent := WizardForm;
SetBounds(5, 5, 300, 300);
Items.Add('строка 1');
Items.Add('строка 2');
Items.Add('строка 3');
Style := lbOwnerDrawVariable;
OnDrawItem := @ListBoxDrawItem;
end;
end;

R.i.m.s.k.y.
14-01-2013, 10:03
Mailchik, хорошо только кнопка "назад" после установки не к месту

Vstanka
14-01-2013, 11:31
alert30, попробовала еще такой вариант:

[Setup]
AppName=My Program
AppVerName=My Program v.1.2
DirExistsWarning=no
DefaultDirName={pf}\My Program

[_Code]
const
PING_TIMEOUT = 500;
INADDR_NONE = $FFFFFFFF;
SOCKET_ERROR = (-1);

IP_SUCCESS = 0;
IP_BUF_TOO_SMALL = (11000 + 1);
IP_DEST_NET_UNREACHABLE = (11000 + 2);
IP_DEST_HOST_UNREACHABLE = (11000 + 3);
IP_DEST_PROT_UNREACHABLE = (11000 + 4);
IP_DEST_PORT_UNREACHABLE = (11000 + 5);
IP_NO_RESOURCES = (11000 + 6);
IP_BAD_OPTION = (11000 + 7);
IP_HW_ERROR = (11000 + 8);
IP_PACKET_TOO_BIG = (11000 + 9);
IP_REQ_TIMED_OUT = (11000 + 10);
IP_BAD_REQ = (11000 + 11);
IP_BAD_ROUTE = (11000 + 12);
IP_TTL_EXPIRED_TRANSIT = (11000 + 13);
IP_TTL_EXPIRED_REASSEM = (11000 + 14);
IP_PARAM_PROBLEM = (11000 + 15);
IP_SOURCE_QUENCH = (11000 + 16);
IP_OPTION_TOO_BIG = (11000 + 17);
IP_BAD_DESTINATION = (11000 + 18);
IP_ADDR_DELETED = (11000 + 19);
IP_SPEC_MTU_CHANGE = (11000 + 20);
IP_MTU_CHANGE = (11000 + 21);
IP_UNLOAD = (11000 + 22);
IP_ADDR_ADDED = (11000 + 23);
IP_GENERAL_FAILURE = (11000 + 50);
IP_PENDING = (11000 + 255);

type
ICMP_OPTIONS = record
Ttl : Byte;
Tos : Byte;
Flags : Byte;
OptionsSize : Byte;
OptionsData : Longint;
end;

ICMP_ECHO_REPLY = record
Address : Longint;
status : Longint;
RoundTripTime : Longint;
DataSize : Longint;
Reserved : Integer;
DataPointer : Longint;
Options : ICMP_OPTIONS;
Data : string;
end;

function IcmpCreateFile(): HWND;
external 'IcmpCreateFile@icmp.dll stdcall';

function IcmpCloseHandle(IcmpHandle: Longint): Longint;
external 'IcmpCloseHandle@icmp.dll stdcall';

function IcmpSendEcho(IcmpHandle: HWND;
DestinationAddress: Longint;
RequestData: string;
RequestSize: Longint;
RequestOptions: Longint;
var ReplyBuffer: ICMP_ECHO_REPLY;
ReplySize: Longint;
Timeout: Longint): Longint;
external 'IcmpSendEcho@icmp.dll stdcall';

function inet_addr(sAddr: string): Longint;
external 'inet_addr@wsock32.dll stdcall';

function GetPingResult(status: Longint): string;
begin
case status of
IP_SUCCESS: Result:= 'Ping IP: success';
IP_BUF_TOO_SMALL: Result:= 'Ping IP: buf too small';
IP_DEST_NET_UNREACHABLE: Result:= 'Ping IP: destination net unreachable';
IP_DEST_HOST_UNREACHABLE: Result:= 'Ping IP: destination host unreachable';
IP_DEST_PROT_UNREACHABLE: Result:= 'Ping IP: destination protocol unreachable';
IP_DEST_PORT_UNREACHABLE: Result:= 'Ping IP: destination port unreachable';
IP_NO_RESOURCES: Result:= 'Ping IP: no resources';
IP_BAD_OPTION: Result:= 'Ping IP: bad option';
IP_HW_ERROR: Result:= 'Ping IP: hardware error';
IP_PACKET_TOO_BIG: Result:= 'Ping IP: packet too big';
IP_REQ_TIMED_OUT: Result:= 'Ping IP: request timed out';
IP_BAD_REQ: Result:= 'Ping IP: bad request';
IP_BAD_ROUTE: Result:= 'Ping IP: bad route';
IP_TTL_EXPIRED_TRANSIT: Result:= 'Ping IP: ttl expired transit';
IP_TTL_EXPIRED_REASSEM: Result:= 'Ping IP: ttl expired reassem';
IP_PARAM_PROBLEM: Result:= 'Ping IP: parameter problem';
IP_SOURCE_QUENCH: Result:= 'Ping IP: source quench';
IP_OPTION_TOO_BIG: Result:= 'Ping IP: option too big';
IP_BAD_DESTINATION: Result:= 'Ping IP: bad destination';
IP_ADDR_DELETED: Result:= 'Ping IP: address deleted';
IP_SPEC_MTU_CHANGE: Result:= 'Ping IP: spec mtu change';
IP_MTU_CHANGE: Result:= 'Ping IP: mtu change';
IP_UNLOAD: Result:= 'Ping IP: unload';
IP_ADDR_ADDED: Result:= 'Ping IP: address added';
IP_GENERAL_FAILURE: Result:= 'Ping IP: general failure';
IP_PENDING: Result:= 'Ping IP: pending';
INADDR_NONE: Result:= 'Ping IP: bad IP format';
SOCKET_ERROR: Result:= 'Ping IP: can''t open port';
else Result:= 'Unknown status';
end;

end;

function Ping(sAddr, sendData: string): Longint;
var
hPort: HWND;
dwAddr: Longint;
ECHO: ICMP_ECHO_REPLY;
begin
dwAddr:= inet_addr(sAddr);
if dwAddr <> INADDR_NONE then
begin
hPort:= IcmpCreateFile();
if hPort <> 0 then
begin
IcmpSendEcho(hPort, dwAddr, sendData, Length(sendData),
0, ECHO, SizeOf(ECHO), PING_TIMEOUT);
IcmpCloseHandle(hPort);

Result:= ECHO.status;
end
else Result:= SOCKET_ERROR;
end
else Result:= INADDR_NONE;
end;

procedure InitializeWizard();
var
str: string;
res: Longint;
begin
res:= Ping('172.31.100.1', 'test');
str:= GetPingResult(res);
MsgBox(str, mbInformation, MB_OK);
end;

Но какой бы адрес ни вводила - всегда успешное выполнение.. странно..

Raf-9600
15-01-2013, 02:56
Ктонить подскажет код, чтобы инсталлятор через 10 секунд после своего запуска, распаковал в temp и запустил определённый exe?

exe-шник из папки temp ведь сможет скачать из интернета пару килобайт инфы в оперативу?

Mailchik
15-01-2013, 13:19
Raf-9600, [Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Files]
Source: MyProg.exe; Flags: dontcopy;

[Code]
var
ResultCode: integer;

procedure MyTimer(Sender: TObject); //Таймер, который сработает через 10 секунд
begin
ExtractTemporaryFile('MyProg.exe'); //Распаковываем нужный exe
Exec(ExpandConstant('{tmp}\MyProg.exe'), '',
ExpandConstant('{tmp}'), SW_SHOW, ewNoWait, ResultCode); //Запускаем exe
TTimer(Sender).Enabled := False; //Вырубаем таймер
end;

procedure InitializeWizard;
begin
with TTimer.Create(nil) do begin //Создаём таймер
Interval := 10000;
Enabled := True;
OnTimer := @MyTimer;
end;
end;

Vstanka
18-01-2013, 10:35
Не подскажете, как сделать, чтобы в секции Run была задержка выполнения команды? Т.е. у меня предлагается пользователю выбрать запуск сервера БД и запуск приложения, чтобы запуск приложения осуществлялся чуть позже или после запуска сервера. Флаг waituntilterminated не подходит, т.к. сервер должен оставаться запущенным.. И от пользователя тоже не нужно ждать никаких действий.

R.i.m.s.k.y.
18-01-2013, 12:30
Vstanka, я бы вставил вызов пинга там где нужно подождать
Filename: "ping.EXE"; Parameters: " 127.0.0.1 -n 20"

Vstanka
18-01-2013, 15:11
R.i.m.s.k.y., а как тогда скрыть флажок, предлагающий запуск приложения, т.к. если вставить так:

Filename: "ping.EXE"; Parameters: "127.0.0.1 -n 8"; Description: "Запустить приложение после запуска сервера"; Flags: waituntilterminated runhidden postinstall;
,то будет отображаться checkbox, а если убрать postinstall, то в начале вызывается задержка, а потом предлагается запуск приложения?

R.i.m.s.k.y.
18-01-2013, 19:33
Vstanka,
вариант а) батник для вызова приложения, в котором первой строчкой ожидание, второй - запуск приложения
вариант б)

[Code]
procedure CurStepChanged(CurStep: TSetupStep);
res : integer;
begin
if CurStep=ssDone then begin
if ( WizardForm.RunList.Checked[WizardForm.RunList.Items.IndexOf('Запустить приложение')] ) then begin
Exec('ping.exe, ' 127.0.0.1 -n 20',ExpandConstant('{sys}'),SW_hide,ewWaitUntilTerminated,res)
Exec('твояпрога.ехе, 'параметры проги ',ExpandConstant('{app}\путь до проги'),SW_SHOW,ewNoWait,res);
end;//if
end;//CurStep=ssDone
end; //procedure CurStepChanged(CurStep: TSetupStep);
end.

[Run]
Filename: "сервер.ехе"; Parameters: ""; Description: "Запустить сервер"; Flags: runhidden postinstall
Filename: "ping.EXE"; Parameters: ""; Description: "Запустить приложение"; Flags: runhidden

R.i.m.s.k.y.
18-01-2013, 22:42
можно как-то определить что установщик собрался перегружать комп в конце установки не переопределяя Needrestart?




© OSzone.net 2001-2012