FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   I added isdone support to a generic script. I need some help please (https://fileforums.com/showthread.php?t=101491)

ZakirAhmad 21-02-2018 01:37

I added isdone support to a generic script. I need some help please
 
1 Attachment(s)
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.

KaktoR 21-02-2018 06:31

What you mean with "win dir part" ?

For icons create first variables then functions and procedures

Example:

Code:

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
Code:

[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

Code:

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

Quote:

Originally Posted by KaktoR (Post 468261)
What you mean with "win dir part" ?

For icons create first variables then functions and procedures

Example:

Code:

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
Code:

[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

Code:

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

KaktoR 21-02-2018 10:00

Try something like this

Code:

SaveStringToFile(ExpandConstant('{tmp}\cls.ini'), '[Srep]'+#13#10+'Memory=75%'+#13#10+'TempPath='+ExpandConstant('{app}'), True);

ZakirAhmad 21-02-2018 10:10

Quote:

Originally Posted by KaktoR (Post 468272)
Try something like this

Code:

SaveStringToFile(ExpandConstant('{tmp}\cls.ini'), '[Srep]'+#13#10+'Memory=75%'+#13#10+'TempPath='+ExpandConstant('{app}'), True);

where can i write this bro.

KaktoR 21-02-2018 10:20

Code:

#ifdef srep2
  ExtractTemporaryFile('cls-srep.dll');
  ExtractTemporaryFile('CLS.ini');
  SaveStringToFile(ExpandConstant('{tmp}\CLS.ini'), '[Srep]'+#13#10+'Memory=75%'+#13#10+'TempPath='+ExpandConstant('{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.

KaktoR 21-02-2018 22:44

Use .rtf file

[Setup]
InfoBeforeFile=Info.rtf

ZakirAhmad 22-02-2018 02:48

thanks
 
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.


All times are GMT -7. The time now is 18:34.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com