diff --git a/bootstrap_mac_dmg.sh b/bootstrap_mac_dmg.sh new file mode 100644 index 0000000..63af867 --- /dev/null +++ b/bootstrap_mac_dmg.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# by following the instructions in this script, you will be able to build +# a clean .dmg for Keyhotee that should be portable to all mac systems without +# any additional dependencies +# +# prerequisite: a fresh mavericks install (in a vm, most likely) +# +# note: this script cannot be run as is, sometimes it will require manual +# intervention. You should follow the instructions in the lines +# starting with "#!!! ". + +## install xcode and command line tools + +#!!! download xcode from the mac app store + +xcode-select --install +#!!! install command line tools + +sudo xcodebuild -license +#!!! agree to the license terms + + +## install brew and keyhotee dependencies + +ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" + +brew install cmake boost qt5 +export QTDIR=/usr/local/Cellar/qt5/5.2.0 + + +## git clone keyhotee and compile it +git clone https://github.com/InvictusInnovations/keyhotee +cd keyhotee +git clone https://github.com/InvictusInnovations/BitShares +cd BitShares +git clone https://github.com/InvictusInnovations/fc +cd .. + +cmake . && make + +cd bin +$QTDIR/bin/macdeployqt Keyhotee.app -dmg diff --git a/make_keyhotee_mac_dmg.sh b/make_keyhotee_mac_dmg.sh deleted file mode 100755 index 19a00d5..0000000 --- a/make_keyhotee_mac_dmg.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh - -# prerequisites: you need to have brew (http://brew.sh) installed -# -# run once: brew tap homebrew/versions && brew install cmake qt5 gcc48 -# -# you also need to download the source tarball for ICU and Boost and put -# them somewhere on your system - -# Set the following variables to the ones of your system: -export GCC_BIN=/usr/local/bin/gcc-4.8 -export GXX_BIN=/usr/local/bin/g++-4.8 -export ICU_TARBALL=/tmp/icu4c-52_1-src.tgz -export BOOST_TARBALL=/tmp/boost_1_55_0.tar.bz2 -export QTDIR=/usr/local/Cellar/qt5/5.2.0 - -BUILD_DIR="/tmp/keyhotee_build" -mkdir -p $BUILD_DIR - - -# compile icu -cd $BUILD_DIR -tar xf $ICU_TARBALL && cd icu/source - -U_USING_ICU_NAMESPACE=0 U_CHARSET_IS_UTF8=1 ./runConfigureICU MacOSX/GCC --enable-static --disable-shared CC=$GCC_BIN CXX=$GXX_BIN -make -j4 && make install DESTDIR=$BUILD_DIR - - -# compile boost -cd $BUILD_DIR -tar xf $BOOST_TARBALL && cd boost_1_55_0 - -# trick boost to use our version of gcc -ln -s $GCC_BIN $BUILD_DIR/gcc -ln -s $GXX_BIN $BUILD_DIR/g++ - -PATH=$BUILD_DIR:$PATH ./bootstrap.sh --with-toolset=gcc --prefix=$BUILD_DIR/usr/local --with-libraries=thread,date_time,system,filesystem,program_options,signals,serialization,chrono,context,coroutine,test -PATH=$BUILD_DIR:$PATH ./b2 threading=multi link=static -PATH=$BUILD_DIR:$PATH ./b2 install threading=multi link=static - - -# compile keyhotee - -cd $BUILD_DIR -git clone https://github.com/InvictusInnovations/keyhotee -cd keyhotee -git clone https://github.com/InvictusInnovations/BitShares -cd BitShares -git clone https://github.com/InvictusInnovations/fc -cd .. - -cmake -DBOOST_ROOT=$BUILD_DIR/usr/local/include -DCMAKE_CXX_COMPILER=$GXX_BIN -DCMAKE_C_COMPILER=$GCC_BIN -DCMAKE_LIBRARY_PATH=$BUILD_DIR/usr/local/lib -DCMAKE_INCLUDE_PATH=$BUILD_DIR/usr/local/include ./CMakeLists.txt -#make VERBOSE=1 -make -j4 - - -# make a .app and a .dmg with all paths to dylibs correctly set - -STDCXX_DYLIB=/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2/libstdc++.6.dylib -GCC_DYLIB=/usr/local/Cellar/gcc48/4.8.2/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2/libgcc_s.1.dylib - -APP=Keyhotee.app/Contents - -cd bin -mkdir $APP/Frameworks -cp $STDCXX_DYLIB $GCC_DYLIB $APP/Frameworks -chmod 644 $APP/Frameworks/* - -install_name_tool -change $GCC_DYLIB @executable_path/../Frameworks/libgcc_s.1.dylib $APP/MacOS/Keyhotee -install_name_tool -change $STDCXX_DYLIB @executable_path/../Frameworks/libstdc++.6.dylib $APP/MacOS/Keyhotee - -install_name_tool -change $GCC_DYLIB @executable_path/../Frameworks/libgcc_s.1.dylib $APP/Frameworks/libgcc_s.1.dylib -install_name_tool -change $GCC_DYLIB @executable_path/../Frameworks/libgcc_s.1.dylib $APP/Frameworks/libstdc++.6.dylib -install_name_tool -change $STDCXX_DYLIB @executable_path/../Frameworks/libstdc++.6.dylib $APP/Frameworks/libstdc++.6.dylib - - -$QTDIR/bin/macdeployqt Keyhotee.app -dmg