Upgrade dependancies and tweak build process.

* Upgrade to use miniupnpc 1.6
* Upgrade to wxWidgets 2.9.2
* Upgrade to Bost 1.47 for Win32 Builds
This commit is contained in:
Matt Corallo 2011-08-12 00:20:07 +02:00
parent 865ed8a1e5
commit b4ada906c0
11 changed files with 88 additions and 215 deletions

View File

@ -14,17 +14,15 @@ remotes:
- "url": "https://github.com/bitcoin/bitcoin.git" - "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin" "dir": "bitcoin"
files: files:
- "wxWidgets-2.9.1.tar.bz2" - "wxWidgets-2.9.2.tar.bz2"
- "boost_1_43_0.tar.bz2" - "boost_1_47_0.tar.bz2"
- "openssl-1.0.0d.tar.gz" - "openssl-1.0.0d.tar.gz"
- "db-4.7.25.NC.tar.gz" - "db-4.8.30.NC.tar.gz"
- "upnpc-exe-win32-20110215.zip" - "miniupnpc-1.6.tar.gz"
- "miniupnpc-1.5.20110215.tar.gz"
- "WSPiApi.h"
script: | script: |
# #
tar xjf wxWidgets-2.9.1.tar.bz2 tar xjf wxWidgets-2.9.2.tar.bz2
cd wxWidgets-2.9.1 cd wxWidgets-2.9.2
./configure --host=i586-mingw32msvc --build=i686-linux --disable-shared --enable-monolithic --without-libpng --disable-svg ./configure --host=i586-mingw32msvc --build=i686-linux --disable-shared --enable-monolithic --without-libpng --disable-svg
perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h
make $MAKEOPTS make $MAKEOPTS
@ -36,14 +34,14 @@ script: |
make make
cd .. cd ..
# #
tar xzf db-4.7.25.NC.tar.gz tar xzf db-4.8.30.NC.tar.gz
cd db-4.7.25.NC/build_unix cd db-4.8.30.NC/build_unix
../dist/configure --enable-mingw --enable-cxx --host=i586-mingw32msvc CFLAGS="-I/usr/i586-mingw32msvc/include" ../dist/configure --enable-mingw --enable-cxx --host=i586-mingw32msvc CFLAGS="-I/usr/i586-mingw32msvc/include"
make $MAKEOPTS make $MAKEOPTS
cd ../.. cd ../..
# #
tar xjf boost_1_43_0.tar.bz2 tar xjf boost_1_47_0.tar.bz2
cd boost_1_43_0 cd boost_1_47_0
echo "using gcc : 4.4 : i586-mingw32msvc-g++ echo "using gcc : 4.4 : i586-mingw32msvc-g++
: :
<rc>i586-mingw32msvc-windres <rc>i586-mingw32msvc-windres
@ -53,16 +51,13 @@ script: |
./bjam toolset=gcc target-os=windows threadapi=win32 threading=multi --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete $MAKEOPTS stage ./bjam toolset=gcc target-os=windows threadapi=win32 threading=multi --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete $MAKEOPTS stage
cd .. cd ..
# #
mkdir upnpc-exe-win32-20110215 tar xzf miniupnpc-1.6.tar.gz
cd upnpc-exe-win32-20110215 cd miniupnpc-1.6
unzip ../upnpc-exe-win32-20110215.zip sed 's/dllwrap -k --driver-name gcc/$(DLLWRAP) -k --driver-name $(CC)/' -i Makefile.mingw
mkdir miniupnpc sed 's|wingenminiupnpcstrings $< $@|./wingenminiupnpcstrings $< $@|' -i Makefile.mingw
cd miniupnpc make -f Makefile.mingw DLLWRAP=i586-mingw32msvc-dllwrap CC=i586-mingw32msvc-gcc AR=i586-mingw32msvc-ar
tar xzf ../../miniupnpc-1.5.20110215.tar.gz cd ..
mv ./miniupnpc-1.5.20110215/* ./ mv miniupnpc-1.6 miniupnpc
cd ../..
#
cp WSPiApi.h $HOME/build
# #
cd bitcoin cd bitcoin
mkdir -p $OUTDIR/src mkdir -p $OUTDIR/src
@ -72,8 +67,7 @@ script: |
cp $OUTDIR/src/doc/README_windows.txt $OUTDIR/readme.txt cp $OUTDIR/src/doc/README_windows.txt $OUTDIR/readme.txt
cp $OUTDIR/src/COPYING $OUTDIR/license.txt cp $OUTDIR/src/COPYING $OUTDIR/license.txt
cd src cd src
sed 's/$(DEBUGFLAGS)//' < makefile.linux-mingw > makefile.linux-mingw.2 && mv makefile.linux-mingw.2 makefile.linux-mingw sed 's/$(DEBUGFLAGS)//' -i makefile.linux-mingw
sed 's|//#include <WSPiApi.h>|#include <WSPiApi.h>|' < net.cpp > net.cpp.2 && mv net.cpp.2 net.cpp
make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoin.exe USE_UPNP=1 make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoin.exe USE_UPNP=1
make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoind.exe USE_UPNP=0 make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoind.exe USE_UPNP=0
i586-mingw32msvc-strip bitcoin.exe i586-mingw32msvc-strip bitcoin.exe

View File

@ -6,7 +6,7 @@ architectures:
- "i386" - "i386"
- "amd64" - "amd64"
packages: packages:
- "libdb4.7++-dev" - "libdb4.8++-dev"
- "libxxf86vm-dev" - "libxxf86vm-dev"
- "libgtk2.0-dev" - "libgtk2.0-dev"
- "libboost-all-dev" - "libboost-all-dev"
@ -17,26 +17,19 @@ remotes:
- "url": "https://github.com/bitcoin/bitcoin.git" - "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin" "dir": "bitcoin"
files: files:
- "wxWidgets-2.9.1.tar.bz2" - "wxWidgets-2.9.2.tar.bz2"
- "miniupnpc-1.5.tar.gz" - "miniupnpc-1.6.tar.gz"
- "toplevel.h.diff"
- "toplevel.cpp.diff"
script: | script: |
INSTDIR="$HOME/install" INSTDIR="$HOME/install"
export LIBRARY_PATH="$INSTDIR/lib" export LIBRARY_PATH="$INSTDIR/lib"
# #
tar xzf miniupnpc-1.5.tar.gz tar xzf miniupnpc-1.6.tar.gz
cd miniupnpc-1.5 cd miniupnpc-1.6
INSTALLPREFIX=$INSTDIR make $MAKEOPTS install INSTALLPREFIX=$INSTDIR make $MAKEOPTS install
cd .. cd ..
# #
tar xjf wxWidgets-2.9.1.tar.bz2 tar xjf wxWidgets-2.9.2.tar.bz2
cd wxWidgets-2.9.1 cd wxWidgets-2.9.2
cd include/wx/gtk
patch < ../../../../toplevel.h.diff
cd ../../../src/gtk
patch < ../../../toplevel.cpp.diff
cd ../..
./configure --prefix=$INSTDIR --enable-monolithic --disable-shared ./configure --prefix=$INSTDIR --enable-monolithic --disable-shared
perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h
make $MAKEOPTS install make $MAKEOPTS install
@ -50,7 +43,7 @@ script: |
cp $OUTDIR/src/doc/README $OUTDIR cp $OUTDIR/src/doc/README $OUTDIR
cp $OUTDIR/src/COPYING $OUTDIR cp $OUTDIR/src/COPYING $OUTDIR
cd src cd src
sed 's/$(DEBUGFLAGS)//' < makefile.unix > makefile.unix.2 && mv makefile.unix.2 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 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 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

View File

@ -1,4 +0,0 @@
This folder contains two patches which are applied to wxWidgets
2.9.1 before building the wxWidgets which is used for release
versions of bitcoin. They make the GUI show up on newer OSs
with new libgtks, such as Ubuntu 11.04.

View File

@ -1,86 +0,0 @@
--- /wxWidgets/trunk/src/gtk/toplevel.cpp (revision 67326)
+++ /wxWidgets/trunk/src/gtk/toplevel.cpp (revision 67496)
@@ -72,4 +72,8 @@
// send any activate events at all
static int g_sendActivateEvent = -1;
+
+// Whether _NET_REQUEST_FRAME_EXTENTS support is working
+// 0 == not tested yet, 1 == working, 2 == broken
+static int gs_requestFrameExtentsStatus;
//-----------------------------------------------------------------------------
@@ -432,4 +436,12 @@
if (event->state == GDK_PROPERTY_NEW_VALUE && event->atom == property)
{
+ if (win->m_netFrameExtentsTimerId)
+ {
+ // WM support for _NET_REQUEST_FRAME_EXTENTS is working
+ gs_requestFrameExtentsStatus = 1;
+ g_source_remove(win->m_netFrameExtentsTimerId);
+ win->m_netFrameExtentsTimerId = 0;
+ }
+
wxSize decorSize = win->m_decorSize;
int left, right, top, bottom;
@@ -439,4 +451,22 @@
win->GTKUpdateDecorSize(decorSize);
}
+ return false;
+}
+}
+
+extern "C" {
+static gboolean request_frame_extents_timeout(void* data)
+{
+ // WM support for _NET_REQUEST_FRAME_EXTENTS is broken
+ gs_requestFrameExtentsStatus = 2;
+ gdk_threads_enter();
+ wxTopLevelWindowGTK* win = static_cast<wxTopLevelWindowGTK*>(data);
+ win->m_netFrameExtentsTimerId = 0;
+ wxSize decorSize = win->m_decorSize;
+ int left, right, top, bottom;
+ if (wxGetFrameExtents(gtk_widget_get_window(win->m_widget), &left, &right, &top, &bottom))
+ decorSize.Set(left + right, top + bottom);
+ win->GTKUpdateDecorSize(decorSize);
+ gdk_threads_leave();
return false;
}
@@ -459,4 +489,5 @@
m_deferShowAllowed = true;
m_updateDecorSize = true;
+ m_netFrameExtentsTimerId = 0;
m_urgency_hint = -2;
@@ -811,5 +842,6 @@
if (deferShow)
{
- deferShow = m_deferShowAllowed && !GTK_WIDGET_REALIZED(m_widget);
+ deferShow = gs_requestFrameExtentsStatus != 2 &&
+ m_deferShowAllowed && !gtk_widget_get_realized(m_widget);
if (deferShow)
{
@@ -829,11 +861,4 @@
// GetSize()/SetSize() because it makes window bigger between each
// restore and save.
- m_updateDecorSize = deferShow;
- }
- if (deferShow)
- {
- // Fluxbox support for _NET_REQUEST_FRAME_EXTENTS is broken
- const char* name = gdk_x11_screen_get_window_manager_name(screen);
- deferShow = strcmp(name, "Fluxbox") != 0;
m_updateDecorSize = deferShow;
}
@@ -875,4 +900,12 @@
(XEvent*)&xevent);
+ if (gs_requestFrameExtentsStatus == 0)
+ {
+ // if WM does not respond to request within 1 second,
+ // we assume support for _NET_REQUEST_FRAME_EXTENTS is not working
+ m_netFrameExtentsTimerId =
+ g_timeout_add(1000, request_frame_extents_timeout, this);
+ }
+
// defer calling gtk_widget_show()
m_isShown = true;

View File

@ -1,9 +0,0 @@
--- /wxWidgets/trunk/include/wx/gtk/toplevel.h (revision 65373)
+++ /wxWidgets/trunk/include/wx/gtk/toplevel.h (revision 67496)
@@ -114,4 +114,6 @@
// wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle.
int m_urgency_hint;
+ // timer for detecting WM with broken _NET_REQUEST_FRAME_EXTENTS handling
+ unsigned m_netFrameExtentsTimerId;
// return the size of the window without WM decorations

View File

@ -27,11 +27,11 @@ Dependencies
Libraries you need to download separately and build: Libraries you need to download separately and build:
default path download default path download
wxWidgets \wxwidgets-2.9.1-mgw http://www.wxwidgets.org/downloads/ wxWidgets \wxwidgets-2.9.2-mgw http://www.wxwidgets.org/downloads/
OpenSSL \openssl-1.0.0d-mgw http://www.openssl.org/source/ OpenSSL \openssl-1.0.0d-mgw http://www.openssl.org/source/
Berkeley DB \db-4.7.25.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html Berkeley DB \db-4.8.30.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html
Boost \boost-1.43.0-mgw http://www.boost.org/users/download/ Boost \boost-1.47.0-mgw http://www.boost.org/users/download/
miniupnpc \upnpc-exe-win32-20110215 http://miniupnp.tuxfamily.org/files/ miniupnpc \miniupnpc-1.6-mgw http://miniupnp.tuxfamily.org/files/
Their licenses: Their licenses:
wxWidgets LGPL 2.1 with very liberal exceptions wxWidgets LGPL 2.1 with very liberal exceptions
@ -41,11 +41,11 @@ Boost MIT-like license
miniupnpc New (3-clause) BSD license miniupnpc New (3-clause) BSD license
Versions used in this release: Versions used in this release:
wxWidgets 2.9.1 wxWidgets 2.9.2
OpenSSL 1.0.0d OpenSSL 1.0.0d
Berkeley DB 4.7.25.NC Berkeley DB 4.8.30.NC
Boost 1.43.0 Boost 1.47.0
miniupnpc 1.5-20110215 miniupnpc 1.6
Notes Notes
@ -57,7 +57,7 @@ classes that do the rote work of constructing all the UI elements.
wxWidgets wxWidgets
--------- ---------
DOS shell: DOS shell:
cd \wxWidgets-2.9.1-mgw\build\msw cd \wxWidgets-2.9.2-mgw\build\msw
mingw32-make -f makefile.gcc mingw32-make -f makefile.gcc
OpenSSL OpenSSL
@ -73,30 +73,26 @@ make
Berkeley DB Berkeley DB
----------- -----------
MSYS shell: MSYS shell:
cd /c/db-4.7.25.NC-mgw/build_unix cd /c/db-4.8.30.NC-mgw/build_unix
sh ../dist/configure --enable-mingw --enable-cxx sh ../dist/configure --enable-mingw --enable-cxx
make make
Boost Boost
----- -----
DOS prompt: DOS prompt:
downloaded boost jam 3.1.18 downloaded boost jam 3.1.18
cd \boost-1.43.0-mgw cd \boost-1.47.0-mgw
bjam toolset=gcc --build-type=complete stage bjam toolset=gcc --build-type=complete stage
Note:
building with boost 1.45.0 failed because of boost ticket 4614, 4258
builds fine with boost 1.43.0
MiniUPnPc MiniUPnPc
--------- ---------
Building miniupnpc failed on Windows Server 2003, thus it is expected that a binary copy will be used.
See http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=642
UPnP support is optional, make with USE_UPNP= to disable it. UPnP support is optional, make with USE_UPNP= to disable it.
Get upnpc-exe-win32-20110215.zip and unzip it to \upnpc-exe-win32-20110215 MSYS shell:
Get miniupnpc-1.5.20110215.tar.gz and copy *.h to \upnpc-exe-win32-20110215\miniupnpc cd /c/miniupnpc-1.6-mgw
make -f Makefile.mingw
mkdir miniupnpc
cp *.h miniupnpc/
Bitcoin Bitcoin
------- -------

View File

@ -135,18 +135,18 @@ The process for miniupnpc (optional) is similar to that of OpenSSL.
Download from http://miniupnp.tuxfamily.org/files/. Download from http://miniupnp.tuxfamily.org/files/.
cd ~/bitcoin/deps cd ~/bitcoin/deps
tar xvf ~/Downloads/miniupnpc-1.5.tar tar xvf ~/Downloads/miniupnpc-1.6.tar
mv miniupnpc-1.5 miniupnpc-1.5-x86_64 mv miniupnpc-1.6 miniupnpc-1.6-x86_64
tar xvf ~/Downloads/miniupnpc-1.5.tar tar xvf ~/Downloads/miniupnpc-1.6.tar
mv miniupnpc-1.5 miniupnpc-1.5-i386 mv miniupnpc-1.6 miniupnpc-1.6-i386
# build x86_64 (64 bit intel) binary # build x86_64 (64 bit intel) binary
cd miniupnpc-1.5-x86_64 cd miniupnpc-1.6-x86_64
export CFLAGS="-arch x86_64" export CFLAGS="-arch x86_64"
export LDFLAGS="-arch x86_64" export LDFLAGS="-arch x86_64"
export PREFIX="/Users/macuser/bitcoin/deps" export PREFIX="/Users/macuser/bitcoin/deps"
make && make install make && make install
# build i386 (32 bit intel) binary # build i386 (32 bit intel) binary
cd miniupnpc-1.5-i386 cd miniupnpc-1.6-i386
export CFLAGS="-arch i386" export CFLAGS="-arch i386"
export LDFLAGS="-arch i386" export LDFLAGS="-arch i386"
export PREFIX="/Users/macuser/bitcoin/deps" export PREFIX="/Users/macuser/bitcoin/deps"
@ -154,7 +154,7 @@ make
# combine the libs # combine the libs
cd ~/bitcoin/deps cd ~/bitcoin/deps
lipo -arch i386 miniupnpc-1.5-i386/libminiupnpc.a -arch x86_64 miniupnpc-1.5-x86_64/libminiupnpc.a -o lib/libminiupnpc.a -create lipo -arch i386 miniupnpc-1.6-i386/libminiupnpc.a -arch x86_64 miniupnpc-1.6-x86_64/libminiupnpc.a -o lib/libminiupnpc.a -create
Verify your binaries Verify your binaries
@ -175,8 +175,8 @@ Berkeley DB
Download from http://freshmeat.net/projects/berkeleydb/ Download from http://freshmeat.net/projects/berkeleydb/
cd ~/bitcoin/deps cd ~/bitcoin/deps
tar xvf ~/Downloads/db-4.8.26.tar tar xvf ~/Downloads/db-4.8.30.tar
cd db-4.8.26/build_unix cd db-4.8.30/build_unix
../dist/configure --prefix=/Users/macosuser/bitcoin/deps --enable-cxx && make && make install ../dist/configure --prefix=/Users/macosuser/bitcoin/deps --enable-cxx && make && make install

View File

@ -25,8 +25,8 @@ Dependencies
sudo apt-get install build-essential sudo apt-get install build-essential
sudo apt-get install libgtk2.0-dev sudo apt-get install libgtk2.0-dev
sudo apt-get install libssl-dev sudo apt-get install libssl-dev
sudo apt-get install libdb4.7-dev sudo apt-get install libdb4.8-dev
sudo apt-get install libdb4.7++-dev sudo apt-get install libdb4.8++-dev
Boost 1.40+: sudo apt-get install libboost-all-dev Boost 1.40+: sudo apt-get install libboost-all-dev
or Boost 1.37: sudo apt-get install libboost1.37-dev or Boost 1.37: sudo apt-get install libboost1.37-dev
@ -55,10 +55,10 @@ miniupnpc New (3-clause) BSD license
Versions used in this release: Versions used in this release:
GCC 4.3.3 GCC 4.3.3
OpenSSL 0.9.8g OpenSSL 0.9.8g
wxWidgets 2.9.0 wxWidgets 2.9.2
Berkeley DB 4.7.25.NC Berkeley DB 4.8.30.NC
Boost 1.37 Boost 1.37
miniupnpc 1.5 miniupnpc 1.6
Notes Notes
@ -74,8 +74,8 @@ symbols, which reduces the executable size by about 90%.
wxWidgets wxWidgets
--------- ---------
cd /usr/local cd /usr/local
tar -xzvf wxWidgets-2.9.0.tar.gz tar -xzvf wxWidgets-2.9.2.tar.gz
cd wxWidgets-2.9.0 cd wxWidgets-2.9.2
mkdir buildgtk mkdir buildgtk
cd buildgtk cd buildgtk
../configure --with-gtk --enable-debug --disable-shared --enable-monolithic --without-libpng --disable-svg ../configure --with-gtk --enable-debug --disable-shared --enable-monolithic --without-libpng --disable-svg
@ -87,8 +87,8 @@ ldconfig
miniupnpc miniupnpc
--------- ---------
tar -xzvf miniupnpc-1.5.tar.gz tar -xzvf miniupnpc-1.6.tar.gz
cd miniupnpc-1.5 cd miniupnpc-1.6
make make
sudo su sudo su
make install make install
@ -96,8 +96,7 @@ make install
Berkeley DB Berkeley DB
----------- -----------
You need Berkeley DB 4.7. Don't use 4.8, the database/log0000* files You need Berkeley DB 4.8. If you have to build Berkeley DB yourself:
are incompatible. If you have to build Berkeley DB yourself:
../dist/configure --enable-cxx ../dist/configure --enable-cxx
make make

View File

@ -7,19 +7,19 @@ DEPSDIR:=/usr/i586-mingw32msvc
USE_UPNP:=0 USE_UPNP:=0
INCLUDEPATHS= \ INCLUDEPATHS= \
-I"$(DEPSDIR)/boost_1_43_0" \ -I"$(DEPSDIR)/boost_1_47_0" \
-I"$(DEPSDIR)/db-4.7.25.NC/build_unix" \ -I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
-I"$(DEPSDIR)/openssl-1.0.0d/include" \ -I"$(DEPSDIR)/openssl-1.0.0d/include" \
-I"$(DEPSDIR)/wxWidgets-2.9.1/lib/gcc_lib/mswud" \ -I"$(DEPSDIR)/wxWidgets-2.9.2/lib/gcc_lib/mswud" \
-I"$(DEPSDIR)/wxWidgets-2.9.1/include" \ -I"$(DEPSDIR)/wxWidgets-2.9.2/include" \
-I"$(DEPSDIR)/wxWidgets-2.9.1/lib/wx/include/i586-mingw32msvc-msw-unicode-static-2.9/" \ -I"$(DEPSDIR)/wxWidgets-2.9.2/lib/wx/include/i586-mingw32msvc-msw-unicode-static-2.9/" \
-I"$(DEPSDIR)" -I"$(DEPSDIR)"
LIBPATHS= \ LIBPATHS= \
-L"$(DEPSDIR)/boost_1_43_0/stage/lib" \ -L"$(DEPSDIR)/boost_1_47_0/stage/lib" \
-L"$(DEPSDIR)/db-4.7.25.NC/build_unix" \ -L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
-L"$(DEPSDIR)/openssl-1.0.0d" \ -L"$(DEPSDIR)/openssl-1.0.0d" \
-L"$(DEPSDIR)/wxWidgets-2.9.1/lib" -L"$(DEPSDIR)/wxWidgets-2.9.2/lib"
WXLIBS= -l wx_mswu-2.9-i586-mingw32msvc WXLIBS= -l wx_mswu-2.9-i586-mingw32msvc
@ -32,7 +32,7 @@ LIBS= \
-l ssl \ -l ssl \
-l crypto -l crypto
DEFS=-D_MT -DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL DEFS=-D_MT -DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB
DEBUGFLAGS=-g -D__WXDEBUG__ DEBUGFLAGS=-g -D__WXDEBUG__
CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
@ -40,8 +40,7 @@ HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h
crypter.h init.h crypter.h init.h
ifdef USE_UPNP ifdef USE_UPNP
INCLUDEPATHS += -I"$(DEPSDIR)/upnpc-exe-win32-20110215" LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
LIBPATHS += -L"$(DEPSDIR)/upnpc-exe-win32-20110215"
LIBS += -l miniupnpc -l iphlpapi LIBS += -l miniupnpc -l iphlpapi
DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
endif endif

View File

@ -5,31 +5,31 @@
USE_UPNP:=0 USE_UPNP:=0
INCLUDEPATHS= \ INCLUDEPATHS= \
-I"C:\boost-1.43.0-mgw" \ -I"C:\boost-1.47.0-mgw" \
-I"C:\db-4.7.25.NC-mgw\build_unix" \ -I"C:\db-4.8.30.NC-mgw\build_unix" \
-I"C:\openssl-1.0.0d-mgw\include" \ -I"C:\openssl-1.0.0d-mgw\include" \
-I"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib\mswud" \ -I"C:\wxWidgets-2.9.2-mgw\lib\gcc_lib\mswud" \
-I"C:\wxWidgets-2.9.1-mgw\include" -I"C:\wxWidgets-2.9.2-mgw\include"
LIBPATHS= \ LIBPATHS= \
-L"C:\boost-1.43.0-mgw\stage\lib" \ -L"C:\boost-1.47.0-mgw\stage\lib" \
-L"C:\db-4.7.25.NC-mgw\build_unix" \ -L"C:\db-4.8.30.NC-mgw\build_unix" \
-L"C:\openssl-1.0.0d-mgw" \ -L"C:\openssl-1.0.0d-mgw" \
-L"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib" -L"C:\wxWidgets-2.9.2-mgw\lib\gcc_lib"
WXLIBS= \ WXLIBS= \
-l wxmsw29ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd -l wxmsw29ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd
LIBS= \ LIBS= \
-l boost_system-mgw45-mt-s-1_43 \ -l boost_system-mgw45-mt-s-1_47 \
-l boost_filesystem-mgw45-mt-s-1_43 \ -l boost_filesystem-mgw45-mt-s-1_47 \
-l boost_program_options-mgw45-mt-s-1_43 \ -l boost_program_options-mgw45-mt-s-1_47 \
-l boost_thread-mgw45-mt-s-1_43 \ -l boost_thread-mgw45-mt-s-1_47 \
-l db_cxx \ -l db_cxx \
-l ssl \ -l ssl \
-l crypto -l crypto
DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB
DEBUGFLAGS=-g -D__WXDEBUG__ DEBUGFLAGS=-g -D__WXDEBUG__
CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
@ -37,8 +37,8 @@ HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h
init.h crypter.h init.h crypter.h
ifdef USE_UPNP ifdef USE_UPNP
INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215" INCLUDEPATHS += -I"C:\miniupnpc-1.6-mgw"
LIBPATHS += -L"C:\upnpc-exe-win32-20110215" LIBPATHS += -L"C:\miniupnpc-1.6-mgw"
LIBS += -l miniupnpc -l iphlpapi LIBS += -l miniupnpc -l iphlpapi
DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
endif endif

View File

@ -12,11 +12,6 @@
#ifdef __WXMSW__ #ifdef __WXMSW__
#include <string.h> #include <string.h>
// This file can be downloaded as a part of the Windows Platform SDK
// and is required for Bitcoin binaries to work properly on versions
// of Windows before XP. If you are doing builds of Bitcoin for
// public release, you should uncomment this line.
//#include <WSPiApi.h>
#endif #endif
#ifdef USE_UPNP #ifdef USE_UPNP
@ -1079,10 +1074,11 @@ void ThreadMapPort2(void* parg)
const char * rootdescurl = 0; const char * rootdescurl = 0;
const char * multicastif = 0; const char * multicastif = 0;
const char * minissdpdpath = 0; const char * minissdpdpath = 0;
int error = 0;
struct UPNPDev * devlist = 0; struct UPNPDev * devlist = 0;
char lanaddr[64]; char lanaddr[64];
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0); devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
struct UPNPUrls urls; struct UPNPUrls urls;
struct IGDdatas data; struct IGDdatas data;
@ -1094,14 +1090,9 @@ void ThreadMapPort2(void* parg)
char intClient[16]; char intClient[16];
char intPort[6]; char intPort[6];
string strDesc = "Bitcoin " + FormatFullVersion(); string strDesc = "Bitcoin " + FormatFullVersion();
#ifndef __WXMSW__
r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
port, port, lanaddr, strDesc.c_str(), "TCP", 0);
#else
r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
port, port, lanaddr, strDesc.c_str(), "TCP", 0, "0"); port, port, lanaddr, strDesc.c_str(), "TCP", 0, "0");
#endif
if(r!=UPNPCOMMAND_SUCCESS) if(r!=UPNPCOMMAND_SUCCESS)
printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n", printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n",
port, port, lanaddr, r, strupnperror(r)); port, port, lanaddr, r, strupnperror(r));