Nie bardzo wiem jak mam się do tego zabrać, ale chciałbym się dowiedzieć jak napisać kod na dodatkową stronę w instalatorze. Chodzi mi oto jak zrobić aby uruchomił mi się program na 3. stronie instalatora. Może przedstawię na screen-ie .
Czy da się to zrobić w ten sposób.
- Rejestracja:około 13 lat
- Ostatnio:ponad 8 lat
- Postów:22
Jaki związek to ma z Delphi?

- Rejestracja:ponad 16 lat
- Ostatnio:19 dni
Wystarczy zajrzeć do przykładowego skryptu CodeClasses.iss umieszczonego w folderze Examples InnoSetup-a, a jak nadal masz problem z IS wystaczy przejrzeć archiwum grup dyskusyjnych IS: http://www.jrsoftware.org/newsgroups.php#search
- Rejestracja:około 13 lat
- Ostatnio:ponad 8 lat
- Postów:22
Gdybym tylko wiedział jak mogę dostosować do siebie ten CodeClasses.iss bo jak coś usunę to zaraz mam błąd w pierwszej linijce kodu i to wszystko. Spróbuję z tą stroną co mi podałeś może coś pomoże, ale wątpię bo nie znam się na pisaniu kodu.
- Rejestracja:ponad 16 lat
- Ostatnio:19 dni
Trochę się nudziłem, więc masz tu małego gotowca:
[Code]
Var
Page: TWizardPage;
RadioButtonLightMode, RadioButtonSponsoredMode: TRadioButton;
procedure RadioButtonLightModeClick(Sender: TObject);
begin
MsgBox('Kliknąłeś RadioButton "Light Mode"!', mbInformation, mb_Ok);
end;
procedure RadioButtonSponsoredModeClick(Sender: TObject);
begin
MsgBox('Kliknąłeś RadioButton "Sponsored Mode"!', mbInformation, mb_Ok);
end;
procedure InitializeWizard();
Begin
Page := CreateCustomPage(wpWelcome, 'Trele fele kuku', 'Testowanie'); //ddatkowa strona po stronie wpWelcome
RadioButtonLightMode:= TRadioButton.Create(Page);
RadioButtonLightMode.Top:=30;
RadioButtonLightMode.Left:=50;
RadioButtonLightMode.Caption:='Light Mode';
RadioButtonLightMode.Parent:=Page.Surface;
RadioButtonLightMode.Checked:=true;
RadioButtonLightMode.OnClick:=@RadioButtonLightModeClick;
RadioButtonSponsoredMode:=TRadioButton.Create(Page);
RadioButtonSponsoredMode.Top:=80;
RadioButtonSponsoredMode.Left:=50;
RadioButtonSponsoredMode.Caption:='Sponsored Mode';
RadioButtonSponsoredMode.OnClick:=@RadioButtonSponsoredModeClick;
RadioButtonSponsoredMode.Parent:=Page.Surface;
End;
function NextButtonClick(CurPageID: Integer): Boolean;
Var
ResultCode: Integer;
Begin
Result:=true;
If (CurPageID=100) and RadioButtonSponsoredMode.Checked then
If Exec('c:\windows\notepad.exe', '', 'c:\windows', SW_SHOW, ewWaitUntilTerminated, ResultCode)
then MsgBox('Uruchomiony program się zakończył (rezultat wykonania:'+InttoStr(ResultCode)+'). Przejście do następnej strony.', mbInformation, MB_OK)
else MsgBox('Błąd uruchomienia programu! Kod błędu: '+IntToStr(ResultCode), mbInformation, MB_OK);
End;
Radzę zapoznać się z helpem InnoSetup (szczególnie rozdział Pascal Scripting), tam wszystko ładnie jest opisane.

- Rejestracja:około 13 lat
- Ostatnio:ponad 8 lat
- Postów:22
Dzięki kolego marogo kod się przydał i to bardzo. Mam jeszcze jedno pytanie, chciałem zrobić drugą taką stronę po tej co mi napisałeś ale jak już przerobie ten kod to otrzymuję komunikat o błędzie.
Line 99:
Column 11:
Duplicate identifier 'INITIALIZEWIZARD'
[Code]
Var
SecondPage: TWizardPage;
RadioButtonLight, RadioButtonSponsored: TRadioButton;
procedure RadioButtonLightClick(Sender: TObject);
begin
end;
procedure RadioButtonSponsoredClick(Sender: TObject);
begin
end;
procedure InitializeWizard(); //błąd
Begin
Page := CreateCustomPage(TWizardPage, 'Instalowanie wymaganych składników', 'Instalowanie VCRedist'); //ddatkowa strona po stronie wpWelcome
RadioButtonLight:= TRadioButton.Create(Page);
RadioButtonLight.Top:=30;
RadioButtonLight.Left:=10;
RadioButtonLight.Caption:='Nie instaluj';
RadioButtonLight.Parent:=Page.Surface;
RadioButtonLight.Checked:=true;
RadioButtonLight.OnClick:=@RadioButtonLightClick;
RadioButtonSponsored:=TRadioButton.Create(Page);
RadioButtonSponsored.Top:=60;
RadioButtonSponsored.Left:=10;
RadioButtonSponsored.Caption:='Instaluj';
RadioButtonSponsored.OnClick:=@RadioButtonSponsoredClick;
RadioButtonSponsored.Parent:=Page.Surface;
End;
function NextButtonClick(CurPageID: Integer): Boolean;
Var
ResultCode: Integer;
Begin
Result:=true;
If (CurPageID=100) and RadioButtonSponsored.Checked then
If Exec('Redist\vcredist_x86.exe', '', 'c:\windows', SW_SHOW, ewWaitUntilTerminated, ResultCode)
then
else MsgBox('Błąd uruchomienia programu! Kod błędu: '+IntToStr(ResultCode), mbInformation, MB_OK);
End;
Z tego błędu na mój angielski wynika że mam duplikat "INITIALIZEWIZARD" i nie wiem co teraz zrobić.
Czy kod do 2 strony trzeba jakoś powiązać z pierwszą? Bo się w tym nie orientuję.