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] Re-add support for the _sc_ inside app bundle. #73429

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Feb 16, 2023

See #73424

editor/editor_paths.cpp Outdated Show resolved Hide resolved
@bruvzg bruvzg changed the title [macOS] Disable broken self-contained mode. [macOS] Re-add support for the _sc_ inside app bundle. Feb 16, 2023
editor/editor_paths.cpp Outdated Show resolved Hide resolved
@akien-mga
Copy link
Member

If there are so many caveats to get it working, it's pretty much a given that users will fail using it and will end up getting Godot files in their user paths.

Maybe it would be better to add a --self-contained command line option for all platforms (and make sure it's passed from project manager to editor/game when running) as an alternative to the hacky ._sc_ file.

I don't know if the plist file lets us define default command line arguments for the binary which could then be used to enforce self-contained mode (e.g. for the macOS builds on Steam and EGS)?

@bruvzg
Copy link
Member Author

bruvzg commented Feb 16, 2023

Maybe it would be better to add a --self-contained command line option for all platforms (and make sure it's passed from project manager to editor/game when running) as an alternative to the hacky .sc file.

It won't help with path randomization, all used data will be written to the temp folder and deleted on restart.

@YuriSizov
Copy link
Contributor

It's a bit surprising that portable tools can't work on macOS. Are there no apps that do that currently? Maybe we don't know about some hack or Gatekeeper setting? :)

@Calinou
Copy link
Member

Calinou commented Feb 16, 2023

Maybe it would be better to add a --self-contained command line option for all platforms (and make sure it's passed from project manager to editor/game when running) as an alternative to the hacky ._sc_ file.

See godotengine/godot-proposals#2474, which also proposed adding more ways to enable self-contained mode (such as an environment variable).

@bruvzg
Copy link
Member Author

bruvzg commented Feb 17, 2023

See godotengine/godot-proposals#2474, which also proposed adding more ways to enable self-contained mode (such as an environment variable).

App bundle started form Finder will ignore all user defined environment variables.

@bruvzg
Copy link
Member Author

bruvzg commented Feb 17, 2023

I have done some testing and updated it with more detailed information, it's actually usable with some extra steps. Also, should work for Steam releases since Steam remove quarantine flag automatically.

Summary of the current changes in this PR:

  • Update docs to reflect macOS limitations.
  • Re-add support for _sc_ inside .app bundle (not recommended, but usable if you do not move it between different macs).
  • _sc_ in the same folder as bundle is still supported.

@akien-mga akien-mga modified the milestones: 4.x, 4.1 Mar 6, 2023
@akien-mga akien-mga merged commit b8126b1 into godotengine:master Mar 7, 2023
@akien-mga
Copy link
Member

Thanks!

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.2.

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

Successfully merging this pull request may close these issues.

4 participants