Смотрите видео ниже, чтобы узнать, как установить наш сайт в качестве веб-приложения на домашнем экране.
Примечание: Эта возможность может быть недоступна в некоторых браузерах.
[Setup]
AppName=MyProg
AppVersion= 1.5
CreateAppDir=no
OutputBaseFilename=setup
[Code]
var
NewCheckBox1: TNewCheckBox;
NewCheckBox2: TNewCheckBox;
NewCheckBox3: TNewCheckBox;
NewCheckBox4: TNewCheckBox;
NewCheckBox5: TNewCheckBox;
NewCheckBox6: TNewCheckBox;
NewCheckBox7: TNewCheckBox;
NewCheckBox8: TNewCheckBox;
procedure RedesignWizardForm;
begin
with WizardForm.WelcomeLabel2 do
begin
Visible := False;
end;
with WizardForm.WelcomeLabel1 do
begin
Visible := False;
end;
{ NewCheckBox1 }
NewCheckBox1 := TNewCheckBox.Create(WizardForm);
with NewCheckBox1 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(96);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox1';
Checked := GetIniString('General', 'NewCheckBox1', '', ExpandConstant('{src}\settings.ini'))='True';
end;
{ NewCheckBox2 }
NewCheckBox2 := TNewCheckBox.Create(WizardForm);
with NewCheckBox2 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(136);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox2';
Checked := GetIniString('General', 'NewCheckBox2', '', ExpandConstant('{src}\settings.ini'))='True';
end;
{ NewCheckBox3 }
NewCheckBox3 := TNewCheckBox.Create(WizardForm);
with NewCheckBox3 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(176);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox3';
Checked := GetIniString('General', 'NewCheckBox3', '', ExpandConstant('{src}\settings.ini'))='True';
end;
{ NewCheckBox4 }
NewCheckBox4 := TNewCheckBox.Create(WizardForm);
with NewCheckBox4 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(216);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox4';
Checked := GetIniString('General', 'NewCheckBox4', '', ExpandConstant('{src}\settings.ini'))='True';
end;
{ NewCheckBox5 }
NewCheckBox5 := TNewCheckBox.Create(WizardForm);
with NewCheckBox5 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(96);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox5';
Checked := GetIniString('General', 'NewCheckBox5', '', ExpandConstant('{src}\settings.ini'))='True';
end;
{ NewCheckBox6 }
NewCheckBox6 := TNewCheckBox.Create(WizardForm);
with NewCheckBox6 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(136);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox6';
Checked := GetIniString('General', 'NewCheckBox6', '', ExpandConstant('{src}\settings.ini'))='True';
end;
{ NewCheckBox7 }
NewCheckBox7 := TNewCheckBox.Create(WizardForm);
with NewCheckBox7 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(176);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox7';
Checked := GetIniString('General', 'NewCheckBox7', '', ExpandConstant('{src}\settings.ini'))='True';
end;
{ NewCheckBox8 }
NewCheckBox8 := TNewCheckBox.Create(WizardForm);
with NewCheckBox8 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(216);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox8';
Checked := GetIniString('General', 'NewCheckBox8', '', ExpandConstant('{src}\settings.ini'))='True';
end;
end;
procedure InitializeWizard();
begin
RedesignWizardForm;
end;
procedure RememberCheckBoxState();
begin
if NewCheckBox1.Checked then SetIniString('General', 'NewCheckBox1', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox1', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox2.Checked then SetIniString('General', 'NewCheckBox2', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox2', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox3.Checked then SetIniString('General', 'NewCheckBox3', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox3', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox4.Checked then SetIniString('General', 'NewCheckBox4', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox4', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox5.Checked then SetIniString('General', 'NewCheckBox5', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox5', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox6.Checked then SetIniString('General', 'NewCheckBox6', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox6', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox7.Checked then SetIniString('General', 'NewCheckBox7', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox7', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox8.Checked then SetIniString('General', 'NewCheckBox8', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox8', 'False', ExpandConstant('{src}\settings.ini'));
end;
procedure DeinitializeSetup();
begin
RememberCheckBoxState();
end;
[General]
NewCheckBox1=True
NewCheckBox2=False
NewCheckBox3=False
NewCheckBox4=True
NewCheckBox5=False
NewCheckBox6=True
NewCheckBox7=True
NewCheckBox8=False
[Setup]
AppName=MyProg
AppVersion= 1.5
CreateAppDir=no
OutputBaseFilename=setup
[Code]
var
NewCheckBox1: TNewCheckBox;
NewCheckBox2: TNewCheckBox;
NewCheckBox3: TNewCheckBox;
NewCheckBox4: TNewCheckBox;
NewCheckBox5: TNewCheckBox;
NewCheckBox6: TNewCheckBox;
NewCheckBox7: TNewCheckBox;
NewCheckBox8: TNewCheckBox;
procedure GetCheckBoxState();
begin
if FileExists(ExpandConstant('{src}\settings.ini')) then
begin
if GetIniString('General', 'NewCheckBox1', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox1.Checked := True else NewCheckBox1.Checked := False;
if GetIniString('General', 'NewCheckBox2', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox2.Checked := True else NewCheckBox2.Checked := False;
if GetIniString('General', 'NewCheckBox3', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox3.Checked := True else NewCheckBox3.Checked := False;
if GetIniString('General', 'NewCheckBox4', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox4.Checked := True else NewCheckBox4.Checked := False;
if GetIniString('General', 'NewCheckBox5', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox5.Checked := True else NewCheckBox5.Checked := False;
if GetIniString('General', 'NewCheckBox6', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox6.Checked := True else NewCheckBox6.Checked := False;
if GetIniString('General', 'NewCheckBox7', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox7.Checked := True else NewCheckBox7.Checked := False;
if GetIniString('General', 'NewCheckBox8', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox8.Checked := True else NewCheckBox8.Checked := False;
end;
end;
procedure RedesignWizardForm;
begin
with WizardForm.WelcomeLabel2 do
begin
Visible := False;
end;
with WizardForm.WelcomeLabel1 do
begin
Visible := False;
end;
{ NewCheckBox1 }
NewCheckBox1 := TNewCheckBox.Create(WizardForm);
with NewCheckBox1 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(96);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox1';
Checked := False;
end;
{ NewCheckBox2 }
NewCheckBox2 := TNewCheckBox.Create(WizardForm);
with NewCheckBox2 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(136);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox2';
Checked := False;
end;
{ NewCheckBox3 }
NewCheckBox3 := TNewCheckBox.Create(WizardForm);
with NewCheckBox3 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(176);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox3';
Checked := True;
end;
{ NewCheckBox4 }
NewCheckBox4 := TNewCheckBox.Create(WizardForm);
with NewCheckBox4 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(216);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox4';
Checked := True;
end;
{ NewCheckBox5 }
NewCheckBox5 := TNewCheckBox.Create(WizardForm);
with NewCheckBox5 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(96);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox5';
Checked := False;
end;
{ NewCheckBox6 }
NewCheckBox6 := TNewCheckBox.Create(WizardForm);
with NewCheckBox6 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(136);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox6';
Checked := False;
end;
{ NewCheckBox7 }
NewCheckBox7 := TNewCheckBox.Create(WizardForm);
with NewCheckBox7 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(176);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox7';
Checked := True;
end;
{ NewCheckBox8 }
NewCheckBox8 := TNewCheckBox.Create(WizardForm);
with NewCheckBox8 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(216);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox8';
Checked := True;
end;
end;
procedure InitializeWizard();
begin
RedesignWizardForm;
GetCheckBoxState(); //чтение
end;
procedure RememberCheckBoxState();
begin
if NewCheckBox1.Checked then SetIniString('General', 'NewCheckBox1', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox1', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox2.Checked then SetIniString('General', 'NewCheckBox2', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox2', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox3.Checked then SetIniString('General', 'NewCheckBox3', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox3', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox4.Checked then SetIniString('General', 'NewCheckBox4', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox4', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox5.Checked then SetIniString('General', 'NewCheckBox5', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox5', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox6.Checked then SetIniString('General', 'NewCheckBox6', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox6', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox7.Checked then SetIniString('General', 'NewCheckBox7', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox7', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox8.Checked then SetIniString('General', 'NewCheckBox8', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox8', 'False', ExpandConstant('{src}\settings.ini'));
end;
procedure DeinitializeSetup();
begin
RememberCheckBoxState(); //запись
end;
[Setup]
AppName=MyProg
AppVersion= 1.5
CreateAppDir=no
OutputBaseFilename=setup
[Code]
var
NewCheckBox1: TNewCheckBox;
NewCheckBox2: TNewCheckBox;
NewCheckBox3: TNewCheckBox;
NewCheckBox4: TNewCheckBox;
NewCheckBox5: TNewCheckBox;
NewCheckBox6: TNewCheckBox;
NewCheckBox7: TNewCheckBox;
NewCheckBox8: TNewCheckBox;
procedure GetCheckBoxState();
begin
if FileExists(ExpandConstant('{src}\settings.ini')) then
begin
if GetIniString('General', 'NewCheckBox1', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox1.Checked := True else NewCheckBox1.Checked := False;
if GetIniString('General', 'NewCheckBox2', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox2.Checked := True else NewCheckBox2.Checked := False;
if GetIniString('General', 'NewCheckBox3', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox3.Checked := True else NewCheckBox3.Checked := False;
if GetIniString('General', 'NewCheckBox4', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox4.Checked := True else NewCheckBox4.Checked := False;
if GetIniString('General', 'NewCheckBox5', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox5.Checked := True else NewCheckBox5.Checked := False;
if GetIniString('General', 'NewCheckBox6', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox6.Checked := True else NewCheckBox6.Checked := False;
if GetIniString('General', 'NewCheckBox7', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox7.Checked := True else NewCheckBox7.Checked := False;
if GetIniString('General', 'NewCheckBox8', '', ExpandConstant('{src}\settings.ini'))='True' then NewCheckBox8.Checked := True else NewCheckBox8.Checked := False;
end;
end;
procedure RedesignWizardForm;
begin
with WizardForm.WelcomeLabel2 do
begin
Visible := False;
end;
with WizardForm.WelcomeLabel1 do
begin
Visible := False;
end;
{ NewCheckBox1 }
NewCheckBox1 := TNewCheckBox.Create(WizardForm);
with NewCheckBox1 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(96);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox1';
Checked := False;
end;
{ NewCheckBox2 }
NewCheckBox2 := TNewCheckBox.Create(WizardForm);
with NewCheckBox2 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(136);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox2';
Checked := False;
end;
{ NewCheckBox3 }
NewCheckBox3 := TNewCheckBox.Create(WizardForm);
with NewCheckBox3 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(176);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox3';
Checked := True;
end;
{ NewCheckBox4 }
NewCheckBox4 := TNewCheckBox.Create(WizardForm);
with NewCheckBox4 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(216);
Top := ScaleY(216);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox4';
Checked := True;
end;
{ NewCheckBox5 }
NewCheckBox5 := TNewCheckBox.Create(WizardForm);
with NewCheckBox5 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(96);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox5';
Checked := False;
end;
{ NewCheckBox6 }
NewCheckBox6 := TNewCheckBox.Create(WizardForm);
with NewCheckBox6 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(136);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox6';
Checked := False;
end;
{ NewCheckBox7 }
NewCheckBox7 := TNewCheckBox.Create(WizardForm);
with NewCheckBox7 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(176);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox7';
Checked := True;
end;
{ NewCheckBox8 }
NewCheckBox8 := TNewCheckBox.Create(WizardForm);
with NewCheckBox8 do
begin
Parent := WizardForm.WelcomePage;
Left := ScaleX(344);
Top := ScaleY(216);
Width := ScaleX(97);
Height := ScaleY(17);
Caption := 'NewCheckBox8';
Checked := True;
end;
end;
procedure InitializeWizard();
begin
RedesignWizardForm;
GetCheckBoxState(); //чтение
end;
procedure RememberCheckBoxState();
begin
if NewCheckBox1.Checked then SetIniString('General', 'NewCheckBox1', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox1', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox2.Checked then SetIniString('General', 'NewCheckBox2', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox2', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox3.Checked then SetIniString('General', 'NewCheckBox3', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox3', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox4.Checked then SetIniString('General', 'NewCheckBox4', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox4', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox5.Checked then SetIniString('General', 'NewCheckBox5', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox5', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox6.Checked then SetIniString('General', 'NewCheckBox6', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox6', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox7.Checked then SetIniString('General', 'NewCheckBox7', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox7', 'False', ExpandConstant('{src}\settings.ini'));
if NewCheckBox8.Checked then SetIniString('General', 'NewCheckBox8', 'True', ExpandConstant('{src}\settings.ini')) else SetIniString('General', 'NewCheckBox8', 'False', ExpandConstant('{src}\settings.ini'));
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
if CurPageID = wpWelcome then RememberCheckBoxState(); //запись
end;