在树莓派官方32位系统上编译godot 3.3.2 游戏引擎
首先,先看godot官方关于编译的文档,中文的:
https://docs.godotengine.org/zh_CN/stable/development/compiling/index.html
英文的: https://docs.godotengine.org/en/stable/development/compiling/index.html
然后,尝试着编译会发现报错,原因是:
-
webp的编译参数不对,解决方法是禁用对应模块(module_webm_enabled="no" module_webp_enabled="no")或添加编译参数(CCFLAGS="-mfpu=neon")
-
无法自动链接atomic库,要手动加上(LINKFLAGS="-latomic")
具体的编译命令为:
- 带优化的导出模板(release)
scons -j 4 \
target="release" \
LINKFLAGS="-latomic" \
CCFLAGS="-mfpu=neon" \
tools="no"
- 带调试标志的导出模板(debug)
scons -j 4 \
target="debug" \
LINKFLAGS="-latomic" \
CCFLAGS="-mfpu=neon" \
tools="no"
- 带优化和调试标志的导出模板(release_debug)
scons -j 4 \
target="release_debug" \
LINKFLAGS="-latomic" \
CCFLAGS="-mfpu=neon" \
tools="no"
- 带调试标志的编辑器
scons -j 4 \
target="debug" \
LINKFLAGS="-latomic" \
CCFLAGS="-mfpu=neon"
- 带优化和调试标志的编辑器
scons -j 4 \
target="release_debug" \
LINKFLAGS="-latomic" \
CCFLAGS="-mfpu=neon"