mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
merged and fixed conflict with upstream/master
This commit is contained in:
commit
2bb9a87b3b
@ -1,27 +1,31 @@
|
||||
##Compilation on MacOS
|
||||
# Compilation on MacOS
|
||||
|
||||
### Qt Installation
|
||||
## Qt Installation
|
||||
|
||||
Install Qt via: [Qt Download](http://www.qt.io/download/)
|
||||
|
||||
Use default options.
|
||||
Add to the PATH environment variable with this temporary solution.
|
||||
Use default options. And add Qt Script support.
|
||||
|
||||
export PATH=/users/$USER/Qt/5.5/clang_64/bin:$PATH
|
||||
Add to the PATH environment variable by editing your *~/.profile* file.
|
||||
|
||||
export PATH="/users/$USER/Qt/5.5/clang_64/bin:$PATH"
|
||||
|
||||
Depends on wich version of Qt you use.
|
||||
|
||||
## ***Choose if you use MacPort or HomeBrew***
|
||||
|
||||
### MacPort Installation
|
||||
|
||||
Install MacPort and XCode following this guide: [MacPort and XCode](http://guide.macports.org/#installing.xcode)
|
||||
|
||||
Start XCode to get it updated and to able C compiler to create executables.
|
||||
|
||||
###Install libraries
|
||||
#### Install libraries
|
||||
|
||||
$sudo port -v selfupdate
|
||||
$sudo port install openssl
|
||||
$sudo port install miniupnpc
|
||||
$sudo port install libmicrohttpd
|
||||
|
||||
For VOIP Plugin:
|
||||
|
||||
@ -30,36 +34,50 @@ For VOIP Plugin:
|
||||
|
||||
Get Your OSX SDK if missing: [MacOSX-SDKs](https://github.com/phracker/MacOSX-SDKs)
|
||||
|
||||
###Last Settings
|
||||
### HOMEBREW Installation
|
||||
|
||||
In QtCreator Option Git add its path:
|
||||
Install HomeBrew following this guide: [HomeBrew](http://brew.sh/)
|
||||
|
||||
C:\Program Files\Git\bin
|
||||
Install XCode command line developer tools:
|
||||
|
||||
and select "Pull" with "Rebase"
|
||||
$xcode-select --install
|
||||
|
||||
###Compil missing libraries
|
||||
####SQLCipher
|
||||
Start XCode to get it updated and to able C compiler to create executables.
|
||||
|
||||
#### Install libraries
|
||||
|
||||
$brew install openssl
|
||||
$brew install miniupnpc
|
||||
$brew install libmicrohttpd
|
||||
|
||||
If you have error in linking, run this:
|
||||
|
||||
$sudo chown -R $(whoami) /usr/local/lib/pkgconfig
|
||||
|
||||
For VOIP Plugin:
|
||||
|
||||
$brew install speex
|
||||
$brew install homebrew/science/opencv
|
||||
$brew install ffmpeg
|
||||
|
||||
Get Your OSX SDK if missing: [MacOSX-SDKs](https://github.com/phracker/MacOSX-SDKs)
|
||||
|
||||
## Last Settings
|
||||
|
||||
In QtCreator Option Git select "Pull" with "Rebase"
|
||||
|
||||
## Compil missing libraries
|
||||
### SQLCipher
|
||||
|
||||
cd <your development directory>
|
||||
git clone https://github.com/sqlcipher/sqlcipher.git
|
||||
cd sqlcipher
|
||||
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
|
||||
./configure --disable-shared --disable-tcl --enable-static --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -I/opt/local/include" 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 <your development directory>
|
||||
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
|
||||
homebrew uses newer, non-stock ssl dependencies found there. Configure might get confused.
|
||||
|
||||
You can now compile RS into Qt Creator or with terminal
|
||||
|
||||
@ -68,4 +86,6 @@ You can now compile RS into Qt Creator or with terminal
|
||||
cd retroshare
|
||||
qmake; make
|
||||
|
||||
You can change Target and SDK in *./retroshare.pri:82* changing value of QMAKE_MACOSX_DEPLOYMENT_TARGET and QMAKE_MAC_SDK
|
||||
|
||||
You can find compiled application on *./retroshare/retroshare-gui/src/RetroShare06.app*
|
||||
|
@ -113,7 +113,8 @@ libresapihttpserver {
|
||||
} else {
|
||||
mac {
|
||||
INCLUDEPATH += . $$INC_DIR
|
||||
for(lib, LIB_DIR):exists($$lib/libmicrohttpd.a){ LIBS *= $$lib/libmicrohttpd.a}
|
||||
#for(lib, LIB_DIR):exists($$lib/libmicrohttpd.a){ LIBS *= $$lib/libmicrohttpd.a}
|
||||
LIBS *= -lmicrohttpd
|
||||
} else {
|
||||
LIBS *= -lmicrohttpd
|
||||
}
|
||||
|
@ -299,8 +299,7 @@ bool InternalFileHierarchyStorage::updateSubFilesList(const DirectoryStorage::En
|
||||
std::cerr << "[directory storage] removing non existing file " << f.file_name << " at index " << d.subfiles[i] << std::endl;
|
||||
#endif
|
||||
|
||||
delete mNodes[d.subfiles[i]] ;
|
||||
mNodes[d.subfiles[i]] = NULL ;
|
||||
deleteNode(d.subfiles[i]) ;
|
||||
|
||||
d.subfiles[i] = d.subfiles[d.subfiles.size()-1] ;
|
||||
d.subfiles.pop_back();
|
||||
@ -374,24 +373,30 @@ bool InternalFileHierarchyStorage::updateFile(const DirectoryStorage::EntryIndex
|
||||
return true;
|
||||
}
|
||||
|
||||
DirectoryStorage::EntryIndex InternalFileHierarchyStorage::allocateNewIndex()
|
||||
void InternalFileHierarchyStorage::deleteNode(uint32_t index)
|
||||
{
|
||||
int found = -1;
|
||||
for(uint32_t j=0;j<mNodes.size();++j)
|
||||
if(mNodes[j] == NULL)
|
||||
if(mNodes[index] != NULL)
|
||||
{
|
||||
found = j;
|
||||
break;
|
||||
delete mNodes[index] ;
|
||||
mFreeNodes.push_back(index) ;
|
||||
mNodes[index] = NULL ;
|
||||
}
|
||||
}
|
||||
|
||||
if(found < 0)
|
||||
DirectoryStorage::EntryIndex InternalFileHierarchyStorage::allocateNewIndex()
|
||||
{
|
||||
while(!mFreeNodes.empty())
|
||||
{
|
||||
uint32_t index = mFreeNodes.front();
|
||||
mFreeNodes.pop_front();
|
||||
|
||||
if(mNodes[index] == NULL)
|
||||
return DirectoryStorage::EntryIndex(index) ;
|
||||
}
|
||||
|
||||
mNodes.push_back(NULL) ;
|
||||
return mNodes.size()-1 ;
|
||||
}
|
||||
else
|
||||
return found ;
|
||||
}
|
||||
|
||||
bool InternalFileHierarchyStorage::updateDirEntry(const DirectoryStorage::EntryIndex& indx,const std::string& dir_name,time_t most_recent_time,time_t dir_modtime,const std::vector<RsFileHash>& subdirs_hash,const std::vector<FileEntry>& subfiles_array)
|
||||
{
|
||||
@ -534,8 +539,7 @@ bool InternalFileHierarchyStorage::updateDirEntry(const DirectoryStorage::EntryI
|
||||
std::cerr << "(EE) Cannot delete node of index " << it->second << " because it is not a file. Inconsistency error!" << std::endl;
|
||||
continue ;
|
||||
}
|
||||
delete mNodes[it->second] ;
|
||||
mNodes[it->second] = NULL ;
|
||||
deleteNode(it->second) ;
|
||||
}
|
||||
|
||||
// now update row and parent index for all subnodes
|
||||
@ -740,6 +744,8 @@ bool InternalFileHierarchyStorage::check(std::string& error_string) // checks co
|
||||
std::vector<uint32_t> hits(mNodes.size(),0) ; // count hits of children. Should be 1 for all in the end. Otherwise there's an error.
|
||||
hits[0] = 1 ; // because 0 is never the child of anyone
|
||||
|
||||
mFreeNodes.clear();
|
||||
|
||||
for(uint32_t i=0;i<mNodes.size();++i)
|
||||
if(mNodes[i] != NULL && mNodes[i]->type() == FileStorageNode::TYPE_DIR)
|
||||
{
|
||||
@ -787,13 +793,15 @@ bool InternalFileHierarchyStorage::check(std::string& error_string) // checks co
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(mNodes[i] == NULL)
|
||||
mFreeNodes.push_back(i) ;
|
||||
|
||||
for(uint32_t i=0;i<hits.size();++i)
|
||||
if(hits[i] == 0 && mNodes[i] != NULL)
|
||||
{
|
||||
error_string += " - Orphean node!" ;
|
||||
delete mNodes[i] ;
|
||||
mNodes[i] = NULL ;
|
||||
|
||||
deleteNode(i) ;
|
||||
}
|
||||
|
||||
return error_string.empty();;
|
||||
@ -887,12 +895,9 @@ bool InternalFileHierarchyStorage::recursRemoveDirectory(DirectoryStorage::Entry
|
||||
recursRemoveDirectory(d.subdirs[i]);
|
||||
|
||||
for(uint32_t i=0;i<d.subfiles.size();++i)
|
||||
{
|
||||
delete mNodes[d.subfiles[i]] ;
|
||||
mNodes[d.subfiles[i]] = NULL ;
|
||||
}
|
||||
delete mNodes[dir] ;
|
||||
mNodes[dir] = NULL ;
|
||||
deleteNode(d.subfiles[i]);
|
||||
|
||||
deleteNode(dir) ;
|
||||
|
||||
mDirHashes.erase(hash) ;
|
||||
|
||||
@ -1005,6 +1010,8 @@ bool InternalFileHierarchyStorage::load(const std::string& fname)
|
||||
uint32_t buffer_size = 0 ;
|
||||
uint32_t buffer_offset = 0 ;
|
||||
|
||||
mFreeNodes.clear();
|
||||
|
||||
try
|
||||
{
|
||||
if(!FileListIO::loadEncryptedDataFromFile(fname,buffer,buffer_size) )
|
||||
|
@ -122,6 +122,7 @@ public:
|
||||
bool findSubDirectory(DirectoryStorage::EntryIndex e,const std::string& s) const ; // returns true when s is the name of a sub-directory in the given entry e
|
||||
|
||||
uint32_t mRoot ;
|
||||
std::list<uint32_t > mFreeNodes ; // keeps a list of free nodes in order to make insert effcieint
|
||||
std::vector<FileStorageNode*> mNodes;// uses pointers to keep information about valid/invalid objects.
|
||||
|
||||
void compress() ; // use empty space in the vector, mostly due to deleted entries. This is a complicated operation, mostly due to
|
||||
@ -159,6 +160,10 @@ private:
|
||||
|
||||
DirectoryStorage::EntryIndex allocateNewIndex();
|
||||
|
||||
// Deletes an existing entry in mNodes, and keeps record of the indices that get freed.
|
||||
|
||||
void deleteNode(DirectoryStorage::EntryIndex);
|
||||
|
||||
// Removes the given subdirectory from the parent node and all its pendign subdirs. Files are kept, and will go during the cleaning
|
||||
// phase. That allows to keep file information when moving them around.
|
||||
|
||||
|
@ -542,7 +542,7 @@ uint32_t p3FileDatabase::locked_getFriendIndex(const RsPeerId& pid)
|
||||
mUpdateFlags |= P3FILELISTS_UPDATE_FLAG_REMOTE_MAP_CHANGED ;
|
||||
|
||||
#ifdef DEBUG_P3FILELISTS
|
||||
P3FILELISTS_DEBUG() << " adding missing remote dir entry for friend " << *it << ", with index " << friend_index << std::endl;
|
||||
P3FILELISTS_DEBUG() << " adding missing remote dir entry for friend " << pid << ", with index " << it->second << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -569,7 +569,7 @@ uint32_t p3FileDatabase::locked_getFriendIndex(const RsPeerId& pid)
|
||||
mUpdateFlags |= P3FILELISTS_UPDATE_FLAG_REMOTE_MAP_CHANGED ;
|
||||
|
||||
#ifdef DEBUG_P3FILELISTS
|
||||
P3FILELISTS_DEBUG() << " adding missing remote dir entry for friend " << *it << ", with index " << friend_index << std::endl;
|
||||
P3FILELISTS_DEBUG() << " adding missing remote dir entry for friend " << pid << ", with index " << it->second << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -295,7 +295,7 @@ mac {
|
||||
OBJECTS_DIR = temp/obj
|
||||
MOC_DIR = temp/moc
|
||||
#DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW
|
||||
DEFINES *= MINIUPNPC_VERSION=13
|
||||
#DEFINES *= MINIUPNPC_VERSION=13
|
||||
|
||||
CONFIG += upnp_miniupnpc
|
||||
CONFIG += c++11
|
||||
@ -315,6 +315,7 @@ mac {
|
||||
|
||||
DEPENDPATH += . $$INC_DIR
|
||||
INCLUDEPATH += . $$INC_DIR
|
||||
INCLUDEPATH += ../../../.
|
||||
|
||||
# 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
|
||||
|
@ -30,7 +30,17 @@
|
||||
#include <iostream>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
int __attribute__((weak)) pthread_setname_np(const char *__buf) ;
|
||||
int RS_pthread_setname_np(pthread_t /*__target_thread*/, const char *__buf) {
|
||||
return pthread_setname_np(__buf);
|
||||
}
|
||||
#else
|
||||
int __attribute__((weak)) pthread_setname_np(pthread_t __target_thread, const char *__buf) ;
|
||||
int RS_pthread_setname_np(pthread_t __target_thread, const char *__buf) {
|
||||
return pthread_setname_np(__target_thread, __buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RSMUTEX_DEBUG
|
||||
#include <stdio.h>
|
||||
@ -167,6 +177,7 @@ void RsThread::start(const std::string &threadName)
|
||||
// set name
|
||||
|
||||
if(pthread_setname_np)
|
||||
{
|
||||
if(!threadName.empty())
|
||||
{
|
||||
// thread names are restricted to 16 characters including the terminating null byte
|
||||
@ -175,9 +186,10 @@ void RsThread::start(const std::string &threadName)
|
||||
#ifdef DEBUG_THREADS
|
||||
THREAD_DEBUG << "RsThread::start called with to long name '" << name << "' truncating..." << std::endl;
|
||||
#endif
|
||||
pthread_setname_np(mTid, threadName.substr(0, 15).c_str());
|
||||
RS_pthread_setname_np(mTid, threadName.substr(0, 15).c_str());
|
||||
} else {
|
||||
pthread_setname_np(mTid, threadName.c_str());
|
||||
RS_pthread_setname_np(mTid, threadName.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,7 @@
|
||||
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
|
||||
|
||||
TEMPLATE = lib
|
||||
macx {
|
||||
CONFIG = staticlib
|
||||
} else {
|
||||
CONFIG += staticlib
|
||||
}
|
||||
|
||||
DEFINES *= OPENSSL_NO_IDEA
|
||||
|
||||
@ -13,8 +9,8 @@ QMAKE_CXXFLAGS *= -Wall -Werror -W
|
||||
|
||||
TARGET = ops
|
||||
DESTDIR = lib
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += .
|
||||
DEPENDPATH += . $$INC_DIR
|
||||
INCLUDEPATH += . $$INC_DIR
|
||||
|
||||
#################################### Windows #####################################
|
||||
|
||||
@ -34,9 +30,13 @@ win32 {
|
||||
# Switch on optimization for debug version
|
||||
#QMAKE_CXXFLAGS_DEBUG += -O2
|
||||
#QMAKE_CFLAGS_DEBUG += -O2
|
||||
}
|
||||
|
||||
DEPENDPATH += $$INC_DIR
|
||||
INCLUDEPATH += $$INC_DIR
|
||||
|
||||
macx {
|
||||
for(lib, LIB_DIR):LIBS += -L"$$lib"
|
||||
for(bin, BIN_DIR):LIBS += -L"$$bin"
|
||||
DEFINES += OPENSSL_NO_CAMELLIA
|
||||
}
|
||||
|
||||
# Input
|
||||
@ -73,8 +73,10 @@ HEADERS += openpgpsdk/writer.h \
|
||||
openpgpsdk/armour.h \
|
||||
openpgpsdk/parse_local.h \
|
||||
openpgpsdk/keyring_local.h \
|
||||
openpgpsdk/opsdir.h \
|
||||
openpgpsdk/opsstring.h
|
||||
openpgpsdk/opsdir.h
|
||||
win32{
|
||||
HEADERS += openpgpsdk/opsstring.h
|
||||
}
|
||||
|
||||
SOURCES += openpgpsdk/accumulate.c \
|
||||
openpgpsdk/compress.c \
|
||||
@ -113,5 +115,7 @@ SOURCES += openpgpsdk/accumulate.c \
|
||||
openpgpsdk/writer_memory.c \
|
||||
openpgpsdk/writer_skey_checksum.c \
|
||||
openpgpsdk/writer_stream_encrypt_se_ip.c \
|
||||
openpgpsdk/opsdir.c \
|
||||
openpgpsdk/opsstring.c
|
||||
openpgpsdk/opsdir.c
|
||||
win32{
|
||||
SOURCES += openpgpsdk/opsstring.c
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "opsdir.h"
|
||||
#ifdef WIN32
|
||||
#include "opsstring.h"
|
||||
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
int ops_open(const char* filename, int flag, int pmode)
|
||||
|
@ -584,10 +584,13 @@ void GenCertDialog::genPerson()
|
||||
|
||||
QCoreApplication::processEvents();
|
||||
QAbstractEventDispatcher* ed = QAbstractEventDispatcher::instance();
|
||||
std::cout << "Waiting ed->processEvents()" << std::endl;
|
||||
time_t waitEnd = time(NULL) + 10;//Wait no more than 10 sec to processEvents
|
||||
if (ed->hasPendingEvents())
|
||||
while(ed->processEvents(QEventLoop::AllEvents));
|
||||
while(ed->processEvents(QEventLoop::AllEvents) && (time(NULL) < waitEnd));
|
||||
|
||||
std::string email_str = "" ;
|
||||
std::cout << "RsAccounts::GeneratePGPCertificate" << std::endl;
|
||||
RsAccounts::GeneratePGPCertificate(
|
||||
ui.name_input->text().toUtf8().constData(),
|
||||
email_str.c_str(),
|
||||
@ -609,6 +612,7 @@ void GenCertDialog::genPerson()
|
||||
std::cerr << "GenCertDialog::genPerson() Generating SSL cert with gpg id : " << PGPId << std::endl;
|
||||
std::string err;
|
||||
this->hide();//To show dialog asking password PGP Key.
|
||||
std::cout << "RsAccounts::GenerateSSLCertificate" << std::endl;
|
||||
bool okGen = RsAccounts::GenerateSSLCertificate(PGPId, "", genLoc, "", isHiddenLoc, sslPasswd, sslId, err);
|
||||
|
||||
if (okGen)
|
||||
|
@ -1587,46 +1587,8 @@ void RSLinkClipboard::parseClipboard(QList<RetroShareLink> &links)
|
||||
{
|
||||
// parse clipboard for links.
|
||||
//
|
||||
links.clear();
|
||||
QString text = QApplication::clipboard()->text() ;
|
||||
|
||||
std::cerr << "Parsing clipboard:" << text.toStdString() << std::endl ;
|
||||
|
||||
QRegExp rx(QString("retroshare://(%1)[^\r\n]+").arg(HOST_REGEXP));
|
||||
|
||||
int pos = 0;
|
||||
|
||||
while((pos = rx.indexIn(text, pos)) != -1)
|
||||
{
|
||||
QString url(text.mid(pos, rx.matchedLength()));
|
||||
RetroShareLink link(url);
|
||||
|
||||
if(link.valid())
|
||||
{
|
||||
// check that the link is not already in the list:
|
||||
bool already = false ;
|
||||
for (int i = 0; i <links.size(); ++i)
|
||||
if(links[i] == link)
|
||||
{
|
||||
already = true ;
|
||||
break ;
|
||||
}
|
||||
|
||||
if(!already)
|
||||
{
|
||||
links.push_back(link) ;
|
||||
#ifdef DEBUG_RSLINK
|
||||
std::cerr << "captured link: " << link.toString().toStdString() << std::endl ;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_RSLINK
|
||||
else
|
||||
std::cerr << "invalid link" << std::endl ;
|
||||
#endif
|
||||
|
||||
pos += rx.matchedLength();
|
||||
}
|
||||
parseText(text, links);
|
||||
}
|
||||
|
||||
QString RSLinkClipboard::toString()
|
||||
@ -1690,3 +1652,46 @@ bool RSLinkClipboard::empty(RetroShareLink::enumType type /* = RetroShareLink::T
|
||||
return RetroShareLink::process(linksToProcess, flag);
|
||||
}
|
||||
|
||||
void RSLinkClipboard::parseText(QString text, QList<RetroShareLink> &links)
|
||||
{
|
||||
links.clear();
|
||||
|
||||
std::cerr << "Parsing text:" << text.toStdString() << std::endl ;
|
||||
|
||||
QRegExp rx(QString("retroshare://(%1)[^\r\n]+").arg(HOST_REGEXP));
|
||||
|
||||
int pos = 0;
|
||||
|
||||
while((pos = rx.indexIn(text, pos)) != -1)
|
||||
{
|
||||
QString url(text.mid(pos, rx.matchedLength()));
|
||||
RetroShareLink link(url);
|
||||
|
||||
if(link.valid())
|
||||
{
|
||||
// check that the link is not already in the list:
|
||||
bool already = false ;
|
||||
for (int i = 0; i <links.size(); ++i)
|
||||
if(links[i] == link)
|
||||
{
|
||||
already = true ;
|
||||
break ;
|
||||
}
|
||||
|
||||
if(!already)
|
||||
{
|
||||
links.push_back(link) ;
|
||||
#ifdef DEBUG_RSLINK
|
||||
std::cerr << "captured link: " << link.toString().toStdString() << std::endl ;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_RSLINK
|
||||
else
|
||||
std::cerr << "invalid link" << std::endl ;
|
||||
#endif
|
||||
|
||||
pos += rx.matchedLength();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,6 +208,8 @@ class RSLinkClipboard
|
||||
//
|
||||
static int process(RetroShareLink::enumType type = RetroShareLink::TYPE_UNKNOWN, uint flag = RSLINK_PROCESS_NOTIFY_ALL);
|
||||
|
||||
static void parseText(QString text, QList<RetroShareLink> &links) ;
|
||||
|
||||
private:
|
||||
static void parseClipboard(QList<RetroShareLink> &links) ;
|
||||
};
|
||||
|
@ -78,6 +78,17 @@ void MimeTextEdit::insertFromMimeData(const QMimeData* source)
|
||||
}
|
||||
#endif
|
||||
|
||||
//insert retroshare links
|
||||
QList<RetroShareLink> links;
|
||||
RSLinkClipboard::parseText(source->text(), links);
|
||||
if(links.size() > 0)
|
||||
{
|
||||
for(int i = 0; i < links.size(); ++i)
|
||||
insertHtml(links[i].toHtml() + "<br>");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
return RSTextEdit::insertFromMimeData(source);
|
||||
}
|
||||
|
||||
|
@ -234,6 +234,9 @@ macx {
|
||||
mac_icon.files = $$files($$PWD/rsMacIcon.icns)
|
||||
mac_icon.path = Contents/Resources
|
||||
QMAKE_BUNDLE_DATA += mac_icon
|
||||
mac_webui.files = $$files($$PWD/../../libresapi/src/webui)
|
||||
mac_webui.path = Contents/Resources
|
||||
QMAKE_BUNDLE_DATA += mac_webui
|
||||
|
||||
CONFIG += version_detail_bash_script
|
||||
LIBS += -lssl -lcrypto -lz
|
||||
|
@ -77,12 +77,12 @@ macx {
|
||||
LIB_DIR += "/usr/local/lib"
|
||||
LIB_DIR += "/opt/local/lib"
|
||||
!QMAKE_MACOSX_DEPLOYMENT_TARGET {
|
||||
message(***retroshare.pri: No Target, set it to MacOS 10.10 )
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET=10.10
|
||||
message(***retroshare.pri: No Target. Set it to MacOS 10.11 )
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET=10.11
|
||||
}
|
||||
!QMAKE_MAC_SDK {
|
||||
message(***retroshare.pri: No SDK, set it to MacOS 10.10 )
|
||||
QMAKE_MAC_SDK = macosx10.10
|
||||
message(***retroshare.pri: No SDK. Set it to MacOS 10.11 )
|
||||
QMAKE_MAC_SDK = macosx10.11
|
||||
}
|
||||
CONFIG += c++11
|
||||
}
|
||||
|
@ -192,23 +192,30 @@ mac {
|
||||
CONFIG += upnp_miniupnpc
|
||||
|
||||
# zeroconf disabled at the end of libretroshare.pro (but need the code)
|
||||
CONFIG += zeroconf
|
||||
CONFIG += zcnatassist
|
||||
#CONFIG += zeroconf
|
||||
#CONFIG += zcnatassist
|
||||
|
||||
# Beautiful Hack to fix 64bit file access.
|
||||
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dfopen64=fopen -Dvstatfs64=vstatfs
|
||||
|
||||
UPNPC_DIR = ../../../miniupnpc-1.0
|
||||
#UPNPC_DIR = ../../../miniupnpc-1.0
|
||||
#GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||
#GPGME_DIR = ../../../../gpgme-1.1.8
|
||||
#OPENPGPSDK_DIR = ../../openpgpsdk/src
|
||||
#INCLUDEPATH += . $${UPNPC_DIR}
|
||||
#INCLUDEPATH += $${OPENPGPSDK_DIR}
|
||||
|
||||
OPENPGPSDK_DIR = ../../openpgpsdk/src
|
||||
#for(lib, LIB_DIR):exists($$lib/libminiupnpc.a){ LIBS += $$lib/libminiupnpc.a}
|
||||
for(lib, LIB_DIR):LIBS += -L"$$lib"
|
||||
for(bin, BIN_DIR):LIBS += -L"$$bin"
|
||||
|
||||
INCLUDEPATH += . $${UPNPC_DIR}
|
||||
INCLUDEPATH += $${OPENPGPSDK_DIR}
|
||||
DEPENDPATH += . $$INC_DIR
|
||||
INCLUDEPATH += . $$INC_DIR
|
||||
INCLUDEPATH += ../../../.
|
||||
|
||||
#../openpgpsdk
|
||||
#INCLUDEPATH += . $${UPNPC_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src
|
||||
# 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
|
||||
#LIBS += -lsqlite3
|
||||
}
|
||||
|
||||
################################# FreeBSD ##########################################
|
||||
|
@ -172,8 +172,8 @@ 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.4
|
||||
|
||||
CONFIG += version_detail_bash_script
|
||||
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
||||
@ -181,24 +181,25 @@ macx {
|
||||
LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2
|
||||
LIBS += -lssl -lcrypto -lz
|
||||
#LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan
|
||||
LIBS += ../../../miniupnpc-1.0/libminiupnpc.a
|
||||
for(lib, LIB_DIR):exists($$lib/libminiupnpc.a){ LIBS += $$lib/libminiupnpc.a}
|
||||
LIBS += -framework CoreFoundation
|
||||
LIBS += -framework Security
|
||||
|
||||
gxs {
|
||||
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
||||
|
||||
LIBS += ../../../lib/libsqlcipher.a
|
||||
for(lib, LIB_DIR):LIBS += -L"$$lib"
|
||||
for(bin, BIN_DIR):LIBS += -L"$$bin"
|
||||
|
||||
DEPENDPATH += . $$INC_DIR
|
||||
INCLUDEPATH += . $$INC_DIR
|
||||
|
||||
#LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
||||
|
||||
# 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
|
||||
#LIBS += -lsqlite3
|
||||
|
||||
}
|
||||
|
||||
|
||||
INCLUDEPATH += .
|
||||
#DEFINES* = MAC_IDLE # for idle feature
|
||||
CONFIG -= uitools
|
||||
|
||||
|
||||
}
|
||||
|
||||
##################################### FreeBSD ######################################
|
||||
|
Loading…
Reference in New Issue
Block a user