You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spinning off of #442 ... (tagging @pcen , thanks for confirming how it works on Win11)
Based on our limited sample size, it appears that on Windows 11, the Civ III install path is not set in the registry upon installing the game via Steam. The PR listed above added a check for Civ III in the default Steam folder.
However, not everyone installs Steam to the default folder, and even for those who do, they may install games on a secondary drive. This issue is to handle those cases.
For the first part, it looks like the install path is stored in the registry at Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Valve\Steam, with the InstallPath key; in my case it is C:\Games\Steam. This will let you know where Steam is installed, and Civ III can be checked for in that location.
If it isn't found there, the file /config/config.vdf lists the install folders. It's JSON-y but I haven't verified if it's really JSON, and we only need 1% of it, which conveniently is near the beginning:
These BaseInstallFolder entries list other Steam directories. Game folders are within the steamapps/common sub-directories of those, just like within the main Steam folder.
The combination of these two steps should theoretically find Civ III reliably whenever it is installed by Steam. We already theoretically have the CD case covered (as in theory it should always set the registry, particularly as the CD implies Windows 8.1 or earlier due to SecuROM being removed in Win10), which leaves GOG detection (when it doesn't set the registry) as the remaining follow up once this one is done.
(@WildWeazel Any pointers on how to detect the Steam install location on Linux? I don't suppose Proton emulates the Windows registry for us? Depending on the complexity it may or may not warrant a spin-off ticket)
The text was updated successfully, but these errors were encountered:
I have no idea, but I have Steam installed as a flatpak in my home partition and Civ3 in a secondary library on another device, so it'll be a fun use case!
Elaboration since I just reviewed Civ3Location.cs:
Check if ~/.steam/root/steamapps/libraryfolders.vdf exists, as this will be the user's Steam library configuration. We need to parse this file to look for a library that contains the the app ID "3910". Once found, take this item's path and append "Sid Meier's Civilization III Complete". Unfortunately VDF is Valve's own not-quite-JSON format, but there is a .NET parser available in nuget: https://github.com/shravan2x/Gameloop.Vdf
Spinning off of #442 ... (tagging @pcen , thanks for confirming how it works on Win11)
Based on our limited sample size, it appears that on Windows 11, the Civ III install path is not set in the registry upon installing the game via Steam. The PR listed above added a check for Civ III in the default Steam folder.
However, not everyone installs Steam to the default folder, and even for those who do, they may install games on a secondary drive. This issue is to handle those cases.
For the first part, it looks like the install path is stored in the registry at
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Valve\Steam
, with theInstallPath
key; in my case it isC:\Games\Steam
. This will let you know where Steam is installed, and Civ III can be checked for in that location.If it isn't found there, the file /config/config.vdf lists the install folders. It's JSON-y but I haven't verified if it's really JSON, and we only need 1% of it, which conveniently is near the beginning:
These BaseInstallFolder entries list other Steam directories. Game folders are within the
steamapps/common
sub-directories of those, just like within the main Steam folder.The combination of these two steps should theoretically find Civ III reliably whenever it is installed by Steam. We already theoretically have the CD case covered (as in theory it should always set the registry, particularly as the CD implies Windows 8.1 or earlier due to SecuROM being removed in Win10), which leaves GOG detection (when it doesn't set the registry) as the remaining follow up once this one is done.
(@WildWeazel Any pointers on how to detect the Steam install location on Linux? I don't suppose Proton emulates the Windows registry for us? Depending on the complexity it may or may not warrant a spin-off ticket)
The text was updated successfully, but these errors were encountered: