Yaroslav950
Участник
В установщик нужно добавить время (чтобы оно шло,а не просто скомпилировалось и осталось). Есть варианты?
Смотрите видео ниже, чтобы узнать, как установить наш сайт в качестве веб-приложения на домашнем экране.
Примечание: Эта возможность может быть недоступна в некоторых браузерах.
[Setup]
AppName=Test
AppVersion=1.5
CreateAppDir=no
DisableWelcomePage=False
[Code]
var
Time: LongWord;
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 GetTime: String;
begin
Result:=GetDateTimeString('hh:nn:ss', ':', #0);
end;
procedure TimeProc;
begin
WizardForm.WelcomeLabel1.Caption:=GetTime;
end;
procedure InitializeWizard;
var
proc: LongWord;
begin
#ifndef IS_ENHANCED
proc:=CreateCallBack(@TimeProc);
#else
proc:=CallbackAddr('TimeProc');
#endif
Time:=SetTimer(0, 0, 1000, proc);
WizardForm.WelcomeLabel1.Caption:=GetTime;
end;
procedure DeinitializeSetup;
begin
if Time <> 0 then KillTimer(0, Time);
end;
[Setup]
AppName=Test
AppVersion=1.5
CreateAppDir=no
DisableWelcomePage=False
[Code]
var
Time: LongWord;
Label1: 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 GetTime: String;
begin
Result:=GetDateTimeString('hh:nn:ss', ':', #0);
end;
procedure TimeProc;
begin
Label1.Caption:=GetTime;
end;
procedure RedesignWizardForm;
begin
Label1 := TLabel.Create(WizardForm.MainPanel);
with Label1 do
begin
Parent := WizardForm.MainPanel;
Caption := '';
Left := ScaleX(8);
Top := ScaleY(40);
Width := ScaleX(127);
Height := ScaleY(16);
end;
with WizardForm.PageDescriptionLabel do
begin
Visible := False;
end;
with WizardForm.PageNameLabel do
begin
Visible := False;
end;
end;
procedure InitializeWizard;
var
proc: LongWord;
begin
RedesignWizardForm;
#ifndef IS_ENHANCED
proc:=CreateCallBack(@TimeProc);
#else
proc:=CallbackAddr('TimeProc');
#endif
Time:=SetTimer(0, 0, 1000, proc);
Label1.Caption:=GetTime;
end;
procedure DeinitializeSetup;
begin
if Time <> 0 then KillTimer(0, Time);
end;
#define MakeCallback(any Method) defined(IS_ENHANCED) ? "CallbackAddr('" + Method + "')" : "CreateCallback(@" + Method + ")"
[Setup]
AppName=Test
AppVersion=1.5
CreateAppDir=no
DisableWelcomePage=False
[Code]
var
time: LongWord;
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 GetTime: String;
begin
Result:= GetDateTimeString('hh:nn:ss', ':', #0);
end;
procedure TimeProc;
begin
WizardForm.Caption:= GetTime;
end;
procedure InitializeWizard;
begin
Time:= SetTimer(0, 0, 1000, {#emit MakeCallback("TimeProc")});
WizardForm.Caption:= GetTime;
end;
procedure DeinitializeSetup;
begin
if Time <> 0 then KillTimer(0, Time);
end;
#define MakeCallback(any Method) defined(IS_ENHANCED) ? "CallbackAddr('" + Method + "')" : "CreateCallback(@" + Method + ")"
[Setup]
AppName=Test
AppVersion=1.5
CreateAppDir=no
DisableWelcomePage=False
[Code]
var
time: LongWord;
label1: 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 GetTime: String;
begin
Result:= GetDateTimeString('hh:nn:ss', ':', #0);
end;
procedure TimeProc;
begin
Label1.Caption:= GetTime;
end;
procedure InitializeWizard;
begin
Label1:= TLabel.Create(WizardForm);
with Label1 do begin
SetBounds(ScaleX(12), ScaleY(329), ScaleX(129), ScaleY(16));
Parent:= WizardForm;
Caption:= GetTime;
end;
Time:= SetTimer(0, 0, 1000, {#emit MakeCallback("TimeProc")});
end;
procedure DeinitializeSetup;
begin
if Time <> 0 then KillTimer(0, Time);
end;