Skip to content

Commit

Permalink
Improved Steam detection and removed vc_redist detection for Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
thesupersonic16 committed Jan 16, 2025
1 parent 23164e3 commit d52025b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
3 changes: 3 additions & 0 deletions HedgeModManager/DependsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ public static bool AskToInstallRuntime(string id, DependTypes type)

private static bool CheckVCRuntime(string platform)
{
// Ignore on Linux
if (HedgeApp.IsLinux)
return true;
var reg = Registry.LocalMachine.OpenSubKey($"Software\\WOW6432Node\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\{platform}");
// If null then try get it from the 32-bit Registry
if (reg == null)
Expand Down
17 changes: 14 additions & 3 deletions HedgeModManager/Steam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,20 @@ public static void Init()
if (HedgeApp.IsLinux)
{
string home = Environment.GetEnvironmentVariable("WINEHOMEDIR").Replace("\\??\\", "");
string steamPath = Path.Combine(home, ".steam/steam");
if (Directory.Exists(steamPath))
SteamLocation = steamPath;
var paths = new List<string>
{
Path.Combine(home, ".steam/steam"),
Path.Combine(home, ".var/app/com.valvesoftware.Steam/.steam/steam")
};

foreach (string path in paths)
{
if (Directory.Exists(path))
{
SteamLocation = path;
break;
}
}
}

// Local Machine
Expand Down

0 comments on commit d52025b

Please sign in to comment.