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

Export macOS apps to .app instead of a .dmg with the .app included #8969

Closed
AdriaandeJongh opened this issue Jan 25, 2024 · 7 comments
Closed

Comments

@AdriaandeJongh
Copy link

Describe the project you are working on

A game that's regularly exported to macOS.

Describe the problem or limitation you are having in your project

Godot exports the macOS version of my game to a .dmg file, but the .dmg is an empty and unpractical in-between step with unfriendly UX. If game developers would distribute .dmg to their players more often (which they almost never do, and instead sell through digital stores like Steam or GOG or Epic or Mac App Store or whatever), they would use another tool (there's hundreds of these) to add a shortcut to the Application folder as well as make the window pretty with custom graphics. This is a standard practice in the 'indie software' world on Mac, but AFAIK all video game distribution platforms (Steam, GOG, etc) need you to supply an .app, not a .dmg. It would help speed up game developers' build process if the export would simply result in an .app.

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

Remove the "packing to .dmg" part from the export process, and just let it be an .app.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I don't know enough about the macOS export process, but this 'feature' probably doesn't require anything more than removing a few lines of code.

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

Perhaps it is possible to make a post-export script that unpacks the .dmg?

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

It's the engine that makes the .dmg.

@Calinou
Copy link
Member

Calinou commented Jan 25, 2024

You can choose to have the project exported in a ZIP archive (not to be confused with Export PCK/ZIP), but I agree there should be an option to skip packing a ZIP archive altogether.

@bruvzg
Copy link
Member

bruvzg commented Jan 25, 2024

There's already an option to export as unpacked .app if you set "distribution type" to "testing" (since it's not possible to notarize .app that is not in .dmg or .zip), or as .pkg (if "distribution type" is set to "app store").

Type can be selected in the file selection dialog after pressing "export project", either in the file extension selector, or by changing filename to have specific extension.

@AdriaandeJongh
Copy link
Author

There's already an option to export as unpacked .app if you set "distribution type" to "testing" (since it's not possible to notarize .app that is not in .dmg or .zip).

I see! Well, I am trying to make the case here that .app is, in my experience with submitting 11 commercial games, the most wanted export result. So perhaps to continue and elaborate:

  1. The word 'testing' does not align with the distribution type here. 'direct to user' would maybe be a more appropriate wording here.

  2. Assuming that notarization should be on by default to distribute an .app without users having to go through any security disabling hoops, it seems that the export to macOS would need a slightly more elaborate export system then? Perhaps together with Complete the macOS app notarization result instead of giving the user terminal commands #8968, the export process packs the .app, sends it to Apple for notarization, and unpacks it for distribution.

@bruvzg
Copy link
Member

bruvzg commented Jan 27, 2024

The word 'testing' does not align with the distribution type here. 'direct to user' would maybe be a more appropriate wording here.

"Testing" is intended for testing (exporting without Apple account and notarization), "Distribution" is what is intended as direct to user.

Assuming that notarization should be on by default to distribute an .app without users having to go through any security disabling hoops, it seems that the export to macOS would need a slightly more elaborate export system then?

We can add support for unpacked .app export in the "Distribution" mode, using temporary ZIP to upload it for notarization and deleting it afterward, should be easy to add.

Perhaps together with #8968

That's gonna need a lot more changes, since checking results (and stapling) should be done asynchronously and have its own UI. I have seen plenty of complaint that notarization take multiple hours to finish, so waiting is not an option.

@AdriaandeJongh
Copy link
Author

AdriaandeJongh commented Jan 28, 2024

add support for unpacked .app export in the "Distribution" mode

I saw you started the PR on this- incredible. I would like to continue to make the case to make export to .app the default option. As mentioned in the original post, every video game distribution platform I know asks for the .app – with the only notable exception being the Mac App Store which distributes only a fraction of the total games sold on Mac. I don't know if changing this default could be breaking compatibility for existing pipelines, but I'm guessing not if the export path and method are saved after having exported once?

@Calinou
Copy link
Member

Calinou commented Jan 28, 2024

Since default values are saved in export presets (unlike project settings), it should be fine to change the default to be .app from now on. This is also more consistent with Windows/Linux exports which aren't automatically packed into another format.

@akien-mga akien-mga added this to the 4.3 milestone Feb 13, 2024
@akien-mga
Copy link
Member

Implemented by godotengine/godot#87657.

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