aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Corallo <matt@bluematt.me>2011-08-12 00:20:07 +0200
committerMatt Corallo <matt@bluematt.me>2011-08-23 13:00:34 -0400
commitb4ada906c03111404c29b115ab37afbad92f4cf1 (patch)
tree37e382dcb41fbb09a0d49724ec1e55928dd6796e /src
parent865ed8a1e5c587468a40756d46bcbc1c5a12bb06 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/makefile.linux-mingw21
-rw-r--r--src/makefile.mingw28
-rw-r--r--src/net.cpp15
3 files changed, 27 insertions, 37 deletions
diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw
index e2ef4213aa..ddf9769055 100644
--- a/src/makefile.linux-mingw
+++ b/src/makefile.linux-mingw
@@ -7,19 +7,19 @@ DEPSDIR:=/usr/i586-mingw32msvc
USE_UPNP:=0
INCLUDEPATHS= \
- -I"$(DEPSDIR)/boost_1_43_0" \
- -I"$(DEPSDIR)/db-4.7.25.NC/build_unix" \
+ -I"$(DEPSDIR)/boost_1_47_0" \
+ -I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
-I"$(DEPSDIR)/openssl-1.0.0d/include" \
- -I"$(DEPSDIR)/wxWidgets-2.9.1/lib/gcc_lib/mswud" \
- -I"$(DEPSDIR)/wxWidgets-2.9.1/include" \
- -I"$(DEPSDIR)/wxWidgets-2.9.1/lib/wx/include/i586-mingw32msvc-msw-unicode-static-2.9/" \
+ -I"$(DEPSDIR)/wxWidgets-2.9.2/lib/gcc_lib/mswud" \
+ -I"$(DEPSDIR)/wxWidgets-2.9.2/include" \
+ -I"$(DEPSDIR)/wxWidgets-2.9.2/lib/wx/include/i586-mingw32msvc-msw-unicode-static-2.9/" \
-I"$(DEPSDIR)"
LIBPATHS= \
- -L"$(DEPSDIR)/boost_1_43_0/stage/lib" \
- -L"$(DEPSDIR)/db-4.7.25.NC/build_unix" \
+ -L"$(DEPSDIR)/boost_1_47_0/stage/lib" \
+ -L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
-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
@@ -32,7 +32,7 @@ LIBS= \
-l ssl \
-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__
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 \
@@ -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
ifdef USE_UPNP
- INCLUDEPATHS += -I"$(DEPSDIR)/upnpc-exe-win32-20110215"
- LIBPATHS += -L"$(DEPSDIR)/upnpc-exe-win32-20110215"
+ LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
LIBS += -l miniupnpc -l iphlpapi
DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
endif
diff --git a/src/makefile.mingw b/src/makefile.mingw
index 96f81b3067..a6654f30a9 100644
--- a/src/makefile.mingw
+++ b/src/makefile.mingw
@@ -5,31 +5,31 @@
USE_UPNP:=0
INCLUDEPATHS= \
- -I"C:\boost-1.43.0-mgw" \
- -I"C:\db-4.7.25.NC-mgw\build_unix" \
+ -I"C:\boost-1.47.0-mgw" \
+ -I"C:\db-4.8.30.NC-mgw\build_unix" \
-I"C:\openssl-1.0.0d-mgw\include" \
- -I"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib\mswud" \
- -I"C:\wxWidgets-2.9.1-mgw\include"
+ -I"C:\wxWidgets-2.9.2-mgw\lib\gcc_lib\mswud" \
+ -I"C:\wxWidgets-2.9.2-mgw\include"
LIBPATHS= \
- -L"C:\boost-1.43.0-mgw\stage\lib" \
- -L"C:\db-4.7.25.NC-mgw\build_unix" \
+ -L"C:\boost-1.47.0-mgw\stage\lib" \
+ -L"C:\db-4.8.30.NC-mgw\build_unix" \
-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= \
-l wxmsw29ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd
LIBS= \
- -l boost_system-mgw45-mt-s-1_43 \
- -l boost_filesystem-mgw45-mt-s-1_43 \
- -l boost_program_options-mgw45-mt-s-1_43 \
- -l boost_thread-mgw45-mt-s-1_43 \
+ -l boost_system-mgw45-mt-s-1_47 \
+ -l boost_filesystem-mgw45-mt-s-1_47 \
+ -l boost_program_options-mgw45-mt-s-1_47 \
+ -l boost_thread-mgw45-mt-s-1_47 \
-l db_cxx \
-l ssl \
-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__
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 \
@@ -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
ifdef USE_UPNP
- INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215"
- LIBPATHS += -L"C:\upnpc-exe-win32-20110215"
+ INCLUDEPATHS += -I"C:\miniupnpc-1.6-mgw"
+ LIBPATHS += -L"C:\miniupnpc-1.6-mgw"
LIBS += -l miniupnpc -l iphlpapi
DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
endif
diff --git a/src/net.cpp b/src/net.cpp
index 3953f021e9..c498c40106 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -12,11 +12,6 @@
#ifdef __WXMSW__
#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
#ifdef USE_UPNP
@@ -1079,10 +1074,11 @@ void ThreadMapPort2(void* parg)
const char * rootdescurl = 0;
const char * multicastif = 0;
const char * minissdpdpath = 0;
+ int error = 0;
struct UPNPDev * devlist = 0;
char lanaddr[64];
- devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
+ devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
struct UPNPUrls urls;
struct IGDdatas data;
@@ -1094,14 +1090,9 @@ void ThreadMapPort2(void* parg)
char intClient[16];
char intPort[6];
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,
port, port, lanaddr, strDesc.c_str(), "TCP", 0, "0");
-#endif
+
if(r!=UPNPCOMMAND_SUCCESS)
printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n",
port, port, lanaddr, r, strupnperror(r));