bscotch / stitch

Tools and apps for GameMaker development: a CLI for pipeline development, a VSCode extension for coding, and more.
Other
105 stars 11 forks source link

MacOS & Linux Support #159

Open adam-coster opened 9 months ago

adam-coster commented 9 months ago

At our studio we only use Windows for development, so we have neither the means nor the incentive to ensure that Stitch VSCode (or any other Stitch packages) work properly on other operating systems. We'd love to get help from GameMaker community members who want Stitch on those platforms!

While we ourselves won't be able to work on MacOS/Linux support, we still want to be able to keep track of platform-specific issues so that we or others can eventually resolve them. So please post an issue if you run into one!

The large majority of Stitch is built with Node.js and webtech, so it's cross-platform by default. There are some exceptions, though:

The order of ops for solving these would be:

msvit commented 9 months ago

macOS user here, happy to help, I'll post if I see anything weird going on.

Meissnerinc commented 9 months ago

same here, I'll be happy to post anything that comes up! (love this extension btw)

treenoder commented 7 months ago

Can't we specify directory of GM installation? On Mac vscode shows error when trying to run a project.

Could not find a release of GameMaker v2023.8.2.108 to run this project.

adam-coster commented 7 months ago

@treenoder There are a few things going on here:

That aside, there's always the option to provide an override. It would need to be checked at the top of this method:

https://github.com/bscotch/stitch/blob/8f1f8c9d2d451edd0380971c67ea76b9c5946a0f/packages/vscode/src/extension.project.mts#L75

At the end of that method Stitch composes a CLI command for Igor (GameMaker's runner), which probably doesn't work out of the gate on Mac even if we had an option to override the runner path. So that would also need an update.

Which is all to say that getting all of that stuff to work on Mac would take a fair bit of experimenting and discovery!

Braffolk commented 7 months ago

I've forked the repo to attempt to get the VSCode extension to seamlessly work on MacOS. I would really like a proper IDE experience with GML, so I'll see how easy it is to get everything working.

From the list of things, I have got the following working:

https://github.com/Braffolk/stitch-macos-fork

I haven't done any code cleanup on the additions yet, so it's all experimental and slightly messy. Still becoming familiar with the codebase.

Edit

Nearly everything in the launcher package now works. Runtime selection, running projects, etc. As long as the tests cover everything, of course.

There are some issues though. For older runtimes, they don't have Igor packaged for MacOS. So I'm assuming they used some other script/tool as an entrypoint, which I haven't identified yet.

Another problem is that getting some of the release notes breaks on MacOS, so I had to make the requirement of release notes soft. All Windows releases have notes, but if a Mac release doesn't have a Windows version equivalent to it, then it will link to a non-existing release notes file.

image
Braffolk commented 7 months ago

And the VSCode extension mostly works too now. Downloading IDEs is a bit flaky there, but shouldn't be too hard to fix.

Pixel-checksum and Spritely also work without any issues, although only by all tests passing. Haven't done any further testing.

https://github.com/bscotch/stitch/assets/7544836/4b6507d8-112c-4d07-96d3-8f8ddd457c72

I don't daily work with Node.js apps, so couldn't figure everything out. For example, the environment variable Mac equivalents of PROGRAMDATA, APPDATA, and PROGRAMFILES aren't added to the compiled package. I've only tested them by adding them to the vscode extension launch config.

For changes and major issues, I've included them in the fork readme.

adam-coster commented 7 months ago

@Braffolk dope, looks like you're making some solid progress here!

Some notes:

Braffolk commented 7 months ago

@adam-coster Thanks! Created one issue there.

I'll also add a short update on the progress:

In general, I have reached the point where most of the big changes are done. Now it'll be mostly refactoring and bug hunting.

Braffolk commented 7 months ago

Managed to get the biggest bugs out of the way. The main problematic part was getting Mono-dependent runtimes to work.

Also, for the Github action that runs tests on Mac, I managed to get automatically installing both the IDE and a runtime working. So all tests, except the ones requiring being logged in on the IDE, work. There are two of those that require login.

Also, one sprite-source test fails, but that seems to be a broken test because it points to a non-existing path.

image

https://github.com/Braffolk/stitch-macos-fork/runs/19432937769#r3