Может кто-нибудь знает,как сделать чтобы при разворачивании формы со скином,она не мигала? может дело в библе?
Можешь посмотреть в скрипте "Prototype" от Shegorat'a (готовые скрипты)Где-можно глянуть пример checkbox'a "Запустить игру" на странице завершения, вроде видел где-то, а найти не могу?
var
RunProgram: TCheckBox;
RunProgramLabel: TLabel;
procedure LabelOnClick(Sender: TObject);
begin
case Sender of
RunProgramLabel: begin RunProgram.Checked:= not RunProgram.Checked; end;
end;
end;
procedure DeinitializeSetup();
var ResultCode: Integer;
begin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
if (WizardForm.CurPageID=wpFinished) and (RunProgram.Checked) then
Exec(ExpandConstant('{#AppRunningFile}'), '', '', SW_SHOWNORMAL, ewNoWait, ResultCode);
end;
procedure InitializeWizard();
begin
RunProgram:= TCheckBox.Create(WizardForm);
with RunProgram do
begin
Parent:= WizardForm;
SetBounds(ScaleX(176), ScaleY(200), ScaleX(13), ScaleY(13))
TabOrder:= 5;
Checked:= True;
end;
RunProgramLabel:= TLabel.Create(WizardForm);
with RunProgramLabel do
begin
Caption:=ExpandConstant('{cm:RunProgram}');
SetBounds(ScaleX(196), ScaleY(200), ScaleX(150), ScaleY(13))
Transparent := True;
Parent:= WizardForm;
OnClick:= @LabelOnClick;
end;
end;
[/SPOILER]
Можно ли это заменить на function InitializeSetup(): Boolean; вместе с "{app}\prototypef.exe" без #define?
#define AppRunningFile "{app}\prototypef.exe"
procedure DeinitializeSetup();
var ResultCode: Integer;
begin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
if (WizardForm.CurPageID=wpFinished) and (RunProgram.Checked) then
Exec(ExpandConstant('{#AppRunningFile}'), '', '', SW_SHOWNORMAL, ewNoWait, ResultCode);
Не знаю на что Inno ругается: на Exec, или от версии самого Inno Ansi или Unicode...
end; Хотя врятли...
var
RunProgram: TCheckBox;
RunProgramLabel: TLabel;
procedure LabelOnClick(Sender: TObject);
begin
case Sender of
RunProgramLabel: begin RunProgram.Checked:= not RunProgram.Checked; end;
end;
end;
procedure DeinitializeSetup();
var ResultCode: Integer;
begin
if (WizardForm.CurPageID=wpFinished) and (RunProgram.Checked) then
Exec(ExpandConstant('{#AppRunningFile}'), '', '', SW_SHOWNORMAL, ewNoWait, ResultCode);
end;
procedure InitializeWizard();
begin
RunProgram:= TCheckBox.Create(WizardForm);
with RunProgram do
begin
Parent:= WizardForm.FinishedPage;
SetBounds(ScaleX(176), ScaleY(200), ScaleX(13), ScaleY(13))
TabOrder:= 5;
Checked:= True;
end;
RunProgramLabel:= TLabel.Create(WizardForm);
with RunProgramLabel do
begin
Caption:=ExpandConstant('{cm:RunProgram}');
SetBounds(ScaleX(196), ScaleY(200), ScaleX(150), ScaleY(13))
Transparent := True;
Parent:= WizardForm.FinishedPage;
OnClick:= @LabelOnClick;
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
RunProgram.Hide; RunProgramLabel.Hide;
if CurPageId = wpFinished then
begin
RunProgram.Show; RunProgramLabel.Show;
end;
end;[/spoiler]
function InitializeSetup(): Boolean;
begin
Result:= true;
if not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 40990') then
MsgBox('Игра {#SetupSetting("AppName")} не найдена! Укажите путь к папке с игрой вручную!', mbinformation, mb_ok);
end;
[Setup]
AppName=My Program
AppVerName=My Program 1.5
DefaultDirName={pf}\My Program
DisableDirPage=yes
DisableProgramGroupPage=yes
DisableReadyPage=yes
DisableFinishedPage=yes
[Files]
Source: "C:\My Program\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Код:procedure CurPageChanged(CurPageID: Integer); begin If CurPageID=wpWelcome then begin SendMessage(WizardForm.NEXTBUTTON.Handle, 513, 0, 0) SendMessage(WizardForm.NEXTBUTTON.Handle, 514, 0, 0) end; end;[/QUOTE]
//Function GetInstallDir( AppID: String ): String; var dir: String;
//begin
//if not RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0E64B098-8018-4256-BA23-C316A43AD9B0}', 'InstallLocation', dir) then
//RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0E64B098-8018-4256-BA23-C316A43AD9B0}', 'InstallLocation', dir);
//Result:= dir;
//end;
//
//function InitializeSetup(): Boolean;
//begin
//Result:= True;
//if not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0E64B098-8018-4256-BA23-C316A43AD9B0}') then
//begin
//if not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0E64B098-8018-4256-BA23-C316A43AD9B0}') then
//begin
//MsgBox('{#SetupSetting("AppName")} не найдена!', mberror, mb_ok);
//Result:=False;
//end;
//end;
//end;
Function GetInstallDir( AppID: String ): String; var dir: String;
begin
if not RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 220440', 'InstallLocation', dir) then
RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 220440}', 'InstallLocation', dir);
Result:= dir;
end;
function InitializeSetup(): Boolean;
begin
Result:= True;
if not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 220440') then
begin
if not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 220440') then
begin
MsgBox('{#SetupSetting("AppName")} не найдена!', mberror, mb_ok);
Result:=False;
end;
end;
end;[/SPOILER]
[Setup]
А можно узнать, почему надоела?Начинал ее читать, но очень скоро надоела