Steam and Gog resolvers now take IDFiles into account.
This commit is contained in:
committed by
Matthias Mailänder
parent
56c0680685
commit
d97df78f4f
@@ -34,8 +34,13 @@ namespace OpenRA.Mods.Common.Installer
|
||||
var prefixes = new[] { "HKEY_LOCAL_MACHINE\\Software\\", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\" };
|
||||
|
||||
foreach (var prefix in prefixes)
|
||||
if (Registry.GetValue($"{prefix}GOG.com\\Games\\{appId.Value}", "path", null) is string installDir)
|
||||
{
|
||||
if (!(Registry.GetValue($"{prefix}GOG.com\\Games\\{appId.Value}", "path", null) is string installDir))
|
||||
continue;
|
||||
|
||||
if (InstallerUtils.IsValidSourcePath(installDir, modSource))
|
||||
return installDir;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -43,8 +43,13 @@ namespace OpenRA.Mods.Common.Installer
|
||||
if (!data.TryGetValue("installdir", out var installDir))
|
||||
continue;
|
||||
|
||||
if (installDir != null)
|
||||
return Path.Combine(steamDirectory, "steamapps", "common", installDir);
|
||||
if (installDir == null)
|
||||
continue;
|
||||
|
||||
var path = Path.Combine(steamDirectory, "steamapps", "common", installDir);
|
||||
|
||||
if (InstallerUtils.IsValidSourcePath(path, modSource))
|
||||
return path;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user