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

Reply
 
Thread Tools Display Modes
  #1561  
Old 17-09-2023, 05:59
Lord.Freddy's Avatar
Lord.Freddy Lord.Freddy is offline
Registered User
 
Join Date: Apr 2022
Location: In Forest
Posts: 33
Thanks: 94
Thanked 23 Times in 16 Posts
Lord.Freddy is on a distinguished road
Quote:
Originally Posted by Dragonis40 View Post
function GetVolumeFreeSpace(const RootDir: PAnsichar; const OutSizeType: Byte): Double; external 'GetVolumeFreeSpace@files:Isab.dll stdcall delayload';

Good morning, how to extract the value from the function above?

I've tried:

value.Caption:=StrToInt(GetVolumeFreeSpace);
value.Caption:=FloatToStr(GetVolumeFreeSpace);
value.Caption:=StrToFloat(GetVolumeFreeSpace);

I have "invalid parameters" issue.

How can i fix the problem? Thanks in advance!
if you want to get free and total bytes or megabytes on a drive,
Use this function instead.
__________________
Life good be a Dream

Last edited by Lord.Freddy; 17-09-2023 at 07:06.
Reply With Quote
Sponsored Links
  #1562  
Old 23-09-2023, 01:10
shazzla shazzla is offline
Registered User
 
Join Date: Nov 2010
Location: Hunnia
Posts: 269
Thanks: 488
Thanked 94 Times in 71 Posts
shazzla is on a distinguished road
hi !

Need a little help here... I tried many combinations ,googled for it ,but no solution. (Standard ISDone)

I want to include/extract some files (XTool-BIK compressor) in my installer and extract them to a sub-folder in {tmp} but the subfolder is not created. Simply all files extracted to the same place ( {tmp} ) ,and it is not good....

Here comes a snippet :

#ifdef xBIK
Source: Include\XToolbpk\_libraries\bik.ini; DestDir: "{tmp}\xBIK\_libraries"; Flags: dontcopy recursesubdirs createallsubdirs
Source: Include\XToolbpk\_libraries\bk2.ini; DestDir: "{tmp}\xBIK\_libraries"; Flags: dontcopy recursesubdirs createallsubdirs
.......


#ifdef xBIK
ExtractTemporaryFile('bik.ini');
ExtractTemporaryFile('bk2.ini');


Whats wrong with my script ?
Reply With Quote
  #1563  
Old 23-09-2023, 09:35
audiofeel's Avatar
audiofeel audiofeel is online now
Registered User
 
Join Date: Jan 2013
Location: Russia
Posts: 240
Thanks: 303
Thanked 385 Times in 183 Posts
audiofeel is on a distinguished road
Quote:
Originally Posted by shazzla View Post
hi !

Need a little help here... I tried many combinations ,googled for it ,but no solution. (Standard ISDone)

I want to include/extract some files (XTool-BIK compressor) in my installer and extract them to a sub-folder in {tmp} but the subfolder is not created. Simply all files extracted to the same place ( {tmp} ) ,and it is not good....

Here comes a snippet :

#ifdef xBIK
Source: Include\XToolbpk\_libraries\bik.ini; DestDir: "{tmp}\xBIK\_libraries"; Flags: dontcopy recursesubdirs createallsubdirs
Source: Include\XToolbpk\_libraries\bk2.ini; DestDir: "{tmp}\xBIK\_libraries"; Flags: dontcopy recursesubdirs createallsubdirs
.......


#ifdef xBIK
ExtractTemporaryFile('bik.ini');
ExtractTemporaryFile('bk2.ini');


Whats wrong with my script ?
if not DirExists(ExpandConstant('{tmp}\xBIK')) then
CreateDir(ExpandConstant('{tmp}\xBIK'));
==or==
if not DirExists(ExpandConstant('{%temp}\xBIK')) then
CreateDir(ExpandConstant('{%temp}\xBIK'));
==or==
if not DirExists(ExpandConstant('{tmp}\xBIK')) then
ForceDirectories(ExpandConstant('{tmp}\xBIK'));
==check==
if DirExists(ExpandConstant('{tmp}\Utilities\SDK')) then
Log('Temp\xBIK\Folder Has Been Created.') else
Log('Temp\xBIK\Folder ERROR : NOT Created.');
source
__________________
https://steamcommunity.com/id/LiLBabushka
Reply With Quote
The Following User Says Thank You to audiofeel For This Useful Post:
shazzla (23-09-2023)
  #1564  
Old 23-09-2023, 09:51
shazzla shazzla is offline
Registered User
 
Join Date: Nov 2010
Location: Hunnia
Posts: 269
Thanks: 488
Thanked 94 Times in 71 Posts
shazzla is on a distinguished road
Thanks,but it only creates folders.
How to implement it in my script? (Above)
(Atm im away from my comp,btw tomorrow will try something with it)
Reply With Quote
  #1565  
Old 24-09-2023, 01:09
shazzla shazzla is offline
Registered User
 
Join Date: Nov 2010
Location: Hunnia
Posts: 269
Thanks: 488
Thanked 94 Times in 71 Posts
shazzla is on a distinguished road
tried. i still cant extract the files there.. ( {tmp}\xBIK )

Any solution ? Anyone ?
Reply With Quote
  #1566  
Old 29-09-2023, 17:53
Junior53's Avatar
Junior53 Junior53 is offline
Registered User
 
Join Date: May 2023
Location: Sri Lanka
Posts: 23
Thanks: 21
Thanked 21 Times in 8 Posts
Junior53 is on a distinguished road
Lightbulb :)

Quote:
Originally Posted by Junior53 View Post
01.how to show Component Page before the Select Dir Page (without creating custom forms or anything like that) in Inno setup 5.5.1 ee2 version?

02.how to calculate the required disk space based on the components selected and show in gigabyte on Component page in Inno setup 5.5.1 ee2 version?

I actually found an answer to this. But it doesn't work. If someone gives an answer to these two, it will be a great help <3

Code:
var
  Component1Size: Extended;
  Component2Size: Extended;
  // Add variables for each component as needed

procedure InitializeWizard;
begin
  Component1Size := 1048576;
  Component2Size := 2097152;
  // Assign sizes for other components if needed
end;

function GetTotalSize: String;
var
  TotalSize: Extended;
begin
  TotalSize := 0;
  if WizardForm.ComponentsList.Checked[0] then
    TotalSize := TotalSize + Component1Size;
  if WizardForm.ComponentsList.Checked[1] then
    TotalSize := TotalSize + Component2Size;
  // Add similar lines for other components if needed

  Result := FormatFloat('#,##0.00', TotalSize / 1024 / 1024 / 1024); // Convert bytes to gigabytes
end;

procedure ComponentsPageOnNextButtonClick(Sender: TWizardPage; var Continue: Boolean);
begin
  if Sender.ID = wpSelectComponents then
    WizardForm.DiskSpaceLabel.Caption := 'Required disk space: ' + GetTotalSize + ' GB';
end;
It's Actually 05:20 Am here in sri lanka and i finally found the answer to this LMAO
Reply With Quote
Reply

Thread Tools
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
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 06:51
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 07:57
Frequently Asked Questions Joe Forster/STA PC Games - Frequently Asked Questions 0 29-11-2005 10:48



All times are GMT -7. The time now is 23:03.


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