Set environment variable ICU_DATA on runtime.
When deploying with AppImage based on OpenSuse, the ICU library has a hardcoded path to the icudt*.dat file. This prevents the library from using shared in memory data. There are few ways to resolve this issue. According to documentation we can either use ICU_DATA environment variable or the function u_setDataDirectory(). --HG-- branch : develop
This commit is contained in:
parent
a59f4d7923
commit
3b56659226
|
@ -31,6 +31,7 @@
|
||||||
#include "../fervor/fvupdater.h"
|
#include "../fervor/fvupdater.h"
|
||||||
#include "../vmisc/vsysexits.h"
|
#include "../vmisc/vsysexits.h"
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
#include <QMessageBox> // For QT_REQUIRE_VERSION
|
#include <QMessageBox> // For QT_REQUIRE_VERSION
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
@ -45,6 +46,14 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations
|
QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations
|
||||||
|
|
||||||
|
#if defined(APPIMAGE)
|
||||||
|
/* When deploying with AppImage based on OpenSuse, the ICU library has a hardcoded path to the icudt*.dat file.
|
||||||
|
* This prevents the library from using shared in memory data. There are few ways to resolve this issue. According
|
||||||
|
* to documentation we can either use ICU_DATA environment variable or the function u_setDataDirectory().
|
||||||
|
*/
|
||||||
|
qputenv("ICU_DATA", QString(QCoreApplication::applicationDirPath() + QStringLiteral("/../share/icu")).toUtf8());
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
VAbstractApplication::WinAttachConsole();
|
VAbstractApplication::WinAttachConsole();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "../fervor/fvupdater.h"
|
#include "../fervor/fvupdater.h"
|
||||||
#include "../vpatterndb/vpiecenode.h"
|
#include "../vpatterndb/vpiecenode.h"
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
#include <QMessageBox> // For QT_REQUIRE_VERSION
|
#include <QMessageBox> // For QT_REQUIRE_VERSION
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
@ -49,6 +50,14 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations
|
QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations
|
||||||
|
|
||||||
|
#if defined(APPIMAGE)
|
||||||
|
/* When deploying with AppImage based on OpenSuse, the ICU library has a hardcoded path to the icudt*.dat file.
|
||||||
|
* This prevents the library from using shared in memory data. There are few ways to resolve this issue. According
|
||||||
|
* to documentation we can either use ICU_DATA environment variable or the function u_setDataDirectory().
|
||||||
|
*/
|
||||||
|
qputenv("ICU_DATA", QString(QCoreApplication::applicationDirPath() + QStringLiteral("/../share/icu")).toUtf8());
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
VAbstractApplication::WinAttachConsole();
|
VAbstractApplication::WinAttachConsole();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user