From a4cf32dce0eed6e0dd326a88f464712512482962 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Thu, 21 Dec 2017 19:12:51 +0100 Subject: [PATCH] Bundle qtbase translations with macOS and AppImage releases --- Dockerfile | 1 + release-tool | 3 ++- share/translations/CMakeLists.txt | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a5966be39..66ecb4c04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,6 +40,7 @@ RUN set -x \ qt${QT5_VERSION}base \ qt${QT5_VERSION}tools \ qt${QT5_VERSION}x11extras \ + qt${QT5_VERSION}translations \ zlib1g-dev \ libxi-dev \ libxtst-dev \ diff --git a/release-tool b/release-tool index a3813fd93..93e964bc3 100755 --- a/release-tool +++ b/release-tool @@ -678,7 +678,8 @@ build() { "$DOCKER_IMAGE" \ bash -c "cd /keepassxc/out/build-release && \ cmake -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=Off $CMAKE_OPTIONS \ - -DCMAKE_INSTALL_PREFIX=\"${INSTALL_PREFIX}\" /keepassxc/src && \ + -DCMAKE_INSTALL_PREFIX=\"${INSTALL_PREFIX}\" \ + -DKEEPASSXC_DIST_TYPE=AppImage /keepassxc/src && \ make $MAKE_OPTIONS && make DESTDIR=/keepassxc/out/bin-release install/strip && \ /keepassxc/src/AppImage-Recipe.sh "$APP_NAME" "$RELEASE_NAME"" diff --git a/share/translations/CMakeLists.txt b/share/translations/CMakeLists.txt index a5d8882be..c0b1a49b8 100644 --- a/share/translations/CMakeLists.txt +++ b/share/translations/CMakeLists.txt @@ -24,6 +24,11 @@ qt5_add_translation(QM_FILES ${TRANSLATION_FILES}) if(MINGW) file(GLOB QTBASE_TRANSLATIONS ${Qt5_DIR}/../../../share/qt5/translations/qtbase_*.qm) +elseif(APPLE OR KEEPASSXC_DIST_APPIMAGE) + file(GLOB QTBASE_TRANSLATIONS + /usr/share/qt/translations/qtbase_*.qm + /usr/share/qt5/translations/qtbase_*.qm + ${Qt5_DIR}/../../../translations/qtbase_*.qm) endif() set(QM_FILES ${QM_FILES} ${QTBASE_TRANSLATIONS})