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

Reply
 
Thread Tools Display Modes
  #1441  
Old 08-03-2021, 19:00
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 767
Thanks: 1,282
Thanked 1,634 Times in 556 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by steamsy View Post
I repacked a game using FreeArc (and XTool19H8, SREP and LOLZ), what tool is best to create a simple setup .exe (no graphics needed) to install redists / decompress the game files?
I didn't understand the version of XTool you used.

As you have already compressed the game, the same compressor/decompressor (or similar) must be used to decompress the game.
Maybe you can use Light Installer Script 1.0.0.7 and define the compressors you used in COMPRESSOR_GUI.exe.
You may need to replace the XTool exes with the one you used for compression (testing only).
If you can recompress the game you can use the latest "Light Installer Script v1.0.0.8".
Reply With Quote
The Following User Says Thank You to Cesar82 For This Useful Post:
steamsy (08-03-2021)
Sponsored Links
  #1442  
Old 08-03-2021, 20:25
steamsy steamsy is offline
Registered User
 
Join Date: Aug 2020
Location: USA
Posts: 2
Thanks: 3
Thanked 0 Times in 0 Posts
steamsy is on a distinguished road
Quote:
Originally Posted by Cesar82 View Post
I didn't understand the version of XTool you used.

As you have already compressed the game, the same compressor/decompressor (or similar) must be used to decompress the game.
Maybe you can use Light Installer Script 1.0.0.7 and define the compressors you used in COMPRESSOR_GUI.exe.
You may need to replace the XTool exes with the one you used for compression (testing only).
If you can recompress the game you can use the latest "Light Installer Script v1.0.0.8".
I'll try it out, thanks
Reply With Quote
  #1443  
Old 10-03-2021, 12:34
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 767
Thanks: 1,282
Thanked 1,634 Times in 556 Posts
Cesar82 is on a distinguished road
Does anyone know any way to send a text from one Inno Setup executable to another?
Similar to the SendMessage function.

Is there any way to use WM_COPYDATA with SendMessage in Inno Setup?
It is not possible to configure WindowProc without pointers in innoSetup (It is not possible to type for TCopyDataStruct).
Reply With Quote
  #1444  
Old 18-03-2021, 01:02
Ele's Avatar
Ele Ele is offline
Registered User
 
Join Date: Nov 2020
Location: Near Mars
Posts: 93
Thanks: 36
Thanked 89 Times in 37 Posts
Ele is on a distinguished road
Question Preprocessor Issue: Inno Setup

I've a problem. How to fix this?



Example:

Code:
Load.ini

[Form]
; Language
cache1=En_us
; Position: X
cache2=$DeskWidth$ - 95%
; Position: Y
cache3=$DeskHeight$ - 90%
; Form Width
cache4=450
; Form Height
cache5=450
; Form Border
cache6=no
 
cache7, cache8, ...
Code:
Test.iss

{Code]
#define public i
#define public FCacheMax 26
#dim public FCache[5]

#sub CheckFCache
  #define FCache[i] ReadIni(AddBackSlash(SourcePath)	+ "load.ini", "Form", StringChange("cacheInt","Int", Str(i)), "")
#endsub
#if ReadIni(AddBackSlash(SourcePath)	+ "load.ini", "Form", "cache1", "") != ""
  #redim FCache[Int(FCacheMax)]
  #for {i = 1; ReadIni(AddBackSlash(SourcePath)	+ "load.ini", "Form", StringChange("cacheInt","Int", Str(i)), "") !=""; i++} CheckFCache
#endif

function InitializeSetup(): Boolean;
begin
  MsgBox('{#FCache[1]}', mbConfirmation, MB_OK);
end;
__________________
- All life is an experiment. The more experiments you make the better. -
Reply With Quote
  #1445  
Old 18-03-2021, 03:58
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 767
Thanks: 1,282
Thanked 1,634 Times in 556 Posts
Cesar82 is on a distinguished road
Change the lines:
Code:
#define public FCache[i] ReadIni(...
...

#redim public FCache[Int(FCacheMax)]

Last edited by Cesar82; 18-03-2021 at 04:01.
Reply With Quote
  #1446  
Old 18-03-2021, 05:48
Ele's Avatar
Ele Ele is offline
Registered User
 
Join Date: Nov 2020
Location: Near Mars
Posts: 93
Thanks: 36
Thanked 89 Times in 37 Posts
Ele is on a distinguished road
Quote:
Originally Posted by Cesar82 View Post
Change the lines:
Code:
#define public FCache[i] ReadIni(...
...

#redim public FCache[Int(FCacheMax)]
Thanks @Cesar82, it works.
__________________
- All life is an experiment. The more experiments you make the better. -
Reply With Quote
  #1447  
Old 28-03-2021, 00:52
Masquerade's Avatar
Masquerade Masquerade is online now
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 729
Thanks: 157
Thanked 760 Times in 381 Posts
Masquerade is on a distinguished road
I know there's an if/else but is there an if/else for ifdef?

Example:

Code:
#define example

#ifdef example
     ExtractTemporaryFile('def.txt')
#else
     ExtractTemporaryFile('notdef.txt')
#endif
Would that work?
Reply With Quote
  #1448  
Old 28-03-2021, 00:54
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 3,551
Thanks: 931
Thanked 5,794 Times in 2,136 Posts
KaktoR is on a distinguished road
Yes there is

https://jrsoftware.org/ispphelp/inde...pic=directives
__________________
Haters gonna hate
Reply With Quote
  #1449  
Old 28-03-2021, 08:24
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 767
Thanks: 1,282
Thanked 1,634 Times in 556 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
I know there's an if/else but is there an if/else for ifdef?

Example:

Code:
#define example

#ifdef example
     ExtractTemporaryFile('def.txt')
#else
     ExtractTemporaryFile('notdef.txt')
#endif
Would that work?
Yes. For ISPP there is more than one way to use ELSE like:
Code:
#define example 5

#if defined(example)
  #if Example == 5
     ExtractTemporaryFile('def5.txt')
  #elif Example == 4
      ExtractTemporaryFile('def4.txt')
  #elif Example == 3
     ExtractTemporaryFile('def3.txt')
  #elif Example == 2
      ExtractTemporaryFile('def2.txt')
  #elif Example == 1
      ExtractTemporaryFile('def1.txt')
  #else
      ExtractTemporaryFile('def.txt')
  #endif
#else
     ExtractTemporaryFile('notdef.txt')
#endif
P.S: elif = else if
Reply With Quote
The Following 2 Users Say Thank You to Cesar82 For This Useful Post:
ffmla (28-03-2021), Prince4 (28-03-2021)
  #1450  
Old 07-05-2021, 12:24
Masquerade's Avatar
Masquerade Masquerade is online now
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 729
Thanks: 157
Thanked 760 Times in 381 Posts
Masquerade is on a distinguished road
Help with Progress Bar

Hello everyone, I am trying to add a progress bar to a script.

Code:
  Progress:= TNewProgressBar.Create(WizardForm);
  with Progress do 
  begin
  Parent := WizardForm;
  SetBounds(10, 150, 200, 0);
  Max:=1000;
  end;
Code:
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
  if OveralPct <=1000 then Progress.Position := OveralPct;
  Result := ISDoneCancel;
end;
Code:
if CurPageID = wpInstalling then
  begin
  ExtractTemporaryFile('unarc.dll')
  Progress.Show;
  DesktopIconCheckBox.Enabled := false;
  WizardForm.DirEdit.Hide;
  WizardForm.DirBrowseButton.Hide;
  ISDoneCancel:= 0
  ISDoneError := true;
  if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, 0, 0, 0, MainForm.Handle, 512, @ProgressCallback) then begin
    ChangeLanguage('English')
    begin
      repeat
        if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), false) then break;
        ISDoneError := false;
      until true;
        ISDoneStop;
      end; 
    end;
  end;
These above code snippets all are the code for the progress bar

I'm not entirely sure why the progress bar isn't showing up during installation.

I click "Install" to trigger wpInstalling.
THe directory box and the browse button disappear and the desktop icon checkbox is frozen. However, the progress bar does not appear.

Why could this be? Thanks!
Reply With Quote
  #1451  
Old 07-05-2021, 13:43
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 767
Thanks: 1,282
Thanked 1,634 Times in 556 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
Hello everyone, I am trying to add a progress bar to a script.

Code:
  Progress:= TNewProgressBar.Create(WizardForm);
  with Progress do 
  begin
  Parent := WizardForm;
  SetBounds(10, 150, 200, 0);
  Max:=1000;
  end;
Code:
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
  if OveralPct <=1000 then Progress.Position := OveralPct;
  Result := ISDoneCancel;
end;
Code:
if CurPageID = wpInstalling then
  begin
  ExtractTemporaryFile('unarc.dll')
  Progress.Show;
  DesktopIconCheckBox.Enabled := false;
  WizardForm.DirEdit.Hide;
  WizardForm.DirBrowseButton.Hide;
  ISDoneCancel:= 0
  ISDoneError := true;
  if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, 0, 0, 0, MainForm.Handle, 512, @ProgressCallback) then begin
    ChangeLanguage('English')
    begin
      repeat
        if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), false) then break;
        ISDoneError := false;
      until true;
        ISDoneStop;
      end; 
    end;
  end;
These above code snippets all are the code for the progress bar

I'm not entirely sure why the progress bar isn't showing up during installation.

I click "Install" to trigger wpInstalling.
THe directory box and the browse button disappear and the desktop icon checkbox is frozen. However, the progress bar does not appear.

Why could this be? Thanks!

Maybe it's because you set Parent = WizardForm.
If you are a native installer, the parent should be the wpInstalling page.

If you are an installer that uses the native interface, try setting the ProgressBar Parent to:

Code:
Parent: = WizardForm.ProgressGauge.Parent;
or 
Parent: = WizardForm.InstallingPage;
Reply With Quote
  #1452  
Old 07-05-2021, 14:12
DiCaPrIo DiCaPrIo is offline
Registered User
 
Join Date: Apr 2017
Location: Don't Know
Posts: 50
Thanks: 90
Thanked 49 Times in 30 Posts
DiCaPrIo is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
Hello everyone, I am trying to add a progress bar to a script.

Code:
  Progress:= TNewProgressBar.Create(WizardForm);
  with Progress do 
  begin
  Parent := WizardForm;
  SetBounds(10, 150, 200, 0);
  Max:=1000;
  end;
Code:
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
  if OveralPct <=1000 then Progress.Position := OveralPct;
  Result := ISDoneCancel;
end;
Code:
if CurPageID = wpInstalling then
  begin
  ExtractTemporaryFile('unarc.dll')
  Progress.Show;
  DesktopIconCheckBox.Enabled := false;
  WizardForm.DirEdit.Hide;
  WizardForm.DirBrowseButton.Hide;
  ISDoneCancel:= 0
  ISDoneError := true;
  if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, 0, 0, 0, MainForm.Handle, 512, @ProgressCallback) then begin
    ChangeLanguage('English')
    begin
      repeat
        if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), false) then break;
        ISDoneError := false;
      until true;
        ISDoneStop;
      end; 
    end;
  end;
These above code snippets all are the code for the progress bar

I'm not entirely sure why the progress bar isn't showing up during installation.

I click "Install" to trigger wpInstalling.
THe directory box and the browse button disappear and the desktop icon checkbox is frozen. However, the progress bar does not appear.

Why could this be? Thanks!
because you didn't give height value SetBounds(10, 150, 200, 40);//(l,t,w,h)
Reply With Quote
The Following 2 Users Say Thank You to DiCaPrIo For This Useful Post:
Cesar82 (07-05-2021), Masquerade (08-05-2021)
  #1453  
Old 09-05-2021, 06:10
Masquerade's Avatar
Masquerade Masquerade is online now
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 729
Thanks: 157
Thanked 760 Times in 381 Posts
Masquerade is on a distinguished road
Is there any way I can use ExtractTemporaryFile with the * wildcard?

Currently I have this:

Code:
[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy
However, how can I extract all of the files included above to {tmp} without manually specifiying everything (since I'm trying to desing the code so that anything in the Include folder will be extracted to {tmp})?
Reply With Quote
  #1454  
Old 09-05-2021, 06:50
DiCaPrIo DiCaPrIo is offline
Registered User
 
Join Date: Apr 2017
Location: Don't Know
Posts: 50
Thanks: 90
Thanked 49 Times in 30 Posts
DiCaPrIo is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
Is there any way I can use ExtractTemporaryFile with the * wildcard?

Currently I have this:

Code:
[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy
However, how can I extract all of the files included above to {tmp} without manually specifiying everything (since I'm trying to desing the code so that anything in the Include folder will be extracted to {tmp})?

HTML Code:
#define Resources "Files\*"

[Files]
Source: {#Resources}; DestDir: {tmp}; Flags: dontcopy

[Code]
function InitializeSetup:boolean;
begin
  #define FHandle
  #define FRst
  #define Mask Resources
  #sub ProcessFiles
  #define FileName FindGetFileName(FHandle)
  ExtractTemporaryFile('{#FileName}');
  #endsub
  #for {FHandle = FRst = FindFirst(Mask, 0); FRst; FRst = FindNext(FHandle)} ProcessFiles
  Result:=True;
end;

Last edited by DiCaPrIo; 09-05-2021 at 06:52.
Reply With Quote
The Following 2 Users Say Thank You to DiCaPrIo For This Useful Post:
El.Amigos (22-05-2021), Masquerade (09-05-2021)
  #1455  
Old 09-05-2021, 10:50
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 767
Thanks: 1,282
Thanked 1,634 Times in 556 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
Is there any way I can use ExtractTemporaryFile with the * wildcard?

Currently I have this:

Code:
[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy
However, how can I extract all of the files included above to {tmp} without manually specifiying everything (since I'm trying to desing the code so that anything in the Include folder will be extracted to {tmp})?
For not so old versions of Inno Setup you can use:
Code:
[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy

[ code]
function InitializeSetup(): Boolean;
begin
  ExtractTemporaryFiles('{tmp}\*.*');
  Result := True;
end;
If you use @files: in the path of any of the DLL functions they will be extracted automatically before the InitializeSetup function.
So I recommend you change to {tmp} in the DLL functions, or specify a destination other than {tmp} for them using the dontcopy flag.

Code:
function ISArcExtract(CurComponent: Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile: Boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external '[email protected]files:ISDone.dll stdcall delayload';

change to:

function ISArcExtract(CurComponent: Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile: Boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external '[email protected]{tmp}\ISDone.dll stdcall delayload';

Last edited by Cesar82; 09-05-2021 at 10:53.
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
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57
Frequently Asked Questions Joe Forster/STA PC Games - Frequently Asked Questions 0 29-11-2005 09:48



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


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