summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--android-mobile/font.qrc7
-rw-r--r--core/qthelper.cpp2
-rwxr-xr-xpackaging/android/android-build-wrapper.sh10
4 files changed, 17 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 52347c458..074155b1d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -304,6 +304,7 @@ if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
qt5_add_resources(MOBILE_RESOURCES mobile-widgets/qml/kirigami/kirigami.qrc)
# When building the mobile application in Android, link it and Qt will do the rest, when doing the mobile application on Desktop, create an executable.
if(ANDROID)
+ qt5_add_resources(MOBILE_RESOURCES android-mobile/font.qrc)
add_library(${SUBSURFACE_TARGET} SHARED ${SUBSURFACE_PKG} ${MOBILE_SRC} ${SUBSURFACE_RESOURCES} ${MOBILE_RESOURCES})
else()
# the following is split across two commands since in cmake 3.12 this would result
diff --git a/android-mobile/font.qrc b/android-mobile/font.qrc
new file mode 100644
index 000000000..29f75a240
--- /dev/null
+++ b/android-mobile/font.qrc
@@ -0,0 +1,7 @@
+
+<RCC>
+ <qresource prefix="/fonts">
+ <!-- we need to load our own font for OnePlus phones -->
+ <file>Roboto-Regular.ttf</file>
+ </qresource>
+</RCC>
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index 8082db742..671ba6885 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -1399,7 +1399,7 @@ QString getUUID()
uuidString = uuid.toString();
qPrefUpdateManager::set_uuidString(uuidString);
}
- uuidString.replace("{", "").replace("}", "");
+ uuidString.replace("{", "p").replace("}", "");
return uuidString;
}
diff --git a/packaging/android/android-build-wrapper.sh b/packaging/android/android-build-wrapper.sh
index f5da7cabb..ef56cb575 100755
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -81,8 +81,8 @@ if [ ! -d "$ANDROID_NDK" ] ; then
fi
if [ ! -d "$ANDROID_SDK"/build-tools/"${ANDROID_BUILDTOOLS_REVISION}" ] ||
- [ ! -d "$ANDROID_SDK"/platforms/android-"${ANDROID_PLATFORMS}" ] ||
- [ ! -d "$ANDROID_SDK"/platforms/android-"${ANDROID_PLATFORM}" ] ; then
+ [ ! -d "$ANDROID_SDK"/platforms/"${ANDROID_PLATFORMS}" ] ||
+ [ ! -d "$ANDROID_SDK"/platforms/"${ANDROID_PLATFORM}" ] ; then
if [ ! -d "$ANDROID_SDK" ] ; then
if [ ! -f "$SDK_TOOLS" ] ; then
wget -q https://dl.google.com/android/repository/"$SDK_TOOLS"
@@ -101,6 +101,12 @@ if [ ! -d "$ANDROID_SDK"/build-tools/"${ANDROID_BUILDTOOLS_REVISION}" ] ||
popd
fi
+# now that we have an NDK, copy the font that we need for OnePlus phones
+# due to https://bugreports.qt.io/browse/QTBUG-69494
+ls -l . "$ANDROID_SDK" "$ANDROID_SDK"/platforms
+ls -l "$ANDROID_SDK"/platforms/"${ANDROID_PLATFORM}" "$ANDROID_SDK"/platforms/"${ANDROID_PLATFORM}"/data/fonts/Roboto-Regular.ttf
+cp "$ANDROID_SDK"/platforms/"${ANDROID_PLATFORM}"/data/fonts/Roboto-Regular.ttf "$SUBSURFACE_SOURCE"/android-mobile || exit 1
+
# download the Qt installer including Android bits and unpack / install
QT_DOWNLOAD_URL=https://download.qt.io/archive/qt/${QT_VERSION}/${LATEST_QT}/${QT_BINARIES}
if [ ! -d Qt/"${LATEST_QT}"/android_armv7 ] ; then