@@ -57,10 +57,6 @@ To compile for Apple Silicon (ARM64) powered Macs, use::
5757
5858 scons platform=macos arch=arm64
5959
60- To support both architectures in a single "Universal 2" binary, run the above two commands and then use ``lipo `` to bundle them together::
61-
62- lipo -create bin/godot.macos.editor.x86_64 bin/godot.macos.editor.arm64 -output bin/godot.macos.editor.universal
63-
6460.. tip ::
6561 If you are compiling Godot to make changes or contribute to the engine,
6662 you may want to use the SCons options ``dev_build=yes `` or ``dev_mode=yes ``.
@@ -72,20 +68,39 @@ If all goes well, the resulting binary executable will be placed in the
7268runs without any dependencies. Executing it will bring up the Project
7369Manager.
7470
71+ .. note :: Using a standalone editor executable is not recommended, it should be always packaged into an
72+ ``.app `` bundle to avoid UI activation issues.
73+
7574.. note :: If you want to use separate editor settings for your own Godot builds
7675 and official releases, you can enable
7776 :ref: `doc_data_paths_self_contained_mode ` by creating a file called
7877 ``._sc_ `` or ``_sc_ `` in the ``bin/ `` folder.
7978
80- To create an ``.app `` bundle like in the official builds, you need to use the
81- template located in ``misc/dist/macos_tools.app ``. Typically, for an optimized
79+ Automatic ``.app `` bundle creation
80+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81+
82+ To automatically create an ``.app `` bundle like in the official builds, use the ``generate_bundle=yes `` option on the *last *
83+ SCons command used to build editor::
84+
85+ scons platform=macos arch=x86_64
86+ scons platform=macos arch=arm64 generate_bundle=yes
87+
88+ Manual ``.app `` bundle creation
89+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90+
91+ To support both architectures in a single "Universal 2" binary,
92+ run the above two commands and then use ``lipo `` to bundle them together::
93+
94+ lipo -create bin/godot.macos.editor.x86_64 bin/godot.macos.editor.arm64 -output bin/godot.macos.editor.universal
95+
96+ To create an ``.app `` bundle, you need to use the template located in ``misc/dist/macos_tools.app ``. Typically, for an optimized
8297editor binary built with ``dev_build=yes ``::
8398
84- cp -r misc/dist/macos_tools.app ./Godot.app
85- mkdir -p Godot.app/Contents/MacOS
86- cp bin/godot.macos.editor.universal Godot.app/Contents/MacOS/Godot
87- chmod +x Godot.app/Contents/MacOS/Godot
88- codesign --force --timestamp --options=runtime --entitlements misc/dist/macos/editor.entitlements -s - Godot.app
99+ cp -r misc/dist/macos_tools.app ./bin/ Godot.app
100+ mkdir -p bin/ Godot.app/Contents/MacOS
101+ cp bin/godot.macos.editor.universal bin/ Godot.app/Contents/MacOS/Godot
102+ chmod +x bin/ Godot.app/Contents/MacOS/Godot
103+ codesign --force --timestamp --options=runtime --entitlements misc/dist/macos/editor.entitlements -s - bin/ Godot.app
89104
90105.. note ::
91106
@@ -95,8 +110,8 @@ editor binary built with ``dev_build=yes``::
95110 You can also choose to link it dynamically by passing ``use_volk=yes `` and
96111 including the dynamic library in your ``.app `` bundle::
97112
98- mkdir -p Godot.app/Contents/Frameworks
99- cp <Vulkan SDK path>/macOS/lib/libMoltenVK.dylib Godot.app/Contents/Frameworks/libMoltenVK.dylib
113+ mkdir -p < Godot bundle name> .app/Contents/Frameworks
114+ cp <Vulkan SDK path>/macOS/lib/libMoltenVK.dylib < Godot bundle name> .app/Contents/Frameworks/libMoltenVK.dylib
100115
101116Running a headless/server build
102117-------------------------------
0 commit comments