FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   INNO TROUBLESHOOT - Questions Here (https://fileforums.com/showthread.php?t=93193)

Cesar82 20-06-2020 07:22

1 Attachment(s)
Quote:

Originally Posted by bunti_o4u (Post 486448)
Thank you for helping me out..

This code didn't work.. I am trying something else and I don't know whether it would fix it or not..

Pl have a look at the attached script..

Try attached file.
I added 2 modes. (I commented on the mode with external functions)

bunti_o4u 20-06-2020 08:52

Quote:

Originally Posted by Cesar82 (Post 486453)
Try attached file.
I added 2 modes. (I commented on the mode with external functions)

Thank you very much..

it's working smooth as butter..

Cesar82 20-06-2020 09:55

1 Attachment(s)
Hey guys.

Can someone help me with a problem.
I was wondering if you have a way to convert hexadecimal Cyrillic characters (string) to a string using only inno setup functions or just the windows API without including additional libraries.
Summing up: I would like to convert: C := Chr($05E2);

I attached a file with a function that uses this, but I can't get it to work without including an additional library (I don't want to use Libs)
If some of the more knowledgeable users can help me, thank you in advance.
Please look at the attached code.

Razor12911 21-06-2020 03:24

Quote:

Originally Posted by Cesar82 (Post 486455)
Hey guys.

Can someone help me with a problem.
I was wondering if you have a way to convert hexadecimal Cyrillic characters (string) to a string using only inno setup functions or just the windows API without including additional libraries.
Summing up: I would like to convert: C := Chr($05E2);

I attached a file with a function that uses this, but I can't get it to work without including an additional library (I don't want to use Libs)
If some of the more knowledgeable users can help me, thank you in advance.
Please look at the attached code.

$05E2 is not Cyrillic, it's Hebrew
Chr accepts byte value and returns ASCII value, $0532 is a Word value
You must use #$???? For UTF-8 format, example C := #$05E2

Cesar82 21-06-2020 05:58

Quote:

Originally Posted by Razor12911 (Post 486464)
$05E2 is not Cyrillic, it's Hebrew
Chr accepts byte value and returns ASCII value, $0532 is a Word value
You must use #$???? For UTF-8 format, example C := #$05E2

Yes, I ended up putting the non-Cyrillic example, but it has the same meaning.
They are Word values.
I know that chr only supports Byte and these type of characters are word type.
But as in the script example, I need to convert a hexadecimal string read from the inno setup language file and convert it to a string (text).

Code:

S1 := '<0420><0443><0441><0441><043A><0438><0439>';
From this string above I need to return: "Русский"
I want to do this using only API or in the script itself if there is im way to do this without external DLL.
Please take a look at the script.

bunti_o4u 21-06-2020 11:37

1 Attachment(s)
Quote:

Originally Posted by Cesar82 (Post 486469)
Code:

S1 := '<0420><0443><0441><0441><043A><0438><0439>';
From this string above I need to return: "Русский"

I hope you want this...

BTW if you are on discord pl add me (discord id: buntionly4u#4466)
Code:

function InitializeSetup(): Boolean;
var
  S1, S2: String;
begin
  S1 := #$0420+#$0443+#$0441+#$0441+#$043A+#$0438+#$0439;
  MsgBox(S1, mbInformation, MB_OK);
end;


Cesar82 21-06-2020 12:51

Quote:

Originally Posted by bunti_o4u (Post 486473)
I hope you want this...

BTW if you are on discord pl add me (discord id: buntionly4u#4466)
Code:

function InitializeSetup(): Boolean;
var
  S1, S2: String;
begin
  S1 := #$0420+#$0443+#$0441+#$0441+#$043A+#$0438+#$0439;
  MsgBox(S1, mbInformation, MB_OK);
end;


Thanks for responding, but it's not that simple.
I get the string using the ISPP by calling the ReadIni function.
Check the Russian.isl language language of Inno Setup and try to read the key LanguageName= using GetIniString and try to transform it into text as in your message.
Download the ChrW script that you will understand.

KaktoR 22-06-2020 05:27

Hey guys&girls :p

I'm looking for a char (preferably) or icon (max 14x14px) to display free/need space, which can be understand in any language (or at least most).

Anyone have ideas?

I already had looked through windows charmap but can't find anything usefull.

bunti_o4u 22-06-2020 12:15

If we want to run any task during installation we can use below command which run the task or other program in a separate window:
Code:

function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
I just want to know - can we add console within wizard page instead of separate windows to show console details to user.

If yes then pl tell how to do it..

Thanks in advance..

DiCaPrIo 22-06-2020 13:25

Quote:

Originally Posted by bunti_o4u (Post 486490)
If we want to run any task during installation we can use below command which run the task or other program in a separate window:
Code:

function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
I just want to know - can we add console within wizard page instead of separate windows to show console details to user.

If yes then pl tell how to do it..

Thanks in advance..

here
download ISutils and got the CaptureConsole.iss
https://www.fileforums.com/showthread.php?t=99835

Cesar82 22-06-2020 13:56

1 Attachment(s)
Quote:

Originally Posted by bunti_o4u (Post 486490)
If we want to run any task during installation we can use below command which run the task or other program in a separate window:
Code:

function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
I just want to know - can we add console within wizard page instead of separate windows to show console details to user.

If yes then pl tell how to do it..

Thanks in advance..

If you use capture console you will not be able to interact.
Be aware that the commands used do not ask for confirmation.

bunti_o4u 22-06-2020 14:59

1 Attachment(s)
Quote:

Originally Posted by DiCaPrIo (Post 486493)
here
download ISutils and got the CaptureConsole.iss
https://www.fileforums.com/showthread.php?t=99835

Thanks.. It worked with my script. But it throwing weird output don't know why.

Quote:

Originally Posted by Cesar82 (Post 486494)
If you use capture console you will not be able to interact.
Be aware that the commands used do not ask for confirmation.

Thanks for info.

Cesar82 22-06-2020 15:34

Quote:

Originally Posted by bunti_o4u (Post 486495)
Thanks.. It worked with my script. But it throwing weird output don't know why.
Thanks for info.

If you want, send me the script by PM that I take a look.

DiCaPrIo 23-06-2020 01:57

[QUOTE=bunti_o4u;486495]Thanks.. It worked with my script. But it throwing weird output don't know why.
https://docs.microsoft.com/en-us/win...dconsoleoutput

BLACKFIRE69 23-06-2020 01:59

Quote:

Originally Posted by bunti_o4u (Post 486495)
Thanks.. It worked with my script. But it throwing weird output don't know why.
Thanks for info.

seems to be a incorrect encoding. :rolleyes:

DiCaPrIo 23-06-2020 02:39

Quote:

Originally Posted by BLACKFIRE69 (Post 486502)
seems to be a incorrect encoding. :rolleyes:

No it's correct you need to use ReadConsoleOutputW for exact output

bunti_o4u 23-06-2020 07:30

Quote:

Originally Posted by Cesar82 (Post 486496)
If you want, send me the script by PM that I take a look.

I have shared the script...

Quote:

Originally Posted by DiCaPrIo (Post 486503)
No it's correct you need to use ReadConsoleOutputW for exact output

still the same type of output..
I think it is writing the output per second....
Ideally it should write output if there is change in output string..

KaktoR 26-06-2020 10:42

Why :confused::D

https://i.imgur.com/gx9CBzl.png

pincoball 26-06-2020 12:10

Quote:

Originally Posted by KaktoR (Post 486551)
Why :confused::D

I guess it's from the ASIS.
Could you send the entire code? I don't get that warning when compiling any version of it

Edit: I get it as well with compact mode = 1, that code it's not used after preprocessing (ISPP), that's why it give you that warning
The code after line 4503 shown in the screen it's not present during the compiling

KaktoR 26-06-2020 12:22

I already got it :p

But it's not that bad anyway. I was just courios.

Cesar82 26-06-2020 17:28

Quote:

Originally Posted by KaktoR (Post 486551)
Why :confused::D

Was this capture not made before recompiling (Previous Debug)?

You would not have been able to compile with the variable ReloadComponents outside the area defined in the ISPP
Code:

ReloadComponents: = False;
Copy from the bottom and paste into the variable declaration this:
Code:

#if UseComponents == "1"
NOTES: The ISPP can also be used to limit a variable whether or not it is defined.
Code:

var
  //////////////////////// Check boxes ////////////////////////
  IconsCB, StartMenuCB, {#if CheckCRC == "1"}CRCCheckCB,{#endif} PauseCB, UninstallCB, LimitRAMCB: TNewCheckBox;


mustafaabd 27-06-2020 06:57

i have problem with xtool unpack

i use this method code to Compress


Code:

-mxprecomp+srep:m3f:a16:d1g+lolz:dtb1:d128m:mtt1:mt8:tt8:mc1023:fba0

and this arc.ini fail
Code:

[External compressor:lolz]
header = 0
packcmd = lolz_x64.exe {options} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp

[External compressor:srep]
header = 0
packcmd  = srep64 {-option } $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = srep64 -d -s -- <stdin> <stdout>

[External compressor:xprecomp]
header    = 0
packcmd  = xtool.exe e:precomp:t90p:zlib - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>

[External compressor:xzlib]
header    = 0
packcmd  = xtool.exe e:precomp:t90p,c128mb:zlib - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>

[External compressor:xzstd]
header    = 0
packcmd  = xtool.exe e:precomp:t90p:zstd - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>

[External compressor:xlz4]
header    = 0
packcmd  = xtool.exe e:precomp:t90p:lz4 - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>

[External compressor:xlzo]
header    = 0
packcmd  = xtool.exe e:precomp:t90p:lzo - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>


but

this error when use any Script to unpack

https://i.imgur.com/eNZpaMU.jpg

https://i.imgur.com/WAoRxYb.jpg

:confused:

mausschieber 27-06-2020 13:03

Quote:

Originally Posted by mustafaabd (Post 486568)
i have problem with xtool unpack

i use this method code to Compress


Code:

-mxprecomp+srep:m3f:a16:d1g+lolz:dtb1:d128m:mtt1:mt8:tt8:mc1023:fba0

and this arc.ini fail
Code:

[External compressor:lolz]
header = 0
packcmd = lolz_x64.exe {options} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp

[External compressor:srep]
header = 0
packcmd  = srep64 {-option } $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = srep64 -d -s -- <stdin> <stdout>

[External compressor:xprecomp]
header    = 0
packcmd  = xtool.exe e:precomp:t90p:zlib - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>

[External compressor:xzlib]
header    = 0
packcmd  = xtool.exe e:precomp:t90p,c128mb:zlib - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>

[External compressor:xzstd]
header    = 0
packcmd  = xtool.exe e:precomp:t90p:zstd - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>

[External compressor:xlz4]
header    = 0
packcmd  = xtool.exe e:precomp:t90p:lz4 - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>

[External compressor:xlzo]
header    = 0
packcmd  = xtool.exe e:precomp:t90p:lzo - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>


but

this error when use any Script to unpack

https://i.imgur.com/eNZpaMU.jpg

https://i.imgur.com/WAoRxYb.jpg

:confused:

as the Error says
RC_ERRCODE_INVALID_COMPRESSOR= -2; (* Invalid compression method or parameters *)

naynay 30-06-2020 03:53

Hi guys

I am a beginner at this, I am trying to repack a 60gb game (Heat) and I am confused on how to add FreeARC to my installer. Can someone give me a tutorial? I am super interested in repacking/compressing games. Can you send me some guides through private message?

Thanks

Masquerade 17-07-2020 07:40

Label not showing up
 
Hi all, dipping my feet back into the Inno pool again - I have gotten to the point where I am trying to add a label, but the label does not show up. Perhaps I am missing something?

[CODE]
Code:

var
 DesktopIconCheckBox: TNewCheckBox;
 Progress: TNewProgressBar;
 RequiredLabel: TLabel;

Code:

  Requiredlabel := TLabel.Create(WizardForm);
  with Requiredlabel do
  begin
  SetBounds(10, 160, 390, 25);
  RequiredLabel.Caption := ExpandConstant('{cm:RequiredSpace} {#Size}');
  end;

{#Size} is a predefined variable.

Code:

procedure CurPageChanged(CurPageID: integer);
begin
  if CurPageID = wpWelcome then
  begin
  Progress.Hide;
  RequiredLabel.Show;
  end;

This is the code for the lable, but it does not show when the installer is running:

https://i.imgur.com/7glfbBQ.png

The pink highlights were the label is meant to be.

KaktoR 17-07-2020 09:04

Try to change the parent of the label

Code:

Parent := WizardForm(.WelcomePage);
If this doesn't has any effect, try to make the position in relation to the DirEdit form
Code:

SetBounds(WizardForm.DirEdit.Left, WizardForm.DirEdit.Top + ScaleX(20), ScaleX(390), ScaleY(25));
Sometimes it's complicated because parents are different and positions get broke :D

PS: And if I were you, I would change the SetBounds integers and add ScaleX/Y to it :p

Masquerade 18-07-2020 09:03

Adding the parent made it work, thank you! That'll explain why I couldn't get other things to appear too.

Masquerade 04-08-2020 06:40

Hi, does Exec2 support extra parameters on files?

Say if I want to use 78372's directory patcher, it needs:

dpzapply patch.dpz {app} - but the normal application cannot understand {app}, so Inno has to execute it - can Inno do this?

KaktoR 04-08-2020 08:27

Yes it does.

Code:

function Exec2 (FileName, Param: PAnsiChar; Show: boolean):boolean;
Code:

Exec2(ExpandConstant('{app}\DirPatcher.exe'), 'dpzapply patch.dpz', true);

Masquerade 04-08-2020 09:12

Thanks, can Exec2 run .msi executables too? I tried with the XNA framework redist installer however Exec2 didn't seem to do anything. Maybe I mis typed the command.

Thank you for the helpful answer.

KaktoR 04-08-2020 09:35

I don't think so.

I don't remember exactly, but you have to run a system executable (from windows system folder) with the msi file as parameter. I really don't remember which file this was ... :p

Edit: https://jrsoftware.org/iskb.php?msi

Masquerade 04-08-2020 11:43

Quote:

Originally Posted by KaktoR (Post 487234)
I don't think so.

I don't remember exactly, but you have to run a system executable (from windows system folder) with the msi file as parameter. I really don't remember which file this was ... :p

Edit: https://jrsoftware.org/iskb.php?msi

Oh of course! I completely forgot about how msi exec worked. Thanks for all of the help!

BLACKFIRE69 05-08-2020 10:59

Does anyone know how to show up the decompression percentage of a file which in inside a archive with ISDone?

i mean if i decompress a archive like data1.bin with ISDone, i need to show up the percentage of a file (like tanks.pak) inside the archive.

for a example :=
Code:

Total            : 24% completed.
current archive  : data1.bin  (86% completed).
process file      : {app}\game\tanks.pak  (68% extracted)

(i hope you understand what i mean. :rolleyes:)

KaktoR 05-08-2020 11:32

I think this is at least possible with unarc.

At least the freearc example is able to do this (but I don't know if the example is using isdone).

BLACKFIRE69 05-08-2020 12:17

Quote:

Originally Posted by KaktoR (Post 487260)
I think this is at least possible with unarc.

At least the freearc example is able to do this (but I don't know if the example is using isdone).

freearc example ?

Epic Titan 69 21-02-2021 22:11

Quote:

Originally Posted by BLACKFIRE69 (Post 487262)
freearc example ?

Adding ISHASH.dll to Windows Phone Installer

Can Anyone Help Me Adding This Script

To The Below Script

Windows Phone Installer Script

Plz Do Help As I am A Newbie(usually Noob) In SCRIPTING SETUPS

steamsy 08-03-2021 15:28

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?

Cesar82 08-03-2021 18:51

1 Attachment(s)
Quote:

Originally Posted by BLACKFIRE69 (Post 487262)
freearc example ?

I think KaktoR refers to the example without IsDone as the example in the attachment.

Cesar82 08-03-2021 19:00

Quote:

Originally Posted by steamsy (Post 490757)
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".

steamsy 08-03-2021 20:25

Quote:

Originally Posted by Cesar82 (Post 490762)
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


All times are GMT -7. The time now is 06:37.

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