Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для Gnom_aka_Lexander

Ветеран


Сообщения: 978
Благодарности: 564

Профиль | Сайт | Отправить PM | Цитировать


Кому не сложно, помогите пожалуйста...
Все уже доделал,
читать дальше »
[Setup]
OutputBaseFilename=тест
AppName=тест
AppVerName=тест 1
DefaultDirName={pf}\тест
DisableProgramGroupPage=true
UsePreviousGroup=false
AppendDefaultGroupName=false

[code]
var
ISCustomPage1: TWizardPage;
Nick: TNewStaticText;
NickEdit: TNewEdit;
ISCustomPage2: TWizardPage;
NikInfo: TNewStaticText;
NickInfoEdit: TNewEdit;

procedure RedesignWizardForm;
begin
{ Creates custom wizard page }
ISCustomPage1 := CreateCustomPage(wpWelcome, 'ISCustomPage1_Caption', 'ISCustomPage1_Description');
ISCustomPage2 := CreateCustomPage(wpPreparing, 'ISCustomPage2_Caption', 'ISCustomPage2_Description');

{ Nick }
Nick := TNewStaticText.Create(WizardForm);
with Nick do
begin
Name := 'Nick';
Parent := ISCustomPage1.Surface;
Caption := 'Nick';
Left := ScaleX(168);
Top := ScaleY(88);
Width := ScaleX(23);
Height := ScaleY(14);
end;

{ NickEdit }
NickEdit := TNewEdit.Create(WizardForm);
with NickEdit do
begin
Name := 'NickEdit';
Parent := ISCustomPage1.Surface;
Left := ScaleX(136);
Top := ScaleY(120);
Width := ScaleX(121);
Height := ScaleY(21);
Text := ''; //нужно какимто образом ввести это там, где написано {NickEdit.Text - не катит...}, и сделать так, чтобы в случае отсутствия значения здесь, ISCustomPage2 не создавалась.//
end;

Nick.TabOrder := 0;
NickEdit.TabOrder := 1;

{ NikInfo }
NikInfo := TNewStaticText.Create(WizardForm);
with NikInfo do
begin
Name := 'NikInfo';
Parent := ISCustomPage2.Surface;
Caption := 'NikInfo';
Left := ScaleX(168);
Top := ScaleY(56);
Width := ScaleX(35);
Height := ScaleY(14);
end;

{ NickInfoEdit }
NickInfoEdit := TNewEdit.Create(WizardForm);
with NickInfoEdit do
begin
Name := 'NickInfoEdit';
Parent := ISCustomPage2.Surface;
Left := ScaleX(66);
Top := ScaleY(96);
Width := ScaleX(273);
Height := ScaleY(93);
Text := '';
end;

NikInfo.TabOrder := 0;
NickInfoEdit.TabOrder := 1;

end;

procedure InitializeWizard();
begin
RedesignWizardForm;
end;
procedure CurStepChanged(CurStep: TSetupStep);
Var
S1: String;
S2: String;
begin
if CurStep = ssPostInstall//запись после распаковки всех файлов
then begin
S1 := '[Account_0]' +#13+#10+ 'Login=' + NickEdit.Text;
SaveStringToFile(ExpandConstant('{app}\test.ini'), S1, false);
begin
if CurStep = ssPostInstall//запись после распаковки всех файлов
then begin
S2 := '[Main]' +#13+#10+ 'Usernotes=' + NickInfoEdit.Text;
SaveStringToFile(ExpandConstant('{app}\{NickEdit.Text - не катит...}\test2.ini'), S2, false);
end;
end;
end;
end;

тут застрял...
Все решено, пост ниже.

Последний раз редактировалось Gnom_aka_Lexander, 04-01-2011 в 15:58. Причина: Решено


Отправлено: 17:34, 03-01-2011 | #363