Skip to content
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

macOS packaging #590

Open
Novum opened this issue Dec 10, 2022 · 12 comments
Open

macOS packaging #590

Novum opened this issue Dec 10, 2022 · 12 comments

Comments

@Novum
Copy link
Owner

Novum commented Dec 10, 2022

Would be nice to have an actual macOS release. It runs well enough through MoltenVK and would make it the only Metal Quake port. Apple probably will remove OpenGL at some point.

Maybe we should port the QuakeSpasm XCode project?

Also don't really want to pay for a dev account to sign it. Without that macs refuse to run the app without the right click->open workaround that not everyone knows about.

@Novum Novum changed the title macOS X packaging macOS packaging Dec 10, 2022
@sezero
Copy link
Collaborator

sezero commented Dec 10, 2022

Maybe @ericwa can help

@Novum
Copy link
Owner Author

Novum commented Dec 10, 2022

Looking at TrenchBroom downloads from github the distribution is about 80% Windows, 15% Linux and 5% macOS.

Not sure how that translates to actual players though.

@johnalanwoods
Copy link

I'm happy to help with this, and have a macOS developer account, it runs terrifically on my M1 Pro, 120FPS everything maxed out.

Apple probably will remove OpenGL at some point.

This wouldn't affect this project, right?

@Novum
Copy link
Owner Author

Novum commented Dec 28, 2022

This wouldn't affect this project, right?

That's the point. QuakeSpasm and other ports would stop working.

@Novum
Copy link
Owner Author

Novum commented Dec 28, 2022

I did some amount of work here:
1c2ddd9
This will produce a universal binary.

But I'm not sure if that's actually the right way to approach this. Manually making an app package is a pain.

On the other hand, I have little interest in maintaining an XCode project in addition to VC++/Makefiles & meson.

@karstenBriksoft
Copy link

I don’t know the details of how they build, but MacSourcePorts has a fork (https://github.com/MacSourcePorts/vkQuake) and also the latest build that is ready for download at: https://macsourceports.com/game/quake

@Novum
Copy link
Owner Author

Novum commented Jan 9, 2023

Their scripts might be useful. Don't understand why they don't want to upstream changes.

@temx
Copy link
Collaborator

temx commented Jan 10, 2023

It looks like the script they actually use is at https://github.com/MacSourcePorts/MSPBuildSystem/tree/main/vkquake

@Novum
Copy link
Owner Author

Novum commented Jan 10, 2023

Yeah, the interesting stuff is in common: https://github.com/MacSourcePorts/MSPBuildSystem/tree/main/common

@tomkidd
Copy link

tomkidd commented Jan 11, 2023

Howdy, I'm the one who runs Mac Source Ports.

Back when I started out (around Sept. 2021) I did a fork of vkQuake because I needed to tweak the then-Makefile to do cross compilation but at some point after the move to Meson, I was able to just use the repo's contents directly, no more need to modify anything. So that's why that fork I did is so behind (I should probably hide or delete it).

But yeah the actual process is pretty simple, if a bit tedious in the details. Essentially I'm building the vkquake executable twice for the two architectures (x86_64 for Intel, arm64 for Apple Silicon), moving them into faux-bundle locations (so. vkquake.app/Contents/MacOS but without the Info.plist, icons, etc.) then using dylibbundler to place the dependencies into architecture-specific subfolders and mark the locations in the various executables/libraries, then using lipo to combine the two vkquake executables into one, copying the libraries subfolders, make an Info.plist with the right values, etc. Then code signing and notarization, finally packaging it into a DMG with the whole "drag the thing to the thing" background graphic.

I definitely prefer command-line based projects versus Xcode projects, they're much easier to automate. When there's a new version of vkQuake, I can just update the version number my build script and then fire it off to come up with another build. I've been tweaking this Frankenstein arrangement for a while now and it's starting to pay off.

The process does require a paid Apple account and one of the things I'm aware of is not everyone wants to have to pay just to have notarization (the thing that gets around the right-click-to-open thing) so one of the things I figure I can offer to the community is to use my account.

image

In any event, let me know if I can be of any assistance. Like you guys noticed, I put everything online - most of it in that MSPBuildSystem repo, including its wiki, and anyone can use anything I put up there for anything you want. If you guys want to make your own signed and notarized builds I can just link to those instead like I do with GZDoom (I definitely don't want to siphon download numbers).

I can say that vkQuake is one of the most popular things on the site, hands down, and everyone is very impressed with how well it works on the Mac, especially on Apple Silicon. Projects like Arcane Dimensions which can bring QuakeSpasm to its knees work with almost no sweat on vkQuake through MoltenVK on an Apple Silicon Mac.

Anyway, like I said let me know if I can be of any help. A whole bunch of things would need to happen for Mac gaming to be taken seriously, from a number of different angles. Mac Source Ports and maintaining builds of source ports is my contribution/angle.

@Novum
Copy link
Owner Author

Novum commented Jan 12, 2023

@tomkidd Thanks for the detailed response. I will get back to you later.

@johnalanwoods
Copy link

I did some amount of work here: 1c2ddd9 This will produce a universal binary.

But I'm not sure if that's actually the right way to approach this. Manually making an app package is a pain.

On the other hand, I have little interest in maintaining an XCode project in addition to VC++/Makefiles & meson.

is there much need when the binary can be compiled and run from the CLI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants