FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   ASIS: Advanced Simple Installer Script (https://fileforums.com/showthread.php?t=99481)

pincoball 03-04-2020 07:58

Hello, I'm trying to create an installer with some sample files.
In particular what I have done is compression with UltraARC and this method set as MASK:
Code:

xZLib+srep:m1f:l512+4x4:b128mb:lzma:a1:mfbt4:64m:fb273:mc1000000:lc8
Then if I compress in a single file everything is ok, but if I split in multiple files when using UltraARC the installer will finish the process without error and unpacking nothing but the uninstallation files.

N.B.: for decompression I uncommented XTOOL in the compression.ini file

What would be the more likely problem?

KaktoR 03-04-2020 08:08

Did you have Records.ini file? And set it right? UltraArc should create one automatically.

pincoball 03-04-2020 08:20

Quote:

Originally Posted by KaktoR (Post 485119)
Did you have Records.ini file? And set it right? UltraArc should create one automatically.

Yes, this one, divided in 10MB each

Edit: I also encounter the same problem using CIU v3. Am I the only one having this problem?

Edit 2: Tried different method for compression with UltraARC and having same problem as well

@KaktoR have you been able the reproduce the problem? I would like to test some old version of ASIS to see if the problem still occour

Code:

[Record1]
Type=Split
Source={src}\data1a.arc
Output={app}\data1.arc
Disk=1
[Record2]
Type=Split
Source={src}\data1b.arc
Output={app}\data1.arc
Disk=2
[Record3]
Type=Split
Source={src}\data1c.arc
Output={app}\data1.arc
Disk=3
[Record4]
Type=Split
Source={src}\data1d.arc
Output={app}\data1.arc
Disk=4
[Record5]
Type=Split
Source={src}\data1e.arc
Output={app}\data1.arc
Disk=5
[Record6]
Type=Split
Source={src}\data1f.arc
Output={app}\data1.arc
Disk=6
[Record7]
Type=Split
Source={src}\data1g.arc
Output={app}\data1.arc
Disk=7
[Record8]
Type=Split
Source={src}\data1h.arc
Output={app}\data1.arc
Disk=8
[Record9]
Type=Split
Source={src}\data1i.arc
Output={app}\data1.arc
Disk=9
[Record10]
Type=Freearc_Split
Source={app}\data1.arc
Output={app}
Disk=9


pincoball 07-04-2020 02:47

Since the splitting feature of UltraARC doesn't seem to work on both ASIS and CIU I was trying to use DiskSpan (the .bat script provided with UltraARC) which seems to be working.

But I have this problem: when the installer extracts the first slice then a message box asks for the second disk containing the next slice:

Quote:

Please Insert Disk With Data1.bin.002
If I select the requested file everything goes fine, so how can I make it select the file automatically?

KaktoR 07-04-2020 03:05

Yeah UltraArc merge is broken on both scripts.

I think it is already the case that the installer automatically take the next slice, but only if it's in same place as first archive/setup.exe.

pincoball 07-04-2020 03:27

Quote:

Originally Posted by KaktoR (Post 485168)
Yeah UltraArc merge is broken on both scripts.

I think it is already the case that the installer automatically take the next slice, but only if it's in same place as first archive/setup.exe.

Ok I see but the installer doesn't take it automatically in this case. Trying understanding how the script code works, it seems that somehow this request of the next slice (even though placed in the same folder as the setup file) is encoded in the first slice itself rather than the ASIS/CIU script. (confirmation + file opener selection)

Is that right?

Edit: I attach the recors.ini generated by DiskSpan

Code:

[Record1]               
Type=Freearc_Original
Source={src}\Data1.bin.001
Output={app}\Game Name
Disk=1


pincoball 07-04-2020 07:04

I think I've found the solution for DiskSpan based on the example script posted from Razor12911 at

https://www.fileforums.com/showthread.php?t=99627

What was missing is simply the initialization of DiskSpan inside the script (i.e. ClsInit), then in order to solve the problem of request of the next disk do as follow:

Look for this snippet of code inside the IS script:

Code:

if Data[i - 1].Arc[0] = 'Freearc_Original' then
[... other code ...]
if ISDoneError = False and not IniKeyExists('Records2', 'Type', ExpandConstant('{{#InternalRecords == "1" ? "tmp" : "src"}}\records.ini')) and ({#UseComponents} = 0) then
            begin
              if not ISArcExtract(0, 100, UpdateSource(Data[i - 1].Arc[1],SourceDir), Data[i - 1].Arc[2], '', false, '', ExpandConstant('{tmp}\arc.ini'), Data[i - 1].Arc[2], false) then
                ISDoneError := True;
            end else begin
              if not ISArcExtract(0, 0, UpdateSource(Data[i - 1].Arc[1],SourceDir), Data[i - 1].Arc[2], '', false, '', ExpandConstant('{tmp}\arc.ini'), Data[i - 1].Arc[2], false) then
                ISDoneError := True;
            end;
            end;

then substitute with:

Code:

if Data[i - 1].Arc[0] = 'Freearc_Original' then
[... other code ...]
if ISDoneError = False and not IniKeyExists('Records2', 'Type', ExpandConstant('{{#InternalRecords == "1" ? "tmp" : "src"}}\records.ini')) and ({#UseComponents} = 0) then
            begin
              ClsInit(ExpandConstant('{src}'),WizardForm.Handle);
              if not ISArcExtract(0, 100, UpdateSource(Data[i - 1].Arc[1],SourceDir), Data[i - 1].Arc[2], '', false, '', ExpandConstant('{tmp}\arc.ini'), Data[i - 1].Arc[2], false) then
                ISDoneError := True;
            end else begin
              if not ISArcExtract(0, 0, UpdateSource(Data[i - 1].Arc[1],SourceDir), Data[i - 1].Arc[2], '', false, '', ExpandConstant('{tmp}\arc.ini'), Data[i - 1].Arc[2], false) then
                ISDoneError := True;
            end;
            end;

The only difference is the line with ClsInit(...) function

zenmar 08-04-2020 06:19

Help me
 
I love this ASIS, thanks to the creator and anyone who get involved in making this installer... I have a problem when decompress my multiple archieves... I cant open my data1.bin.003 when the dialogue box showed n asked me to add it. Is there something I have to do with record.ini or anything else to solve it...? I lack in experience to do something with the script... I did some experiment and it's getting worse lol... Thanks in advance n sorry for my bad english...

pincoball 08-04-2020 09:56

Quote:

Originally Posted by zenmar (Post 485184)
I love this ASIS, thanks to the creator and anyone who get involved in making this installer... I have a problem when decompress my multiple archieves... I cant open my data1.bin.003 when the dialogue box showed n asked me to add it. Is there something I have to do with record.ini or anything else to solve it...? I lack in experience to do something with the script... I did some experiment and it's getting worse lol... Thanks in advance n sorry for my bad english...

Did you generate the splitted archive with DiskSpan? Can you post your records.ini file (and also the compression method)? Also what do you mean you can't open the file? Does it give an error or not let you select it?

zenmar 08-04-2020 15:04

Quote:

Originally Posted by pincoball (Post 485190)
Did you generate the splitted archive with DiskSpan? Can you post your records.ini file (and also the compression method)? Also what do you mean you can't open the file? Does it give an error or not let you select it?

Yes, I used DiskSpan that came with ASIS 7.1.2 with "xZLib+srep+LZ4x4" compress method. There was no error but when I wanted to continue the installation process there was no explorer window opened that led me to select ".003" extension. The dialogue box asking me to to add "Data1.bin.003" continuously appears when I click "open" Here's my original record.ini created by diskspan...

zenmar 08-04-2020 15:11

1 Attachment(s)
Quote:

Originally Posted by zenmar (Post 485198)
Yes, I used DiskSpan that came with ASIS 7.1.2 with "xZLib+srep+LZ4x4" compress method. There was no error but when I wanted to continue the installation process there was no explorer window opened that led me to select ".003" extension. The dialogue box asking me to to add "Data1.bin.003" continuously appears when I click "open" Here's my original record.ini created by diskspan...

Oops, sorry. This is the record.ini created by diskspan...

KaktoR 08-04-2020 15:16

Could you test with some small files and make 1mb archives? So you reach 3 or 4 archives per 1mb or so...

And send me your Setup.exe please. Because I can't reproduce this error atm.

zenmar 08-04-2020 21:17

1 Attachment(s)
Quote:

Originally Posted by KaktoR (Post 485201)
Could you test with some small files and make 1mb archives? So you reach 3 or 4 archives per 1mb or so...

And send me your Setup.exe please. Because I can't reproduce this error atm.

Sure... I just tested with small files to make multiple archieves... It run well untill ".004" and this time there's error dialogue alert showed... It said the archiev data corrupted

I Just figured out that the problem i said before occured when I made iso files of "Data1.bin.001+Setup.exe"... So when I mount the iso file and run the setup.exe from it, the error occured, I cant add next archieve (002, 003 etc). It stuck at dialogue box asking me next archieve files..

KaktoR 09-04-2020 01:09

Which compressor did you use for test archive?

If you run from ISO image, you have to switch to next ISO if Setup ask for next archive. I will change this so the file explorer will always open if next archive is not directly next to previous archive.

Edit: So I can say your archive is not broken. It extracts very well with batch file. I will look what's causing this.

zenmar 11-04-2020 03:20

Quote:

Originally Posted by KaktoR (Post 485207)
Which compressor did you use for test archive?

If you run from ISO image, you have to switch to next ISO if Setup ask for next archive. I will change this so the file explorer will always open if next archive is not directly next to previous archive.

Edit: So I can say your archive is not broken. It extracts very well with batch file. I will look what's causing this.

Sorry, little bit late to reply, been busy with some works... I used default settings of ASIS and default setting of DiskSpan that came with ASIS 7.1.2... Cz I need more time to learn the setting and how to edit it... It's out of my expertise lol....
And yes, I switched the iso, even I mount all of the iso files at the same times but still with same problem. Perhaps it's just my fault by setting it wrong... I'll try to compress some files with different setting when my works here finished... Thank you for ur help...

KaktoR 11-04-2020 14:30

1 Attachment(s)
Me and Cesar done some tests

First, as mentioned above by user pincoball, the clsinit function was missing. Strange enough, because I'm sure I never touched this. That's why no search window was opened. But whatever.

Unpack will always fail if using a third command (lzma, lzma-mt, lolz, razor, zstd), xtool+srep works fine. xtool or srep alone works fine too. Even with CIU and other scripts.

There are some possibilities:
1. The archive size of 1mb per part. Most likely, because with bigger sizes it works (option 6 is most used for whole games by users here). And I can confirm this myself, because I use XTool+srep+LZMA-MT most of the time and never got issues.
2. Bug inside cls-diskspan, unarc.dll or isdone.dll. unarc.dll and isdone.dll are pretty old and never got updated since years. Maybe some incompatibilities or bugs they have with diskspan or vise-versa.

So really nothing I could fix.

However, I added the clsinit back and the search file will now work.

pincoball 12-04-2020 02:52

1 Attachment(s)
Regarding the problem of the splitting feature of UltraARC, I think I've found the causes of it during the merging

First problem:

The split.exe executable were not extracted from the {tmp} directory:

Solution:

from

Code:

procedure UnpackCompressors();
var
  CurrFile: String;
begin
  ExtractTemporaryFile('Arc.ini');
  ...
  ExtractTemporaryFile('Facompress_mt.dll');

to

Code:

procedure UnpackCompressors();
var
  CurrFile: String;
begin
  ExtractTemporaryFile('Arc.ini');
  ...
  ExtractTemporaryFile('Facompress_mt.dll');
  ExtractTemporaryFile('Split.exe');

Second problem:

Edit: Removed: It was a problem that I made in my script

Edit: I also attach the records.ini I've been using just for reference

KaktoR 12-04-2020 03:28

It works for me.

I created archives as follow:

Code:

\Test\Disk1\records.ini
\Test\Disk1\Setup.exe
\Test\Disk1\data1a.arc

\Test\Disk2\data1b.arc
\Test\Disk2\data2a.arc

\Test\Disk3\data2b.arc

\Test\Disk4\data2c.arc
\Test\Disk4\data3.arc

Each archive contains a single test file and after unpacking all 3 files are inside destination folder.

pincoball 12-04-2020 03:38

But should I place the split files in different folders or can I just pust all together with also the setup.exe? Because for me it doesn't work.
Also I use records.ini as internal so to integrate it in the installer

KaktoR 12-04-2020 03:45

I did a second test, this time with external and internal records.ini

Code:

\Test\Disk1\Setup.exe
\Test\Disk1\data1a.arc
\Test\Disk2\data1b.arc
\Test\Disk3\data1c.arc
\Test\Disk4\data1d.arc
\Test\Disk5\data1e.arc
\Test\Disk6\data1f.arc
\Test\Disk7\data1g.arc

[Record1]
Type=Split
Source={src}\data1a.arc
Output={app}\data1.arc
Disk=1
[Record2]
Type=Split
Source={src}\data1b.arc
Output={app}\data1.arc
Disk=2
[Record3]
Type=Split
Source={src}\data1c.arc
Output={app}\data1.arc
Disk=3
[Record4]
Type=Split
Source={src}\data1d.arc
Output={app}\data1.arc
Disk=4
[Record5]
Type=Split
Source={src}\data1e.arc
Output={app}\data1.arc
Disk=5
[Record6]
Type=Split
Source={src}\data1f.arc
Output={app}\data1.arc
Disk=6
[Record7]
Type=Split
Source={src}\data1g.arc
Output={app}\data1.arc
Disk=7
[Record8]
Type=Freearc_Split
Source={app}\data1.arc
Output={app}
Disk=7

It works just fine.

Splitted files were initially meant for put them into different folders, but it also work if you put all together into one folder. If you put all into one folder, don't forget to change the disk number inside records.ini.

pincoball 12-04-2020 05:14

Ok I fixed it, it was a mistake I made in my script. Actually even leaving the Disk number in the records.ini unchanged works fine as well. Since it seems to be needed only to change the disk number that appears in the messagebox that appears in case of missing file

KaktoR 12-04-2020 08:11

Code:

v7.1.6
_____________________________________________________
- Fixed diskspan file search window
  > Clsinit function was missing and is now back
- Fixed positioning of CRC Checkbox on CompactMode
- If no Setup.ico is present, compiler will use default icon now instead of giving a error message while compile
- Added PMT support for MPZ
- Changed Time Remaining label
  > Before it showed "Infinity" if you used more then one record inside records.ini.
    If you use more then one record, Time Remaining will not show up anymore.

PS: Some of you may noticed the option "InternalCompression" inside Settings.ini. This setting does nothing until now, but in future there will be the possibility to use Inno build-in compression (lzma(2), zip) to use. I have to change big parts, especially for the time functions, progressbar and some other. I have no ETA but it may come in future.

XxAZAxX 12-04-2020 11:00

FIX Italian Custom Message
 
2 Attachment(s)
Hi, I am new in your world ... I have reviewed the files in "Italian" language since I am of Italian mother tongue, and I found errors scattered a little here and there, so I wanted to correct them and maybe share them for the other users I have thought it might help. Thanks for your splendid Script.

=============================================

pincoball 15-04-2020 11:00

I've been trying to repack this sample file (helloworld.dat) with this method (and UltraARC R7)

Code:

xZLib+srep:m1f:l512+4x4:b128mb:lzma:a1:mfbt4:64m:fb273:mc1000000:lc8
It always gives me Error -12 on failed CRC check. I've been repacking this files among other files but it gives the error only on this one.

Here there are the original file
https://gofile.io/?c=DWMX4V

and compressed one
https://gofile.io/?c=EqIKaK

Is there something I can do for decompress it correctly? I don't know if it is right posting it here since it is a rather generic problem

KaktoR 15-04-2020 11:31

This file has no streams, therefore xtool is useless on this.

exclude this file using xtool or try with ztool instead.

the file unpack works properly without xtool.

pincoball 15-04-2020 11:57

Quote:

Originally Posted by KaktoR (Post 485318)
This file has no streams, therefore xtool is useless on this.

exclude this file using xtool or try with ztool instead.

the file unpack works properly without xtool.

Sorry for the dumb question, but how do see that the file has no stream? And also have you been able to unpack it from the archive I posted or a recompressed one? What are at this point the difference of using Xtool and Ztool in this case?

I would say I surely lack of knowledge of about compression and would like to know how to see in advance what I should exclude in general when using Xtool.

KaktoR 15-04-2020 12:28

Throw an eye inside the detectors folder (I guess you know because UltraArc R7 is from there).

XTool has some bugs left, but not noticeable most of the time (well this time it is noticeable :D)

And no, I was not able to unpack the file, only recompress without xtool.

nicola16 18-04-2020 09:40

I found a code and modified it you say it looks like it?
Quote:

; Elamigos example username page ini file section
[INI]
Filename: {app}\uplay_r1_loader.ini; Section: Settings; Key: UserName; String: {code:GetUserName}


; Elamigos example username page code sections

[code]
var
UserNamePage : TInputQueryWizardPage;

procedure InitializeWizard;
begin
UserNamePage := CreateInputQueryPage(wpWelcome,
'Modificare il nome del giocatore', 'Nome del giocatore',
'Cambia il nome utente nel gioco');
UserNamePage.Add(' Username:', False);
end;

function UserNameForm_NextButtonClick(Page: TWizardPage): Boolean;
begin
Result := True;
end;

function GetUserName(Param: String): string;
begin
result := UserNamePage.Values[0];
end;
https://i.ibb.co/QH0FWhZ/Immagine.png

Masquerade 20-04-2020 08:23

Hey there, I'm using A.S.I.S 7.1.4 still but I'm encoutering a small issue.

I normally could use packjpg/packmp3 without issues (I just added them into Arc.ini and used the BPK folder to include them because anything that goes in there gets included in the installer).

Now however, when I try and decompress a file packed with either, it just crashes without an error message. I haven't changed any files in my compressor or installer before the issueso I'm not sure what could be causing it. It's only with these 2 compressors.

Also, on an unrelated note: is it possible to remove the Compressors.ini file and replace it with a simple Include folder that just intakes everytihng inside, just like the BPK folder?

Thanks again for the brilliant installer script.

KaktoR 21-04-2020 07:58

packjpg/packmp3 are already included inside MPZ folder.

Maybe the files cause the error (jpg/mp3). Did you try to unpack them with a batch file instead to see if the error comes actually from the script itself?

Yes it is possible, but you could also just move all files you need inside FreeArc folder.

Masquerade 23-04-2020 11:07

Quote:

Originally Posted by KaktoR (Post 485407)
packjpg/packmp3 are already included inside MPZ folder.

Maybe the files cause the error (jpg/mp3). Did you try to unpack them with a batch file instead to see if the error comes actually from the script itself?

Yes it is possible, but you could also just move all files you need inside FreeArc folder.

Sorry it took me a while to get back to you, but I did a bit of digging and when I was rearranging my Arc.ini in the Installer, I missed out a line causing everything to turn nasty:

Compress:
Code:

[External compressor:packjpg]
header = 0
packcmd = packjpg_x64 -np $$arcdatafile$$.jpg
datafile = $$arcdatafile$$.jpg
packedfile = $$arcdatafile$$.pjg
solid = 0

Unpack Arc.ini
Code:

[External compressor:packjpg]
packcmd = packjpg_x64 -np $$arcdatafile$$.jpg
datafile = $$arcdatafile$$.jpg
packedfile = $$arcdatafile$$.pjg
solid = 0

Added the header = 0 line back and now all is good. Thanks again for the great script.

Masquerade 24-04-2020 01:17

The issue with the Bonus Components Back Button going missing is still happening.

https://i.ibb.co/q7PNsxg/Screenshot-...0953-01-01.jpg

I suggested changing screen resolution.

Apologies for giving you all of these problems :( I really wish I could help.

KaktoR 24-04-2020 02:14

I think the problem is
Code:

Left        := ScaleX(WizardForm.ClientWidth - 80);
    Top        := ScaleY(WizardForm.ClientHeight - 28);

I will try to use absolute numbers without doing math.

Otherwise I don't know

KaktoR 28-04-2020 05:25

1 Attachment(s)
The previous update had some bugs left, here is the hotfix :D

Code:

v7.1.7 Hotfix
_____________________________________________________
- Fixed "OK" button on components page (CompactMode) with higher desktop resolutions
  > Hopefully this will be the last one
- Fixed "Background" button on FinishedPage with special settings
- Added a new [Executable#] section to Settings.ini
  > There will be set executables for shortcuts
- Reworked creating icons for your application
  > It is now possible to set/create more then one icon
  > Theoretical you can create an infinite number of shortcuts
- Updated all languages
- Some script cleanup, now be less unneccessary doubled codes and trash
- Hotfix: Fixed hash check if more then from 1 disc/iso is installed
  > Before the file was extracted on hash page, and if you were installing from more
    then one disc/iso and changed the disc/iso, Installer couldn't extract the file
    because Setup.exe was not in {src} folder anymore, so you had to remount the disc/iso
    and click "Retry" to start the hash check. This is now fixed.
- Hotfix: Fixed broken FinishPage if CRC checkbox was checked (NormalMode)

If you encounter more then tell me please

Masquerade 28-04-2020 08:24

I was wondering if it's possible to change the button placement in compact mode? I'm having a little play around with the layout and I can move everything so far except from the install, pause and cancel buttons. Is there something I'm missing?

Code:

  PauseButton := TNewButton.Create(WizardForm);
  with PauseButton do
  begin
    Parent  := WizardForm;
    Left    := ScaleX(10);
    Top    := ScaleY(310);
    Width  := ScaleX(225);
    Height  := ScaleY(23);
    Caption := ExpandConstant('{cm:Pause}');
    OnClick := @PauseButtonClick;
  end;

Here's an example. According to the above config, the button should be larger and on the left instead of the right, however ther button still appears in the top right.

I extended the installer slightly to 500 (Y) value, so that's why the button can go lower than the normal compact mode window.

Is there some kind of lock on the button / or can buttons not be resized or moved?

KaktoR 28-04-2020 08:31

There are two different PauseButton.

One for NormalMode, the other for CompactMode.

The button for compactmode is on line 3190

Masquerade 28-04-2020 11:17

Quote:

Originally Posted by KaktoR (Post 485506)
There are two different PauseButton.

One for NormalMode, the other for CompactMode.

The button for compactmode is on line 3190

I ripped out the Wizard Creation for Normal Mode because I didn't need it, the remaining wizard creation part is the lines for Compact mode (lines beginning with the notation /* BEGIN Compact Mode Wizard Creation */). I removed the ELSE statement.

So for me the Wizard Creation starts at 1938 however with the Normal mode section, it would begin at 2807 I do believe.

Edit: the above mentioned Code snippet is located on line 3092

KaktoR 28-04-2020 11:36

Search for CurPageID = wpWelcome

The pausebutton will be changed there too (this is ridiculous, I will change this too in next version). This settings will be higher priority then the first in initialize wizard.

Masquerade 29-04-2020 12:12

I managed to get everything sorted, this is how it's looking currently:

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

I'd like to add an image at the top, so I added this code (taken from the About section of the newest release):

Do you know how I could add an image to the top section? I tried using code snippets from the 7.1.7H release about section:


This went in after the //Begin Creation// notation:
Code:

ExtractTemporaryFile('image.bmp');
  LogoImage := TBitmapImage.Create(WizardForm);
  with LogoImage do begin
    Name            := 'LogoImage';
    Parent          := WizardForm;
    Left            := ScaleX(5);
    Top              := ScaleY(5);
    Width            := ScaleX(373);
    Height          := ScaleY(149);
    //Bitmap.AlphaFormat := afDefined;
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\image.bmp'));
    ReplaceColor := $0000ff
    ReplaceWithColor := WizardForm.Color
  end;

I also added this to the procedure InitialiseWizard section:

Code:

LogoImage: TBitmapImage;
However I cannot get the image to appear. I tried adding:

Code:

WizardForm.LogoImage.Show;
And:
Code:

WizardForm.LogoImage.Hide;
To dictate whether the image should be there or not in wpWelcome and wpInstalling etc...

However that returns the issue Missing Identifier LOGOIMAGE.

I wonder if you know about adding more images? I don't have any in the about section, I replaced that area of code with text from 7.1.4b.

Cesar82 29-04-2020 12:24

@Masquerade
try removing WizardForm. from lines:
WizardForm.LogoImage.Show; >> LogoImage.Show;
WizardForm.LogoImage.Hide; >> LogoImage.Hide;


All times are GMT -7. The time now is 10:02.

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