Browse Source

Merge branch 'master' of https://github.com/bitcoin/bitcoin

miguelfreitas
Wladimir J. van der Laan 13 years ago
parent
commit
fbea7eca65
  1. 13
      bitcoin-qt.pro
  2. 51
      contrib/create_osx_dmg.sh
  3. 4
      contrib/gitian-descriptors/gitian.yml
  4. 12
      doc/build-unix.txt
  5. 14
      share/setup.nsi
  6. 21
      src/makefile.osx
  7. 51
      src/makefile.unix
  8. 2508
      src/qt/locale/bitcoin_es.ts
  9. 2
      src/serialize.h

13
bitcoin-qt.pro

@ -1,5 +1,6 @@
TEMPLATE = app TEMPLATE = app
TARGET = TARGET =
VERSION = 0.5.0
INCLUDEPATH += src src/json src/qt INCLUDEPATH += src src/json src/qt
DEFINES += QT_GUI DEFINES += QT_GUI
CONFIG += no_include_pwd CONFIG += no_include_pwd
@ -174,8 +175,10 @@ FORMS += \
CODECFORTR = UTF-8 CODECFORTR = UTF-8
# for lrelease/lupdate # for lrelease/lupdate
TRANSLATIONS = src/qt/locale/bitcoin_nl.ts src/qt/locale/bitcoin_de.ts \ TRANSLATIONS = src/qt/locale/bitcoin_de.ts \
src/qt/locale/bitcoin_ru.ts src/qt/locale/bitcoin_es.ts \
src/qt/locale/bitcoin_nl.ts \
src/qt/locale/bitcoin_ru.ts
isEmpty(QMAKE_LRELEASE) { isEmpty(QMAKE_LRELEASE) {
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
@ -205,6 +208,10 @@ isEmpty(BDB_LIB_PATH) {
macx:BDB_LIB_PATH = /opt/local/lib/db48 macx:BDB_LIB_PATH = /opt/local/lib/db48
} }
isEmpty(BDB_LIB_SUFFIX) {
macx:BDB_LIB_SUFFIX = -4.8
}
isEmpty(BDB_INCLUDE_PATH) { isEmpty(BDB_INCLUDE_PATH) {
macx:BDB_INCLUDE_PATH = /opt/local/include/db48 macx:BDB_INCLUDE_PATH = /opt/local/include/db48
} }
@ -226,7 +233,7 @@ macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm
macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 BOOST_FILESYSTEM_VERSION=3 macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 BOOST_FILESYSTEM_VERSION=3
macx:ICON = src/qt/res/icons/bitcoin.icns 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 # Set libraries and includes at end, to use platform-defined defaults if not overridden
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH

51
contrib/create_osx_dmg.sh

@ -24,37 +24,24 @@ else
TOP=$1 TOP=$1
fi fi
CONTRIB=$TOP/contrib # Create Bitcoin-Qt.app
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
cd "$TOP" cd "$TOP"
git archive -o /Volumes/Bitcoin/bitcoin.zip $(git branch 2>/dev/null|grep -e ^* | cut -d ' ' -f 2) if [ ! -e Makefile ]; then qmake bitcoin-qt.pro; fi
make
# Fix permissions macdeployqt Bitcoin-Qt.app
chmod -Rf go-w /Volumes/Bitcoin # Workaround a bug in macdeployqt: https://bugreports.qt.nokia.com/browse/QTBUG-21913
# (when fixed, this won't be necessary)
cd "$BUILD_DIR" cp /opt/local/lib/db48/libdb_cxx-4.8.dylib Bitcoin-Qt.app/Contents/Frameworks/
hdiutil eject /Volumes/Bitcoin install_name_tool -id @executable_path/../Frameworks/libdb_cxx-4.8.dylib \
rm -f "$CWD/Bitcoin.dmg" Bitcoin-Qt.app/Contents/Frameworks/libdb_cxx-4.8.dylib
hdiutil convert Bitcoin.sparseimage -format UDBZ -o "$CWD/Bitcoin.dmg" 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"

4
contrib/gitian-descriptors/gitian.yml

@ -53,7 +53,7 @@ script: |
cp $OUTDIR/src/COPYING $OUTDIR cp $OUTDIR/src/COPYING $OUTDIR
cd src cd src
sed 's/$(DEBUGFLAGS)//' -i makefile.unix 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 STATIC=1 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 bitcoind USE_UPNP=0
mkdir -p $OUTDIR/bin/$GBUILD_BITS mkdir -p $OUTDIR/bin/$GBUILD_BITS
install -s bitcoin bitcoind $OUTDIR/bin/$GBUILD_BITS install -s bitcoin bitcoind $OUTDIR/bin/$GBUILD_BITS

12
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 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): Take the following steps to build (no UPnP support):
cd ${BITCOIN_DIR}/src cd ${BITCOIN_DIR}/src
sed -i 's/<db_cxx.h>/<db4.8\/db_cxx.h>/' *.h # path fix make -f makefile.unix USE_UPNP= BDB_INCLUDE_PATH='/usr/include/db4.8'
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
strip bitcoind strip bitcoind

14
share/setup.nsi

@ -5,7 +5,7 @@ SetCompressor /SOLID lzma
# General Symbol Definitions # General Symbol Definitions
!define REGKEY "SOFTWARE\$(^Name)" !define REGKEY "SOFTWARE\$(^Name)"
!define VERSION 0.4.1 !define VERSION 0.5.0
!define COMPANY "Bitcoin project" !define COMPANY "Bitcoin project"
!define URL http://www.bitcoin.org/ !define URL http://www.bitcoin.org/
@ -20,7 +20,7 @@ SetCompressor /SOLID lzma
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY} !define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
!define MUI_STARTMENUPAGE_DEFAULTFOLDER Bitcoin !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_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp" !define MUI_UNWELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp"
!define MUI_UNFINISHPAGE_NOAUTOCLOSE !define MUI_UNFINISHPAGE_NOAUTOCLOSE
@ -45,13 +45,13 @@ Var StartMenuGroup
!insertmacro MUI_LANGUAGE English !insertmacro MUI_LANGUAGE English
# Installer attributes # Installer attributes
OutFile bitcoin-0.4.1-win32-setup.exe OutFile bitcoin-0.5.0-win32-setup.exe
InstallDir $PROGRAMFILES\Bitcoin InstallDir $PROGRAMFILES\Bitcoin
CRCCheck on CRCCheck on
XPStyle on XPStyle on
BrandingText " " BrandingText " "
ShowInstDetails show ShowInstDetails show
VIProductVersion 0.4.1.0 VIProductVersion 0.5.0.0
VIAddVersionKey ProductName Bitcoin VIAddVersionKey ProductName Bitcoin
VIAddVersionKey ProductVersion "${VERSION}" VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey CompanyName "${COMPANY}" VIAddVersionKey CompanyName "${COMPANY}"
@ -66,7 +66,7 @@ ShowUninstDetails show
Section -Main SEC0000 Section -Main SEC0000
SetOutPath $INSTDIR SetOutPath $INSTDIR
SetOverwrite on SetOverwrite on
File ../src/bitcoin.exe File ../bitcoin-qt.exe
File /oname=license.txt ../COPYING File /oname=license.txt ../COPYING
File /oname=readme.txt ../doc/README_windows.txt File /oname=readme.txt ../doc/README_windows.txt
SetOutPath $INSTDIR\daemon SetOutPath $INSTDIR\daemon
@ -85,7 +85,7 @@ Section -post SEC0001
WriteUninstaller $INSTDIR\uninstall.exe WriteUninstaller $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory $SMPROGRAMS\$StartMenuGroup 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 CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk" $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_END !insertmacro MUI_STARTMENU_WRITE_END
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)" WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
@ -113,7 +113,7 @@ done${UNSECTION_ID}:
# Uninstaller sections # Uninstaller sections
Section /o -un.Main UNSEC0000 Section /o -un.Main UNSEC0000
Delete /REBOOTOK $INSTDIR\bitcoin.exe Delete /REBOOTOK $INSTDIR\bitcoin-qt.exe
Delete /REBOOTOK $INSTDIR\license.txt Delete /REBOOTOK $INSTDIR\license.txt
Delete /REBOOTOK $INSTDIR\readme.txt Delete /REBOOTOK $INSTDIR\readme.txt
RMDir /r /REBOOTOK $INSTDIR\daemon RMDir /r /REBOOTOK $INSTDIR\daemon

21
src/makefile.osx vendored

@ -19,7 +19,19 @@ LIBPATHS= \
USE_UPNP:=1 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 \ -ldb_cxx-4.8 \
-lboost_system-mt \ -lboost_system-mt \
-lboost_filesystem-mt \ -lboost_filesystem-mt \
@ -27,6 +39,7 @@ LIBS= -dead_strip \
-lboost_thread-mt \ -lboost_thread-mt \
-lssl \ -lssl \
-lcrypto -lcrypto
endif
DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DUSE_SSL DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DUSE_SSL
@ -70,8 +83,12 @@ OBJS= \
obj/wallet.o obj/wallet.o
ifdef USE_UPNP ifdef USE_UPNP
LIBS += -lminiupnpc
DEFS += -DUSE_UPNP=$(USE_UPNP) DEFS += -DUSE_UPNP=$(USE_UPNP)
ifdef STATIC
LIBS += $(DEPSDIR)/lib/libminiupnpc.a
else
LIBS += -lminiupnpc
endif
endif endif

51
src/makefile.unix

@ -2,31 +2,47 @@
# Distributed under the MIT/X11 software license, see the accompanying # Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php. # file license.txt or http://www.opensource.org/licenses/mit-license.php.
CXX=g++
USE_UPNP:=0 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 # for boost 1.37, add -mt to the boost libraries
LIBS= \ LIBS= \
-Wl,-Bstatic \ -Wl,-B$(LMODE) \
-l boost_system \ -l boost_system$(BOOST_LIB_SUFFIX) \
-l boost_filesystem \ -l boost_filesystem$(BOOST_LIB_SUFFIX) \
-l boost_program_options \ -l boost_program_options$(BOOST_LIB_SUFFIX) \
-l boost_thread \ -l boost_thread$(BOOST_LIB_SUFFIX) \
-l db_cxx \ -l db_cxx$(BDB_LIB_SUFFIX) \
-l ssl \ -l ssl \
-l crypto -l crypto
ifdef USE_UPNP ifndef USE_UPNP
override USE_UPNP = -
endif
ifneq (${USE_UPNP}, -)
LIBS += -l miniupnpc LIBS += -l miniupnpc
DEFS += -DUSE_UPNP=$(USE_UPNP) DEFS += -DUSE_UPNP=$(USE_UPNP)
endif endif
ifneq (${USE_SSL}, 0)
DEFS += -DUSE_SSL
endif
LIBS+= \ LIBS+= \
-Wl,-Bdynamic \ -Wl,-B$(LMODE2) \
-l gthread-2.0 \
-l z \ -l z \
-l dl \ -l dl \
-l pthread -l pthread
@ -61,7 +77,8 @@ LIBS+= \
DEBUGFLAGS=-g DEBUGFLAGS=-g
CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(HARDENING) CXXFLAGS=-O2
xCXXFLAGS=-pthread -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
HEADERS = \ HEADERS = \
base58.h \ base58.h \
bignum.h \ bignum.h \
@ -106,24 +123,24 @@ all: bitcoind
-include obj/test/*.P -include obj/test/*.P
obj/nogui/%.o: %.cpp obj/nogui/%.o: %.cpp
$(CXX) -c $(CXXFLAGS) -MMD -o $@ $< $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \ @cp $(@:%.o=%.d) $(@:%.o=%.P); \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d) rm -f $(@:%.o=%.d)
bitcoind: $(OBJS:obj/%=obj/nogui/%) bitcoind: $(OBJS:obj/%=obj/nogui/%)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS) $(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
obj/test/%.o: test/%.cpp obj/test/%.o: test/%.cpp
$(CXX) -c $(CXXFLAGS) -MMD -o $@ $< $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \ @cp $(@:%.o=%.d) $(@:%.o=%.P); \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d) rm -f $(@:%.o=%.d)
test_bitcoin: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%)) test_bitcoin: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
$(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LIBS) $(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LDFLAGS) $(LIBS)
clean: clean:
-rm -f bitcoind test_bitcoin -rm -f bitcoind test_bitcoin

2508
src/qt/locale/bitcoin_es.ts

File diff suppressed because it is too large Load Diff

2
src/serialize.h

@ -60,7 +60,7 @@ class CDataStream;
class CAutoFile; class CAutoFile;
static const unsigned int MAX_SIZE = 0x02000000; static const unsigned int MAX_SIZE = 0x02000000;
static const int VERSION = 40100; static const int VERSION = 50000;
static const char* pszSubVer = ""; static const char* pszSubVer = "";
static const bool VERSION_IS_BETA = true; static const bool VERSION_IS_BETA = true;

Loading…
Cancel
Save