View Full Version : I added isdone support to a generic script. I need some help please
ZakirAhmad
21-02-2018, 01:37
I have little knowledge of inno scripts. I added isdone support. I just made it look like fitgirls script. Now i want to add wintb.dll support but i am getting errors.
My scripts only lacks "create desktop icon " and " dont create start icon" in select dir page, if possible please add that too. Thanks in advance.
I am uploading only .iss file as my internet speed is too damn slow (only 15kbps).
ZakirAhmad
21-02-2018, 03:34
I added wintb support..
now remains the win dir part, if anybody is then please help me add it.
What you mean with "win dir part" ?
For icons create first variables then functions and procedures
Example:
var
StartMenuIcons, DesktopIconCheckBox: TNewCheckBox;
function CreateIcons: Boolean;
begin
Result := DesktopIconCheckBox.Checked;
end;
procedure StartMenuIconsClick(Sender: TObject);
begin
if StartMenuIcons.Checked = True then begin
WizardForm.GroupEdit.Enabled := False;
WizardForm.GroupBrowseButton.Enabled := False;
end else begin
WizardForm.GroupEdit.Enabled := True;
WizardForm.GroupBrowseButton.Enabled := True;
end;
end;
Then checks for Icons
[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExec}"; Check: CreateIcons
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExec}"; Check: CreateIcons
After this you have to place it in WizardForm like this
procedure InitializeWizard();
begin
StartMenuIcons := TNewCheckBox.Create(WizardForm);
with StartMenuIcons do begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(8);
Top := ScaleY(150);
Width := ScaleX(240);
Height := ScaleY(17);
Caption := 'Create Start menu icons';
OnClick := @StartMenuIconsClick; //Which action should be performed when OnClick (=clicked)
end;
DesktopIconCheckBox := TNewCheckBox.Create(WizardForm);
with DesktopIconCheckBox do begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(8);
Top := ScaleY(170);
Width := ScaleX(240);
Height := ScaleY(17);
Caption := 'Create Desktop icon';
end;
end;
For left/top/width/height you can also use SetBounds(Left, Top, Width, Height);.
ZakirAhmad
21-02-2018, 07:01
What you mean with "win dir part" ?
For icons create first variables then functions and procedures
Example:
var
StartMenuIcons, DesktopIconCheckBox: TNewCheckBox;
function CreateIcons: Boolean;
begin
Result := DesktopIconCheckBox.Checked;
end;
procedure StartMenuIconsClick(Sender: TObject);
begin
if StartMenuIcons.Checked = True then begin
WizardForm.GroupEdit.Enabled := False;
WizardForm.GroupBrowseButton.Enabled := False;
end else begin
WizardForm.GroupEdit.Enabled := True;
WizardForm.GroupBrowseButton.Enabled := True;
end;
end;
Then checks for Icons
[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExec}"; Check: CreateIcons
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExec}"; Check: CreateIcons
After this you have to place it in WizardForm like this
procedure InitializeWizard();
begin
StartMenuIcons := TNewCheckBox.Create(WizardForm);
with StartMenuIcons do begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(8);
Top := ScaleY(150);
Width := ScaleX(240);
Height := ScaleY(17);
Caption := 'Create Start menu icons';
OnClick := @StartMenuIconsClick; //Which action should be performed when OnClick (=clicked)
end;
DesktopIconCheckBox := TNewCheckBox.Create(WizardForm);
with DesktopIconCheckBox do begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(8);
Top := ScaleY(170);
Width := ScaleX(240);
Height := ScaleY(17);
Caption := 'Create Desktop icon';
end;
end;
For left/top/width/height you can also use SetBounds(Left, Top, Width, Height);.
sorry bro SelectDirPage.
Bro i also want to change srepinit virtual memory to percentage value. but the cls.ini is overwritten by srepinit function of of isdone. Please help me here.
i also how can i add in info page of setup like FItgirl.
thanks
Try something like this
SaveStringToFile(ExpandConstant('{tmp}\cls.ini'), '[Srep]'+#13#10+'Memory=75%'+#13#10+'TempPath='+ExpandCon stant('{app}'), True);
ZakirAhmad
21-02-2018, 10:10
Try something like this
SaveStringToFile(ExpandConstant('{tmp}\cls.ini'), '[Srep]'+#13#10+'Memory=75%'+#13#10+'TempPath='+ExpandCon stant('{app}'), True);
where can i write this bro.
#ifdef srep2
ExtractTemporaryFile('cls-srep.dll');
ExtractTemporaryFile('CLS.ini');
SaveStringToFile(ExpandConstant('{tmp}\CLS.ini'), '[Srep]'+#13#10+'Memory=75%'+#13#10+'TempPath='+ExpandCon stant('{app}'), True);
#endif
ZakirAhmad
21-02-2018, 18:59
Thanks bro, I will try it. One last thing. How can i Format text like FItgirl in infobefore page of inno setup.
Use .rtf file
[Setup]
InfoBeforeFile=Info.rtf
ZakirAhmad
22-02-2018, 02:48
i added SaveStringToFile function to script but their r now two entries of srep in script. one of srepinit function another of savestring to function.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.