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)

insertdisc 31-05-2025 13:12

CRC Errors
 
Quote:

Originally Posted by mausschieber (Post 507902)
Setup.dll contains the files needed by the installer to unpack your game, and Records.ini contains the compressed file information needed to unpack it.

You can include these files, but to do so you must use the DSG tools by clicking on the TOOLS button and then on the "Setup DLL" tab.
You must unpack Setup.dll and place all the unpacked contents of Setup.dll and Records.ini in a folder named "Setup_DLL" next to the installer script and recompile the script.

and did you read the helpfiles from helpfolder there is all information about the Installer for DSG is also an helpfile

My steps were:
Run DSG
Extract Setup.dll
Copy to Setup_DLL
Changed the line in settings.ini (I'm not sure about this step. I copied the line with the .dat extension and renamed checksums.dat to Data1a-01 to match what DSG made.)
Compiled.
Get Error.
I'm fairly sure I followed the steps correctly.

KaktoR 31-05-2025 13:16

Looks like a bug. However under normal circumstances you cannot call {app} before the folder is actually initialized by inno setup, but in this case the crc check will start at the very end (I think it's the very last action if you enable all possible options), so I don't know why you get this error. I will ask César if he can fix this.

insertdisc 31-05-2025 13:41

CRC Errors
 
Quote:

Originally Posted by KaktoR (Post 507904)
Looks like a bug. However under normal circumstances you cannot call {app} before the folder is actually initialized by inno setup, but in this case the crc check will start at the very end (I think it's the very last action if you enable all possible options), so I don't know why you get this error. I will ask César if he can fix this.

I changed
Code:

begin
  I := 1;
  SetArrayLength(HashFileList, 0);
  while GetIniString('CRCCheck', 'HashFile' + IntToStr(I), '', ExpandConstant('{tmp}\Settings.ini')) <> '' do
  begin
    HashLine := GetIniString('CRCCheck', 'HashFile' + IntToStr(I), '', ExpandConstant('{tmp}\Settings.ini'));
    if ComponentsCheck(LineDecode(HashLine, 'Comp', '')) and TasksCheck(LineDecode(HashLine, 'Task', '')) and LanguagesCheck(LineDecode(HashLine, 'Lang', '')) then
    begin
      HashFile := ExpandFileName(ExpandConstant(Trim(LineDecode(HashLine, '', ''))));
      if FileExists(HashFile) or (Pos(LowerCase(ExpandConstant('{app}\')), LowerCase(HashFile)) > 0) then
      begin
        Y := GetArrayLength(HashFileList);
        SetArrayLength(HashFileList, Y + 1);
        HashFileList[Y].FileName := GenerateUniqueName(ExpandConstant('{tmp}'), '.dat');
        HashFileList[Y].BasePath := ExpandFileName(ExpandConstant(Trim(LineDecode(HashLine, 'DestDir', '{app}'))));
        HashFileList[Y].AppDirFile := Pos(LowerCase(ExpandConstant('{app}\')), LowerCase(HashFile)) > 0;
        HashFileList[Y].Algorithm := DSG_GetHashAlgorithm(Trim(LineDecode(HashLine, 'Algo', 'auto')));
        if (not HashFileList[Y].AppDirFile) and (not FileCopy(HashFile, HashFileList[Y].FileName, False)) then
          SetArrayLength(HashFileList, Y);
      end;
    end;

to
Code:

begin
  I := 1;
  SetArrayLength(HashFileList, 0);
  while GetIniString('CRCCheck', 'HashFile' + IntToStr(I), '', ExpandConstant('{tmp}\Settings.ini')) <> '' do
  begin
    HashLine := GetIniString('CRCCheck', 'HashFile' + IntToStr(I), '', ExpandConstant('{tmp}\Settings.ini'));
    if ComponentsCheck(LineDecode(HashLine, 'Comp', '')) and TasksCheck(LineDecode(HashLine, 'Task', '')) and LanguagesCheck(LineDecode(HashLine, 'Lang', '')) then
    begin
      HashFile := ExpandFileName(ExpandConstant(Trim(LineDecode(HashLine, '', ''))));
      if FileExists(HashFile) or (Pos(LowerCase(ExpandConstant('{tmp}\')), LowerCase(HashFile)) > 0) then
      begin
        Y := GetArrayLength(HashFileList);
        SetArrayLength(HashFileList, Y + 1);
        HashFileList[Y].FileName := GenerateUniqueName(ExpandConstant('{tmp}'), '.dat');
        HashFileList[Y].BasePath := ExpandFileName(ExpandConstant(Trim(LineDecode(HashLine, 'DestDir', '{app}'))));
        HashFileList[Y].AppDirFile := Pos(LowerCase(ExpandConstant('{tmp}\')), LowerCase(HashFile)) > 0;
        HashFileList[Y].Algorithm := DSG_GetHashAlgorithm(Trim(LineDecode(HashLine, 'Algo', 'auto')));
        if (not HashFileList[Y].AppDirFile) and (not FileCopy(HashFile, HashFileList[Y].FileName, False)) then
          SetArrayLength(HashFileList, Y);
      end;
    end;

and hash completed successfully. Though I'm not sure what long-term implications that would have.

Cesar82 31-05-2025 14:46

Quote:

Originally Posted by insertdisc (Post 507905)
I changed
Code:

begin
  I := 1;
  SetArrayLength(HashFileList, 0);
  while GetIniString('CRCCheck', 'HashFile' + IntToStr(I), '', ExpandConstant('{tmp}\Settings.ini')) <> '' do
  begin
    HashLine := GetIniString('CRCCheck', 'HashFile' + IntToStr(I), '', ExpandConstant('{tmp}\Settings.ini'));
    if ComponentsCheck(LineDecode(HashLine, 'Comp', '')) and TasksCheck(LineDecode(HashLine, 'Task', '')) and LanguagesCheck(LineDecode(HashLine, 'Lang', '')) then
    begin
      HashFile := ExpandFileName(ExpandConstant(Trim(LineDecode(HashLine, '', ''))));
      if FileExists(HashFile) or (Pos(LowerCase(ExpandConstant('{app}\')), LowerCase(HashFile)) > 0) then
      begin
        Y := GetArrayLength(HashFileList);
        SetArrayLength(HashFileList, Y + 1);
        HashFileList[Y].FileName := GenerateUniqueName(ExpandConstant('{tmp}'), '.dat');
        HashFileList[Y].BasePath := ExpandFileName(ExpandConstant(Trim(LineDecode(HashLine, 'DestDir', '{app}'))));
        HashFileList[Y].AppDirFile := Pos(LowerCase(ExpandConstant('{app}\')), LowerCase(HashFile)) > 0;
        HashFileList[Y].Algorithm := DSG_GetHashAlgorithm(Trim(LineDecode(HashLine, 'Algo', 'auto')));
        if (not HashFileList[Y].AppDirFile) and (not FileCopy(HashFile, HashFileList[Y].FileName, False)) then
          SetArrayLength(HashFileList, Y);
      end;
    end;

to
Code:

begin
  I := 1;
  SetArrayLength(HashFileList, 0);
  while GetIniString('CRCCheck', 'HashFile' + IntToStr(I), '', ExpandConstant('{tmp}\Settings.ini')) <> '' do
  begin
    HashLine := GetIniString('CRCCheck', 'HashFile' + IntToStr(I), '', ExpandConstant('{tmp}\Settings.ini'));
    if ComponentsCheck(LineDecode(HashLine, 'Comp', '')) and TasksCheck(LineDecode(HashLine, 'Task', '')) and LanguagesCheck(LineDecode(HashLine, 'Lang', '')) then
    begin
      HashFile := ExpandFileName(ExpandConstant(Trim(LineDecode(HashLine, '', ''))));
      if FileExists(HashFile) or (Pos(LowerCase(ExpandConstant('{tmp}\')), LowerCase(HashFile)) > 0) then
      begin
        Y := GetArrayLength(HashFileList);
        SetArrayLength(HashFileList, Y + 1);
        HashFileList[Y].FileName := GenerateUniqueName(ExpandConstant('{tmp}'), '.dat');
        HashFileList[Y].BasePath := ExpandFileName(ExpandConstant(Trim(LineDecode(HashLine, 'DestDir', '{app}'))));
        HashFileList[Y].AppDirFile := Pos(LowerCase(ExpandConstant('{tmp}\')), LowerCase(HashFile)) > 0;
        HashFileList[Y].Algorithm := DSG_GetHashAlgorithm(Trim(LineDecode(HashLine, 'Algo', 'auto')));
        if (not HashFileList[Y].AppDirFile) and (not FileCopy(HashFile, HashFileList[Y].FileName, False)) then
          SetArrayLength(HashFileList, Y);
      end;
    end;

and hash completed successfully. Though I'm not sure what long-term implications that would have.

You did a "hack". LOL

If your hash file source path is the installation folder, you're in trouble.

KaktoR 31-05-2025 15:20

1 Attachment(s)
Try this

insertdisc 31-05-2025 19:12

Quote:

Originally Posted by KaktoR (Post 507908)
Try this

Code:

Line 4492:
Column 7:
Unknown identifier 'DSG_FinishUninstallFilesList'

It errors out during compile.

KaktoR 01-06-2025 01:35

Works fine here. Did you changed something in DSG_Module.iss?

insertdisc 01-06-2025 08:22

Quote:

Originally Posted by KaktoR (Post 507914)
Works fine here. Did you changed something in DSG_Module.iss?

Negative. I just tried with a Vanilla v7.5.0 and the fix script and 2 different extracted setup.DLL files. Same error.

insertdisc 01-06-2025 08:27

Quote:

Originally Posted by KaktoR (Post 507914)
Works fine here. Did you changed something in DSG_Module.iss?

I got the script to compile. I had forgotten the hotfix with the module in it. I'll test the CRC fix ASAP. Thanks for your help so far.

Edit: Everything seems to be working as intended! Thank you!

insertdisc 01-06-2025 15:39

Typo
 
Found a typo. Just thought you should know.

"Your system does partially meet the hardware reuirements."

insertdisc 03-06-2025 06:34

Title scale
 
Is there a way to scale the title bar height and left padding with DPI changes as well? Things start getting clipped/overlapped at uhd resolutions and over %200 scale. I can edit the height in a fixed way by editing the vsf but I'm sure that will be huge on lower resolutions. Am I walking into a dead end here?

PHM2D 18-08-2025 08:03

Compact Mode Components Bug
 
I think I found a bug for the components page when using compact mode (Hotfix 8).
This bug makes the Start Menu Checkbox stay visible on components page when using compact mode.


:) FIX:

in this section:
Code:

ComponentsPageVisible := (not ComponentsPageVisible);
we should add
Code:

StartMenuCB.Visible
under the
Code:

#if !UpdateMode
as well so it would look like this:
Code:

      #if !UpdateMode
        IconsCB.Visible := (not ComponentsPageVisible);
        StartMenuCB.Visible := (not ComponentsPageVisible);
        UnInstallCB.Visible := (not ComponentsPageVisible);
      #endif

the same should be done for the tasks' page.

KaktoR 18-08-2025 08:23

1 Attachment(s)
Thanks, fixed.

The same should be added on
Code:

procedure TasksPageClick(Sender: TObject);
Code:

StartMenuCB.Visible := (not TasksPageVisible);

trillestdwane 19-08-2025 15:24

Is there anyway to modify the script to have a separate audio file play during the splash screen, and then start the normal music file when the splash ends? I tried using a LLM to analyze the script and Settings.ini to see if it could add that in, and it couldn't. Not really an important feature, but I was just wondering :D

PHM2D 20-08-2025 03:35

Start Menu Shortcut Bugs!
 
When I checked the start menu shortcut creator checkbox, I realized that the shortcut is not created inside the programs folder of the start menu. However it was created when I checked the desktop shortcut creator checkbox. So I fixed it like this:
Code:

//#if !CompactMode || !UpdateMode
//  function CreateIconsDesktop: Boolean;
//  begin
//    Result := (not IsDoneError) and IconsCB.Checked;
//  end;

//  function IsUninstallable: Boolean;
//  begin
//    Result := UninstallCB.Checked;
//  end;
//#endif

//#if !CompactMode
//function CreateIconsStartMenu: Boolean;
//begin
//  Result := (not IsDoneError) and (not StartMenuCB.Checked);
//end;
//#endif

function CreateIconsDesktop: Boolean;
begin
  Result := (not IsDoneError) and Assigned(IconsCB) and IconsCB.Checked;  // your “desktop shortcut” checkbox
end;

function CreateIconsStartMenu: Boolean;
begin
  Result := (not IsDoneError) and Assigned(StartMenuCB) and StartMenuCB.Checked;
end;

function IsUninstallable: Boolean;
begin
  Result := Assigned(UninstallCB) and UninstallCB.Checked;
end;

procedure StartMenuCBClick(Sender: TObject);
var
  CB: TNewCheckBox;
begin
  if (Sender is TNewCheckBox) then CB := TNewCheckBox(Sender) else CB := StartMenuCB;
  if Assigned(WizardForm) and Assigned(CB) then
  begin
    WizardForm.GroupEdit.Enabled := CB.Checked;
    WizardForm.GroupBrowseButton.Enabled := CB.Checked;
  end;
end;

Then called it inside the
Code:

StartMenuCB := TNewCheckBox.Create(WizardForm);
like this:
Code:

      Checked  := False;            // 1) set default state
      OnClick  := @StartMenuCBClick; // 2) wire the handler
      StartMenuCBClick(StartMenuCB); // 3) Synchronize the UI to the current checkbox state
    end;

I don't know if anyone has experienced this bug but here is my solution nevertheless! :)


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

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