diff --git a/README.asciidoc b/README.asciidoc index 14da7ebd9..c2aad3e7f 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -2,8 +2,7 @@ RetroShare is a decentralized, private, secure, cross-platform, communication toolkit. -RetroShare provides filesharing, chat, messages, forums, channels and -more. +RetroShare provides filesharing, chat, messages, forums, channels and more. .Build Status |=============================================================================== @@ -15,13 +14,13 @@ more. == Compilation It is very difficult to keep a comprehensive (we support many platforms) and -updated documentation on how to build retroshare, instead we provide scripts and -receipts that are used to create the packages for the supported platforms and +updated documentation on how to build RetroShare, instead we provide scripts and +recipes that are used to create the packages for the supported platforms and more in the `build_scripts` directory of this repository. -Those packaging receipts toghether with the continuous integration files -`.travis.yml` and `appveyor.yml` are a good source of knoweldge on how to -compile retroshare on different platforms. +Those packaging receipts together with the continuous integration files +`.travis.yml` and `appveyor.yml` are a good source of knowledge on how to +compile RetroShare on different platforms. == Using RetroShare on a headless computer with WebUI diff --git a/appveyor.yml b/appveyor.yml index ef836a6a2..db33f5d04 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -90,8 +90,10 @@ install: # Configuring MSys2 - set PATH=C:\msys64\usr\bin;%PATH% - set PATH=C:\msys64\mingw32\bin;%PATH% - - pacman --noconfirm -S mingw-w64-i686-qt5 mingw-w64-i686-miniupnpc mingw-w64-i686-rapidjson mingw-w64-i686-sqlcipher mingw-w64-i686-xapian-core mingw-w64-i686-cmark - #- pacman --noconfirm -S mingw-w64-i686-qt5-static mingw-w64-i686-miniupnpc mingw-w64-i686-sqlcipher mingw-w64-i686-libmicrohttpd + - > + pacman --noconfirm -S + mingw-w64-i686-qt5 mingw-w64-i686-miniupnpc mingw-w64-i686-rapidjson + mingw-w64-i686-sqlcipher mingw-w64-i686-xapian-core mingw-w64-i686-cmark #- set PATH=C:\msys64\mingw32\qt5-static\bin\;%PATH% # Configuring Qt diff --git a/libretroshare/src/jsonapi/jsonapi.cpp b/libretroshare/src/jsonapi/jsonapi.cpp index 3884775da..b15dbefb5 100644 --- a/libretroshare/src/jsonapi/jsonapi.cpp +++ b/libretroshare/src/jsonapi/jsonapi.cpp @@ -17,8 +17,6 @@ * * *******************************************************************************/ -#include "jsonapi.h" - #include #include #include @@ -26,6 +24,9 @@ #include #include + +#include "jsonapi.h" + #include "util/rsjson.h" #include "retroshare/rsfiles.h" #include "util/radix64.h" @@ -36,6 +37,7 @@ #include "util/rsurl.h" #include "util/rstime.h" #include "retroshare/rsevents.h" +#include "retroshare/rsversion.h" // Generated at compile time #include "jsonapi-includes.inl" @@ -644,3 +646,14 @@ void JsonApiServer::runloop() RsInfo() << __PRETTY_FUNCTION__ << " finished!" << std::endl; } + +/*static*/ void RsJsonApi::version( + uint32_t& major, uint32_t& minor, uint32_t& mini, std::string& extra, + std::string& human ) +{ + major = RS_MAJOR_VERSION; + minor = RS_MINOR_VERSION; + mini = RS_MINI_VERSION; + extra = RS_EXTRA_VERSION; + human = RS_HUMAN_READABLE_VERSION; +} diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro index 0a9c75322..369f8075f 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -172,8 +172,6 @@ HEADERS += plugins/pluginmanager.h \ HEADERS += $$PUBLIC_HEADERS -SOURCES *= services/rsversion.cxx - ################################# Linux ########################################## linux-* { CONFIG += link_pkgconfig diff --git a/libretroshare/src/retroshare/rsjsonapi.h b/libretroshare/src/retroshare/rsjsonapi.h index e5c59c496..07a18c6b9 100644 --- a/libretroshare/src/retroshare/rsjsonapi.h +++ b/libretroshare/src/retroshare/rsjsonapi.h @@ -158,5 +158,17 @@ public: */ virtual bool isAuthTokenValid(const std::string& token) = 0; + /** + * @brief Write version information to given paramethers + * @jsonapi{development,unauthenticated} + * @param[out] major storage + * @param[out] minor storage + * @param[out] mini storage + * @param[out] extra storage + * @param[out] human storage + */ + static void version( uint32_t& major, uint32_t& minor, uint32_t& mini, + std::string& extra, std::string& human ); + virtual ~RsJsonApi() = default; }; diff --git a/libretroshare/src/retroshare/rsversion.h b/libretroshare/src/retroshare/rsversion.h index 172f6c5b3..a5e459a4a 100644 --- a/libretroshare/src/retroshare/rsversion.h +++ b/libretroshare/src/retroshare/rsversion.h @@ -79,35 +79,3 @@ constexpr auto RS_HUMAN_READABLE_VERSION = RS_PRIVATE_STRINGIFY(RS_MAJOR_VERSION) "." \ RS_PRIVATE_STRINGIFY(RS_MINOR_VERSION) "." \ RS_PRIVATE_STRINGIFY(RS_MINI_VERSION) RS_EXTRA_VERSION; - - -#include -#include - -/** - * Helper to expose version information to JSON API. - * From C++ you should use directly the macro and constants defined upstair - * @jsonapi{development} - */ -class RsVersion -{ -public: - /** - * @brief Write version information to given paramethers - * @jsonapi{development,unauthenticated} - * @param[out] major storage - * @param[out] minor storage - * @param[out] mini storage - * @param[out] extra storage - * @param[out] human storage - */ - static void version( uint32_t& major, uint32_t& minor, uint32_t& mini, - std::string& extra, std::string& human ); -}; - -/** - * Pointer to global instance of RsVersion, for the sake of JSON API, from C++ - * you can use directly the macro and constants defined upstair - * @jsonapi{development} - */ -extern RsVersion* rsVersion; diff --git a/libretroshare/src/services/rsversion.cxx b/libretroshare/src/services/rsversion.cxx deleted file mode 100644 index b4a06f7f7..000000000 --- a/libretroshare/src/services/rsversion.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * * - * libretroshare: retroshare core library * - * * - * Copyright (C) 2019 Gioacchino Mazzurco * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU Lesser 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 Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public License * - * along with this program. If not, see . * - * * - *******************************************************************************/ - -#include "retroshare/rsversion.h" - -/*extern*/ RsVersion* rsVersion = new RsVersion; - -/*static*/ void RsVersion::version( - uint32_t& major, uint32_t& minor, uint32_t& mini, std::string& extra, - std::string& human ) -{ - major = RS_MAJOR_VERSION; - minor = RS_MINOR_VERSION; - mini = RS_MINI_VERSION; - extra = RS_EXTRA_VERSION; - human = RS_HUMAN_READABLE_VERSION; -}