Commit 4c75d73a authored by Jonah Brüchert's avatar Jonah Brüchert 🌳 Committed by Linus Jahn

Ubuntu Touch minor fixes & improvements

parent ff73f377
......@@ -11,6 +11,7 @@ option(I18N "Enable i18n support" FALSE)
option(SAILFISH_OS "Build with Sailfish OS GUI, needs 3rdparty/kaidansf submodule" FALSE)
option(UBUNTU_TOUCH "Building a Ubuntu Touch click (internal use only!)" FALSE)
option(CLICK_ARCH "Architecture that will be used in the click's manifest")
option(CLICK_DATE "Date used in the version number in the click's manifest")
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
......@@ -84,10 +85,17 @@ if(NOT SAILFISH_OS)
set(KAIDAN_QML_QRC kaidan_qml.qrc)
endif()
# Include bundled icons on Ubuntu Touch,
# because its icon theme is missing some required icons
if(UBUNTU_TOUCH)
set(KAIDAN_ICONS_QRC kirigami-icons.qrc)
endif()
add_executable(${PROJECT_NAME}
${KAIDAN_SOURCES}
${KAIDAN_QML_QRC}
${I18N_QRC_CPP} # only set if enabled
${KAIDAN_ICONS_QRC} # only set if enabled
${I18N_QRC_CPP} #
${KAIDANSF_SOURCES} #
)
......
......@@ -7,6 +7,7 @@
"specificDependencies": true,
"dependencies": [
"ninja-build",
"curl"
"curl",
"kirigami2-dev:armhf"
]
}
......@@ -10,6 +10,6 @@
"apparmor": "apparmor.json"
}
},
"version": "0.4.0~dev",
"version": "0.4.0~dev.@CLICK_DATE@",
"maintainer": "Kaidan developers <gamerbude@lnj.li>"
}
......@@ -241,6 +241,9 @@ QString Kaidan::getResourcePath(QString name) const
pathList << QCoreApplication::applicationDirPath() + QString("/../share/") + QString(APPLICATION_NAME);
// get the standard app data locations for current platform
pathList << QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
#ifdef UBUNTU_TOUCH
pathList << QString("./share/") + QString(APPLICATION_NAME);
#endif
#ifndef NDEBUG
#ifdef DEBUG_SOURCE_PATH
// add source directory (only for debug builds)
......
......@@ -112,6 +112,11 @@ int main(int argc, char *argv[])
// App
//
#ifdef UBUNTU_TOUCH
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "true");
qputenv("QT_QUICK_CONTROLS_MOBILE", "true");
#endif
// create a qt app
SingleApplication app(argc, argv, true);
......@@ -211,10 +216,6 @@ int main(int argc, char *argv[])
}
#endif
#ifdef UBUNTU_TOUCH
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "true");
#endif
// QML type bindings
#ifdef QMAKE_BUILD
KirigamiPlugin::getInstance().registerTypes();
......
......@@ -5,6 +5,7 @@ CLICK_TARGET_DIR="$KAIDAN_SOURCES/bin/ubuntu-touch/tmp" # tmp is hard-coded into
mkdir -p $CLICK_TARGET_DIR
DATE=$(date +%Y%m%d)
ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
......@@ -21,21 +22,13 @@ install_deb() {
}
install_dependencies() {
KIRIGAMI_VERSION="5.49.0-1"
GLOOX_VERSION="1.0.20-1+16.04+xenial+build1"
echo "I: Installing Kirigami 2"
for PKG in qml-module-org-kde-kirigami2 kirigami2-dev libkf5kirigami2-5; do
install_deb http://repo.ubports.com/pool/xenial/main/k/kirigami2 ${PKG} ${KIRIGAMI_VERSION}
done
echo "I: Installing gloox"
for PKG in libgloox-dev libgloox17; do
install_deb http://neon.plasma-mobile.org:8080/pool/main/g/gloox ${PKG} ${GLOOX_VERSION}
done
echo "I: Installing QML modules"
mv $CLICK_TARGET_DIR/usr/lib/$DEB_HOST_MULTIARCH/qt5/qml/* $CLICK_TARGET_DIR/usr/lib/$DEB_HOST_MULTIARCH
echo "I: Installing libraries"
mv $CLICK_TARGET_DIR/usr/* $CLICK_TARGET_DIR/
}
......@@ -51,7 +44,9 @@ build_kaidan() {
-DGLOOX_INCLUDE_DIR="${CLICK_TARGET_DIR}/include" \
-DI18N=1 \
-DUBUNTU_TOUCH=1 \
-DCLICK_ARCH="${ARCH}"
-DCLICK_ARCH="${ARCH}" \
-DCLICK_DATE="${DATE}" \
-DCMAKE_BUILD_TYPE=Release
ninja install
}
......@@ -62,10 +57,7 @@ cleanup_click_dir() {
$CLICK_TARGET_DIR/usr \
$CLICK_TARGET_DIR/include \
$CLICK_TARGET_DIR/share/doc \
$CLICK_TARGET_DIR/share/locale \
$CLICK_TARGET_DIR/lib/$DEB_HOST_MULTIARCH/cmake \
$CLICK_TARGET_DIR/lib/$DEB_HOST_MULTIARCH/pkgconfig \
$CLICK_TARGET_DIR/lib/$DEB_HOST_MULTIARCH/qt5/mkspecs
$CLICK_TARGET_DIR/lib/$DEB_HOST_MULTIARCH/pkgconfig
}
echo "*****************************************"
......
......@@ -13,7 +13,7 @@ cd ${TRAVIS_BUILD_DIR}/build
if [[ ${PLATFORM} == "ubuntu-touch" ]]; then
cd ..
clickable clean build click-build
clickable clean build click-build review publish
elif [[ ${BUILD_SYSTEM} == "cmake" ]]; then
cmake .. \
-GNinja \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment