Ship Qt's translation together with AppImage.
This commit is contained in:
parent
161d019f29
commit
d67df44d9c
15
dist/AppImage/AppImageBuilder.yml
vendored
15
dist/AppImage/AppImageBuilder.yml
vendored
|
@ -41,6 +41,7 @@ AppDir:
|
|||
- qt515imageformats
|
||||
- qt515svg
|
||||
- qt515xmlpatterns
|
||||
- qt515translations
|
||||
- libpango-1.0-0
|
||||
files:
|
||||
include: []
|
||||
|
@ -89,6 +90,20 @@ AppDir:
|
|||
- opt/qt515/plugins/egldeviceintegrations
|
||||
- opt/qt515/plugins/platforminputcontexts
|
||||
- opt/qt515/plugins/sqldrivers
|
||||
- /opt/qt515/translations/assistant*.qm
|
||||
- /opt/qt515/translations/designer*.qm
|
||||
- /opt/qt515/translations/linguist*.qm
|
||||
- /opt/qt515/translations/qt_help*.qm
|
||||
- /opt/qt515/translations/qtconnectivity*.qm
|
||||
- /opt/qt515/translations/qtdeclarative*.qm
|
||||
- /opt/qt515/translations/qtlocation*.qm
|
||||
- /opt/qt515/translations/qtmultimedia*.qm
|
||||
- /opt/qt515/translations/qtquickcontrols2*.qm
|
||||
- /opt/qt515/translations/qtquickcontrols*.qm
|
||||
- /opt/qt515/translations/qtscript*.qm
|
||||
- /opt/qt515/translations/qtserialport*.qm
|
||||
- /opt/qt515/translations/qtwebengine*.qm
|
||||
- /opt/qt515/translations/qtwebsockets*.qm
|
||||
runtime:
|
||||
env:
|
||||
APPDIR_LIBRARY_PATH: "$APPDIR:$APPDIR/runtime/compat/:$APPDIR/opt/qt515/lib:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/local/lib/valentina"
|
||||
|
|
|
@ -149,7 +149,6 @@ Module {
|
|||
|
||||
if (enableAppImage && qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos"))
|
||||
defines.push('APPIMAGE');
|
||||
defines.push('APPIMAGE_QT_TRANSLATIONS="' + FileInfo.joinPaths(qbs.installPrefix, "translations") + '"');
|
||||
|
||||
if (enableMultiBundle)
|
||||
defines.push('MULTI_BUNDLE');
|
||||
|
|
|
@ -278,7 +278,7 @@ auto VAbstractApplication::QtTranslationsPath(const QString &locale) -> QString
|
|||
#if defined(APPIMAGE)
|
||||
Q_UNUSED(locale)
|
||||
/* Fix path to translations when run inside AppImage. */
|
||||
return AppImageRoot() + APPIMAGE_QT_TRANSLATIONS;
|
||||
return AppImageRoot() + QLibraryPath(QLibraryInfo::TranslationsPath);
|
||||
#else
|
||||
return translationsPath(locale);
|
||||
#endif // defined(APPIMAGE)
|
||||
|
@ -371,7 +371,7 @@ void VAbstractApplication::LoadTranslation(QString locale)
|
|||
LoadQM(qtTranslator, QStringLiteral("qt_"), locale, qtQmDir);
|
||||
installTranslator(qtTranslator);
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(QBS_BUILD)
|
||||
#if (defined(Q_OS_WIN) && !defined(QBS_BUILD)) || defined(APPIMAGE)
|
||||
qtxmlTranslator = new QTranslator(this);
|
||||
LoadQM(qtxmlTranslator, QStringLiteral("qtxmlpatterns_"), locale, qtQmDir);
|
||||
installTranslator(qtxmlTranslator);
|
||||
|
|
Loading…
Reference in New Issue
Block a user