Last active
November 2, 2016 11:10
-
-
Save khalidchawtany/f95a50b8530de3270e8a801346856573 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -x | |
#=============================== | |
# Copied Calinou/build_osx.sh gist | |
#=============================== | |
# This script must be run from a GNU/Linux system with | |
# OSXCross installed and configured. XCode SDK 7.2 is used | |
# with this script. | |
# Place this script at the root of your Godot Git clone. | |
# CC0 1.0 Universal | |
OSXCROSS_PATH="/opt/osxcross" | |
export OSXCROSS_ROOT=$OSXCROSS_PATH | |
export PATH=$OSXCROSS_PATH/target/bin:$PATH | |
# Build 64-bit Godot for OS X | |
scons p=osx -j$(nproc) verbose=no osxcross_sdk=darwin15 bits=64 tools=yes target=release_debug | |
scons p=osx -j$(nproc) verbose=no osxcross_sdk=darwin15 bits=64 tools=no target=release_debug | |
scons p=osx -j$(nproc) verbose=no osxcross_sdk=darwin15 bits=64 tools=no target=release | |
# Build 32-bit Godot for OS X | |
scons p=osx -j$(nproc) verbose=no osxcross_sdk=darwin15 bits=32 tools=yes target=release_debug | |
scons p=osx -j$(nproc) verbose=no osxcross_sdk=darwin15 bits=32 tools=no target=release_debug | |
scons p=osx -j$(nproc) verbose=no osxcross_sdk=darwin15 bits=32 tools=no target=release | |
# Install into osx_template.app/ which is in the bin/ directory | |
# Download osx_template.zip from here: https://archive.hugo.pro/misc/godot/osx_template.zip | |
# then extract it as osx_template.app in the bin/ directory. | |
cd bin/ | |
cp godot.osx.opt.debug.64 osx_template.app/Contents/MacOS/godot_osx_debug.64 | |
cp godot.osx.opt.debug.32 osx_template.app/Contents/MacOS/godot_osx_debug.32 | |
cp godot.osx.opt.64 osx_template.app/Contents/MacOS/godot_osx_release.64 | |
cp godot.osx.opt.32 osx_template.app/Contents/MacOS/godot_osx_release.32 | |
# Create .zip of export template and copy it to Godot's templates directory | |
zip -r9 osx.zip osx_template.app | |
cp osx.zip $HOME/.godot/templates/ | |
# Install Godot editor binaries into their .app directories, then create .zips | |
# Download Godot64.zip from here: https://archive.hugo.pro/misc/godot/Godot64.zip | |
# then extract it as Godot64.app in the bin/ directory. | |
# Download Godot32.zip from here: https://archive.hugo.pro/misc/godot/Godot32.zip | |
# then extract it as Godot64.app in the bin/ directory. | |
cp godot.osx.opt.tools.64 Godot64.app/Contents/MacOS/Godot | |
cp godot.osx.opt.tools.32 Godot32.app/Contents/MacOS/Godot | |
zip -r9 $HOME/.godot/editor/godot-osx-x86_64.zip Godot64.app/ | |
zip -r9 $HOME/.godot/editor/godot-osx-x86.zip Godot32.app/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment