Osx lipo and create app script.

This commit is contained in:
Relintai 2022-01-29 12:06:50 +01:00
parent 5765491335
commit f524ade29d
3 changed files with 25 additions and 4 deletions

View File

@ -16,7 +16,7 @@ mkdir -p logs
#sudo podman run -i -t -v $(pwd)/files:/root/files godot-osx:bs /bin/bash
#sudo podman run -i -t -v $(pwd)/:/root/project -w /root/project godot-osx:bs /bin/bash
#sudo podman run -v $(pwd)/:/root/project -w /root/project godot-osx:bs scons bex_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4
#sudo podman run -i -t -v $(pwd)/:/root/project -w /root/project/tools/osx godot-osx:bs ./lipo.sh
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bew_strip -j4 . 2>&1 | tee logs/bew.log
@ -56,19 +56,19 @@ $podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_ve
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bex_strip arch=arm64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bex_arm64.log
rm -f engine/modules/modules_enabled.gen.h
#todo lipo script
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bx_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bx_x86_64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bx_strip arch=arm64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bx_arm64.log
rm -f engine/modules/modules_enabled.gen.h
#todo lipo script
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bxr_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bxr_x86_64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bxr_strip arch=arm64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bxr_arm64.log
rm -f engine/modules/modules_enabled.gen.h
#todo lipo script
#lipo
$podman run -v ${project_root}:/root/project -w /root/project/tools/osx godot-osx:${img_version} bash -c ./lipo.sh
#ios
#$podman run -v ${project_root}:/root/project -w /root/project godot-ios:${img_version} scons bir_strip -j4 . 2>&1 | tee logs/bir.log

17
tools/osx/create_app.sh Executable file
View File

@ -0,0 +1,17 @@
rm -Rf ../../engine/bin/Godot.app
cp -r ../../engine/misc/dist/osx_tools.app ../../engine/bin/Godot.app
mkdir -p ../../engine/bin/Godot.app/Contents/MacOS
cp ../../engine/bin/godot.osx.opt.tools.universal ../../engine/bin/Godot.app/Contents/MacOS/Godot
chmod +x ../../engine/bin/Godot.app/Contents/MacOS/Godot
cd ../../engine/bin/
zip -q -r Godot.app.zip Godot.app/*
cd ../../tools/osx/
#templates
#cp -r misc/dist/osx_template.app .
#mkdir -p osx_template.app/Contents/MacOS
#cp bin/godot.osx.opt.universal osx_template.app/Contents/MacOS/godot_osx_release.64
#cp bin/godot.osx.opt.debug.universal osx_template.app/Contents/MacOS/godot_osx_debug.64
#chmod +x osx_template.app/Contents/MacOS/godot_osx*
#zip -q -9 -r osx.zip osx_template.app

4
tools/osx/lipo.sh Executable file
View File

@ -0,0 +1,4 @@
# Tools
lipo -create ../../engine/bin/godot.osx.opt.tools.x86_64 ../../engine/bin/godot.osx.opt.tools.arm64 -output ../../engine/bin/godot.osx.opt.tools.universal
lipo -create ../../engine/bin/godot.osx.tools.x86_64 ../../engine/bin/godot.osx.tools.arm64 -output ../../engine/bin/godot.osx.tools.universal