michelefi
User
 Fresh Boarder
| Posts: 3 |   | Karma: 0
|
Re:v0.6 for Mac? - 2007/12/02 03:32
Hi Lotodore, for compiling I do this step
1) Modify the .pro file to fix the path where my library are installed and add the QtNetwork that are missing. For the pokerth_game.pro the mac section is this one:
| Code: |
mac{
# make it universal
CONFIG += x86
CONFIG += ppc
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
# 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/
# Qt static (path is standard for self-compiling qt)
#LIBS += /Library/Frameworks/QtCore.framework/Versions/4/QtCore
#LIBS += /usr/local/Trolltech/Qt-4.3.2/lib/QtGui.la
# QT dynamic linked framework (see also mac_post_make.sh)
LIBS += -framework QtCore
LIBS += -framework QtGui
LIBS += -framework QtNetwork
LIBS += lib/libpokerth_lib.a
LIBS += /lib/boost/libboost_filesystem-mt.a
LIBS += /lib/boost/libboost_thread.a
# SDL and SDL_mixer come as frameworks
LIBS += -framework SDL
LIBS += -framework SDL_mixer
LIBS += /usr/lib/libc.dylib
# standard path for darwinports
# make sure you have a universal version of boost
# libraries installed on every mac
LIBS += -lcrypto -lz -framework Carbon
# set the application icon
RC_FILE = pokerth.icns
LIBPATH += /Developer/SDKs/MacOSX10.4u.sdk/usr/lib
LIBPATH += /usr/lib/
INCLUDEPATH += /Developer/SDKs/MacOSX10.4u.sdk/usr/include/
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
INCLUDEPATH += /include/boost-1_34_1
}
|
2) Raplace MSG_NOSIGNAL with SO_NOSIGPIPE in socket_helper.h
3) In libircclient.c my compiler isn't able to find the gethostbyname_r funcion.I try to set
| Code: |
/* Define to 1 if you have the `gethostbyname_r' function. */
#define HAVE_GETHOSTBYNAME_R 0
|
in config.h but it doesn't work so I comment the code in this way:
| Code: |
/*#if defined HAVE_GETHOSTBYNAME_R
int tmp_errno;
struct hostent tmp_hostent;
char buf[2048];
if ( gethostbyname_r (server, &tmp_hostent, buf, sizeof(buf), &hp, &tmp_errno) )
hp = 0;
#else*/
hp = gethostbyname (server);
//#endif // HAVE_GETHOSTBYNAME_R
|
4) I include the lib with the mac_post_make.sh script but it doesn't include the QtNetwork library so I had it by hand.
I think that's all if I didn't forgot something
For the lib I use the Qt, SDL e SDL_mixer framework.
I found some problem to compile the boost lib in universal binary, so I use the Adobe Open Source Libary that contain the libboost, are easier to compile and still opensource.
In the dmg on my website I include only the SDL and Qt framework.
I think that the version that you compile have problem under Tiger because Leopard have new libiconv, but if you compile under Tiger it works to all.
|