Skip to content

x86 and universal macos builds, get exports working.#23

Open
a-morphous wants to merge 3 commits intoDecapitated:masterfrom
a-morphous:amorphous/macos-export-nonsense
Open

x86 and universal macos builds, get exports working.#23
a-morphous wants to merge 3 commits intoDecapitated:masterfrom
a-morphous:amorphous/macos-export-nonsense

Conversation

@a-morphous
Copy link
Contributor

@a-morphous a-morphous commented Mar 8, 2025

So unfortunately, this is a follow up to #18 -- arm64 will work if you build it against the Godot editor's own arm build, but the Mac export template right now expects universal builds. So for this to work on mac in an export we'd need to get x86_64 versions up and running too, or create a universal build.

Unfortunately x2, I can't add universal Ultralight dylibs to Github because they are over Github's 100mb size limit. So here's a somewhat jankier version that keeps the dylibs separate and just throws all of them into the exported binary.

Also, for some reason the exported binary was expecting the gdextension library to still be in an addons folder, hence why the dependencies entry in the .gdextension file looks pretty wonky right now. I have no idea why this is.

Draft PR for now because this truly does feel like a terrible hack. But, once again, may be useful for reference?

"bin/macos/arm64/libWebCore.dylib" : "Contents/Frameworks/arm64",
"bin/macos/arm64/libAppCore.dylib" : "Contents/Frameworks/arm64",

"bin/macos/arm64/gdhtml.macos.template_debug.arm64.dylib": "Contents/Frameworks/addons/gdhtml/bin/macos/arm64",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line (and the equivalent one for x86_64) is needed because for some reason the exported game tries to look for the gdextension library in the addons/gdhtml folder inside of the Mac app. I don't think this is really the right thing to do, nor do I know enough about how Godot works on Mac to figure out any alternatives, but it works for me right now.

@a-morphous a-morphous force-pushed the amorphous/macos-export-nonsense branch from 319a5d9 to cee1dcf Compare March 8, 2025 09:25
@Decapitated
Copy link
Owner

@a-morphous Sorry. Didn't realize I was actually able to commit my suggestions.

@a-morphous
Copy link
Contributor Author

Okay, I think this is about as good as it will get for now, so I'll put it up for review and let you decide whether you want to merge it. I'm still mystified by why we need to add the gdextension library itself as a dependency to get it working, but I won't have time to dig deeper into that for a while yet.

@a-morphous a-morphous marked this pull request as ready for review March 8, 2025 21:43
@Decapitated
Copy link
Owner

@a-morphous I'm going to let this one sit for a bit. I can't verify a lot of what you state. Since, as you say, you're not sure if it's the right way to do it. I'll wait a while until we can verify further.

Thanks for getting it this far. I should probably test exports on Linux as well.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants