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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-02-2024, 00:11
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by Tihiy_Don View Post
Maybe it will be useful to someone.
Automatically set the unpacking parameters depending on the amount of RAM:


Code:
function GetRamMemory: Integer;
var i: Integer;
s: String;
begin
s:=MbOrTb(RamInfo.TotalRam, 0);
for i:=length(s) downto 1 do
if not (s[i] in ['0','1','2','3','4','5','6','7','8','9']) then delete(s,i,1);

Result:=StrToInt(s);
end;

procedure CurStepChanged(CurStep: TSetupStep);
var
XValue, LRamValue, LCpuValue, SValue: String;
begin
case GetRamMemory of
0..2:
begin
XValue:= 't4';
SValue:= '512mb';
LRamValue:= '512mb';
LCpuValue:= '4';
end;
3..4:
begin
XValue:= 't4';
SValue:= '768mb';
LRamValue:= '768mb';
LCpuValue:= '4';
end;

// ....
end;


how about this way? i think it's more convenient.


Code:
procedure _GetMeRAMInGB;
var
  MyRamInGB: Integer;
begin
  // Note:  ARamUsage.TotalRam --> Total RAM in MB.

  MyRamInGB := Round(ARamUsage.TotalRam / 1024);  // 0, 1, 2, 3, ....

  case MyRamInGB of
    0..2:
    begin
      MsgBox('RAM: 0..2 GB', mbInformation, MB_OK);
    end;

    3..4:
    begin
      MsgBox('RAM: 3..4 GB', mbInformation, MB_OK);
    end;

    // ....

    else
    begin
      MsgBox('Are you sure you really have RAM installed?  ;)', mbError, MB_OK);
    end;
  end;
end;
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (08-02-2024), Tihiy_Don (08-02-2024)
Sponsored Links
  #2  
Old 08-02-2024, 01:58
Tihiy_Don Tihiy_Don is offline
Registered User
 
Join Date: Mar 2023
Location: Los Angeles Lakers
Posts: 43
Thanks: 91
Thanked 26 Times in 18 Posts
Tihiy_Don is on a distinguished road
Quote:
Originally Posted by BLACKFIRE69 View Post
how about this way? i think it's more convenient.


Code:
procedure _GetMeRAMInGB;
var
  MyRamInGB: Integer;
begin
  // Note:  ARamUsage.TotalRam --> Total RAM in MB.

  MyRamInGB := Round(ARamUsage.TotalRam / 1024);  // 0, 1, 2, 3, ....

  case MyRamInGB of
    0..2:
    begin
      MsgBox('RAM: 0..2 GB', mbInformation, MB_OK);
    end;

    3..4:
    begin
      MsgBox('RAM: 3..4 GB', mbInformation, MB_OK);
    end;

    // ....

    else
    begin
      MsgBox('Are you sure you really have RAM installed?  ;)', mbError, MB_OK);
    end;
  end;
end;
It's more convenient, yes. I did this because I thought that it could only be done through the MbOrTb function and asked about it in the FMX Q&A topic, but I never got an answer, so I did and already released a repack on the torrent tracker, the main thing is that it works.

I was not afraid to make it on FMX and release it, I even worked on supporting 32-bit machines.

Last edited by Tihiy_Don; 08-02-2024 at 02:05.
Reply With Quote
The Following 2 Users Say Thank You to Tihiy_Don For This Useful Post:
ADMIRAL (10-02-2024), BLACKFIRE69 (08-02-2024)
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
Windows Fluent Effects Standalone API - InnoSetup / VCL / FXM BLACKFIRE69 Conversion Tutorials 0 15-11-2023 17:35
Windows Phone Installer similar to razor12911's original design? Kitsune1982 Conversion Tutorials 0 02-07-2020 13:04
INDEX - Conversion Tutorial Index Razor12911 Conversion Tutorials 5 11-06-2020 02:05
Frequently Asked Questions Joe Forster/STA PC Games - Frequently Asked Questions 0 29-11-2005 09:48



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


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