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-03-2019, 13:25
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 HunterEmrah View Post
I tried something but could not give the correct size to "Main files" component, on components page first time size is right, but after clicking components it's resets.

what i changed in script.iss


Given size in Settings.ini


I've uploaded a video for a better understanding.
https://streamable.com/wsa4j
Try this:
Leave as before the part you changed:
ComponentsSize:=0;

1. Then replace the original line (Line commented with //) with the line below in this part.
Code:
procedure ComponentsOnCheck(Sender: TObject);
var
  I: Integer;
begin
  ComponentsSize := 0;
  for I := 0 to GetArrayLength(CompIndexList) - 1 do
    if ComponentsList.Checked[CompIndexList[I]] then
      ComponentsSize := ComponentsSize + GetSizeBytes(GetIniString('ComponentsSettings', 'Component' + IntToStr(CompIndexList[I]) + '.Size', '0', ExpandConstant('{tmp}\Settings.ini')));
  //ComponentsDiskSpaceLabel.Caption := DiskSpaceMB(SetupMessage(msgComponentsDiskSpaceMBLabel), SizeBytesToMB(ComponentsSize, '', 0));
  ComponentsDiskSpaceLabel.Caption := DiskSpaceMB(SetupMessage(msgComponentsDiskSpaceMBLabel), SizeBytesToMB(ComponentsSize + GetSizeBytes(GetIniString('Settings', 'Size', '0', ExpandConstant('{tmp}\Settings.ini'))), '', 0));
end;
2/3. Then substitute the original line (Line commented with "//") by the line below (Required to replace 2 times in the script)
Code:
    //ComponentsDiskSpaceLabel.Caption := DiskSpaceMB(SetupMessage(msgComponentsDiskSpaceMBLabel), SizeBytesToMB(ComponentsSize, '', 0));
    ComponentsDiskSpaceLabel.Caption := DiskSpaceMB(SetupMessage(msgComponentsDiskSpaceMBLabel), SizeBytesToMB(ComponentsSize + GetSizeBytes(GetIniString('Settings', 'Size', '0', ExpandConstant('{tmp}\Settings.ini'))), '', 0));
Reply With Quote
The Following 2 Users Say Thank You to Cesar82 For This Useful Post:
KaktoR (01-04-2019), Titeuf (31-03-2019)
Sponsored Links
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 07:54.


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