="Пример От YURSHAT из скрипта S.T.A.L.K.E.R.: Тень Чернобыля"]
#define GameName "S.T.A.L.K.E.R.: Тень Чернобыля"
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Languages]
Name: "rus"; MessagesFile: "compiler:Languages\Russian.isl"
[Files]
Source: "InstallFiles\*"; Flags: dontcopy;
[ code]
type
TTimerProc = procedure (h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);
TPercentsProc = function (h:hWnd;Msg,wParam,lParam:Longint):Longint;
const
ARTitleTimerID = 2;
var
GameNameLabel: TLabel;
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';
function WrapTimerProc(callback:TTimerProc; paramcount:integer):LongWord; external 'wrapcallbackaddr@{tmp}\CallbackCtrl.dll stdcall delayload';
function InitializeSetup(): Boolean;
begin
if not FileExists(ExpandConstant('{tmp}\CallbackCtrl.dll')) then ExtractTemporaryFile('CallbackCtrl.dll');
Result := True;
end;
procedure GameName(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);
var
str: string;
begin
str:=GameNameLabel.Caption;
GameNameLabel.Caption:=Copy(str,2,Length(str)-1)+Copy(str,1,1);
end;
procedure InitializeWizard();
begin
GameNameLabel:= TLabel.Create(WizardForm);
with GameNameLabel do begin
Parent:= WizardForm;
AutoSize:= False;
SetBounds(ScaleX(15), ScaleY(325), ScaleX(555), ScaleY(20));
Transparent:= True;
Caption:= ExpandConstant('{#GameName} ');
Font.Color:=$008080;
Font.Size:=13;
Font.Style:= [fsBold];
end;
SetTimer(WizardForm.Handle,ARTitleTimerID,120,WrapTimerProc(@GameName,4));
end;
procedure DeinitializeSetup();
begin
KillTimer(WizardForm.Handle,ARTitleTimerID);
end;