From a5f07cbea05fbb03a668dbd5ba3694627cfb5375 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Mon, 7 Nov 2011 09:50:03 -0500 Subject: [PATCH] Static link on Linux. And better document release process on OSX. --- bitcoin-qt.pro | 18 ++++++++++++++++++ contrib/gitian-descriptors/gitian.yml | 2 +- doc/release-process.txt | 12 ++++++++---- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index d1a7e68aa..a8f6b2d86 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -19,6 +19,17 @@ OBJECTS_DIR = build MOC_DIR = build UI_DIR = build +# use: qmake "RELEASE=1" +contains(RELEASE, 1) { + # Mac: compile for maximum compatibility (10.5, 32-bit) + macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk + + !windows:!macx { + # Linux: static link + LIBS += -Wl,-Bstatic + } +} + # use: qmake "USE_UPNP=1" ( enabled by default; default) # or: qmake "USE_UPNP=0" (disabled by default) # or: qmake "USE_UPNP=-" (not supported) @@ -255,4 +266,11 @@ LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX +contains(RELEASE, 1) { + !windows:!macx { + # Linux: turn dynamic linking back on for c/c++ runtime libraries + LIBS += -Wl,-Bdynamic + } +} + system($$QMAKE_LRELEASE -silent $$_PRO_FILE_) diff --git a/contrib/gitian-descriptors/gitian.yml b/contrib/gitian-descriptors/gitian.yml index 4e1da912d..72e40cd5a 100644 --- a/contrib/gitian-descriptors/gitian.yml +++ b/contrib/gitian-descriptors/gitian.yml @@ -43,6 +43,6 @@ script: | mkdir -p $OUTDIR/bin/$GBUILD_BITS install -s bitcoind $OUTDIR/bin/$GBUILD_BITS cd .. - qmake INCLUDEPATH="$INSTDIR/include" LIBS="-L$INSTDIR/lib" + qmake INCLUDEPATH="$INSTDIR/include" LIBS="-L$INSTDIR/lib" RELEASE=1 make $MAKEOPTS install bitcoin-qt $OUTDIR/bin/$GBUILD_BITS diff --git a/doc/release-process.txt b/doc/release-process.txt index f0e1ca28c..4abd91389 100644 --- a/doc/release-process.txt +++ b/doc/release-process.txt @@ -24,6 +24,7 @@ * perform gitian builds * From a directory containing the bitcoin source, gitian-builder and gitian.sigs + export SIGNER=(your gitian key, ie bluematt, sipa, etc) export VERSION=0.5.0 cd ./gitian-builder @@ -42,12 +43,12 @@ * Build bitcoind and bitcoin-qt on Linux32, Linux64, and Win32: ./bin/gbuild --commit bitcoin=v$VERSION ../bitcoin/contrib/gitian-descriptors/gitian.yml - ./bin/gsign --signer (your gitian key, ie bluematt, sipa, etc) --release $VERSION --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian.yml + ./bin/gsign --signer $SIGNER --release $VERSION --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian.yml cd build/out zip bitcoin-$VERSION-linux-gitian.zip * mv bitcoin-$VERSION-linux-gitian.zip ../../ ./bin/gbuild --commit bitcoin=v$VERSION ../bitcoin/contrib/gitian-descriptors/gitian-win32.yml - ./bin/gsign --signer (your gitian key, ie bluematt, sipa, etc) --release $VERSION-win32 --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win32.yml + ./bin/gsign --signer $SIGNER --release $VERSION-win32 --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win32.yml cd build/out zip bitcoin-$VERSION-win32-gitian.zip * mv bitcoin-$VERSION-win32-gitian.zip ../../ @@ -74,10 +75,13 @@ * perform Mac build + See this blog post for how Gavin set up his build environment and + patched macdeployqt to build the OSX release: + http://gavintech.blogspot.com/2011/11/deploying-bitcoin-qt-on-osx.html qmake USE_SSL=1 USE_UPNP=1 bitcoin-qt.pro make - export QTDIR=/opt/local/share/qt4 - contrib/macdeploy/macdeployqtplus Bitcoin-Qt.app -add-qt-tr de,ru -dmg -fancy contrib/macdeploy/fancy.plist + export QTDIR=/opt/local/share/qt4 # needed to find translations/qt_*.qm files + contrib/macdeploy/macdeployqtplus Bitcoin-Qt.app -add-qt-tr de,es,ru -dmg -fancy contrib/macdeploy/fancy.plist Build output expected: Bitcoin-Qt.dmg