Uh oh!
There was an error while loading. Please reload this page.
Macos support - #28
Conversation
IsaacMarovitz
commented
Mar 6, 2025
This PR contains many unrelated changes to formatting as well as a version bump that are wholly out of scope. Additionally this conflicts with my PR #20. Changes regarding Unleashed Recompiled should not be merged before the official release. Things are not set in stone and stuff like the name of the bundle may be subject to change still, which would break functionality here. |
to-fuu
commented
Mar 7, 2025
{"Macos",new("UnleashedRecomp","UnleashedRecomp")}, |
to-fuu
commented
Mar 7, 2025
Status:
|
fred64k
commented
Mar 7, 2025
Keep in mind this only works with unleashed as of now If you pulled the latest changes, you will find under HedgeModManager/ModdableGameLocator that line 136 is commented. You need to uncomment it before building. |
Odd, I think your branch needs a rebase
FYI, I am pro a consistent formatting style but later using
I was mainly referring to the build method. I spoke to SuperSonic16 and afaik she would prefer if it was all contained within one PR. I'm happy to PR to your branch or vice versa.
I will need to review these changes closely; Unleashed Recomp is an outlier; all other Sonic games on macOS will need to be launched through Wine. |
IsaacMarovitz
commented
Mar 7, 2025
I've rebased my changes on main |
| if (SelectedGame.Game.ModLoaderConfiguration is ModLoaderConfiguration config) | ||
| await config.Save(Path.Combine(SelectedGame.Game.Root, "cpkredir.ini")); | ||
| { | ||
| // For macos, save under the user's Application Support directory. |
| if (OperatingSystem.IsMacOS()) | ||
| { | ||
| var appSupportDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); | ||
| await config.Save(Path.Combine( appSupportDir,SelectedGame.Game.Executable, "cpkredir.ini")); |
There was a problem hiding this comment.
await config.Save(Path.Combine(appSupportDir, SelectedGame.Game.Executable, "cpkredir.ini"));
| WorkingDirectory = Root, | ||
| UseShellExecute = true | ||
| }); | ||
| // The command to launch macos apps is |
| }); | ||
| // The command to launch macos apps is | ||
| // open -a path/to/my/app/appname | ||
| // When the app is inside the Application folder only the app's name is needed. |
There was a problem hiding this comment.
That being said, I think it would be better to opt for the full file path for specificity.
| games.Add(game); | ||
| } | ||
| } | ||
| if (OperatingSystem.IsMacOS() && gameInfo.PlatformInfos.TryGetValue("Macos", out var macosDesktopInfo)) |
| var gameSimple = new GameSimple( | ||
| "Macos", macosDesktopInfo.ID, gameInfo.ID, | ||
| "/Applications", macosDesktopInfo.Executable, "Macos", "" |
There was a problem hiding this comment.
You have to be careful assuming /Applications. Things can also be installed to ~/Applications
| mkdir "$APP_NAME/Contents/Resources" | ||
| # Create Info.plist inside the bundle | ||
| cat > "$APP_NAME/Contents/Info.plist" << EOF |
There was a problem hiding this comment.
Would prefer if this was actually a file in the repo instead of being cat'd out
There was a problem hiding this comment.
This was so in github workflows, the version and bundle name can be passed as arguments. Though I don't disagree
There was a problem hiding this comment.
I would like this to be in its own file if it can be easily done. Maybe you could look into string substitution, I think some people had used the sed command.
| ``` | ||
| ```bash | ||
| cd macos | ||
| /bin/bash macos/generate-bundle.bash com.hedge_dev.hedgemodmanager 8.0.3 |
There was a problem hiding this comment.
As of macOS Catalina, zsh is the default shell on Mac
| ## 2. Build the project | ||
| ### Macos |
| } | ||
| if (OperatingSystem.IsMacOS() && gameInfo.PlatformInfos.TryGetValue("Macos", out var macosDesktopInfo)) | ||
| { | ||
| // The root is actually not necessary on macos |
There was a problem hiding this comment.
i feel like there should still be a root here as by default the data for unleashed is held in "~/Library/Application Support/UnleashedRecomp", and having the mod folder there makes it more similar to other platforms. maybe try something like this
| // The root is actually not necessary on macos | |
| stringroot=Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), | |
| "Library","Application Support","UnleashedRecomp"); | |
| if(Directory.Exists(root)) | |
| { | |
| vargameSimple=newGameSimple( | |
| "Macos", macosDesktopInfo.ID, gameInfo.ID, | |
| root,macosDesktopInfo.Executable, | |
| "Macos", "", "" | |
| ); | |
| vargame=newModdableGameGeneric(gameSimple) | |
| { | |
| SupportsDirectLaunch=true, | |
| SupportsLauncher=false, | |
| Is64Bit=gameInfo.Is64Bit | |
| }; | |
| game.ModDatabase.SupportsCodeCompilation=gameInfo.SupportsCodes; | |
| games.Add(game); | |
| } |
There was a problem hiding this comment.
Note that Application Support should be accessed using Environment.SpecialFolder.ApplicationData
There was a problem hiding this comment.
When I tried to pull and build the project, it didn't work right. It wouldn't save config files or be able to boot the game. I tried fixing the code myself, but it still had trouble detecting mods and saving.
The suggested fixes above worked, and HMM runs great for me.
There was a problem hiding this comment.
I have made changes to GameSimple, though it should be simple to work around for macOS. What I changed is making it work a bit more like running a command instead of executable and arguments.
Also please change all the Macos to macOS or MacOS, I think using the proper capitalisation would be good here.
adoobly
commented
Mar 7, 2025
my terminal says command not found dotnet what do i do |
to-fuu
commented
Mar 7, 2025
adoobly
commented
Mar 7, 2025
is there a .app download? |
FlipTheFox
commented
Mar 7, 2025
@adoobly you need to install dotnet and then run |
to-fuu
commented
Mar 20, 2025
@thesupersonic16 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
to-fuu
commented
Mar 20, 2025
I'll go through the change requests. |
to-fuu
commented
Mar 23, 2025
@thesupersonic16 Reverted the change to saving |
IsaacMarovitz
commented
Mar 23, 2025
Check your PRs on your fork |
thesupersonic16
commented
May 18, 2025
I believe it's the mod loaders that don't work with crossover. There is an issue on the HMM 7 repo about that. Ideally a standard needs to be made for this as I never heard macOS having a Steam client that runs the games. After that is worked out, code could be added to setup whatever is needed get the games running with the mod loaders. I really do not want HMM 8 to have code designed just to run under wine/crossover. |
MarioMastr
commented
Aug 12, 2025
macOS support has been merged into the main repo of UnleashedRecomp, I hope to see this PR cleaned up and merged soon to accompany that |
thesupersonic16
commented
Aug 12, 2025
I cannot work on macOS support without having a machine that runs it. I am currently waiting for when this PR is ready for another review. |
to-fuu
commented
Aug 12, 2025
I will try to pick up where I left this weekend |
thesupersonic16
commented
Aug 12, 2025
You also have a PR on your repo, so you may want to look into that aswell. |



Adds support for Macs builds and UnleahsedRecomp
Can be built from code using the following command
TODO: