Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
rid: [linux-x64, win-x64]
rid: [linux-x64, win-x64, osx-arm64]

steps:
- name: Checkout Repository
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
- name: win-x64 Build
run: dotnet publish -p:PublishProfile=win-x64 -c Release -p:AssemblyVersion=${{ github.event.inputs.version }} -p:FileVersion=${{ github.event.inputs.version }} -o ./output/win-x64 ${{env.PROJECT_PATH}}

- name: osx-arm64 Build
run: dotnet publish -p:PublishProfile=osx-arm64 -c Release -p:AssemblyVersion=${{ github.event.inputs.version }} -p:FileVersion=${{ github.event.inputs.version }} -o ./output/osx-arm64 ${{env.PROJECT_PATH}}

- name: flatpak-x86_64 Build
env:
APP_VERSION: ${{ github.event.inputs.version }}
Expand All @@ -87,6 +90,7 @@ jobs:
run: |
mkdir -p ./release
mv ./output/win-x64/HedgeModManager.UI.exe ./release/HedgeModManager.exe
mv ./output/osx-arm64/HedgeModManager.UI ./release/HedgeModManager
mv ./flatpak/${{env.FLATPAK_ID}}.flatpak ./release/${{env.FLATPAK_ID}}.flatpak

- name: Create Release
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,4 @@ _Pvt_Extensions/
ModelManifest.xml

Ignored/
.DS_Store
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
7 changes: 6 additions & 1 deletion Source/Libraries/HedgeModManager.Epic/EpicLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ public void LocateEpicRoots()
searchPaths.Add(Path.Combine(appdata, "heroic"));
searchPaths.Add(Path.Combine("heroic"));
}


if (OperatingSystem.IsMacOS())
{
searchPaths.Add(Path.Combine(appdata, "heroic"));
}

if (OperatingSystem.IsLinux())
{
// Heroic Games Launcher (Flatpak)
Expand Down
29 changes: 29 additions & 0 deletions Source/Libraries/HedgeModManager.Steam/SteamLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public class SteamLocator : IGameLocator
return null;
}

[SupportedOSPlatform("macos")]
private string? FindSteamLibraryMacOS()
{
// TODO: Open a folder selection window
return "";
}

private string? FindSteamLibraryUnix()
{
var pathList = new[]
Expand Down Expand Up @@ -62,6 +69,12 @@ public class SteamLocator : IGameLocator
return SteamInstallPath;
}

if (OperatingSystem.IsMacOS())
{
SteamInstallPath = FindSteamLibraryMacOS();
return SteamInstallPath;
}

SteamInstallPath = FindSteamLibraryUnix();
return SteamInstallPath;
}
Expand Down Expand Up @@ -128,6 +141,22 @@ public List<SteamGame> Locate()
continue;
}

// Paths will be encoded by Windows Steam and will need to be adapted for macOS paths.
// C:\ is equivalent to the Wine prefix.
// Any other drive letter should be removed and treated as raw Unix path.
if (OperatingSystem.IsMacOS())
{
if (path.StartsWith(@"C:\"))
{
path = SteamInstallPath;
}
else
{
// Remove drive letter and replace slashes
path = path[2..].Replace(@"\", "/");
}
}

var libPath = Path.Combine(path, "steamapps");
foreach (var app in apps)
{
Expand Down