From 2bbdc915ba1bb9d6e21e73cb093604d007800765 Mon Sep 17 00:00:00 2001 From: TrianglesCommunityProject Date: Thu, 23 Jul 2015 10:06:42 +0200 Subject: [PATCH] Black Pharao Update 1 - added/fixed some Mac build instructions --- contrib/macdeploy/fancy.plist | 2 +- contrib/macdeploy/macdeployqtplus | 2 +- doc/build-osx-brew-mavericks.txt | 123 ++++++++++++++++++++++++++++++ doc/build-osx.txt | 2 +- doc/release-process.txt | 4 +- 5 files changed, 128 insertions(+), 5 deletions(-) create mode 100644 doc/build-osx-brew-mavericks.txt diff --git a/contrib/macdeploy/fancy.plist b/contrib/macdeploy/fancy.plist index 1d73754..d4c58b5 100644 --- a/contrib/macdeploy/fancy.plist +++ b/contrib/macdeploy/fancy.plist @@ -22,7 +22,7 @@ 370 156 - triangles-Qt.app + Triangles-Qt.app 128 156 diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index 6d714f0..e70f2f1 100644 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -763,7 +763,7 @@ if config.dmg is not None: items_positions.append(itemscript.substitute(params)) params = { - "disk" : "triangles-Qt", + "disk" : "Triangles-Qt", "window_bounds" : "300,300,800,620", "icon_size" : "96", "background_commands" : "", diff --git a/doc/build-osx-brew-mavericks.txt b/doc/build-osx-brew-mavericks.txt new file mode 100644 index 0000000..d48c7a2 --- /dev/null +++ b/doc/build-osx-brew-mavericks.txt @@ -0,0 +1,123 @@ +Copyright (c) 2012-2013 PPCoin Developers +Copyright (c) 2009-2012 Bitcoin Developers +Distributed under the MIT/X11 software license, see the accompanying file +license.txt or http://www.opensource.org/licenses/mit-license.php. This +product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic +software written by Eric Young (eay@cryptsoft.com) and UPnP software written by +Thomas Bernard. + + +Mac OS X Mavericks build instructions +How to build trianglesd and Triangles-Qt on 10.9 + + +Prerequisites + +Install Xcode from the App Store and launch it + +All of the commands should be executed in Terminal.app + +1. Install the command line tools + +xcode-select --install + +2. Install Homebrew from http://brew.sh + +You cannot install Boost 1.55.0 from Homebrew and will have to build it +https://github.com/bitcoin/bitcoin/issues/3228 + +3. Install dependencies from Homebrew + +brew doctor +brew install berkeley-db4 openssl miniupnpc libevent +brew link berkeley-db4 --force +brew link openssl --force +brew link libevent --force +sudo mkdir -p /opt/local/lib +sudo ln -s /usr/local/lib /opt/local/lib/db48 + +4. Download and extract Boost from +http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/ + +tar xvfz Downloads/boost_1_55_0.tar.gz + +Boost 1.55.0 fails to build with current versions of clang so we need to patch +https://trac.macports.org/ticket/42282 + +5. Download and replace the files needed to build Boost + +curl -O https://raw.githubusercontent.com/boostorg/atomic/e4bde20f2eec0a51be14533871d2123bd2ab9cf3/include/boost/atomic/detail/gcc-atomic.hpp +curl -O https://raw.githubusercontent.com/boostorg/atomic/6bb71fdd8f7cc346d90fb14beb38b7297fc1ffd9/include/boost/atomic/detail/cas128strong.hpp +mv gcc-atomic.hpp boost_1_55_0/boost/atomic/detail/ +mv cas128strong.hpp boost_1_55_0/boost/atomic/detail/ + +6. Build Boost + +cd boost_1_55_0/ +./bootstrap.sh +./b2 --toolset=clang cxxflags="-stdlib=libstdc++" linkflags="-stdlib=libstdc++" variant=release link=static threading=multi runtime-link=static --build-dir=build --build-type=minimal stage --with-program_options --with-system --with-filesystem --with-chrono --with-thread +./b2 --toolset=clang cxxflags="-stdlib=libstdc++" linkflags="-stdlib=libstdc++" variant=release link=shared threading=multi runtime-link=shared --build-dir=build --build-type=minimal stage --with-program_options --with-system --with-filesystem --with-chrono --with-thread +cd .. + +7. Duplicate Boost libraries appending -mt + +for f in boost_1_55_0/stage/lib/*.dylib; do cp "$f" "${f%.dylib}-mt.dylib"; done +for f in boost_1_55_0/stage/lib/*.a; do cp "$f" "${f%.a}-mt.a"; done + +8. Copy Boost libraries and source + +sudo cp boost_1_55_0/stage/lib/libboost_*.dylib /usr/lib/ +sudo cp boost_1_55_0/stage/lib/libboost_*.a /opt/local/lib/ +sudo cp -r boost_1_55_0/boost/ /usr/include/boost/ + +9. Clone the github tree to get the source code + +git clone https://github.com/triangles/triangles.git + + +Building trianglesd + +1. Run the makefile + +cd triangles/src/ +make -f makefile.osx RELEASE=true 64BIT=true + + +Building Triangles-Qt.app + + +1. Download and install Qt 5 from http://download.qt.io/archive/qt/ + +2. Download and install Qt Creator from http://qt-project.org/downloads + +3. Use Qt Creator to build the project + +Double-click triangles/triangles-qt.pro to open Qt-Creator +Click the Configure Project button +Click on the monitor icon on the left bar above Debug and change it to Release +On the top menu, click Build and Build Project "bitcoin-qt" + + +Deploying Triangles-Qt.app + +Deploying your app is needed to run it on non-development systems + +1. Sym-link some shit + +sudo ln -s /opt/local/lib /opt/local/lib/lib +sudo ln -s /opt/local/lib/db48/libdb_cxx-4.8.dylib /opt/local/lib/libdb_cxx-4.8.dylib + +2. Copy Triangles-Qt.app and run macdeployqt to bundle required libraries + +mkdir deploy +cp -r build-triangles-qt-Desktop-Release/Triangles-Qt.app/ deploy/Triangles-Qt.app/ +sudo macdeployqt deploy/Triangles-Qt.app/ + +3. Fix a dependency path + +install_name_tool -change "/opt/local/lib/db48/libdb_cxx-4.8.dylib" "@executable_path/../Frameworks/libdb_cxx-4.8.dylib" deploy/Triangles-Qt.app/Contents/MacOS/Triangles-Qt + +4. Compress Triangles-Qt.app into a zip + +Right-click on Triangles-Qt.app and click Compress \ No newline at end of file diff --git a/doc/build-osx.txt b/doc/build-osx.txt index 6417dee..05f1b87 100644 --- a/doc/build-osx.txt +++ b/doc/build-osx.txt @@ -29,7 +29,7 @@ but you can get the current version from http://developer.apple.com 1. Clone the github tree to get the source code: -git clone https://github.com/TrianglesCommunityProject/triangles triangles +git clone https://github.com/wurstgelee/triangles triangles 2. Download and install MacPorts from http://www.macports.org/ diff --git a/doc/release-process.txt b/doc/release-process.txt index 2d60d8b..244430c 100644 --- a/doc/release-process.txt +++ b/doc/release-process.txt @@ -86,10 +86,10 @@ Note: This is old and outdated and doesn't apply to Triangles. make export QTDIR=/opt/local/share/qt4 # needed to find translations/qt_*.qm files T=$(contrib/qt_translations.py $QTDIR/translations src/qt/locale) - python2.7 contrib/macdeploy/macdeployqtplus triangles-Qt.app -add-qt-tr $T -dmg -fancy contrib/macdeploy/fancy.plist + python2.7 contrib/macdeploy/macdeployqtplus Triangles-Qt.app -add-qt-tr $T -dmg -fancy contrib/macdeploy/fancy.plist Build output expected: - triangles-Qt.dmg + Triangles-Qt.dmg * upload builds to SourceForge