Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 25-04-2018, 07:38
julenza julenza is offline
Registered User
 
Join Date: Apr 2018
Location: italy
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
julenza is on a distinguished road
you have to write DiskSpanning = yes before setup and the problem will be solved

you have to write DiskSpanning = yes before setup and the problem will be solved.

Hi Giuseppe.

Quote:
Originally Posted by JRD! View Post
Hi dudes,

I have a little problem, I want to get the weight of greater than +2Gb file with Inno Setup 5.5.1 ee2, I try many things without success, can someone help me ?

Many thanks!

Example:

Code:
#define FileSize "D:\Game\Grand Theft Auto V\x64q.rpf"

[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[_Code]
const
    // Some constants for CreateFile ().
    GENERIC_READ           = $80000000;
    GENERIC_WRITE          = $40000000;
    GENERIC_EXECUTE        = $20000000;
    GENERIC_ALL            = $10000000;
    FILE_SHARE_READ        = 1;
    FILE_SHARE_WRITE       = 2;
    FILE_SHARE_DELETE      = 4;
    CREATE_NEW             = 1;
    CREATE_ALWAYS          = 2;
    OPEN_EXISTING          = 3;
    OPEN_ALWAYS            = 4;
    TRUNCATE_EXISTING      = 5;
    FILE_READ_ATTRIBUTES   = $80;
    FILE_WRITE_ATTRIBUTES  = $100;

    // General Win32.
    INVALID_HANDLE_VALUE   = -1;

function CloseHandle (hHandle: THandle): Boolean;
  external '[email protected] stdcall';

function CreateFile (
    lpFileName             : String;
    dwDesiredAccess        : Cardinal;
    dwShareMode            : Cardinal;
    lpSecurityAttributes   : Cardinal;
    dwCreationDisposition  : Cardinal;
    dwFlagsAndAttributes   : Cardinal;
    hTemplateFile          : Integer
): Integer;
 external '[email protected] stdcall';

function GetFileSize (hFile: THandle; var lpFileSizeHigh: Integer): Integer;
  external '[email protected] stdcall';

function GetTheFileSize (FileName: String): Integer;
var
    hFile:  THandle;
    iSize:  Integer;
    hSize:  Integer;
begin
    hFile := CreateFile (FileName,
        GENERIC_READ,// Desired access.
        FILE_SHARE_READ + FILE_SHARE_WRITE,
        0,                // Security attributes.
        OPEN_EXISTING,
        FILE_ATTRIBUTE_TEMPORARY,
        0);
    if (INVALID_HANDLE_VALUE = hFile) then
    begin
        Result := 0;
        Exit;
    end;
    iSize := GetFileSize (hFile, hSize);
    CloseHandle (hFile);
    Result := iSize;
end;

function InitializeSetup():Boolean;
var
  FileSize: integer;
begin
  FileSize := GetTheFileSize(ExpandConstant('{#FileSize}'));
  MsgBox(IntToStr(FileSize), mbInformation, mb_OK);
  Result := False;
end;
Reply With Quote
 


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
BlackBox v2 y_thelastknight Conversion Tutorials 567 11-03-2025 07:16
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
Inno Setup: Additional Libraries altef_4 Conversion Tutorials 50 21-10-2020 09:59
Useful Dll for Inno Setup users peterf1999 Conversion Tutorials 88 01-12-2017 16:00
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57



All times are GMT -7. The time now is 17:02.


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