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: allow running unpacked game files from .app bundle resources #101125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

axunes
Copy link

@axunes axunes commented Jan 4, 2025

When releasing a Godot game for Linux or Windows, instead of distributing a .pck file containing your game alongside the engine executable, you can place the individual game files to be loaded in the same directory as the executable. I believe something similar is done by default on Android.
The benefit of doing it this way is that at least for a platform like Steam, updates to your game will come as patches to the individual files which in theory will be more efficient than patching a single monolithic pack file.
This PR enables loading the project file and assets from the Resources folder in macOS .app bundles just as .pck files are, for parity with Linux and Windows.


if (!found) {
// Attempt to load project file from macOS .app bundle resources.
String bundle_resource_dir = OS::get_singleton()->get_bundle_resource_dir();
Copy link
Member

Choose a reason for hiding this comment

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

get_bundle_resource_dir can return empty string is app is not bundled, so it should check if it's not empty. For consistency, I would also move it down to the part after // Try to use the filesystem for files, according to OS..

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.

3 participants