From dae1eb160555cdd2da088caedb6a7696e670d87c Mon Sep 17 00:00:00 2001 From: floty Date: Fri, 17 Oct 2008 09:49:36 +0000 Subject: [PATCH] calcHandsChance --- pokerth_lib.pro | 2 + pokerth_server.pro | 201 ++++++++++++++++++++++----------------------- 2 files changed, 102 insertions(+), 101 deletions(-) diff --git a/pokerth_lib.pro b/pokerth_lib.pro index da27e72c..e08b1e24 100644 --- a/pokerth_lib.pro +++ b/pokerth_lib.pro @@ -99,6 +99,7 @@ HEADERS += \ src/engine/local_engine/tools.h \ src/engine/local_engine/localbero.h \ src/engine/local_engine/localexception.h \ + src/engine/local_engine/arraydata.h \ src/engine/network_engine/clientboard.h \ src/engine/network_engine/clientenginefactory.h \ src/engine/network_engine/clienthand.h \ @@ -140,6 +141,7 @@ SOURCES += \ src/engine/local_engine/tools.cpp \ src/engine/local_engine/localbero.cpp \ src/engine/local_engine/localexception.cpp \ + src/engine/local_engine/arraydata.cpp \ src/engine/network_engine/clientboard.cpp \ src/engine/network_engine/clientenginefactory.cpp \ src/engine/network_engine/clienthand.cpp \ diff --git a/pokerth_server.pro b/pokerth_server.pro index 7b79e9c5..926669cc 100644 --- a/pokerth_server.pro +++ b/pokerth_server.pro @@ -1,7 +1,7 @@ # QMake pro-file for the PokerTH dedicated server -isEmpty( PREFIX ) { - PREFIX=/usr +isEmpty( PREFIX ){ + PREFIX =/usr } TEMPLATE = app @@ -112,7 +112,7 @@ SOURCES += \ src/core/common/loghelper_server.cpp win32 { - DEFINES += CURL_STATICLIB + DEFINES += CURL_STATICLIB DEPENDPATH += src/net/win32/ src/core/win32 INCLUDEPATH += ../boost/ ../GnuTLS/include @@ -125,22 +125,22 @@ win32 { LIBS += -lpokerth_lib - win32-msvc2005{ - LIBS += -llibgnutls-openssl -llibgcrypt - LIBS += -llibcurl - } + win32-msvc2005 { + LIBS += -llibgnutls-openssl -llibgcrypt + LIBS += -llibcurl + } - win32-g++{ - LIBS += -lgnutls-openssl -lgnutls -lgcrypt -ltasn1 -lgpg-error - LIBS += -lcurl - LIBS += -lz - LIBS += -llibboost_thread-mgw34-mt-1_36 - LIBS += -llibboost_filesystem-mgw34-mt-1_36 - LIBS += -llibboost_system-mgw34-mt-1_36 - LIBS += -llibboost_iostreams-mgw34-mt-1_36 - LIBS += -llibboost_zlib-mgw34-mt-1_36 - LIBS += -llibboost_program_options-mgw34-mt-1_36 - } + win32-g++ { + LIBS += -lgnutls-openssl -lgnutls -lgcrypt -ltasn1 -lgpg-error + LIBS += -lcurl + LIBS += -lz + LIBS += -llibboost_thread-mgw34-mt-1_36 + LIBS += -llibboost_filesystem-mgw34-mt-1_36 + LIBS += -llibboost_system-mgw34-mt-1_36 + LIBS += -llibboost_iostreams-mgw34-mt-1_36 + LIBS += -llibboost_zlib-mgw34-mt-1_36 + LIBS += -llibboost_program_options-mgw34-mt-1_36 + } LIBS += -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lole32 -luuid -luser32 -lmsimg32 -lshell32 -lkernel32 -lws2_32 -ladvapi32 -lwldap32 } @@ -151,103 +151,102 @@ win32 { } unix { - # workaround for problems with boost_filesystem exceptions - QMAKE_LFLAGS += -no_dead_strip_inits_and_terms + # workaround for problems with boost_filesystem exceptions + QMAKE_LFLAGS += -no_dead_strip_inits_and_terms } unix : !mac { - ##### My release static build options - #QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections - #QMAKE_LFLAGS += -Wl,--gc-sections + ##### My release static build options + #QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections + #QMAKE_LFLAGS += -Wl,--gc-sections - LIBPATH += lib + LIBPATH += lib - LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 - BOOST_FS = boost_filesystem boost_filesystem-mt - BOOST_THREAD = boost_thread boost_thread-mt - BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt - BOOST_IOSTREAMS = boost_iostreams boost_iostreams-mt + LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 + BOOST_FS = boost_filesystem boost_filesystem-mt + BOOST_THREAD = boost_thread boost_thread-mt + BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt + BOOST_IOSTREAMS = boost_iostreams boost_iostreams-mt - for(dir, LIB_DIRS) { - exists($$dir) { - for(lib, BOOST_THREAD) { - exists($${dir}/lib$${lib}.so*) { - message("Found $$lib") - BOOST_THREAD = -l$$lib - } - } - for(lib, BOOST_FS) { - exists($${dir}/lib$${lib}.so*) { - message("Found $$lib") - BOOST_FS = -l$$lib - } - } - for(lib, BOOST_PROGRAM_OPTIONS) { - exists($${dir}/lib$${lib}.so*) { - message("Found $$lib") - BOOST_PROGRAM_OPTIONS = -l$$lib - } - } - for(lib, BOOST_IOSTREAMS) { - exists($${dir}/lib$${lib}.so*) { - message("Found $$lib") - BOOST_IOSTREAMS = -l$$lib - } - } - } - } - BOOST_LIBS = $$BOOST_THREAD $$BOOST_FS $$BOOST_PROGRAM_OPTIONS $$BOOST_IOSTREAMS - !count(BOOST_LIBS, 4) { - error("could not locate required library: \ - libboost (version >= 1.34.1) --> http://www.boost.org/") - } + for(dir, LIB_DIRS){ + exists($$dir){ + for(lib, BOOST_THREAD){ + exists($${dir}/lib$${lib}.so*){ + message("Found $$lib") + BOOST_THREAD = -l$$lib + } + } + for(lib, BOOST_FS){ + exists($${dir}/lib$${lib}.so*){ + message("Found $$lib") + BOOST_FS = -l$$lib + } + } + for(lib, BOOST_PROGRAM_OPTIONS){ + exists($${dir}/lib$${lib}.so*){ + message("Found $$lib") + BOOST_PROGRAM_OPTIONS = -l$$lib + } + } + for(lib, BOOST_IOSTREAMS){ + exists($${dir}/lib$${lib}.so*){ + message("Found $$lib") + BOOST_IOSTREAMS = -l$$lib + } + } + } + } + BOOST_LIBS = $$BOOST_THREAD $$BOOST_FS $$BOOST_PROGRAM_OPTIONS $$BOOST_IOSTREAMS + !count(BOOST_LIBS, 4){ + error( libboost (version >= 1.34.1) --> http://www.boost.org/") + } - UNAME = $$system(uname -s) - BSD = $$find(UNAME, "BSD") + UNAME = $$system(uname -s) + BSD = $$find(UNAME, "BSD") - LIBS += -lpokerth_lib - LIBS += $$BOOST_LIBS - LIBS += -lcurl - !isEmpty( BSD ) { - LIBS += -lcrypto -liconv - } else { - LIBS += -lgnutls-openssl -lgcrypt - } + LIBS += -lpokerth_lib + LIBS += $$BOOST_LIBS + LIBS += -lcurl + !isEmpty( BSD ){ + LIBS += -lcrypto -liconv + } else { + LIBS += -lgnutls-openssl -lgcrypt + } - TARGETDEPS += ./lib/libpokerth_lib.a + TARGETDEPS += ./lib/libpokerth_lib.a - #### INSTALL #### + #### INSTALL #### - binary.path += $${PREFIX}/bin/ - binary.files += pokerth_server + binary.path += $${PREFIX}/bin/ + binary.files += pokerth_server - INSTALLS += binary -} + INSTALLS += binary + } -mac{ - # make it universal - CONFIG += x86 - CONFIG += ppc - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3 +mac { + # make it universal + CONFIG += x86 + CONFIG += ppc + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3 - # for universal-compilation on PPC-Mac uncomment the following line - # on Intel-Mac you have to comment this line out or build will fail. - # QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk/ + # for universal-compilation on PPC-Mac uncomment the following line + # on Intel-Mac you have to comment this line out or build will fail. + # QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk/ - LIBPATH += lib - LIBS += -lpokerth_lib - # standard path for darwinports - # make sure you have a universal version of boost - LIBS += /usr/local/lib/libboost_thread-mt-1_35.a - LIBS += /usr/local/lib/libboost_filesystem-mt-1_35.a - LIBS += /usr/local/lib/libboost_system-mt-1_35.a - LIBS += /usr/local/lib/libboost_iostreams-mt-1_35.a - LIBS += /usr/local/lib/libboost_program_options-mt-1_35.a - # libraries installed on every mac - LIBS += -lcrypto -lssl -lz -lcurl -liconv - # set the application icon - RC_FILE = pokerth.icns - LIBPATH += /Developer/SDKs/MacOSX10.4u.sdk/usr/lib - INCLUDEPATH += /Developer/SDKs/MacOSX10.4u.sdk/usr/include/ + LIBPATH += lib + LIBS += -lpokerth_lib + # standard path for darwinports + # make sure you have a universal version of boost + LIBS += /usr/local/lib/libboost_thread-mt-1_35.a + LIBS += /usr/local/lib/libboost_filesystem-mt-1_35.a + LIBS += /usr/local/lib/libboost_system-mt-1_35.a + LIBS += /usr/local/lib/libboost_iostreams-mt-1_35.a + LIBS += /usr/local/lib/libboost_program_options-mt-1_35.a + # libraries installed on every mac + LIBS += -lcrypto -lssl -lz -lcurl -liconv + # set the application icon + RC_FILE = pokerth.icns + LIBPATH += /Developer/SDKs/MacOSX10.4u.sdk/usr/lib + INCLUDEPATH += /Developer/SDKs/MacOSX10.4u.sdk/usr/include/ }