From 5a219b4d10199b2801656928d377f7b2181fe9e6 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Wed, 15 Mar 2017 23:11:50 +0100 Subject: [PATCH] Update to Qt 5.8.0 Simplified android buinding and updated documentation Removed a bunch of unused qml files --- README-Android.asciidoc | 80 ++++++----- libretroshare/src/libretroshare.pro | 16 +-- openpgpsdk/src/openpgpsdk.pro | 16 +-- .../src/android/gradle.properties | 4 +- retroshare-qml-app/src/qml.qrc | 10 -- retroshare-qml-app/src/qml/AppButton.qml | 30 ---- retroshare-qml-app/src/qml/ApplicationBar.qml | 37 ----- .../src/qml/ChannelGroupDelegate.qml | 33 ----- .../src/qml/ChannelMsgDelegate.qml | 42 ------ retroshare-qml-app/src/qml/ChatView.qml | 9 +- retroshare-qml-app/src/qml/ContactBox.qml | 61 -------- .../src/qml/ForumMsgDelegate.qml | 41 ------ .../src/qml/GxsGroupDelegate.qml | 26 ---- retroshare-qml-app/src/qml/GxsIdDelegate.qml | 33 ----- retroshare-qml-app/src/qml/GxsService.qml | 119 --------------- retroshare-qml-app/src/qml/Locations.qml | 6 +- .../src/qml/PostedMsgDelegate.qml | 40 ------ retroshare-qml-app/src/qml/main.qml | 136 ------------------ retroshare.pri | 7 +- 19 files changed, 81 insertions(+), 665 deletions(-) delete mode 100644 retroshare-qml-app/src/qml/AppButton.qml delete mode 100644 retroshare-qml-app/src/qml/ApplicationBar.qml delete mode 100644 retroshare-qml-app/src/qml/ChannelGroupDelegate.qml delete mode 100644 retroshare-qml-app/src/qml/ChannelMsgDelegate.qml delete mode 100644 retroshare-qml-app/src/qml/ContactBox.qml delete mode 100644 retroshare-qml-app/src/qml/ForumMsgDelegate.qml delete mode 100644 retroshare-qml-app/src/qml/GxsGroupDelegate.qml delete mode 100644 retroshare-qml-app/src/qml/GxsIdDelegate.qml delete mode 100644 retroshare-qml-app/src/qml/GxsService.qml delete mode 100644 retroshare-qml-app/src/qml/PostedMsgDelegate.qml diff --git a/README-Android.asciidoc b/README-Android.asciidoc index db1116bb7..085d50ade 100644 --- a/README-Android.asciidoc +++ b/README-Android.asciidoc @@ -3,14 +3,28 @@ Compile Retroshare for Android == Introduction -Compiling an application for Android is not as easy as one would imagine, expecially one like RetroShare that has a big codebase and is not well documented. This document is aimed to empower the reader so she can hopefully succed or at least have a significant help in compiling her own RetroShare APK package installable on Android. +Compiling an application for Android is not as easy as one would imagine, +expecially one like RetroShare that has a big codebase and is not well +documented. +This document is aimed to empower the reader so she can hopefully succed or at +least have a significant help in compiling her own RetroShare APK package +installable on Android. == Preparing The Environement -First of all setup your Qt for Android development environement following the guide on the link:http://doc.qt.io/qt-5/androidgs.html[Qt for android web site]. -At this point you should have Android SDK, Android NDK, and Qt for Android working fine, and you should be capable of executing on an Android emulator or on your Android phone Qt for Android examples. +First of all setup your Qt for Android development environement following the +guide on the link:http://doc.qt.io/qt-5/androidgs.html[Qt for android web site]. +At this point you should have Android SDK, Android NDK, and Qt for Android +working fine, and you should be capable of executing on an Android emulator or +on your Android phone Qt for Android examples. -But RetroShare is not as simple to compile as those examples. In particular, the Android NDK precompiled toolchain is limited and doesn't support the full C++ specification, and it is missing some part that is needed to build RetroShare. The good news is that Android NDK ships all the necessary to build a custom toolchain that is suitable to build RetroShare. In order to build the toolchain with needed library RetroShare provides the +android-prepare-toolchain.sh+ script; before you execute it you should define some variables the script cannot determine in an easy and reliable manner by itself in your terminal. +But RetroShare is not as simple to compile as those examples. The good news is +that Android NDK ships all the necessary to build a custom toolchain that is +suitable to build RetroShare. +In order to build the toolchain with needed library RetroShare provides the ++android-prepare-toolchain.sh+ script; before you execute it you should define +some variables the script cannot determine in an easy and reliable manner by +itself in your terminal. [source,bash] ------------------------------------------------------------------------------- @@ -27,56 +41,56 @@ export ANDROID_NDK_ARCH="arm" ## The Android API level the Android device you want to target export ANDROID_PLATFORM_VER="19" -## The number of core that yout host CPU have (just to speed up compilation) set it to 1 if unsure +## The number of core that yout host CPU have (just to speed up compilation) set +## it to 1 if unsure export HOST_NUM_CPU=1 ./android-prepare-toolchain.sh ------------------------------------------------------------------------------- -Now is time for the bad news: as of today Qt assumes you use the NDK precompiled toolchain and doesn't have an option to use the custom toolchain you just generated, so you need to tweak Qt internals a little to make usage of the custom toolchain. First of all you need to determine your Qt for Android installation path -in my case it is +/opt/Qt5.7.0/+ - then find the +mkspecs+ directory -in my case it is +/opt/Qt5.7.0/5.7/android_armv7/mkspecs+ - and then modify qmake configuration for the android target according to your toolchain, in my case I have done it with the following commands (in the same shell I used before, to take advantage of the already set variables): - -WARNING: This may need a slight modification if you have a different Qt version. - -[source,bash] -------------------------------------------------------------------------------- -export QT_PATH="/opt/Qt5.7.0/" -export QT_MAJOR_VERSION="5.7" - -cd ${QT_PATH}/${QT_MAJOR_VERSION}/android_armv7/mkspecs -sudo --preserve-env -s -cp -r android-g++ android-g++-backup -cd android-g++ -sed -i "s|^NDK_TOOLCHAIN_PATH =.*|NDK_TOOLCHAIN_PATH = ${NDK_TOOLCHAIN_PATH}|" qmake.conf -------------------------------------------------------------------------------- - - == Preparing Qt Creator -Now that your environement is set up you should configure Qt Creator for Android following the link:http://doc.qt.io/qtcreator/creator-developing-android.html[official guide]. At the end of this step your Qt Creator should recognize the Android compiler and the Qt for Android kit. As we use a custom toolchain one more step is needed. +Now that your environement is set up you should configure Qt Creator for Android +following the +link:http://doc.qt.io/qtcreator/creator-developing-android.html[official guide]. +At the end of this step your Qt Creator should recognize the Android compiler +and the Qt for Android kit. -From the top menu click -_Tools -> Options... -> Build & Run -> Compilers -> Android GCC (arm-4.9) -> Clone_ +Your Kit is now ready to use. Now you can open RetroShare as a Qt Creator +project and in the Projects left menu add the newly created kit if not already +present, so you can select it on the build type selection button down on the +left. -Now a new compiler (usually named +Clone of Android GCC (arm-4.9)+) should have appeared on your compilers list. Select that compiler and press the Browse button to look for your custom toolchain compiler. You should find it at +$NDK_TOOLCHAIN_PATH/bin/arm-linux-androideabi-gcc+. Select it, then press Apply. +As we use a custom toolchain one more step is needed + -Now go to the Kits tab, select +Android for armeabi-v7a (GCC 4.9, Qt 5.7.0)+ and press the Clone button. A new kit is created (usually named +Clone of Android for armeabi-v7a (GCC 4.9, Qt 5.7.0)+). Now select the new kit and change the compiler to the one you have just created. +_Qt Creator left pane -> Projects -> Build and Run -> Android SOMESTUFF kit -> +Build Environement -> Add -Your Kit is now ready to use. Now you can open RetroShare as a Qt Creator project and in the Projects left menu add the newly created kit if not already present, so you can select it on the build type selection button down on the left. +Variable: +NATIVE_LIBS_TOOLCHAIN_PATH+ +Value: +Same value as NDK_TOOLCHAIN_PATH in Preparing The Environement step+ -Some of RetroShare modules like +retroshare-gui+, +WebUI+ and +sqlcipher+ are not supported yet on Android so to be able to compile RetroShare without errors you will have to go to + +Some of RetroShare modules like +retroshare-gui+ and +WebUI+ are not available +on Android so to be able to compile RetroShare without errors you will have to +go to + -_Qt Creator left pane -> Projects -> Build and Run -> Android SOMESTUFF kit -> Build Steps -> qmake -> Additional arguments_ +_Qt Creator left pane -> Projects -> Build and Run -> Android SOMESTUFF kit -> +Build Steps -> qmake -> Additional arguments_ and add the following configurations [source,makefile] ------------------------------------------------------------------------------- -CONFIG+=no_retroshare_gui CONFIG+=no_retroshare_nogui CONFIG+=no_retroshare_plugins CONFIG+=retroshare_android_service CONFIG+=libresapilocalserver CONFIG+=no_libresapihttpserver CONFIG+=no_sqlcipher CONFIG+=retroshare_qml_app +CONFIG+=no_retroshare_gui CONFIG+=no_retroshare_nogui CONFIG+=no_retroshare_plugins CONFIG+=retroshare_android_service CONFIG+=libresapilocalserver CONFIG+=no_libresapihttpserver CONFIG+=retroshare_qml_app ------------------------------------------------------------------------------- -WARNING: SQLCipher is not supported yet on RetroShare for Android. This poses a major security concern, we are working to fix this ASAP. +WARNING: SQLCipher is not supported yet on RetroShare for Android. This poses a +major security concern, we are working to fix this ASAP. -WARNING: Some versions of QtCreator try to find the Android SDK in +/opt/android/sdk+. A workaround to this is to make a symbolic link there pointing to your SDK installation path, like +mkdir -p /opt/android/sdk && ln -s /home/user/android-sdk-linux /opt/android/sdk+ +WARNING: Some versions of QtCreator try to find the Android SDK in ++/opt/android/sdk+. A workaround to this is to make a symbolic link there +pointing to your SDK installation path, like ++mkdir -p /opt/android/sdk && ln -s /home/user/android-sdk-linux +/opt/android/sdk+ == Quircks diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro index 85fbdc9f7..fb135f196 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -906,15 +906,15 @@ android-g++ { ## Add this here and not in retroshare.pri because static library are very ## sensible to order in command line, has to be in the end of file for the ## same reason - LIBS += -L$$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/ -lssl - INCLUDEPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include - DEPENDPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include - PRE_TARGETDEPS += $$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/libssl.a + LIBS += -L$$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/ -lssl + INCLUDEPATH += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include + DEPENDPATH += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include + PRE_TARGETDEPS += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/libssl.a - LIBS += -L$$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/ -lcrypto - INCLUDEPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include - DEPENDPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include - PRE_TARGETDEPS += $$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/libcrypto.a + LIBS += -L$$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/ -lcrypto + INCLUDEPATH += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include + DEPENDPATH += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include + PRE_TARGETDEPS += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/libcrypto.a HEADERS += util/androiddebug.h } diff --git a/openpgpsdk/src/openpgpsdk.pro b/openpgpsdk/src/openpgpsdk.pro index d158cdcb1..2fcad33d4 100644 --- a/openpgpsdk/src/openpgpsdk.pro +++ b/openpgpsdk/src/openpgpsdk.pro @@ -126,14 +126,14 @@ android-g++ { ## Add this here and not in retroshare.pri because static library are very ## sensible to order in command line - LIBS += -L$$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/ -lssl - INCLUDEPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include - DEPENDPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include - PRE_TARGETDEPS += $$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/libssl.a + LIBS += -L$$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/ -lssl + INCLUDEPATH += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include + DEPENDPATH += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include + PRE_TARGETDEPS += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/libssl.a - LIBS += -L$$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/ -lcrypto - INCLUDEPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include - DEPENDPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include - PRE_TARGETDEPS += $$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/libcrypto.a + LIBS += -L$$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/ -lcrypto + INCLUDEPATH += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include + DEPENDPATH += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include + PRE_TARGETDEPS += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/libcrypto.a } diff --git a/retroshare-qml-app/src/android/gradle.properties b/retroshare-qml-app/src/android/gradle.properties index 0675a3cf4..6915cd803 100644 --- a/retroshare-qml-app/src/android/gradle.properties +++ b/retroshare-qml-app/src/android/gradle.properties @@ -4,6 +4,6 @@ # as it contains information specific to your local configuration. androidBuildToolsVersion=24.0.1 -androidCompileSdkVersion=18 +androidCompileSdkVersion=23 buildDir=.build -qt5AndroidDir=/opt/Qt5.7.0/5.7/android_armv7/src/android/java +qt5AndroidDir=/opt/Qt5.8.0/5.8/android_armv7/src/android/java diff --git a/retroshare-qml-app/src/qml.qrc b/retroshare-qml-app/src/qml.qrc index 7a7883377..594c556fd 100644 --- a/retroshare-qml-app/src/qml.qrc +++ b/retroshare-qml-app/src/qml.qrc @@ -5,16 +5,6 @@ qml/icons/settings-4-128.png qml/icons/email-128.png qml/icons/contacts-128.png - qml/PostedMsgDelegate.qml - qml/GxsService.qml - qml/GxsIdDelegate.qml - qml/GxsGroupDelegate.qml - qml/ForumMsgDelegate.qml - qml/ContactBox.qml - qml/ChannelMsgDelegate.qml - qml/ChannelGroupDelegate.qml - qml/ApplicationBar.qml - qml/AppButton.qml qml/Locations.qml qml/jsonpath.js qml/JSONListModel.qml diff --git a/retroshare-qml-app/src/qml/AppButton.qml b/retroshare-qml-app/src/qml/AppButton.qml deleted file mode 100644 index 6b3f9a881..000000000 --- a/retroshare-qml-app/src/qml/AppButton.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.2 -import QtQuick.Layouts 1.1 -import "." - -Rectangle { - id: appButton - property alias icon: appIcon.source - - signal buttonClicked - - width: parent.height - height: parent.height - color: "#00000000" - - Image { - id: appIcon - anchors.centerIn: parent - width: 25 - height: 25 - } - MouseArea { - hoverEnabled: false - anchors.fill: parent - onClicked: { - appButton.buttonClicked() - } - } -} - - diff --git a/retroshare-qml-app/src/qml/ApplicationBar.qml b/retroshare-qml-app/src/qml/ApplicationBar.qml deleted file mode 100644 index 3ec44349d..000000000 --- a/retroshare-qml-app/src/qml/ApplicationBar.qml +++ /dev/null @@ -1,37 +0,0 @@ -import QtQuick 2.2 -import QtQuick.Layouts 1.1 -import "." - -Rectangle { - id: status - anchors.fill: parent - color: "#336699" //"#FF7733" - height: 50 - - default property alias contents: placeholder.children - - RowLayout { - id: placeholder - spacing: 0 - width: 200 - height: parent.height - anchors.top: parent.top - anchors.left: parent.left - - } - - ContactBox { - - width: 200 - height: parent.height - anchors.top: parent.top - anchors.right: parent.right - - icon: "icons/contacts-128.png" - name: "Vade Retro" - status: "Away" - } -} - - - diff --git a/retroshare-qml-app/src/qml/ChannelGroupDelegate.qml b/retroshare-qml-app/src/qml/ChannelGroupDelegate.qml deleted file mode 100644 index a92cab36c..000000000 --- a/retroshare-qml-app/src/qml/ChannelGroupDelegate.qml +++ /dev/null @@ -1,33 +0,0 @@ -import QtQuick 2.2 -import "." - -Item { - id: item - width: parent.width - height: 50 - - Column { - Text { text: '' + model.GroupName + '' } - Text { text: GroupId } - } - - MouseArea { - hoverEnabled: false - anchors.fill: parent - onClicked: { - item.ListView.view.currentIndex = index - channelMsgModel.updateEntries(model.GroupId) - console.log("Clicked on Channel GroupId: " + model.GroupId) - } - } - - Rectangle { - width: parent.width - height: 1 - color: "#AAAAAA" - anchors.left: parent.left - anchors.top: parent.bottom - } -} - - diff --git a/retroshare-qml-app/src/qml/ChannelMsgDelegate.qml b/retroshare-qml-app/src/qml/ChannelMsgDelegate.qml deleted file mode 100644 index 333d0fab0..000000000 --- a/retroshare-qml-app/src/qml/ChannelMsgDelegate.qml +++ /dev/null @@ -1,42 +0,0 @@ -import QtQuick 2.2 -import "." - -Item { - id: msgDelegate - - width: parent.width - height: 150 - - Column { - Text { text: 'MsgId: ' + AuthorId } - Text { text: 'AuthorId: ' + AuthorId } - Row { - Text { text: 'Name: ' + MsgName } - Text { text: ' PublishTs: ' + PublishTs } - } - Text { text: 'Msg: ' + Msg } - Row { - Text { text: 'NumberFiles: ' + NumberFiles } - Text { text: ' TotalFileSize: ' + TotalFileSize } - } - - Text { text: 'FileNames: ' + FileNames } - Text { text: 'FileSizes: ' + FileSizes } - Text { text: 'FileHashes: ' + FileHashes } - Row { - Text { text: 'HaveVoted: ' + HaveVoted } - Text { text: ' UpVotes: ' + UpVotes } - Text { text: ' DownVotes: ' + DownVotes } - Text { text: ' Comments: ' + Comments } - } - } - - MouseArea { - hoverEnabled: false - anchors.fill: parent - onClicked: { - item.ListView.view.currentIndex = index - } - } -} - diff --git a/retroshare-qml-app/src/qml/ChatView.qml b/retroshare-qml-app/src/qml/ChatView.qml index 7f6139b9b..4a06b6dd9 100644 --- a/retroshare-qml-app/src/qml/ChatView.qml +++ b/retroshare-qml-app/src/qml/ChatView.qml @@ -7,7 +7,11 @@ Item id: chatView property string chatId - function refreshData() { rsApi.request("/chat/messages/"+ chatId, "", function(par) { chatModel.json = par.response }) } + function refreshData() + { + rsApi.request( "/chat/messages/"+ chatId, "", + function(par) { chatModel.json = par.response } ) + } onFocusChanged: focus && refreshData() @@ -66,7 +70,8 @@ Item onClicked: { var jsonData = {"chat_id":chatView.chatId, "msg":msgComposer.text} - rsApi.request("/chat/send_message", JSON.stringify(jsonData), function(par) { msgComposer.text = ""; console.log(msg) }) + rsApi.request( "/chat/send_message", JSON.stringify(jsonData), + function(par) { msgComposer.text = ""; } ) } } diff --git a/retroshare-qml-app/src/qml/ContactBox.qml b/retroshare-qml-app/src/qml/ContactBox.qml deleted file mode 100644 index 9790ed677..000000000 --- a/retroshare-qml-app/src/qml/ContactBox.qml +++ /dev/null @@ -1,61 +0,0 @@ -import QtQuick 2.2 -import "." - -Item { - - property alias icon: contactIcon.source - property alias name: contactName.text - property alias status: contactStatus.text - - Rectangle { - - anchors.fill: parent - color: "#00000000" - - Image { - id: contactIcon - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - width: 40 - height: 40 - source: "icons/contacts-128.png" - } - - Rectangle { - height: contactIcon.height - anchors.verticalCenter: parent.verticalCenter - anchors.left: contactIcon.right - color: parent.color - - Text { - id: contactName - text: "Username" - anchors.left: parent.left - anchors.leftMargin: 10 - anchors.bottom: contactStatus.top - anchors.bottomMargin: 2 - - horizontalAlignment: Text.AlignHCenter - font.pointSize: 14 - font.bold: false - color: "#FFFFFF" - } - - Text { - id: contactStatus - text: "Hello world!" - anchors.left: parent.right - anchors.leftMargin: 10 - anchors.bottom: parent.bottom - anchors.bottomMargin: 1 - - horizontalAlignment: Text.AlignHCenter - font.pointSize: 10 - font.bold: false - color: "#FFFFFF" - } - } - } -} - - diff --git a/retroshare-qml-app/src/qml/ForumMsgDelegate.qml b/retroshare-qml-app/src/qml/ForumMsgDelegate.qml deleted file mode 100644 index bdb8d9138..000000000 --- a/retroshare-qml-app/src/qml/ForumMsgDelegate.qml +++ /dev/null @@ -1,41 +0,0 @@ -import QtQuick 2.2 -import "." - -Item { - id: msgDelegate - - width: parent.width - height: col.height - - Column { - id: col - Text { text: 'MsgId: ' + AuthorId } - Text { text: 'AuthorId: ' + AuthorId } - Row { - Text { text: 'Name: ' + MsgName } - Text { text: ' PublishTs: ' + PublishTs } - } - Text { - wrapMode: Text.Wrap - text: 'Msg: ' + Msg - } - } - - MouseArea { - hoverEnabled: false - anchors.fill: parent - onClicked: { - item.ListView.view.currentIndex = index - } - } - - Rectangle { - width: parent.width - height: 2 - color: "#AAAAAA" - anchors.left: parent.left - anchors.top: parent.bottom - } - -} - diff --git a/retroshare-qml-app/src/qml/GxsGroupDelegate.qml b/retroshare-qml-app/src/qml/GxsGroupDelegate.qml deleted file mode 100644 index 0a0b14f73..000000000 --- a/retroshare-qml-app/src/qml/GxsGroupDelegate.qml +++ /dev/null @@ -1,26 +0,0 @@ -import QtQuick 2.2 -import "." - -Item { - id: item - property var msgModel: {} - - width: parent.width - height: 50 - - Column { - Text { text: 'Name: ' + model.GroupName } - Text { text: 'Number: ' + GroupId } - } - - MouseArea { - hoverEnabled: false - anchors.fill: parent - onClicked: { - item.ListView.view.currentIndex = index - item.msgModel.updateEntries(model.GroupId) - } - } -} - - diff --git a/retroshare-qml-app/src/qml/GxsIdDelegate.qml b/retroshare-qml-app/src/qml/GxsIdDelegate.qml deleted file mode 100644 index 8fd7d738d..000000000 --- a/retroshare-qml-app/src/qml/GxsIdDelegate.qml +++ /dev/null @@ -1,33 +0,0 @@ -import QtQuick 2.2 -import "." - -Item { - id: item - width: parent.width - height: 50 - - Column { - Text { text: '' + model.GroupName + '' } - Text { text: GroupId } - } - - MouseArea { - hoverEnabled: false - anchors.fill: parent - onClicked: { - item.ListView.view.currentIndex = index - //channelMsgModel.updateEntries(model.GroupId) - //console.log("Clicked on Channel GroupId: " + model.GroupId) - } - } - - Rectangle { - width: parent.width - height: 1 - color: "#AAAAAA" - anchors.left: parent.left - anchors.top: parent.bottom - } -} - - diff --git a/retroshare-qml-app/src/qml/GxsService.qml b/retroshare-qml-app/src/qml/GxsService.qml deleted file mode 100644 index 7c2a4798d..000000000 --- a/retroshare-qml-app/src/qml/GxsService.qml +++ /dev/null @@ -1,119 +0,0 @@ -import QtQuick 2.2 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 1.1 -import "." - - -Item { - id: gxsService - - property alias icon: sideIcon.source - property alias title: sideTitle.text - - property alias groupDelegate: sideList.delegate - property alias groupModel: sideList.model - - property alias msgDelegate: mainList.delegate - property alias msgModel: mainList.model - - RowLayout { - spacing: 0 - anchors.fill: parent - - Rectangle { - id: sideBar - width: 200 - Layout.fillHeight: true - - Rectangle { - id: sideHeader - width: parent.width - height: 30 - - Text { - id: sideTitle - - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: 10 - width: 20 - height: 20 - text: "Service" - color: "#333333" - } - - Image { - id: sideIcon - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 10 - width: 20 - height: 20 - source: "icons/contacts-128.png" - } - } - - Rectangle { - id: sideListBox - width: parent.width - - anchors.top: sideHeader.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - - ListView { - id: sideList - anchors.fill: parent - - delegate: GxsGroupDelegate { - msgModel: mainList.model - } - - // section. - section.property: "SubscribeStatus" - section.criteria: ViewSection.FullString - section.delegate: Rectangle { - width: sideListBox.width - height: childrenRect.height - color: "blue" - - Text { - text: section - font.bold: true - font.pixelSize: 20 - } - } - - clip: true - highlight: Rectangle { color: "lightsteelblue"; radius: 5 } - focus: true - - onCurrentItemChanged: { - console.log("SideBar Item Changed on " + gxsService.title) - } - } - } - } - - Rectangle { - Layout.fillWidth: true - Layout.fillHeight: true - - ListView { - id: mainList - anchors.fill: parent - - clip: true - highlight: Rectangle { color: "lightsteelblue"; radius: 5 } - focus: true - onCurrentItemChanged: { - console.log("item changed") - } - } - - } - } -} - - diff --git a/retroshare-qml-app/src/qml/Locations.qml b/retroshare-qml-app/src/qml/Locations.qml index f81ae4c42..41b917471 100644 --- a/retroshare-qml-app/src/qml/Locations.qml +++ b/retroshare-qml-app/src/qml/Locations.qml @@ -69,7 +69,8 @@ Item { locationView.password = password console.log("locationView.sslid: ", locationView.sslid) - rsApi.request("/control/login/", JSON.stringify({id: locationView.sslid})) + rsApi.request( "/control/login/", + JSON.stringify({id: locationView.sslid}) ) locationView.attemptLogin = true busyIndicator.running = true attemptTimer.start() @@ -111,7 +112,8 @@ Item { // if Server requested password var jsonPass = { password: locationView.password } - rsApi.request("/control/password/", JSON.stringify(jsonPass)) + rsApi.request( "/control/password/", + JSON.stringify(jsonPass) ) locationView.attemptLogin = false console.debug("RS core asked for password") } diff --git a/retroshare-qml-app/src/qml/PostedMsgDelegate.qml b/retroshare-qml-app/src/qml/PostedMsgDelegate.qml deleted file mode 100644 index f700054aa..000000000 --- a/retroshare-qml-app/src/qml/PostedMsgDelegate.qml +++ /dev/null @@ -1,40 +0,0 @@ -import QtQuick 2.2 -import "." - -Item { - id: msgDelegate - - width: parent.width - height: 150 - - Column { - Text { text: 'MsgId: ' + AuthorId } - Text { text: 'AuthorId: ' + AuthorId } - Row { - Text { text: 'Name: ' + MsgName } - Text { text: ' PublishTs: ' + PublishTs } - } - Text { text: 'Link: ' + Link } - Text { text: 'Notes: ' + Notes } - Row { - Text { text: 'Hot: ' + HotScore } - Text { text: ' Top: ' + HotScore } - Text { text: ' New: ' + HotScore } - } - Row { - Text { text: 'HaveVoted: ' + HaveVoted } - Text { text: ' UpVotes: ' + UpVotes } - Text { text: ' DownVotes: ' + DownVotes } - Text { text: ' Comments: ' + Comments } - } - } - - MouseArea { - hoverEnabled: false - anchors.fill: parent - onClicked: { - item.ListView.view.currentIndex = index - } - } -} - diff --git a/retroshare-qml-app/src/qml/main.qml b/retroshare-qml-app/src/qml/main.qml index a031f103e..37c14d521 100644 --- a/retroshare-qml-app/src/qml/main.qml +++ b/retroshare-qml-app/src/qml/main.qml @@ -114,140 +114,4 @@ ApplicationWindow } } } - -/* - onSceneGraphInitialized: llc.openConnection() - - Rectangle { - id: page - width: 600; height: 400 - color: "#336699" // "#FFFFFF" - - Rectangle { - id: header - width: parent.width - anchors.top: parent.top - anchors.left: parent.left - height: 50 - - ApplicationBar { - id: status - - AppButton { - icon: "icons/contacts-128.png" - onButtonClicked : { - tabView.currentIndex = 0 - } - } - - AppButton { - icon: "icons/settings-4-128.png" - onButtonClicked : { - tabView.currentIndex = 1 - } - } - - AppButton { - icon: "icons/email-128.png" - onButtonClicked : { - tabView.currentIndex = 2 - } - } - - AppButton { - icon: "icons/star-2-128.png" - onButtonClicked : { - tabView.currentIndex = 3 - } - } - - } - - } - - TabView { - id: tabView - width: parent.width - anchors.top: header.bottom - anchors.left: parent.left - anchors.bottom: parent.bottom - tabsVisible: false - - Tab { - id: gxsIds - //onActiveChanged: llc.request("/identity/", "") - - onVisibleChanged: llc.request("/identity/", "") - - GxsService { - id: gxss - title: "Friends" -// Button { -// text: "buto" -// anchors.left: gxss.right -// onClicked: { -// // gxss.title = "provaboba" -// // gxss.title = llc.request("/identity/", "") -// //llc.request("/identity/", "") // canviar per onVisibleChanged de Tab potser -// } - -// } - Connections { - target: llc - onGoodResponseReceived: gxss.title = msg //console.log("Image has changed!") - } - //groupDelegate: GxsIdDelegate {} - //groupModel: gxsIdModel - } - } - - Tab { - id: forum - - GxsService { - id: gxssforum - title: "Forums" - onVisibleChanged: llc.request("/control/locations/", "") - Connections { - target: llc - onGoodResponseReceived: gxssforum.title = msg //console.log("Image has changed!") - } - // This one uses the default GxsGroupDelegate. - // groupModel: forumGroupModel - - // msgDelegate: ForumMsgDelegate {} - // msgModel: forumMsgModel - } - } - - Tab { - id: channelLinks - GxsService { - title: "Channels" - - // custom GroupDelegate. - // groupDelegate: ChannelGroupDelegate {} - // groupModel: channelGroupModel - - // msgDelegate: ChannelMsgDelegate {} - // msgModel: channelMsgModel - } - } - - Tab { - id: postedLinks - - GxsService { - title: "Posted" - - // This one uses the default GxsGroupDelegate. -// groupModel: postedGroupModel - -// msgDelegate: PostedMsgDelegate {} -// msgModel: postedMsgModel - } - } - } - } - */ } diff --git a/retroshare.pri b/retroshare.pri index 99f3e4f04..5b8595985 100644 --- a/retroshare.pri +++ b/retroshare.pri @@ -83,16 +83,19 @@ unix { } android-g++ { + isEmpty(NATIVE_LIBS_TOOLCHAIN_PATH) { + NATIVE_LIBS_TOOLCHAIN_PATH = $$(NATIVE_LIBS_TOOLCHAIN_PATH) + } CONFIG *= no_libresapihttpserver no_sqlcipher upnp_libupnp CONFIG -= libresapihttpserver sqlcipher upnp_miniupnpc QT *= androidextras DEFINES *= "fopen64=fopen" DEFINES *= "fseeko64=fseeko" DEFINES *= "ftello64=ftello" - INCLUDEPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include + INCLUDEPATH += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include LIBS *= -L$$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/ LIBS *= -lbz2 -lupnp -lixml -lthreadutil -lsqlite3 - ANDROID_EXTRA_LIBS *= $$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/libsqlite3.so + ANDROID_EXTRA_LIBS *= $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/libsqlite3.so # message(LIBS: $$LIBS) # message(ANDROID_EXTRA_LIBS: $$ANDROID_EXTRA_LIBS) # message(ANDROID_PLATFORM: $$ANDROID_PLATFORM)