Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
iOS用のコンパイル¶
参考
This page describes how to compile iOS export template binaries from source. If you're looking to export your project to iOS instead, read iOS用にエクスポート.
必要条件¶
3.0以降のSCons ビルドシステム。
Xcode (またはXcode用のより軽量なコマンドラインツール)。
If you are building the master
branch:
Download and follow README instructions to build a static
.xcframework
from the MoltenVK SDK.
注釈
If you have Homebrew installed, you can easily install SCons using the following command:
brew install scons
Homebrewをインストールすると、Xcodeのコマンドラインツールがまだない場合は自動的に取得されます。
Similarly, if you have MacPorts installed, you can easily install SCons using the following command:
sudo port install scons
参考
To get the Godot source code for compiling, see ソースの取得.
Godotにおける基本的なSconsの使い方については、ビルドシステムの説明を参照してください。
コンパイル¶
ターミナルを開き、エンジンソースコードのルートディレクトリに移動し、次のように入力します:
$ scons p=ios target=template_debug
デバッグビルドの場合、または次の場合:
$ scons p=ios target=template_release
for a release build (check platform/ios/detect.py
for the compiler
flags used for each configuration).
または、次の操作を実行できます
$ scons p=ios target=template_debug ios_simulator=yes arch=x86_64
$ scons p=ios target=template_debug ios_simulator=yes arch=arm64
for a Simulator libraries.
To create an Xcode project like in the official builds, you need to use the
template located in misc/dist/ios_xcode
. The release and debug libraries
should be placed in libgodot.ios.debug.xcframework
and libgodot.ios.release.xcframework
respectively.
$ cp -r misc/dist/ios_xcode .
$ cp libgodot.ios.debug.arm64.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a
$ lipo -create libgodot.ios.debug.arm64.simulator.a libgodot.ios.debug.x86_64.simulator.a -output ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
$ cp libgodot.ios.opt.arm64.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64/libgodot.a
$ lipo -create libgodot.ios.opt.arm64.simulator.a libgodot.ios.opt.x86_64.simulator.a -output ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
The MoltenVK static .xcframework
folder must also be placed in the ios_xcode
folder once it has been created.
実行¶
デバイスまたはシミュレーターで実行するには、次の手順に従います: iOS用にエクスポート。