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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 31-05-2025, 13:16
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,689
Thanks: 1,106
Thanked 7,336 Times in 2,838 Posts
KaktoR is on a distinguished road
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.
__________________
Haters gonna hate
Reply With Quote
The Following 2 Users Say Thank You to KaktoR For This Useful Post:
insertdisc (31-05-2025), mausschieber (31-05-2025)
Sponsored Links
  #2  
Old 31-05-2025, 13:41
insertdisc insertdisc is offline
Registered User
 
Join Date: May 2025
Location: Earth
Posts: 12
Thanks: 5
Thanked 1 Time in 1 Post
insertdisc is on a distinguished road
CRC Errors

Quote:
Originally Posted by KaktoR View Post
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.
Reply With Quote
  #3  
Old 31-05-2025, 14:46
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by insertdisc View Post
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.
Reply With Quote
The Following User Says Thank You to Cesar82 For This Useful Post:
insertdisc (01-06-2025)
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
[Help] need Advanced Installer script with Razor1911's UltraArc module rez3vil Conversion Tutorials 3 15-04-2024 02:24
Portable Installer Inno Setup Script y_thelastknight Conversion Tutorials 59 23-10-2020 00:02
INDEX - Conversion Tutorial Index Razor12911 Conversion Tutorials 5 11-06-2020 02:05
Simple Arc Installer 78372 Conversion Tutorials 1 15-06-2017 15:37
MSC+Srep+lzma Simple Script Example gozarck Conversion Tutorials 10 07-09-2015 16:31



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


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