diff options
-rw-r--r-- | bitcoin-qt.pro | 7 | ||||
-rwxr-xr-x | contrib/create_osx_dmg.sh | 51 | ||||
-rw-r--r-- | contrib/gitian-descriptors/gitian.yml | 4 | ||||
-rw-r--r-- | doc/build-unix.txt | 12 | ||||
-rw-r--r-- | share/setup.nsi | 14 | ||||
-rw-r--r-- | src/makefile.osx | 21 | ||||
-rw-r--r-- | src/makefile.unix | 37 | ||||
-rw-r--r-- | src/serialize.h | 2 |
8 files changed, 89 insertions, 59 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index 6b1fb7f6cf..42d721e940 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -1,5 +1,6 @@ TEMPLATE = app TARGET = +VERSION = 0.5.0 INCLUDEPATH += src src/json src/qt DEFINES += QT_GUI CONFIG += no_include_pwd @@ -198,6 +199,10 @@ isEmpty(BDB_LIB_PATH) { macx:BDB_LIB_PATH = /opt/local/lib/db48 } +isEmpty(BDB_LIB_SUFFIX) { + macx:BDB_LIB_SUFFIX = -4.8 +} + isEmpty(BDB_INCLUDE_PATH) { macx:BDB_INCLUDE_PATH = /opt/local/include/db48 } @@ -216,7 +221,7 @@ windows:RC_FILE = src/qt/res/bitcoin-qt.rc macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 BOOST_FILESYSTEM_VERSION=3 macx:ICON = src/qt/res/icons/bitcoin.icns -macx:TARGET = "Bitcoin Qt" +macx:TARGET = "Bitcoin-Qt" # Set libraries and includes at end, to use platform-defined defaults if not overridden INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH diff --git a/contrib/create_osx_dmg.sh b/contrib/create_osx_dmg.sh index af164e56cf..d26dcc8242 100755 --- a/contrib/create_osx_dmg.sh +++ b/contrib/create_osx_dmg.sh @@ -24,37 +24,24 @@ else TOP=$1 fi -CONTRIB=$TOP/contrib -BUILD_DIR=/tmp/bitcoin_osx_build - -# First, compile bitcoin and bitcoind -cd "$TOP/src" -if [ ! -e bitcoin ]; then make -f makefile.osx bitcoin; fi -if [ ! -e bitcoind ]; then make -f makefile.osx bitcoind; fi -strip bitcoin bitcoind - -mkdir -p "$BUILD_DIR" -cd "$BUILD_DIR" - -rm -f Bitcoin.sparseimage -hdiutil convert "$CONTRIB/BitcoinTemplate.dmg" -format UDSP -o Bitcoin -hdiutil mount Bitcoin.sparseimage - -# Copy over placeholders in /Volumes/Bitcoin -cp "$TOP/src/bitcoind" /Volumes/Bitcoin/ -cp "$TOP/src/bitcoin" /Volumes/Bitcoin/Bitcoin.app/Contents/MacOS/ - -# Create source code .zip +# Create Bitcoin-Qt.app cd "$TOP" -git archive -o /Volumes/Bitcoin/bitcoin.zip $(git branch 2>/dev/null|grep -e ^* | cut -d ' ' -f 2) - -# Fix permissions -chmod -Rf go-w /Volumes/Bitcoin - -cd "$BUILD_DIR" -hdiutil eject /Volumes/Bitcoin -rm -f "$CWD/Bitcoin.dmg" -hdiutil convert Bitcoin.sparseimage -format UDBZ -o "$CWD/Bitcoin.dmg" +if [ ! -e Makefile ]; then qmake bitcoin-qt.pro; fi +make +macdeployqt Bitcoin-Qt.app +# Workaround a bug in macdeployqt: https://bugreports.qt.nokia.com/browse/QTBUG-21913 +# (when fixed, this won't be necessary) +cp /opt/local/lib/db48/libdb_cxx-4.8.dylib Bitcoin-Qt.app/Contents/Frameworks/ +install_name_tool -id @executable_path/../Frameworks/libdb_cxx-4.8.dylib \ + Bitcoin-Qt.app/Contents/Frameworks/libdb_cxx-4.8.dylib +install_name_tool -change libqt.3.dylib \ + @executable_path/../Frameworks/libqt.3.dylib \ + Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt + +# Create a .dmg +macdeployqt Bitcoin-Qt.app -dmg + +# Compile bitcoind +cd "$TOP/src" +STATIC=1 make -f makefile.osx -cd "$CWD" -rm -rf "$BUILD_DIR" diff --git a/contrib/gitian-descriptors/gitian.yml b/contrib/gitian-descriptors/gitian.yml index efa9cb8c10..7e0d174810 100644 --- a/contrib/gitian-descriptors/gitian.yml +++ b/contrib/gitian-descriptors/gitian.yml @@ -53,7 +53,7 @@ script: | cp $OUTDIR/src/COPYING $OUTDIR cd src sed 's/$(DEBUGFLAGS)//' -i makefile.unix - PATH=$INSTDIR/bin:$PATH make -f makefile.unix CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoin USE_UPNP=1 - PATH=$INSTDIR/bin:$PATH make -f makefile.unix CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoind USE_UPNP=0 + PATH=$INSTDIR/bin:$PATH make -f makefile.unix STATIC=1 CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoin USE_UPNP=1 + PATH=$INSTDIR/bin:$PATH make -f makefile.unix STATIC=1 CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoind USE_UPNP=0 mkdir -p $OUTDIR/bin/$GBUILD_BITS install -s bitcoin bitcoind $OUTDIR/bin/$GBUILD_BITS diff --git a/doc/build-unix.txt b/doc/build-unix.txt index e47dbf710c..f4178caae5 100644 --- a/doc/build-unix.txt +++ b/doc/build-unix.txt @@ -65,14 +65,16 @@ If using Boost 1.37, append -mt to the boost libraries in the makefile. Dependency Build Instructions: Gentoo ------------------------------------- -emerge -av boost openssl sys-libs/db + +Note: If you just want to install bitcoind on Gentoo, you can add the Bitcoin + overlay and use your package manager: + layman -a bitcoin && emerge bitcoind + +emerge -av1 --noreplace boost glib openssl sys-libs/db:4.8 Take the following steps to build (no UPnP support): cd ${BITCOIN_DIR}/src - sed -i 's/<db_cxx.h>/<db4.8\/db_cxx.h>/' *.h # path fix - sed -i 's/-Bstatic/-Bdynamic/' makefile.unix # dynamic linking - sed -i 's/^USE_UPNP:=0$/USE_UPNP:=/' makefile.unix # disable UPnP - make -f makefile.unix + make -f makefile.unix USE_UPNP= BDB_INCLUDE_PATH='/usr/include/db4.8' strip bitcoind diff --git a/share/setup.nsi b/share/setup.nsi index 4c837c974b..2f2eeaa784 100644 --- a/share/setup.nsi +++ b/share/setup.nsi @@ -5,7 +5,7 @@ SetCompressor /SOLID lzma # General Symbol Definitions
!define REGKEY "SOFTWARE\$(^Name)"
-!define VERSION 0.4.1
+!define VERSION 0.5.0
!define COMPANY "Bitcoin project"
!define URL http://www.bitcoin.org/
@@ -20,7 +20,7 @@ SetCompressor /SOLID lzma !define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
!define MUI_STARTMENUPAGE_DEFAULTFOLDER Bitcoin
-!define MUI_FINISHPAGE_RUN $INSTDIR\bitcoin.exe
+!define MUI_FINISHPAGE_RUN $INSTDIR\bitcoin-qt.exe
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp"
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
@@ -45,13 +45,13 @@ Var StartMenuGroup !insertmacro MUI_LANGUAGE English
# Installer attributes
-OutFile bitcoin-0.4.1-win32-setup.exe
+OutFile bitcoin-0.5.0-win32-setup.exe
InstallDir $PROGRAMFILES\Bitcoin
CRCCheck on
XPStyle on
BrandingText " "
ShowInstDetails show
-VIProductVersion 0.4.1.0
+VIProductVersion 0.5.0.0
VIAddVersionKey ProductName Bitcoin
VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey CompanyName "${COMPANY}"
@@ -66,7 +66,7 @@ ShowUninstDetails show Section -Main SEC0000
SetOutPath $INSTDIR
SetOverwrite on
- File ../src/bitcoin.exe
+ File ../bitcoin-qt.exe
File /oname=license.txt ../COPYING
File /oname=readme.txt ../doc/README_windows.txt
SetOutPath $INSTDIR\daemon
@@ -85,7 +85,7 @@ Section -post SEC0001 WriteUninstaller $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory $SMPROGRAMS\$StartMenuGroup
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk" $INSTDIR\bitcoin.exe
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk" $INSTDIR\bitcoin-qt.exe
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk" $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_END
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
@@ -113,7 +113,7 @@ done${UNSECTION_ID}: # Uninstaller sections
Section /o -un.Main UNSEC0000
- Delete /REBOOTOK $INSTDIR\bitcoin.exe
+ Delete /REBOOTOK $INSTDIR\bitcoin-qt.exe
Delete /REBOOTOK $INSTDIR\license.txt
Delete /REBOOTOK $INSTDIR\readme.txt
RMDir /r /REBOOTOK $INSTDIR\daemon
diff --git a/src/makefile.osx b/src/makefile.osx index 6269d93bda..7830f3bad5 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -19,7 +19,19 @@ LIBPATHS= \ USE_UPNP:=1 -LIBS= -dead_strip \ +LIBS= -dead_strip +ifdef STATIC +# Build STATIC if you are redistributing the bitcoind binary +LIBS += \ + $(DEPSDIR)/lib/db48/libdb_cxx-4.8.a \ + $(DEPSDIR)/lib/libboost_system-mt.a \ + $(DEPSDIR)/lib/libboost_filesystem-mt.a \ + $(DEPSDIR)/lib/libboost_program_options-mt.a \ + $(DEPSDIR)/lib/libboost_thread-mt.a \ + $(DEPSDIR)/lib/libssl.a \ + $(DEPSDIR)/lib/libcrypto.a +else +LIBS += \ -ldb_cxx-4.8 \ -lboost_system-mt \ -lboost_filesystem-mt \ @@ -27,6 +39,7 @@ LIBS= -dead_strip \ -lboost_thread-mt \ -lssl \ -lcrypto +endif DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DUSE_SSL @@ -70,8 +83,12 @@ OBJS= \ obj/wallet.o ifdef USE_UPNP - LIBS += -lminiupnpc DEFS += -DUSE_UPNP=$(USE_UPNP) +ifdef STATIC + LIBS += $(DEPSDIR)/lib/libminiupnpc.a +else + LIBS += -lminiupnpc +endif endif diff --git a/src/makefile.unix b/src/makefile.unix index 1ef7caaad7..0e903ef18e 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -6,26 +6,45 @@ CXX=g++ USE_UPNP:=0 -DEFS=-DNOPCH -DUSE_SSL +DEFS=-DNOPCH + +DEFS += $(addprefix -I,$(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH)) +LIBS += $(addprefix -l,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH)) + +LMODE = dynamic +LMODE2 = dynamic +ifdef STATIC + LMODE = static + ifeq (${STATIC}, all) + LMODE2 = static + endif +endif # for boost 1.37, add -mt to the boost libraries LIBS= \ - -Wl,-Bstatic \ - -l boost_system \ - -l boost_filesystem \ - -l boost_program_options \ - -l boost_thread \ - -l db_cxx \ + -Wl,-B$(LMODE) \ + -l boost_system$(BOOST_LIB_SUFFIX) \ + -l boost_filesystem$(BOOST_LIB_SUFFIX) \ + -l boost_program_options$(BOOST_LIB_SUFFIX) \ + -l boost_thread$(BOOST_LIB_SUFFIX) \ + -l db_cxx$(BDB_LIB_SUFFIX) \ -l ssl \ -l crypto -ifdef USE_UPNP +ifndef USE_UPNP + override USE_UPNP = - +endif +ifneq (${USE_UPNP}, -) LIBS += -l miniupnpc DEFS += -DUSE_UPNP=$(USE_UPNP) endif +ifneq (${USE_SSL}, 0) + DEFS += -DUSE_SSL +endif + LIBS+= \ - -Wl,-Bdynamic \ + -Wl,-B$(LMODE2) \ -l gthread-2.0 \ -l z \ -l dl \ diff --git a/src/serialize.h b/src/serialize.h index 396594cf73..beb87f1d04 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -60,7 +60,7 @@ class CDataStream; class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int VERSION = 40100; +static const int VERSION = 50000; static const char* pszSubVer = ""; static const bool VERSION_IS_BETA = true; |