Skip to content

Commit 16b5246

Browse files
add instructions on how to use custom export templates on macOS
1 parent eae8a08 commit 16b5246

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

engine_details/development/compiling/compiling_for_macos.rst

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,12 @@ x86_64 architectures.
223223
scons platform=macos target=template_debug arch=arm64
224224
scons platform=macos target=template_release arch=arm64 generate_bundle=yes
225225

226-
To create a ``.app`` bundle like in the official builds, you need to use the
226+
To create an ``.app`` bundle like in the official builds, you need to use the
227227
template located in ``misc/dist/macos_template.app``. This process can be automated by using
228228
the ``generate_bundle=yes`` option on the *last* SCons command used to build export templates
229-
(so that all binaries can be included). This option also takes care of calling ``lipo`` to create
230-
a *Universal 2* binary from two separate ARM64 and x86_64 binaries (if both were compiled beforehand).
229+
(so that all binaries can be included). This will create a ``godot_macos.zip`` file in ``bin/``
230+
and additionally takes care of calling ``lipo`` to create a *Universal 2* binary from two separate
231+
ARM64 and x86_64 binaries (if both were compiled beforehand).
231232

232233
.. note::
233234

@@ -246,13 +247,25 @@ a *Universal 2* binary from two separate ARM64 and x86_64 binaries (if both were
246247
easier. The main upside of dynamic linking is that it allows updating
247248
MoltenVK without having to recompile export templates.
248249

249-
You can then zip the ``macos_template.app`` folder to reproduce the ``macos.zip``
250-
template from the official Godot distribution:
250+
If you created the ``.app`` manually, you can zip the ``macos_template.app`` folder
251+
to reproduce the ``macos.zip`` template from the official Godot distribution:
251252

252253
::
253254

254255
zip -r9 macos.zip macos_template.app
255256

257+
To use your custom export templates, you can select the ``godot_macos.zip`` file in
258+
the advanced options of your export presets:
259+
260+
.. image:: img/mactemplates.webp
261+
262+
Alternatively, if you want all your presets to use your custom export template, you
263+
can rename the ``godot_macos.zip`` file to ``macos.zip`` and move it to the default
264+
location for export templates:
265+
266+
::
267+
~/Library/Application Support/Godot/export_templates/<GODOT_VERSION>/macos.zip
268+
256269
Cross-compiling for macOS from Linux
257270
------------------------------------
258271

41.7 KB
Loading

0 commit comments

Comments
 (0)