-
-
Notifications
You must be signed in to change notification settings - Fork 18
fix: Add macOS support for GameMaker runtime detection and platform selection #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
fix: Add macOS support for GameMaker runtime detection and platform selection #285
Conversation
|
Rad, I appreciate your work on this! From a cursory look things look solid but I'll need some time to review everything and make sure stuff still works on Windows. I'll try to get that done by the end of the week! |
|
Sure! take your time! Nice project btw, I've been using it for a week now. I'd love to keep helping with the macOS support. |
|
I appreciate all the help I can get! We don't use Mac at all so the only way Stitch will support it is with outside help :D |
| }; | ||
| } else { | ||
| // Fallback for other platforms | ||
| const prefix = `${process.env.HOME}/.gamemaker`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know that this fallback works on some platform? E.g. does this work on Linux?
packages/launcher/src/lib/utility.ts
Outdated
| installer.on('exit', resolve); | ||
| }); | ||
| } else if (process.platform === 'darwin') { | ||
| // For now, display a helpful message to the user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing you added this to prevent the error from being thrown, but since it doesn't actually run the IDE installer on Mac it probably should still throw. Maybe this should get handled at the caller instead? Presumably there's some step you're trying to prevent from erroring out in VSCode or something.
packages/launcher/src/lib/utility.ts
Outdated
| continue; | ||
| } else if (process.platform === 'darwin') { | ||
| // macOS: Search for runtimes in /Users/Shared/GameMakerStudio2/Cache/runtimes/ | ||
| const sharedRuntimesDir = new Pathy('/Users/Shared/GameMakerStudio2/Cache/runtimes'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be redundancy here. The original windows code calls listGameMakerRuntimes(), which you aren't doing here. But you did update the listGameMakerRuntimes() function to work on MacOS -- can that have been used here instead?
Basically it'd be easier to review and maintain if any redundancies like this were removed. I don't want to make any such edits myself since I won't actually be able to test them, but it'd be very helpful for readability and future maintenance.
|
On mac here - M3 latest OS 26.0.1. |
Problem
The VSCode extension was always defaulting to Windows platform when running GameMaker projects on macOS, causing runtime failures due to incorrect platform detection and missing Mono dependencies.
Solution
This PR adds comprehensive macOS support by:
1. Platform Detection
defaultTargetPlatformutility function that correctly mapsdarwintomacwindows2. macOS Runtime Discovery
listGameMakerRuntimeDirs()to search macOS-specific paths:/Users/Shared/GameMakerStudio2/Cache/runtimes/~/Library/Application Support/GameMakerStudio2/Igorwithout.exe)3. Cross-Platform Compatibility
Changes Made
packages/launcher/src/lib/GameMakerRuntime.command.ts: Updated platform detection logicpackages/launcher/src/lib/utility.ts: Added macOS path support and platform utilitiespackages/launcher/src/lib/GameMakerComponent.ts: Enhanced cross-platform component detectionpackages/vscode/src/lib.mts: Improved IDE discovery for macOSTesting
-- mac Runcommand instead of-- windows RunImpact
This enables GameMaker developers on macOS to use the Stitch VSCode extension without platform-related runtime errors, significantly improving the developer experience for Mac users.