diff --git a/MacOS_X_InstallGuide.txt b/MacOS_X_InstallGuide.txt new file mode 100644 index 000000000..da67ba0f8 --- /dev/null +++ b/MacOS_X_InstallGuide.txt @@ -0,0 +1,63 @@ +############################# +###--- QT INSTALLATION ---### +############################# + +###Install Qt via: +http://www.qt.io/download/ + +###Use default options. +###Add to the PATH environment variable with this temporary solution. +export PATH=/users/$USER/Qt/5.5/clang_64/bin:$PATH +###Depends on wich version of Qt you use. + +################################## +###--- MACPORT INSTALLATION ---### +################################## + +###Install MacPort and XCode following this guide: +http://guide.macports.org/#installing.xcode + +###Start XCode to get it updated and to able C compiler to create executables. + +###Install libraries +$sudo port -v selfupdate +$sudo port install openssl +$sudo port install miniupnpc + +###Get Your OSX SDK if missing: +https://github.com/phracker/MacOSX-SDKs + +########################### +###--- LAST SETTINGS ---### +########################### + +###In QtCreator Option Git add its path: +C:\Program Files\Git\bin +### and select "Pull" with "Rebase" + +###Compil missing libraries +###SQLCipher +cd +git clone https://github.com/sqlcipher/sqlcipher.git +cd sqlcipher +./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto" +make +sudo make install +#NOTE, might be necessary to chmod 000 /usr/local/ssl temporarily during ./configure if +#homebrew uses newer, non-stock ssl dependencies found there. configure might get confused. + +### libMicroHTTPD: The one with port don't have good support. +cd +wget http://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-0.9.46.tar.gz +tar zxvf libmicrohttpd-0.9.46.tar.gz +cd libmicrohttpd-0.9.46 +bash ./configure +sudo make install + +###You can now compile RS into Qt Creator or with terminal +cd +git clone https://github.com/RetroShare/RetroShare.git retroshare +cd retroshare +qmake;make + +###You can find compiled application on ./retroshare/retroshare-gui/src/RetroShare06.app diff --git a/libresapi/src/libresapi.pro b/libresapi/src/libresapi.pro index ed135aad1..d012680d8 100644 --- a/libresapi/src/libresapi.pro +++ b/libresapi/src/libresapi.pro @@ -33,8 +33,8 @@ libmicrohttpd{ PKGCONFIG *= libmicrohttpd } else { mac { - INCLUDEPATH += /usr/local/include - LIBS *= /usr/local/lib/libmicrohttpd.a + INCLUDEPATH += . $$INC_DIR + for(lib, LIB_DIR):exists($$lib/libmicrohttpd.a){ LIBS *= $$lib/libmicrohttpd.a} } else { LIBS *= -lmicrohttpd } diff --git a/libretroshare/src/dbase/findex.cc b/libretroshare/src/dbase/findex.cc index 1eeea8c9d..9e211a821 100644 --- a/libretroshare/src/dbase/findex.cc +++ b/libretroshare/src/dbase/findex.cc @@ -33,7 +33,11 @@ #include #include #include +#ifdef __MAC_10_10 +#include +#else #include +#endif #include #include #include @@ -54,8 +58,11 @@ static const char FILE_CACHE_SEPARATOR_CHAR = '|' ; ****/ static RsMutex FIndexPtrMtx("FIndexPtrMtx") ; +#ifdef __MAC_10_10 +std::unordered_set FileIndex::_pointers ; +#else std::tr1::unordered_set FileIndex::_pointers ; - +#endif void FileIndex::registerEntry(void*p) { RsStackMutex m(FIndexPtrMtx) ; diff --git a/libretroshare/src/dbase/findex.h b/libretroshare/src/dbase/findex.h index 0cb1b1921..a86915f95 100644 --- a/libretroshare/src/dbase/findex.h +++ b/libretroshare/src/dbase/findex.h @@ -27,7 +27,11 @@ #include #include #include +#if __MAC_10_10 +#include +#else #include +#endif #include #include #include @@ -246,7 +250,11 @@ class FileIndex PersonEntry *root; +#ifdef __MAC_10_10 + static std::unordered_set _pointers ; +#else static std::tr1::unordered_set _pointers ; +#endif static void registerEntry(void*p) ; static void unregisterEntry(void*p) ; static bool isValid(void*p) ; diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro index e9ac68bf3..bdb7af945 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -266,6 +266,7 @@ mac { DEFINES *= MINIUPNPC_VERSION=13 CONFIG += upnp_miniupnpc + CONFIG += c+11 # zeroconf disabled at the end of libretroshare.pro (but need the code) #CONFIG += zeroconf @@ -274,13 +275,14 @@ mac { # Beautiful Hack to fix 64bit file access. QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dfopen64=fopen -Dvstatfs64=vstatfs - UPNPC_DIR = /usr/local/include #GPG_ERROR_DIR = ../../../../libgpg-error-1.7 #GPGME_DIR = ../../../../gpgme-1.1.8 - INCLUDEPATH += . $${UPNPC_DIR} + for(lib, LIB_DIR):LIBS += -L"$$lib" + for(bin, BIN_DIR):LIBS += -L"$$bin" - #INCLUDEPATH += . $${UPNPC_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src + DEPENDPATH += . $$INC_DIR + INCLUDEPATH += . $$INC_DIR # We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database. LIBS += /usr/local/lib/libsqlcipher.a diff --git a/libretroshare/src/retroshare/rsflags.h b/libretroshare/src/retroshare/rsflags.h index de146273f..90bb54e49 100644 --- a/libretroshare/src/retroshare/rsflags.h +++ b/libretroshare/src/retroshare/rsflags.h @@ -47,7 +47,12 @@ template class t_RsFlags32 friend std::ostream& operator<<(std::ostream& o,const t_RsFlags32& f) // friendly print with 0 and I { - for(int i=31;i>=0;--i) { o << ( (f._bits&(1<=0;--i) { + std::string res = f._bits&(1<