Skip to content

Commit

Permalink
Mono/macOS: Change .app packaging following godotengine/godot#43768
Browse files Browse the repository at this point in the history
This allows signing the editor .app (will be done in next commit) and should
let users sign their macOS exports.

Co-authored-by: Shane Liesegang <shane@techie.net>
  • Loading branch information
akien-mga and sjml committed Mar 2, 2021
1 parent e0da42a commit bf6cf6e
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,14 @@ if [ "${build_mono}" == "1" ]; then
mkdir -p Godot_mono.app/Contents/MacOS
cp out/macosx/tools-mono/godot.osx.opt.tools.x86_64.mono Godot_mono.app/Contents/MacOS/Godot
mkdir -p Godot_mono.app/Contents/{Frameworks,Resources}
mkdir -p Godot_mono.app/Contents/{Frameworks,Resources}/GodotSharp
mkdir -p Godot_mono.app/Contents/{Frameworks,Resources}/GodotSharp/Mono
cp -rp out/macosx/tools-mono/GodotSharp/Api Godot_mono.app/Contents/Frameworks/GodotSharp
cp -rp out/macosx/tools-mono/GodotSharp/Mono/lib Godot_mono.app/Contents/Frameworks/GodotSharp/Mono
cp -rp out/macosx/tools-mono/GodotSharp/Tools Godot_mono.app/Contents/Frameworks/GodotSharp
cp -rp out/macosx/tools-mono/GodotSharp/Mono/etc Godot_mono.app/Contents/Resources/GodotSharp/Mono
cp -rp out/aot-compilers Godot_mono.app/Contents/Frameworks/GodotSharp/Tools/
cp -rp out/macosx/tools-mono/GodotSharp.frameworks Godot_mono.app/Contents/Frameworks/GodotSharp
cp -rp out/macosx/tools-mono/GodotSharp.resources Godot_mono.app/Contents/Resources/GodotSharp
# Temporary workaround until those are also properly packaged.
cp -rp out/macosx/tools-mono/GodotSharp/Api Godot_mono.app/Contents/Resources/GodotSharp/Api
cp -rp out/macosx/tools-mono/GodotSharp/Tools/* Godot_mono.app/Contents/Resources/GodotSharp/Tools/
sed -i -e 's/$mono_libdir/$mono_libdir\/..\/..\/..\/..\/Frameworks\/GodotSharp\/Mono/g' Godot_mono.app/Contents/Resources/GodotSharp/Mono/etc/mono/config

cp -rp out/aot-compilers Godot_mono.app/Contents/Resources/GodotSharp/Tools/
chmod +x Godot_mono.app/Contents/MacOS/Godot
zip -q -9 -r "${reldir_mono}/${binname}.zip" Godot_mono.app
rm -rf Godot_mono.app
Expand All @@ -387,7 +388,11 @@ if [ "${build_mono}" == "1" ]; then

cp out/macosx/templates-mono/godot.osx.opt.debug.x86_64.mono osx_template.app/Contents/MacOS/godot_osx_debug.64
cp out/macosx/templates-mono/godot.osx.opt.x86_64.mono osx_template.app/Contents/MacOS/godot_osx_release.64
cp -rp out/macosx/templates-mono/data.mono.osx.64.* osx_template.app/Contents/MacOS/

mkdir -p osx_template.app/Contents/{Frameworks,Resources}
cp -rp out/macosx/templates-mono/data.mono.osx.64.frameworks.* osx_template.app/Contents/Frameworks/
cp -rp out/macosx/templates-mono/data.mono.osx.64.resources.* osx_template.app/Contents/Resources/

chmod +x osx_template.app/Contents/MacOS/godot_osx*
zip -q -9 -r "${templatesdir_mono}/osx.zip" osx_template.app
rm -rf osx_template.app
Expand Down

0 comments on commit bf6cf6e

Please sign in to comment.