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

Create the macOS export template structure on the fly when exporting the project #1459

Open
Calinou opened this issue Sep 4, 2020 · 5 comments

Comments

@Calinou
Copy link
Member

Calinou commented Sep 4, 2020

See also godotengine/godot#10913, which is an older approach to the same issue (but it's less consistent with how exporting to Windows and Linux works).

Describe the project you are working on:

The Godot editor 🙂

Describe the problem or limitation you are having in your project:

Users who build their own export templates are often confused as to the exact steps required to package export templates for all platforms.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

We can simplify this process by making the editor do more work on its side. This in turn makes the build process more "fault-tolerant" since it will be harder for users to make mistakes.

@bruvzg suggested doing the following in godotengine/godot#36332 (comment):

Do we need to ship macOS export templates as ZIP at all? It's just folder structure and two text files (Info.plist and PkgInfo), .plist is modified on export anyway, PkgInfo contains static "APPL????" string. Export process can be easily changed to generate them in place.

This way, we can simplify the export template building process by simply adding a macOS binary to the export templates TPZ. Users building their own export templates won't have to create an export template structure based on the files in misc/dist/osx_template.app anymore.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

  • Create the required files and folders using Godot's built-in file handling classes.
  • Instead of adding osx_template.zip to the export template binary, just add osx_debug and osx_release binaries. (Note: How will this work with Apple Silicon?)

If this enhancement will not be used often, can it be worked around with a few lines of script?:

No, as this is related to the editor's export functionality.

Is there a reason why this should be core and not an add-on in the asset library?:

This is related to the editor's export functionality.

@bruvzg
Copy link
Member

bruvzg commented Sep 4, 2020

How will this work with Apple Silicon?

Probably ship single fat binary with both x86-64 and arm code, it's gonna be twice in size, but at least for the next 3-4 years it's the most reasonable thing to do.

@bruvzg
Copy link
Member

bruvzg commented Sep 4, 2020

Another question, how to ship MoltenVK: as the separate .dylib file or link it statically.

AFAIK, the only negative effect of static linking, it doesn't support validation layers (in addition to default validation layer for the renderer debugging this includes things like RenderDoc and Steam overlay for example).

@Calinou
Copy link
Member Author

Calinou commented Sep 4, 2020

@bruvzg We can probably link MoltenVK statically in release builds at least, since we generally don't expect to use validation layers there. The question remains for debug builds though.

@snoopdouglas
Copy link

snoopdouglas commented Nov 11, 2020

This is the only mention I can find of Apple Silicon in both the engine and proposals repos. Can anyone estimate how much work will be needed to build Godot for Apple Silicon? (we already have ARM builds for mobile, but presumably it's nowhere near that simple)

@bruvzg
Copy link
Member

bruvzg commented Nov 11, 2020

Can anyone estimate how much work will be needed to build Godot for Apple Silicon?

It is building already, both 3.2 and master branches (use Xcode 12.2 RC, use arch=arm64 scons command line argument), but it's not tested on real hardware.
Change for Apple Silicon build support for the reference: godotengine/godot#39788, godotengine/godot#39943

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

4 participants