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

Reply
 
Thread Tools Display Modes
  #16  
Old 04-03-2018, 10:16
jitender jitender is offline
Registered User
 
Join Date: Feb 2018
Location: USA
Posts: 13
Thanks: 3
Thanked 1 Time in 1 Post
jitender is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
Fixed
thanks now all fine.Only one thing left is how to create these two files from an installer :
1. unpacking portable.cmd
2. silent install.cmd

Reply With Quote
Sponsored Links
  #17  
Old 05-03-2018, 07:04
pakrat2k2's Avatar
pakrat2k2 pakrat2k2 is offline
Moderator
 
Join Date: Apr 2005
Location: Canada
Posts: 7,210
Thanks: 3,040
Thanked 8,984 Times in 3,083 Posts
pakrat2k2 is on a distinguished road
you can open both of those with notepad & see how they are written out.
Reply With Quote
  #18  
Old 05-03-2018, 07:58
vint56 vint56 is offline
Registered User
 
Join Date: May 2011
Location: almaty
Posts: 52
Thanks: 118
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
  #19  
Old 05-03-2018, 08:29
jitender jitender is offline
Registered User
 
Join Date: Feb 2018
Location: USA
Posts: 13
Thanks: 3
Thanked 1 Time in 1 Post
jitender is on a distinguished road
I have this code:
http://fileforums.com/attachment.php...9&d=1519677850

Now please Download above script and modify it and give me final one which create portable + silent install also.( i don't know coding otherwise i had modified it)

Last edited by pakrat2k2; 05-03-2018 at 21:06. Reason: STOP QUOTING MESSAGES
Reply With Quote
  #20  
Old 05-03-2018, 09:34
vint56 vint56 is offline
Registered User
 
Join Date: May 2011
Location: almaty
Posts: 52
Thanks: 118
Thanked 55 Times in 31 Posts
vint56 is on a distinguished road
jitender
Code:
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{AEB246C4-0FD6-4C59-8EEF-03944CDFDDA5}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={code:GetInstallDir|{pf}\My Application}
DisableProgramGroupPage=yes
Uninstallable=not PortableCheck
OutputDir=.
OutputBaseFilename=setup
Compression=none
SolidCompression=yes
BackColorDirection=lefttoright



[UninstallDelete]
Type: filesandordirs; Name: {app}

[Languages]
Name: english; MessagesFile: compiler:Default.isl

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
Source: Include\Splash.png; DestDir: {tmp}; Flags: dontcopy
Source: Include\isgsg.dll;  DestDir: {tmp}; Flags: dontcopy

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


[Icons]
Name: {commonprograms}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon; Check: InstallerCheck;

[Run]
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}; Flags: nowait postinstall skipifsilent

;Code section add [] to front of line.
var
  URLText: TNewStaticText;
  Portable,Installer: TNewRadioButton;

procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10 :integer);
external '[email protected]:isgsg.dll stdcall delayload';

procedure URLTextClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('open', 'http://fileforums.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;

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 NewRadioButton1Click(Sender: TObject);
begin
  if Portable.Checked then
  WizardForm.DirEdit.Text:= ExpandConstant('{userdesktop}\My Application Portable')
  else
  WizardForm.DirEdit.Text:= ExpandConstant('{pf}\My Application');
end;

procedure InitializeWizard();
begin
  ExtractTemporaryFile('Splash.png');
  ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'), 1000, 1000, 1000, 0, 255, True, $FFFFFF, 10);

  with WizardForm do begin
    Color := $d78318;
  end;

  URLText := TNewStaticText.Create(WizardForm);
  with URLText do begin
    Parent := WizardForm;
    Left := ScaleX(10);
    Top := ScaleY(331);
    Width := ScaleX(156);
    Height := ScaleY(23);
    Caption := 'My Website';
    Cursor := crHand;
    Color := clWhite;
    Font.Style := [fsUnderline];
    Transparent := True;
    OnClick := @URLTextClick;
  end;

  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');
    OnClick := @NewRadioButton1Click;
  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');
    OnClick := @NewRadioButton1Click;
  end;
end;

Last edited by pakrat2k2; 05-03-2018 at 21:02. Reason: code your entries so not wall of text
Reply With Quote
  #21  
Old 05-03-2018, 11:09
jitender jitender is offline
Registered User
 
Join Date: Feb 2018
Location: USA
Posts: 13
Thanks: 3
Thanked 1 Time in 1 Post
jitender is on a distinguished road
Getting these question marks???


DO NOT QUOTE ENTIRE MESSAGE, JUST REPLY

Last edited by pakrat2k2; 05-03-2018 at 21:04. Reason: remove wall of text
Reply With Quote
  #22  
Old 05-03-2018, 11:18
vint56 vint56 is offline
Registered User
 
Join Date: May 2011
Location: almaty
Posts: 52
Thanks: 118
Thanked 55 Times in 31 Posts
vint56 is on a distinguished road
Portable := TNewRadioButton.Create(WizardForm);
with Portable do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(110);
Top := ScaleY(175);
Width := ScaleX(100);
Height := ScaleY(17);
Caption := 'Portable';
Checked := CheckParam('/P');
OnClick := @NewRadioButton1Click;
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 := 'Installer';
Checked := not CheckParam('/P');
OnClick := @NewRadioButton1Click;
end;
end;


jitender + vint56 do NOT Quote messages ANY further, just reply to post.
useless to keep quoting previous messages.

Last edited by pakrat2k2; 05-03-2018 at 21:08.
Reply With Quote
The Following User Says Thank You to vint56 For This Useful Post:
jitender (06-03-2018)
  #23  
Old 06-03-2018, 00:29
jitender jitender is offline
Registered User
 
Join Date: Feb 2018
Location: USA
Posts: 13
Thanks: 3
Thanked 1 Time in 1 Post
jitender is on a distinguished road
So this script create two options in setup: 1)portable 2)silent install

So, it means if i select portable option then portable version of program will install or if i select silent then it will perform silent installation.Am i right?
Reply With Quote
Reply

Thread Tools
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
Ridge Racer Unbounded + innosetup installer clriboli PC Games - CD/DVD Conversions 2 31-01-2015 14:53
Fallout Nv Ultimate Edition 3xDVD9 to 2xDVD5 InnoSetup 1 LANGUAGE THADEADMAN2011 PC Games - CD/DVD Conversions 8 09-01-2015 20:41
Unarc innosetup gabrimor PC Games 7 08-12-2012 12:23



All times are GMT -7. The time now is 12:22.


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