Last active
December 14, 2015 03:28
-
-
Save carsonmcdonald/5020747 to your computer and use it in GitHub Desktop.
Grabs the current version of mruby and builds it as a framework that will work for embedding in OS X apps.
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
# | |
# Grab the latest mruby | |
# | |
git clone git://github.com/mruby/mruby.git | |
cd mruby | |
make clean | |
make | |
make test | |
cd .. | |
if [ ! -d bin ] | |
then | |
mkdir bin | |
cp mruby/bin/* bin | |
fi | |
# | |
# create framework dirs | |
# | |
if [ ! -d MRuby.framework ] | |
then | |
mkdir -p MRuby.framework/Versions/0.1/Headers MRuby.framework/Versions/0.1/Resources | |
ln -s 0.1 MRuby.framework/Versions/Current | |
ln -s Versions/Current/Headers MRuby.framework/Headers | |
ln -s Versions/Current/MRuby MRuby.framework/MRuby | |
ln -s Versions/Current/Resources MRuby.framework/Resources | |
fi | |
cp mruby/build/host/lib/libmruby.a MRuby.framework/Versions/Current/MRuby | |
cp -R mruby/include/* MRuby.framework/Versions/Current/Headers/ | |
# | |
# Fixup for headers with the framework directory structure | |
# | |
sed -i '' 's/mruby\.h/..\/mruby\.h/g' MRuby.framework/Versions/Current/Headers/mruby/* | |
sed -i '' 's/mruby\/khash\.h/..\/mruby\/khash\.h/g' MRuby.framework/Versions/Current/Headers/mruby/* | |
sed -i '' 's/mruby\/irep\.h/..\/mruby\/irep\.h/g' MRuby.framework/Versions/Current/Headers/mruby/proc.h | |
sed -i '' 's/mruby\/irep\.h/..\/mruby\/irep\.h/g' MRuby.framework/Versions/Current/Headers/mruby/dump.h | |
sed -i '' 's/mruby\/object\.h/..\/mruby\/object\.h/g' MRuby.framework/Versions/Current/Headers/mruby/value.h | |
sed -i '' 's/mruby\/compile\.h/..\/mruby\/compile\.h/g' MRuby.framework/Versions/Current/Headers/mruby/irep.h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment