diff options
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | mobile-widgets/qml/mobile-resources.qrc | 58 | ||||
-rw-r--r-- | packaging/android/build.sh | 7 | ||||
-rwxr-xr-x | scripts/build.sh | 10 | ||||
-rwxr-xr-x | scripts/mobilecomponents.sh | 6 | ||||
-rw-r--r-- | subsurface-mobile-helper.cpp | 5 |
6 files changed, 40 insertions, 50 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aac06f6b..dea200c36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,12 +238,16 @@ if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable") else() add_executable(${SUBSURFACE_TARGET} MACOSX_BUNDLE WIN32 ${SUBSURFACE_PKG} ${MOBILE_SRC} ${SUBSURFACE_RESOURCES} ${MOBILE_RESOURCES}) endif() + ADD_LIBRARY(kirigami_static_library STATIC IMPORTED) + SET_TARGET_PROPERTIES(kirigami_static_library PROPERTIES + IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/mobile-widgets/qml/kirigami/build/src/libkirigamiplugin.a) target_link_libraries( ${SUBSURFACE_TARGET} subsurface_profile subsurface_models subsurface_corelib ${SUBSURFACE_LINK_LIBRARIES} + kirigami_static_library ) elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable") set(SUBSURFACE_APP diff --git a/mobile-widgets/qml/mobile-resources.qrc b/mobile-widgets/qml/mobile-resources.qrc index 698353323..b95ce4134 100644 --- a/mobile-widgets/qml/mobile-resources.qrc +++ b/mobile-widgets/qml/mobile-resources.qrc @@ -23,50 +23,18 @@ <file alias="menu-back.png">icons/menu-back.png</file> <file alias="nocloud.svg">icons/nocloud.svg</file> </qresource> - <qresource prefix="/imports"> - <file alias="org/kde/kirigami/qmldir">kirigami/qmldir</file> - <file alias="org/kde/kirigami/Action.qml">kirigami/Action.qml</file> - <file alias="org/kde/kirigami/ApplicationWindow.qml">kirigami/ApplicationWindow.qml</file> - <file alias="org/kde/kirigami/BasicListItem.qml">kirigami/BasicListItem.qml</file> - <file alias="org/kde/kirigami/GlobalDrawer.qml">kirigami/GlobalDrawer.qml</file> - <file alias="org/kde/kirigami/ContextDrawer.qml">kirigami/ContextDrawer.qml</file> - <file alias="org/kde/kirigami/Page.qml">kirigami/Page.qml</file> - <file alias="org/kde/kirigami/ScrollablePage.qml">kirigami/ScrollablePage.qml</file> - <file alias="org/kde/kirigami/Icon.qml">kirigami/Icon.qml</file> - <file alias="org/kde/kirigami/Heading.qml">kirigami/Heading.qml</file> - <file alias="org/kde/kirigami/OverlaySheet.qml">kirigami/OverlaySheet.qml</file> - <file alias="org/kde/kirigami/ApplicationHeader.qml">kirigami/ApplicationHeader.qml</file> - <file alias="org/kde/kirigami/AbstractApplicationHeader.qml">kirigami/AbstractApplicationHeader.qml</file> - <file alias="org/kde/kirigami/AbstractApplicationWindow.qml">kirigami/AbstractApplicationWindow.qml</file> - <file alias="org/kde/kirigami/private/PageRow.qml">kirigami/private/PageRow.qml</file> - <file alias="org/kde/kirigami/Label.qml">kirigami/Label.qml</file> - <file alias="org/kde/kirigami/AbstractListItem.qml">kirigami/AbstractListItem.qml</file> - <file alias="org/kde/kirigami/SwipeListItem.qml">kirigami/SwipeListItem.qml</file> - <file alias="org/kde/kirigami/OverlayDrawer.qml">kirigami/OverlayDrawer.qml</file> - <file alias="org/kde/kirigami/Theme.qml">kirigami/Theme.qml</file> - <file alias="org/kde/kirigami/Units.qml">kirigami/Units.qml</file> - <file alias="org/kde/kirigami/private/AbstractDrawer.qml">kirigami/private/AbstractDrawer.qml</file> - <file alias="org/kde/kirigami/private/ActionButton.qml">kirigami/private/ActionButton.qml</file> - <file alias="org/kde/kirigami/private/BackButton.qml">kirigami/private/BackButton.qml</file> - <file alias="org/kde/kirigami/private/ContextIcon.qml">kirigami/private/ContextIcon.qml</file> - <file alias="org/kde/kirigami/private/CornerShadow.qml">kirigami/private/CornerShadow.qml</file> - <file alias="org/kde/kirigami/private/DefaultListItemBackground.qml">kirigami/private/DefaultListItemBackground.qml</file> - <file alias="org/kde/kirigami/private/EdgeShadow.qml">kirigami/private/EdgeShadow.qml</file> - <file alias="org/kde/kirigami/private/MenuIcon.qml">kirigami/private/MenuIcon.qml</file> - <file alias="org/kde/kirigami/private/PageActionPropertyGroup.qml">kirigami/private/PageActionPropertyGroup.qml</file> - <file alias="org/kde/kirigami/private/PassiveNotification.qml">kirigami/private/PassiveNotification.qml</file> - <file alias="org/kde/kirigami/private/RefreshableScrollView.qml">kirigami/private/RefreshableScrollView.qml</file> - <file alias="org/kde/kirigami/icons/go-next.svg">kirigami/icons/go-next.svg</file> - <file alias="org/kde/kirigami/icons/go-previous.svg">kirigami/icons/go-previous.svg</file> - <file alias="org/kde/kirigami/icons/handle-left.svg">kirigami/icons/handle-left.svg</file> - <file alias="org/kde/kirigami/icons/distribute-horizontal-x.svg">kirigami/icons/distribute-horizontal-x.svg</file> - <file alias="org/kde/kirigami/icons/document-edit.svg">kirigami/icons/document-edit.svg</file> - <file alias="org/kde/kirigami/icons/document-save.svg">kirigami/icons/document-save.svg</file> - <file alias="org/kde/kirigami/icons/view-readermode.svg">kirigami/icons/view-readermode.svg</file> - <file alias="org/kde/kirigami/icons/dialog-cancel.svg">kirigami/icons/dialog-cancel.svg</file> - <file alias="org/kde/kirigami/icons/application-menu.svg">kirigami/icons/application-menu.svg</file> - <file alias="org/kde/kirigami/icons/gps.svg">kirigami/icons/gps.svg</file> - <file alias="org/kde/kirigami/icons/trash-empty.svg">kirigami/icons/trash-empty.svg</file> - <file alias="org/kde/kirigami/icons/list-add.svg">kirigami/icons/list-add.svg</file> + <qresource prefix="/"> + <file alias="icons/go-next.svg">kirigami/icons/go-next.svg</file> + <file alias="icons/go-previous.svg">kirigami/icons/go-previous.svg</file> + <file alias="icons/handle-left.svg">kirigami/icons/handle-left.svg</file> + <file alias="icons/distribute-horizontal-x.svg">kirigami/icons/distribute-horizontal-x.svg</file> + <file alias="icons/document-edit.svg">kirigami/icons/document-edit.svg</file> + <file alias="icons/document-save.svg">kirigami/icons/document-save.svg</file> + <file alias="icons/view-readermode.svg">kirigami/icons/view-readermode.svg</file> + <file alias="icons/dialog-cancel.svg">kirigami/icons/dialog-cancel.svg</file> + <file alias="icons/application-menu.svg">kirigami/icons/application-menu.svg</file> + <file alias="icons/gps.svg">kirigami/icons/gps.svg</file> + <file alias="icons/trash-empty.svg">kirigami/icons/trash-empty.svg</file> + <file alias="icons/list-add.svg">kirigami/icons/list-add.svg</file> </qresource> </RCC> diff --git a/packaging/android/build.sh b/packaging/android/build.sh index 408a5467d..5319c4d46 100644 --- a/packaging/android/build.sh +++ b/packaging/android/build.sh @@ -316,6 +316,13 @@ if [ "$SUBSURFACE_MOBILE" = "ON" ] ; then pushd $SUBSURFACE_SOURCE bash ./scripts/mobilecomponents.sh popd + + cd $SUBSURFACE_SOURCE/mobile-widgets/qml/kirigami/ + mkdir -p build + cd build + cmake .. -DSTATIC_LIBRARY=ON + make -j4 + make install fi if [ ! -z "$SUBSURFACE_MOBILE" ] ; then diff --git a/scripts/build.sh b/scripts/build.sh index 014d2d32b..635f1b155 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -211,6 +211,9 @@ if [ "$BUILDGRANTLEE" = "1" ] ; then make install fi + + + # finally, build Subsurface if [ $PLATFORM = Darwin ] ; then @@ -229,6 +232,13 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do if [ "$SUBSURFACE_EXECUTABLE" = "MobileExecutable" ] ; then cd $SRC/subsurface bash ./scripts/mobilecomponents.sh + + cd $SRC/subsurface/mobile-widgets/qml/kirigami/ + mkdir -p build + cd build + cmake .. -DSTATIC_LIBRARY=ON + make -j4 + make install fi mkdir -p $SRC/subsurface/$BUILDDIR diff --git a/scripts/mobilecomponents.sh b/scripts/mobilecomponents.sh index ec1e97f97..4072bf413 100755 --- a/scripts/mobilecomponents.sh +++ b/scripts/mobilecomponents.sh @@ -44,16 +44,12 @@ fi # now copy the components and a couple of icons into plae MC=$SRC/subsurface/mobile-widgets/qml/kirigami -PMMC=kirigami/src/qml +PMMC=kirigami BREEZE=breeze-icons rm -rf $MC mkdir -p $MC/icons cp -R $PMMC/* $MC/ -cp $PMMC/../fallbacktheme/*qml $MC/ - -# fix plugin requirement -sed -i -e 's/^plugin kirigamiplugin/# plugin kirigamiplugin/' $MC/qmldir cp $BREEZE/icons/actions/24/dialog-cancel.svg $MC/icons cp $BREEZE/icons/actions/24/distribute-horizontal-x.svg $MC/icons diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp index 2093af9f4..d038336c4 100644 --- a/subsurface-mobile-helper.cpp +++ b/subsurface-mobile-helper.cpp @@ -21,6 +21,9 @@ #include "qt-models/gpslistmodel.h" #include "mobile-widgets/qmlprofile.h" +#define KIRIGAMI_BUILD_TYPE_STATIC +#include "mobile-widgets/qml/kirigami/src/kirigamiplugin.h" + QObject *qqWindowObject = NULL; void init_ui() @@ -32,7 +35,9 @@ void run_ui() { qmlRegisterType<QMLManager>("org.subsurfacedivelog.mobile", 1, 0, "QMLManager"); qmlRegisterType<QMLProfile>("org.subsurfacedivelog.mobile", 1, 0, "QMLProfile"); + QQmlApplicationEngine engine; + KirigamiPlugin::getInstance().registerTypes(); #if __APPLE__ // when running the QML UI on a Mac the deployment of the QML Components seems // to fail and the search path for the components is rather odd - simply the |