Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #18  
Old 05-03-2018, 07:58
vint56 vint56 is offline
Registered User
 
Join Date: May 2011
Location: almaty
Posts: 52
Thanks: 145
Thanked 55 Times in 31 Posts
vint56 is on a distinguished road
jitender
Code:
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={code:GetInstallDir|{pf}\My Application}
DisableProgramGroupPage=yes
Uninstallable=not PortableCheck
OutputDir=.

[Files]
Source: "MyProg - installer.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: InstallerCheck;
Source: "MyProg - portable.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: PortableCheck;

[Icons]
Name: "{commondesktop}\My Application"; Filename: "{app}\MyProg - installer.exe"; Check: InstallerCheck;

This is CODE section add [] +Code
var
  Portable,Installer: TNewRadioButton;

function CheckParam(s: string): boolean;
var
  i: integer;
begin
for i := 0 to ParamCount do begin
  Result := ParamStr(i) = s;
if Result then Break;
end;
end;

function GetInstallDir(S: String): String;
begin
  if CheckParam('/P') then
    Result:= ExpandConstant('{userdesktop}\My Application Portable')
  else
    Result:= ExpandConstant(S);
end;

function PortableCheck: Boolean;
begin
  Result := Portable.Checked or CheckParam('/P');
end;

function InstallerCheck: Boolean;
begin
  Result := Installer.Checked or CheckParam('/I');
end;

procedure InitializeWizard();
begin
  WizardForm.DirEdit.Text:= ExpandConstant('{code:GetInstallDir|{pf}\My Application}');

  Portable := TNewRadioButton.Create(WizardForm);
  with Portable do
  begin
    Parent := WizardForm.SelectDirPage;
    Left := ScaleX(110);
    Top := ScaleY(175);
    Width := ScaleX(100);
    Height := ScaleY(17);
    Caption := 'Портативная';
    Checked := CheckParam('/P');
  end;

  Installer := TNewRadioButton.Create(WizardForm);
  with Installer do
  begin
    Parent := WizardForm.SelectDirPage;
    Left := ScaleX(0);
    Top := ScaleY(175);
    Width := ScaleX(100);
    Height := ScaleY(17);
    Caption := 'Стационарная';
    Checked := not CheckParam('/P');
  end;
end;

Portable
start /wait setup.exe /VERYSILENT /P 
Installer
start /wait setup.exe /VERYSILENT /I

Last edited by pakrat2k2; 05-03-2018 at 21:05.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fallout Nv Ultimate Edition 3xDVD9 to 2xDVD5 InnoSetup 1 LANGUAGE THADEADMAN2011 PC Games - CD/DVD Conversions 9 04-09-2022 05:40
Ridge Racer Unbounded + innosetup installer clriboli PC Games - CD/DVD Conversions 2 31-01-2015 14:53
Unarc innosetup gabrimor PC Games 7 08-12-2012 12:23



All times are GMT -7. The time now is 15:35.


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