diff --git a/build_scripts/OSX/MacOS.10.6_RS_Compilation_Instructions.txt b/build_scripts/OSX/MacOS.10.6_RS_Compilation_Instructions.txt new file mode 100644 index 000000000..3c2c73219 --- /dev/null +++ b/build_scripts/OSX/MacOS.10.6_RS_Compilation_Instructions.txt @@ -0,0 +1,60 @@ +Hi there, + +I heard about RetroShare recently (on Slashdot) and really like the goal of the program; it's something I've been wanting for a long time now. I'm a software developer so I figured I could help contribute to the project. I started by getting a build up and running on my mac, which was non-trivial as it looks like the Mac build hasn't been maintained (or maybe it's just targetting older OS X version?). Anyway, I have instructions and patches to get a build going on OS X 10.6, if you want to put them up on the wiki or something. The steps I used boiled down to running the following commands in a directory that also contains the retroshare-mac-build.patch file, which I posted at https://staktrace.com/pub/retroshare-mac-build.patch (you can also see the changes at https://github.com/staktrace/retroshare/commit/51f554f909086f4baca7be215d5edacab744dea4) + +sudo port selfupdate +sudo port install qt4-mac +sudo port install wget + +wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.bz2 +tar xjf libgpg-error-1.10.tar.bz2 +rm libgpg-error-1.10.tar.bz2 +pushd libgpg-error-1.10 +./configure --prefix=$PWD/build --enable-static=yes --enable-shared=no +make +make install +popd + +wget ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.3.1.tar.bz2 +tar xjf gpgme-1.3.1.tar.bz2 +rm gpgme-1.3.1.tar.bz2 +pushd gpgme-1.3.1 +./configure --prefix=$PWD/build --enable-static=yes --enable-shared=no --with-gpg-error-prefix=$PWD/../libgpg-error-1.10/build +make +make install +popd + +wget http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.3.tar.gz +tar xzf miniupnpc-1.3.tar.gz +rm miniupnpc-1.3.tar.gz +pushd miniupnpc-1.3 +make upnpc-static +popd + +git clone https://github.com/kigeia/retroshare +pushd retroshare +git apply ../retroshare-mac-build.patch +popd + +pushd retroshare/libbitdht/src +qmake +make +popd + +pushd retroshare/libretroshare/src +qmake +make +popd + +pushd retroshare/retroshare-gui/src +qmake +make +popd + +At the end there is a RetroShare.App in the retroshare/retroshare-gui/ folder which seems to work as expected. + +Now that I've gotten it building and working, I'd like to start working on adding features. One that I would like to see is taking advantage of the RetroShare platform to enable F2F games. A while back I wrote a P2P collaborative crossword solver app in Java; porting that to work as a RetroShare plugin would probably be a good start for me. I looked briefly at the existing plugins in the source tree but haven't yet had time to peruse the rsplugin.h API in detail; if you have any tips or pointers before I dive in, please do let me know. I'll probably start work on it in a couple of days and progress might be a little slow because I'm also fairly busy with other things right now. + +Cheers, +kats + diff --git a/build_scripts/OSX/retroshare-mac-build.patch b/build_scripts/OSX/retroshare-mac-build.patch new file mode 100644 index 000000000..7023ad7c2 --- /dev/null +++ b/build_scripts/OSX/retroshare-mac-build.patch @@ -0,0 +1,94 @@ +commit 51f554f909086f4baca7be215d5edacab744dea4 +Author: Kartikaya Gupta +Date: Wed Mar 7 23:30:48 2012 -0500 + + Modifications needed to get build working on Mac OS X 10.6 + +diff --git a/.gitignore b/.gitignore +new file mode 100644 +index 0000000..3e90033 +--- /dev/null ++++ b/.gitignore +@@ -0,0 +1,6 @@ ++*.o ++Makefile ++libbitdht/src/lib/ ++libretroshare/src/lib/ ++retroshare-gui/src/RetroShare.app/ ++retroshare-gui/src/temp/ +diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro +index 6f35e01..267cc91 100644 +--- a/libretroshare/src/libretroshare.pro ++++ b/libretroshare/src/libretroshare.pro +@@ -312,7 +312,7 @@ mac { + OBJECTS_DIR = temp/obj + MOC_DIR = temp/moc + #DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW +- #DEFINES *= MINIUPNPC_VERSION=13 ++ DEFINES *= MINIUPNPC_VERSION=13 + DESTDIR = lib + + #miniupnp implementation files +@@ -326,12 +326,11 @@ mac { + # Beautiful Hack to fix 64bit file access. + QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dfopen64=fopen -Dvstatfs64=vstatfs + +- UPNPC_DIR = ../../../miniupnpc-1.0 +- GPG_ERROR_DIR = ../../../../libgpg-error-1.7 +- GPGME_DIR = ../../../../gpgme-1.1.8 ++ UPNPC_DIR = ../../../miniupnpc-1.3 ++ GPG_ERROR_DIR = ../../../libgpg-error-1.10 ++ GPGME_DIR = ../../../gpgme-1.3.1 + +- INCLUDEPATH += . $${UPNPC_DIR} +- #INCLUDEPATH += . $${UPNPC_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src ++ INCLUDEPATH += . $${UPNPC_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src + } + + ################################# FreeBSD ########################################## +diff --git a/libretroshare/src/pqi/sslfns.cc b/libretroshare/src/pqi/sslfns.cc +index 2588cb8..305433f 100644 +--- a/libretroshare/src/pqi/sslfns.cc ++++ b/libretroshare/src/pqi/sslfns.cc +@@ -586,8 +586,8 @@ X509 *loadX509FromDER(const uint8_t *ptr, uint32_t len) + X509 *tmp = NULL; + #ifdef __APPLE__ + // This depends on which version you are compiling for... OSX10.5 doesn't have consts (old OpenSSL!) +- unsigned char **certptr = (unsigned char **) &ptr; +- //const unsigned char **certptr = (const unsigned char **) &ptr; ++ //unsigned char **certptr = (unsigned char **) &ptr; ++ const unsigned char **certptr = (const unsigned char **) &ptr; + #else + const unsigned char **certptr = (const unsigned char **) &ptr; + #endif +diff --git a/retroshare-gui/src/RetroShare.pro b/retroshare-gui/src/RetroShare.pro +index adcb5a0..ffbf669 100644 +--- a/retroshare-gui/src/RetroShare.pro ++++ b/retroshare-gui/src/RetroShare.pro +@@ -140,19 +140,21 @@ win32 { + + macx { + # ENABLE THIS OPTION FOR Univeral Binary BUILD. +- CONFIG += ppc x86 +- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 ++ # CONFIG += ppc x86 ++ QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 + + CONFIG += version_detail_bash_script + LIBS += ../../libretroshare/src/lib/libretroshare.a +- LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan +- LIBS += ../../../miniupnpc-1.0/libminiupnpc.a ++ LIBS += ../../../libgpg-error-1.10/build/lib/libgpg-error.a ++ LIBS += ../../../gpgme-1.3.1/build/lib/libgpgme.a ++ LIBS += ../../../miniupnpc-1.3/libminiupnpc.a ++ LIBS += -lssl -lcrypto -lz -lassuan + LIBS += -framework CoreFoundation + LIBS += -framework Security + + # LIBS += -framework CoreServices + +- INCLUDEPATH += . ++ INCLUDEPATH += . ../../../gpgme-1.3.1/src + #DEFINES* = MAC_IDLE # for idle feature + CONFIG -= uitools +