Смотрите видео ниже, чтобы узнать, как установить наш сайт в качестве веб-приложения на домашнем экране.
Примечание: Эта возможность может быть недоступна в некоторых браузерах.
эффект диагональных полупрозрачных линий на фоном рисунке
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
DefaultGroupName=My Application
DisableProgramGroupPage=yes
AllowNoIcons=yes
[Tasks]
Name: desktopicon; Description: Test2; GroupDescription: Test; Flags: unchecked;
[B][[/B]Code]
procedure InitializeWizard;
begin
with WizardForm do begin
with GroupEdit do begin
Parent := SelectTasksPage;
Top := SelectTasksLabel.Top + SelectTasksLabel.Height + ScaleY(5);
end;
with GroupBrowseButton do begin
Parent := SelectTasksPage;
Top := SelectTasksLabel.Top + SelectTasksLabel.Height + ScaleY(3);
end;
with NoIconsCheck do begin
Parent := SelectTasksPage;
Top := GroupEdit.Top + GroupEdit.Height + ScaleY(5);
end;
TasksList.Top := NoIconsCheck.Top + NoIconsCheck.Height + ScaleY(5);
end;
end;
Const
PCFonFLY=true;
notPCFonFLY=false;
Var
LabelPct1,LabelCurrFileName: TLabel;
ISDoneProgressBar1: TNewProgressBar;
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;
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 ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
Function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
Function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@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 SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
Function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';
//************************************************ [Процесс отмены "Прервать установку?"] ***************************************************//
Procedure CancelButtonOnClick(Sender: TObject);
begin
SuspendProc;
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
ResumeProc;
end;
//************************************************ [Загрузка скина ISSkin.cjstyles] ***************************************************//
Procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
Procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall';
Function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';
Function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('ISSkin.cjstyles');
LoadSkin(ExpandConstant('{tmp}\ISSkin.cjstyles'), '');
Result := True;
end;
//************************************************ [Создание прогрессбара и лэйблов] ***************************************************//
Procedure CreateControls;
var PBTop:integer;
begin
PBTop:=ScaleY(534);
ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar1 do begin
Parent := WizardForm;
Left := ScaleX(7);
Top := PBTop;
Width := ScaleX(776);
Height := ScaleY(23);
Max := 1000;
end;
LabelPct1 := TLabel.Create(WizardForm);
with LabelPct1 do begin
Parent := WizardForm;
Left := ISDoneProgressBar1.Width+ScaleX(-29);
Top := ISDoneProgressBar1.Top + ScaleY(-13);
Width := ScaleX(80);
end;
LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
Parent := WizardForm;
Left := ScaleX(11);
Top := ISDoneProgressBar1.Top + ScaleY(34);
end;
MyCancelButton:=TButton.Create(WizardForm);
with MyCancelButton do begin
Parent :=WizardForm;
Width :=ScaleX(90);
Height :=ScaleY(23);
Caption :=ExpandConstant('{cm:CancelButton}');
Left :=ScaleX(693);
Top :=ISDoneProgressBar1.Top + ISDoneProgressBar1.Height + ScaleX(8);
OnClick :=@CancelButtonOnClick;
end;
end;
//************************************************ [Обновления прогрессбара и лэйблов] ***************************************************//
Function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
Result := ISDoneCancel;
end;
//************************************************ [Скрытие прогрессбара и лэйблов] ***************************************************//
Procedure HideControls;
begin
WizardForm.FileNamelabel.Hide;
ISDoneProgressBar1.Hide;
LabelPct1.Hide;
LabelCurrFileName.Hide;
MyCancelButton.Hide;
end;
//************************************************ [Изменение мастера и его страниц] ***************************************************//
Procedure InitializeWizard;
begin
with WizardForm do begin
begin
WizardForm.Width:=796;
WizardForm.Height:=627;
Center;
end;
with WizardForm.OuterNotebook do begin
Width := ScaleX(795);
Height := ScaleY(627);
end;
with WizardForm.WizardBitmapImage do begin
Width := ScaleX(795);
Height := ScaleY(495);
end;
with WizardForm.bevel do begin
WizardForm.bevel.BringToFront;
SetBounds(ScaleX(0), ScaleY(495), ScaleX(790), Height);
end;
with WizardForm.WelcomeLabel1 do
begin
Font.Color := $8F5123;
Font.Height := 16;
Font.Name := 'Segoe UI';
Top := ScaleY(10);
Font.Style := [fsBold];
ParentFont := False;
WordWrap := False;
end;
with WizardForm.WelcomeLabel2 do
begin
Font.Color := $8F5123;
Font.Height := 20;
Font.Name := 'Segoe UI';
Width := ScaleX(675);
Height := ScaleY(60);
Left := ScaleX(10);
Top := ScaleY(498);
Font.Style := [fsBold];
ParentFont := False;
WordWrap := False;
end;
with DiskSpaceLabel do begin
Parent := WizardForm;
SetBounds(ScaleX(8), ScaleY(553), ScaleX(295), Height);
end;
with DirEdit do begin
Parent := WizardForm;
SetBounds(ScaleX(8), ScaleY(567), ScaleX(394), Height);
end;
with DirBrowseButton do begin
Parent := WizardForm;
SetBounds(DirEdit.Left + DirEdit.Width + ScaleX(6), DirEdit.Top - 1, ScaleX(90), Height);
end;
with GroupEdit do begin
Parent := WizardForm;
SetBounds(ScaleX(8), ScaleY(567), ScaleX(394), Height);
end;
with GroupBrowseButton do begin
Parent := WizardForm;
SetBounds(DirEdit.Left + DirEdit.Width + ScaleX(6), DirEdit.Top - 1, ScaleX(90), Height);
end;
with WizardForm.BackButton do begin
WizardForm.BackButton.BringToFront;
SetBounds (DirBrowseButton.Left + DirBrowseButton.Width + ScaleX(5), ScaleY(566), ScaleX(90), Height);
end;
with WizardForm.NextButton do begin
WizardForm.NextButton.BringToFront;
SetBounds (BackButton.Left + BackButton.Width + ScaleX(5), BackButton.Top, ScaleX(90), Height);
end;
with WizardForm.CancelButton do begin
WizardForm.CancelButton.BringToFront;
SetBounds (NextButton.Left + NextButton.Width + ScaleX(5), BackButton.Top, ScaleX(90), Height);
end;
end;
end;
//************************************************ [Скрытие мастера и его страниц] ***************************************************//
Procedure CurPageChanged(CurPageID : integer);
begin
WizardForm.DiskSpaceLabel.Hide;
WizardForm.DirEdit.Hide;
WizardForm.DirBrowseButton.Hide;
WizardForm.GroupEdit.Hide;
WizardForm.GroupBrowseButton.Hide;
case CurPageID of
wpSelectDir : begin
WizardForm.DiskSpaceLabel.Show;
WizardForm.DirEdit.Show;
WizardForm.DirBrowseButton.Show;
end;
wpSelectProgramGroup: begin
WizardForm.GroupEdit.Show;
WizardForm.GroupBrowseButton.Show;
end;
wpFinished: if ISDoneError then begin
WizardForm.Caption:= ExpandConstant('{cm:Error}');
WizardForm.FinishedLabel.Font.Color:= clWhite;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
end;
end;
end;
Function CheckError:boolean;
begin
result:= not ISDoneError;
end;
//************************************************ [Основная процедура распаковки] ***************************************************//
Procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssInstall then begin //Если необходимо, можно поменять на ssPostInstall
WizardForm.ProgressGauge.Hide;
WizardForm.CancelButton.Hide;
CreateControls;
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
ISDoneCancel:=0;
//************************************************ [Распаковка файлов в папку {tmp}] ***************************************************//
ExtractTemporaryFile('unarc.dll');
#ifdef SrepInside
ExtractTemporaryFile('CLS-srep.dll');
#endif
#ifdef facompress
ExtractTemporaryFile('facompress.dll'); //ускоряет распаковку .arc архивов.
#endif
#ifdef records
ExtractTemporaryFile('records.inf');
#endif
ExtractTemporaryFile('russian.ini');
//************************************************ [Распаковка файлов архива] ***************************************************//
ISDoneError:=true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, 0, 0, 0, MainForm.Handle, {#NeedMem}, @ProgressCallback) then begin
repeat
if not SrepInit('',512,0) then break;
if not FileSearchInit(true) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
//************************************************ [Откат незавершенной установке] ***************************************************//
ISDoneError:=false;
until true;
ISDoneStop;
end;
HideControls;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
end;
Да, SendToBack;Есть ли противоположность BringToFront
Нет, Bevel перекрывает WizardForm.WelcomePage, у которой родитель всё тот же OuterNotebook. Поставьте у Bevel'а родителем WizardForm.WelcomePage, то есть WizardForm.Bevel.Parent := WizardForm.WelcomePage и Bevel будет виден.А то bevel перекрывается OuterNotebook...
В CurPageChanged дописываешь WizardForm.WizardBitmapImage.Show;Как сделать, чтобы WizardImageFile отображался на всех страницах
Закос под Fenixx'а ведь есть:...
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Types]
Name: full; Description: Full installation; Flags: iscustom
[Components]
Name: JMP; Description: Joves Mod Pack; Flags: fixed;
Name: JMP\UPOJ; Description: 1. Удобный прицел от Джова.;
Name: JMP\UCVSR; Description: 2. Удаление черноты в снайперском режиме.;
Name: JMP\PP; Description: 3. Панель повреждений.;
Name: JMP\UMK; Description: 4. Улучшенная мини-карта.; Types: full;
Name: JMP\ZKIGOV; Description: 5. Звоночек Крита и голосовое обнаружение врагов.;
Name: JMP\XVM; Description: 6. XVM-мод - комплексный мод по улучшению интерфейса.;
Name: JMP\OK; Description: 7. Отдаление камеры.;
Name: JMP\OKIBTT; Description: 8. Отключение камуфляжа и белые трупы танков.;
Name: JMP\OKIBTT\OK; Description: а. Отключение камуфляжа; Flags: exclusive;
Name: JMP\OKIBTT\BTT; Description: б. Белые трупы танков; Flags: exclusive;
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[B][[/B]Code]
procedure InitializeWizard;
begin
with WizardForm do begin
OuterNotebook.Hide;
WelcomeLabel1.Parent := WizardForm;
WelcomeLabel2.Parent := WizardForm;
WizardBitmapImage.Parent := WizardForm;
end;
end;
procedure HideComponents;
begin
with WizardForm do begin
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
WizardBitmapImage.Hide;
end;
end;
procedure CurPageChanged(CurPageID : integer);
begin
HideComponents;
case CurPageID of
wpWelcome : begin
with WizardForm do begin
WelcomeLabel1.Show;
WelcomeLabel2.Show;
WizardBitmapImage.Show;
end;
end;
end;
end;