mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 14:41:04 -04:00
Added Windows support to retroshare-android-service
This commit is contained in:
parent
ca0521cb2d
commit
b0d2249ebc
2 changed files with 39 additions and 2 deletions
|
@ -6,11 +6,40 @@ QT += core network
|
||||||
QT -= gui
|
QT -= gui
|
||||||
|
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
CONFIG += dll
|
android-g++:CONFIG += dll
|
||||||
|
|
||||||
android-g++:TEMPLATE = lib
|
android-g++:TEMPLATE = lib
|
||||||
!android-g++:TEMPLATE = app
|
!android-g++:TEMPLATE = app
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
OBJECTS_DIR = temp/obj
|
||||||
|
|
||||||
|
LIBS_DIR = $$PWD/../../libs/lib
|
||||||
|
LIBS += $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a
|
||||||
|
LIBS += $$OUT_PWD/../../openpgpsdk/src/lib/libops.a
|
||||||
|
|
||||||
|
for(lib, LIB_DIR):LIBS += -L"$$lib"
|
||||||
|
for(bin, BIN_DIR):LIBS += -L"$$bin"
|
||||||
|
|
||||||
|
|
||||||
|
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz -lws2_32
|
||||||
|
LIBS += -luuid -lole32 -liphlpapi -lcrypt32 -lgdi32
|
||||||
|
LIBS += -lwinmm
|
||||||
|
|
||||||
|
DEFINES *= WINDOWS_SYS WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
||||||
|
|
||||||
|
DEPENDPATH += . $$INC_DIR
|
||||||
|
INCLUDEPATH += . $$INC_DIR
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
|
# Qt 5
|
||||||
|
RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src
|
||||||
|
} else {
|
||||||
|
# Qt 4
|
||||||
|
QMAKE_RC += --include-dir=$$_PRO_FILE_PWD_/../../libretroshare/src
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SOURCES += service.cpp
|
SOURCES += service.cpp
|
||||||
|
|
||||||
DEPENDPATH *= ../../libresapi/src
|
DEPENDPATH *= ../../libresapi/src
|
||||||
|
|
|
@ -39,11 +39,19 @@ int main(int argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QCoreApplication a(argc, argv);
|
QCoreApplication a(argc, argv);
|
||||||
|
|
||||||
|
RsInit::InitRsConfig();
|
||||||
|
|
||||||
ApiServer api;
|
ApiServer api;
|
||||||
RsControlModule ctrl_mod(argc, argv, api.getStateTokenServer(), &api, true);
|
RsControlModule ctrl_mod(argc, argv, api.getStateTokenServer(), &api, true);
|
||||||
api.addResourceHandler("control", dynamic_cast<resource_api::ResourceRouter*>(&ctrl_mod), &resource_api::RsControlModule::handleRequest);
|
api.addResourceHandler("control", dynamic_cast<resource_api::ResourceRouter*>(&ctrl_mod), &resource_api::RsControlModule::handleRequest);
|
||||||
|
|
||||||
QString sockPath = QString::fromStdString(RsAccounts::ConfigDirectory());
|
#ifdef QT_DEBUG
|
||||||
|
QString sockPath = "RS/";
|
||||||
|
#else
|
||||||
|
QString sockPath = QCoreApplication::applicationDirPath();
|
||||||
|
#endif
|
||||||
|
|
||||||
sockPath.append("/libresapi.sock");
|
sockPath.append("/libresapi.sock");
|
||||||
qDebug() << "Listening on:" << sockPath;
|
qDebug() << "Listening on:" << sockPath;
|
||||||
ApiServerLocal apiServerLocal(&api, sockPath); (void) apiServerLocal;
|
ApiServerLocal apiServerLocal(&api, sockPath); (void) apiServerLocal;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue