View Single Post
  #1352  
Old 28-12-2023, 12:51
statics statics is offline
Registered User
 
Join Date: Dec 2023
Location: Brazil
Posts: 3
Thanks: 4
Thanked 1 Time in 1 Post
statics is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
Not supported this way.

However you could save all actions for different games in a single bat file and use
Code:
if
command.

Open CMD.exe and type
Code:
if /?
to get additional help there.
I did a "Frankenstein" in the script, and I managed to make it work, in a pretty horrible way hahaha
Then I will try to improve the code...
Code:
      
if IsComponentChecked(2) and not IsDoneError then
      begin
        PercentLabel.Hide;
        ElapsedLabel.Hide;
        RemainingLabel.Hide;
        if FileExists(ExpandConstant('{tmp}\xdelta3.exe')) then
        begin
          FileCopy(ExpandConstant('{tmp}\xdelta3.exe'), ExpandConstant('{app}\xdelta3.exe'), False);
          WizardForm.FilenameLabel.Caption := ExpandConstant('{cm:BatchExecution}');
          WizardForm.FilenameLabel.Font.Size := 12;
          WizardForm.FilenameLabel.Left := WizardForm.ProgressGauge.Left;
          WizardForm.FilenameLabel.Top := WizardForm.ProgressGauge.Top;
          WizardForm.FilenameLabel.Width := WizardForm.ProgressGauge.Width;
          WizardForm.FilenameLabel.Height := WizardForm.ProgressGauge.Height;
          WizardForm.ProgressGauge.Hide;
          if FileExists(ExpandConstant('{app}\english.pak.xdelta')) then
          begin
            RenameFile(ExpandConstant('{app}\Game\Localized\english.pak'), ExpandConstant('{app}\Game\Localized\english.pak.tmp'));
            Exec(ExpandConstant('{app}\xdelta3.exe'), ' -d -B536870912 -qfs "Game\Localized\english.pak.tmp" "english.pak.xdelta" "Game\Localized\english.pak"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
            DeleteFile(ExpandConstant('{app}\xdelta3.exe'));
            DeleteFile(ExpandConstant('{app}\english.pak.xdelta'));
          end;
        end;
      end;
Reply With Quote