2018-05-21 14:50:38 -04:00
|
|
|
################################################################################
|
|
|
|
# libresapi.pro #
|
|
|
|
# Copyright (C) 2018, Retroshare team <retroshare.team@gmailcom> #
|
|
|
|
# #
|
|
|
|
# This program is free software: you can redistribute it and/or modify #
|
|
|
|
# it under the terms of the GNU Affero General Public License as #
|
|
|
|
# published by the Free Software Foundation, either version 3 of the #
|
|
|
|
# License, or (at your option) any later version. #
|
|
|
|
# #
|
|
|
|
# This program is distributed in the hope that it will be useful, #
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
|
|
# GNU Affero General Public License for more details. #
|
|
|
|
# #
|
|
|
|
# You should have received a copy of the GNU Affero General Public License #
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
|
|
|
################################################################################
|
2015-12-15 13:56:49 -05:00
|
|
|
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
|
|
|
|
|
|
|
|
TEMPLATE = lib
|
|
|
|
CONFIG += staticlib
|
2017-03-28 05:18:27 -04:00
|
|
|
CONFIG -= qt
|
2015-12-15 13:56:49 -05:00
|
|
|
TARGET = resapi
|
|
|
|
TARGET_PRL = libresapi
|
|
|
|
DESTDIR = lib
|
|
|
|
|
2018-04-15 07:41:52 -04:00
|
|
|
!include(use_libresapi.pri):error("Including")
|
2015-12-15 13:56:49 -05:00
|
|
|
|
2018-05-11 14:24:24 -04:00
|
|
|
INCLUDEPATH += ../../libretroshare/src
|
2018-05-02 16:46:27 -04:00
|
|
|
|
2018-04-15 07:41:52 -04:00
|
|
|
libresapilocalserver {
|
|
|
|
SOURCES *= api/ApiServerLocal.cpp
|
|
|
|
HEADERS *= api/ApiServerLocal.h
|
|
|
|
}
|
2018-01-30 12:04:24 -05:00
|
|
|
|
2018-04-15 07:41:52 -04:00
|
|
|
libresapi_settings {
|
|
|
|
SOURCES += api/SettingsHandler.cpp
|
|
|
|
HEADERS += api/SettingsHandler.h
|
2017-03-25 13:15:47 -04:00
|
|
|
}
|
|
|
|
|
2016-07-28 08:08:49 -04:00
|
|
|
libresapihttpserver {
|
2018-10-20 07:51:01 -04:00
|
|
|
linux-* {
|
2016-03-23 19:33:22 -04:00
|
|
|
|
|
|
|
webui_files.path = "$${DATA_DIR}/webui"
|
2016-04-30 08:21:09 -04:00
|
|
|
webui_files.files = webui/app.js webui/app.css webui/index.html
|
|
|
|
INSTALLS += webui_files
|
2015-12-15 13:56:49 -05:00
|
|
|
|
2016-04-30 08:21:09 -04:00
|
|
|
webui_img_files.path = "$${DATA_DIR}/webui/img"
|
|
|
|
webui_img_files.files = ../../retroshare-gui/src/gui/images/logo/logo_splash.png
|
|
|
|
INSTALLS += webui_img_files
|
2016-03-23 19:33:22 -04:00
|
|
|
|
2016-05-03 13:02:07 -04:00
|
|
|
# create dummy files, we need it to include files on first try
|
2016-05-06 04:29:03 -04:00
|
|
|
system(webui-src/make-src/build.sh .)
|
2016-04-30 08:21:09 -04:00
|
|
|
|
|
|
|
WEBUI_SRC_SCRIPT = webui-src/make-src/build.sh
|
|
|
|
|
|
|
|
WEBUI_SRC_HTML = $$WEBUI_SRC_SCRIPT
|
|
|
|
WEBUI_SRC_HTML += webui-src/app/assets/index.html
|
|
|
|
|
|
|
|
WEBUI_SRC_JS = $$WEBUI_SRC_SCRIPT
|
|
|
|
WEBUI_SRC_JS += webui-src/app/accountselect.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/adddownloads.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/addidentity.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/addpeer.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/chat.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/createlogin.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/downloads.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/forums.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/home.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/identities.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/main.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/menudef.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/menu.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/mithril.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/mithril.min.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/peers.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/retroshare.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/search.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/searchresult.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/servicecontrol.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/settings.js
|
|
|
|
WEBUI_SRC_JS += webui-src/app/waiting.js
|
|
|
|
|
|
|
|
WEBUI_SRC_CSS = $$WEBUI_SRC_SCRIPT
|
|
|
|
WEBUI_SRC_CSS += webui-src/app/green-black.scss
|
|
|
|
WEBUI_SRC_CSS += webui-src/app/_reset.scss
|
|
|
|
WEBUI_SRC_CSS += webui-src/app/_chat.sass
|
|
|
|
WEBUI_SRC_CSS += webui-src/app/main.sass
|
|
|
|
|
|
|
|
|
|
|
|
create_webfiles_html.output = webui/index.html
|
|
|
|
create_webfiles_html.input = WEBUI_SRC_HTML
|
|
|
|
create_webfiles_html.commands = sh $$_PRO_FILE_PWD_/webui-src/make-src/build.sh $$_PRO_FILE_PWD_ index.html .
|
2016-05-06 16:12:40 -04:00
|
|
|
create_webfiles_html.variable_out = JUNK
|
2016-04-30 08:21:09 -04:00
|
|
|
create_webfiles_html.CONFIG = combine no_link
|
|
|
|
|
|
|
|
create_webfiles_js.output = webui/app.js
|
|
|
|
create_webfiles_js.input = WEBUI_SRC_JS
|
|
|
|
create_webfiles_js.commands = sh $$_PRO_FILE_PWD_/webui-src/make-src/build.sh $$_PRO_FILE_PWD_ app.js .
|
2016-05-06 16:12:40 -04:00
|
|
|
create_webfiles_js.variable_out = JUNK
|
2016-04-30 08:21:09 -04:00
|
|
|
create_webfiles_js.CONFIG = combine no_link
|
|
|
|
|
|
|
|
create_webfiles_css.output = webui/app.css
|
|
|
|
create_webfiles_css.input = WEBUI_SRC_CSS
|
|
|
|
create_webfiles_css.commands = sh $$_PRO_FILE_PWD_/webui-src/make-src/build.sh $$_PRO_FILE_PWD_ app.css .
|
2016-05-06 16:12:40 -04:00
|
|
|
create_webfiles_css.variable_out = JUNK
|
2016-04-30 08:21:09 -04:00
|
|
|
create_webfiles_css.CONFIG = combine no_link
|
|
|
|
|
|
|
|
|
|
|
|
QMAKE_EXTRA_COMPILERS += create_webfiles_html create_webfiles_js create_webfiles_css
|
2016-07-28 08:08:49 -04:00
|
|
|
}
|
2015-12-15 13:56:49 -05:00
|
|
|
|
2018-08-03 15:21:53 -04:00
|
|
|
appveyor {
|
2015-12-15 13:56:49 -05:00
|
|
|
DEFINES *= WINDOWS_SYS
|
|
|
|
INCLUDEPATH += . $$INC_DIR
|
2016-03-28 05:34:33 -04:00
|
|
|
|
2018-05-16 04:38:47 -04:00
|
|
|
PRO_PATH=$$shell_path($$_PRO_FILE_PWD_)
|
|
|
|
MAKE_SRC=$$shell_path($$PRO_PATH/webui-src/make-src)
|
2016-03-28 05:34:33 -04:00
|
|
|
|
2018-05-16 04:38:47 -04:00
|
|
|
#create_webfiles.commands = $$MAKE_SRC\\build.bat $$PRO_PATH
|
|
|
|
#QMAKE_EXTRA_TARGETS += create_webfiles
|
|
|
|
#PRE_TARGETDEPS += create_webfiles
|
|
|
|
QMAKE_POST_LINK=$$MAKE_SRC\\build.bat $$PRO_PATH
|
2016-03-28 05:34:33 -04:00
|
|
|
|
2016-03-31 04:23:23 -04:00
|
|
|
# create dummy files
|
|
|
|
system($$MAKE_SRC\\init.bat .)
|
2016-07-28 08:08:49 -04:00
|
|
|
}
|
2015-12-15 13:56:49 -05:00
|
|
|
|
2018-08-03 14:09:32 -04:00
|
|
|
win32 {
|
|
|
|
DEFINES *= WINDOWS_SYS
|
|
|
|
INCLUDEPATH += . $$INC_DIR
|
|
|
|
|
|
|
|
PRO_PATH=$$shell_path($$_PRO_FILE_PWD_)
|
|
|
|
MAKE_SRC=$$shell_path($$PRO_PATH/webui-src/make-src)
|
|
|
|
|
|
|
|
QMAKE_POST_LINK=$$MAKE_SRC/build.sh $$PRO_PATH
|
|
|
|
|
|
|
|
# create dummy files
|
|
|
|
system($$MAKE_SRC/init.sh .)
|
|
|
|
}
|
|
|
|
|
2015-12-15 13:56:49 -05:00
|
|
|
linux {
|
|
|
|
CONFIG += link_pkgconfig
|
|
|
|
PKGCONFIG *= libmicrohttpd
|
|
|
|
} else {
|
|
|
|
mac {
|
2015-12-21 11:25:02 -05:00
|
|
|
INCLUDEPATH += . $$INC_DIR
|
2016-07-16 17:10:00 -04:00
|
|
|
#for(lib, LIB_DIR):exists($$lib/libmicrohttpd.a){ LIBS *= $$lib/libmicrohttpd.a}
|
|
|
|
LIBS *= -lmicrohttpd
|
2015-12-15 13:56:49 -05:00
|
|
|
} else {
|
|
|
|
LIBS *= -lmicrohttpd
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SOURCES += \
|
|
|
|
api/ApiServerMHD.cpp
|
|
|
|
|
|
|
|
HEADERS += \
|
|
|
|
api/ApiServerMHD.h
|
|
|
|
}
|
|
|
|
|
|
|
|
SOURCES += \
|
|
|
|
api/ApiServer.cpp \
|
|
|
|
api/json.cpp \
|
|
|
|
api/JsonStream.cpp \
|
|
|
|
api/ResourceRouter.cpp \
|
|
|
|
api/PeersHandler.cpp \
|
|
|
|
api/Operators.cpp \
|
|
|
|
api/IdentityHandler.cpp \
|
|
|
|
api/ForumHandler.cpp \
|
|
|
|
api/ServiceControlHandler.cpp \
|
|
|
|
api/StateTokenServer.cpp \
|
|
|
|
api/GxsResponseTask.cpp \
|
|
|
|
api/FileSearchHandler.cpp \
|
|
|
|
api/TransfersHandler.cpp \
|
|
|
|
api/RsControlModule.cpp \
|
|
|
|
api/GetPluginInterfaces.cpp \
|
|
|
|
api/ChatHandler.cpp \
|
|
|
|
api/LivereloadHandler.cpp \
|
|
|
|
api/TmpBlobStore.cpp \
|
|
|
|
util/ContentTypes.cpp \
|
2016-02-19 13:22:51 -05:00
|
|
|
api/ApiPluginHandler.cpp \
|
2016-08-30 15:50:20 -04:00
|
|
|
api/ChannelsHandler.cpp \
|
2017-10-20 14:57:37 -04:00
|
|
|
api/StatsHandler.cpp \
|
|
|
|
api/FileSharingHandler.cpp
|
2015-12-15 13:56:49 -05:00
|
|
|
|
|
|
|
HEADERS += \
|
|
|
|
api/ApiServer.h \
|
|
|
|
api/json.h \
|
|
|
|
api/JsonStream.h \
|
|
|
|
api/ApiTypes.h \
|
|
|
|
api/ResourceRouter.h \
|
|
|
|
api/PeersHandler.h \
|
|
|
|
api/Operators.h \
|
|
|
|
api/IdentityHandler.h \
|
|
|
|
api/ForumHandler.h \
|
|
|
|
api/ServiceControlHandler.h \
|
|
|
|
api/GxsMetaOperators.h \
|
|
|
|
api/StateTokenServer.h \
|
|
|
|
api/GxsResponseTask.h \
|
|
|
|
api/Pagination.h \
|
|
|
|
api/FileSearchHandler.h \
|
|
|
|
api/TransfersHandler.h \
|
|
|
|
api/RsControlModule.h \
|
|
|
|
api/GetPluginInterfaces.h \
|
|
|
|
api/ChatHandler.h \
|
|
|
|
api/LivereloadHandler.h \
|
|
|
|
api/TmpBlobStore.h \
|
|
|
|
util/ContentTypes.h \
|
2016-02-19 13:22:51 -05:00
|
|
|
api/ApiPluginHandler.h \
|
2016-08-30 15:50:20 -04:00
|
|
|
api/ChannelsHandler.h \
|
2017-10-20 14:57:37 -04:00
|
|
|
api/StatsHandler.h \
|
|
|
|
api/FileSharingHandler.h
|