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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 29-11-2013, 18:00
Smurf Stomper's Avatar
Smurf Stomper Smurf Stomper is offline
Registered User
 
Join Date: Feb 2007
Location: EU
Posts: 118
Thanks: 0
Thanked 10 Times in 8 Posts
Smurf Stomper is on a distinguished road
Inno Setup - check GPU DirectX version?

I would like to add a check to my scripts that will determine if the currently installed GPU is DX 11 capable - which would then allow additional parameters in the script to be executed. For example, my current Far Cry 3 script has the following line:

Code:
[Icons]
Name: {userdesktop}\Far Cry 3; Filename: {app}\bin\FarCry3.exe; Parameters: -offline; WorkingDir: {app}\bin
I would change it to something like this:

Code:
[Icons]
Name: {userdesktop}\Far Cry 3; Filename: {app}\bin\FarCry3.exe; Parameters: -offline; WorkingDir: {app}\bin
Name: {userdesktop}\Far Cry 3; Filename: {app}\bin\FarCry3_D3D11.exe; Parameters: -offline; WorkingDir: {app}\bin
Adding the second line creates the option for a shortcut to the DX11-specific exe to be shortcutted on the desktop. What I need help with is setting some parameter in the two lines that only causes the appropriate one to be executed as the setup installs, based on the system's directX gpu capability.

For example, when a setup has x64 specific files, I can designate the following check (using my Rage script as an example):

Code:
[Icons]
Name: {userdesktop}\Rage; Filename: {app}\Rage.exe; WorkingDir: {app}\; Tasks: desktopshortcut; Check: not isWin64
Name: {userdesktop}\Rage (64-bit); Filename: {app}\Rage64.exe; WorkingDir: {app}\; Tasks: desktopshortcut; Check: isWin64
the "isWin64" check is built in to inno setup, so I don't have to put a specific function in the CODE section. Unfortunately, no GPU directX check is built in that I'm aware of.

Anyone have a custom 'check' function already coded up that they'll share?
Reply With Quote
Sponsored Links
  #2  
Old 29-11-2013, 23:01
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,749
Thanks: 2,170
Thanked 11,206 Times in 2,307 Posts
Razor12911 is on a distinguished road
Link
Reply With Quote
  #3  
Old 30-11-2013, 06:52
pakrat2k2's Avatar
pakrat2k2 pakrat2k2 is offline
Moderator
 
Join Date: Apr 2005
Location: Canada
Posts: 7,209
Thanks: 3,040
Thanked 9,043 Times in 3,086 Posts
pakrat2k2 is on a distinguished road
post #65 ( get sysinfo exe ) & post 72 ( xml code ) are the posts you need to look at specifically. ( For Razor's link )
Reply With Quote
  #4  
Old 30-11-2013, 10:13
altef_4's Avatar
altef_4 altef_4 is offline
Registered User
 
Join Date: Mar 2012
Location: Ukraine
Posts: 361
Thanks: 248
Thanked 1,022 Times in 239 Posts
altef_4 is on a distinguished road
here link
link ver.2

Last edited by altef_4; 30-11-2013 at 11:13.
Reply With Quote
The Following 2 Users Say Thank You to altef_4 For This Useful Post:
jamel2013 (13-10-2014), pakrat2k2 (30-11-2013)
  #5  
Old 01-12-2013, 12:30
Smurf Stomper's Avatar
Smurf Stomper Smurf Stomper is offline
Registered User
 
Join Date: Feb 2007
Location: EU
Posts: 118
Thanks: 0
Thanked 10 Times in 8 Posts
Smurf Stomper is on a distinguished road
altef, you the man. Thanks!!!!!
Reply With Quote
  #6  
Old 08-12-2013, 08:37
Smurf Stomper's Avatar
Smurf Stomper Smurf Stomper is offline
Registered User
 
Join Date: Feb 2007
Location: EU
Posts: 118
Thanks: 0
Thanked 10 Times in 8 Posts
Smurf Stomper is on a distinguished road
Altef, one question: I'm using the code from your 'link ver. 2' in your post, and noticed how your listed out all the different directX versions (except for 11.1) that are out so far.

If a new version of directX is released in the future, say v12.0, and future gpus are at that version, will this code still work? It seems the code looks at specific directX versions, not doing a general GPU ability check, like this pseudocode idea:

Quote:
function: check GPU directX version
if check result <11.0, then shortcut to farcry3.exe
else shortcut to farcry3_d3d11.exe
Obviously this is just my idea - I like the idea of having a check after each line in the [icons] section - I'm just giving you an idea in case the code you graciously wrote up won't work for future directX versions.

Let me know.. thanks for your help!

Last edited by Smurf Stomper; 08-12-2013 at 08:41.
Reply With Quote
  #7  
Old 09-12-2013, 07:23
altef_4's Avatar
altef_4 altef_4 is offline
Registered User
 
Join Date: Mar 2012
Location: Ukraine
Posts: 361
Thanks: 248
Thanked 1,022 Times in 239 Posts
altef_4 is on a distinguished road
Quote:
Originally Posted by Smurf Stomper View Post
Altef, one question: I'm using the code from your 'link ver. 2' in your post, and noticed how your listed out all the different directX versions (except for 11.1) that are out so far.

If a new version of directX is released in the future, say v12.0, and future gpus are at that version, will this code still work? It seems the code looks at specific directX versions, not doing a general GPU ability check, like this pseudocode idea:



Obviously this is just my idea - I like the idea of having a check after each line in the [icons] section - I'm just giving you an idea in case the code you graciously wrote up won't work for future directX versions.

Let me know.. thanks for your help!
this code will work, all what you need it's add new check like this
Code:
function DX12:boolean;
begin
  Case GetDXV of
    '9':    Result:=False;
    '9.0c': Result:=False;
    '10':   Result:=False;
    '10.1': Result:=False;
    '11':   Result:=False;
    '11.1': Result:=False;
    '11.2': Result:=False;
    '12': Result:=True;
  else
  Result:=False;
  end;
end;
Reply With Quote
The Following User Says Thank You to altef_4 For This Useful Post:
pakrat2k2 (09-12-2013)
  #8  
Old 05-10-2014, 06:10
Fahimft2014 Fahimft2014 is offline
Registered User
 
Join Date: Jul 2014
Location: Bangladesh
Posts: 2
Thanks: 3
Thanked 0 Times in 0 Posts
Fahimft2014 is on a distinguished road
Exclamation

Hey,the exec2 function is not working for me.I have done everything to solve this but in vain.No files are executing and no error is occured.Please someone help me to solve this problem.
Reply With Quote
Reply


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
Mass Effect Collection - 5xDVD9 [3 GAMES + ALL DLCs + INNO SETUP + TRILOGY COMPAT. ] REV0 PC Games - CD/DVD Conversions 13 01-12-2019 06:48
The Amazing Spider-Man + DLC (2xDVD5 - Inno Setup) Fabioddq PC Games - CD/DVD Conversions 8 28-07-2014 16:03
Inno Setup Secure Installer thilanka Software 0 21-01-2013 19:47
Mass Effect Collection - 8xDVD5 [3 GAMES + ALL DLCs + INNO SETUP + TRILOGY COMPAT. ] REV0 PC Games - CD/DVD Conversions 31 11-11-2012 12:22
Dark Souls - Inno Setup - This is not a conversion, it's just custom installer Fabioddq PC Games - CD/DVD Conversions 4 26-10-2012 19:48



All times are GMT -7. The time now is 07:21.


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