From 1fa3c8f81aa793cc99d36c0363b6a4b9798148d4 Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Mon, 12 Feb 2018 20:59:26 +0100 Subject: [PATCH] Add custom packaging prefix to the translation paths --- flameshot.pro | 2 ++ src/utils/pathinfo.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/flameshot.pro b/flameshot.pro index 65d7ea88..299aa1b9 100644 --- a/flameshot.pro +++ b/flameshot.pro @@ -207,6 +207,8 @@ unix:!macx { } } + DEFINES += APP_PREFIX=\\\"$$PREFIX\\\" + target.path = $${BASEDIR}$${PREFIX}/bin/ qmfile.path = $${BASEDIR}$${PREFIX}/share/flameshot/translations/ diff --git a/src/utils/pathinfo.cpp b/src/utils/pathinfo.cpp index a7d48f01..7a7719db 100644 --- a/src/utils/pathinfo.cpp +++ b/src/utils/pathinfo.cpp @@ -26,6 +26,7 @@ QStringList PathInfo::translations() { QString trPath = QDir::toNativeSeparators(binaryPath) + "translations"; #if defined(Q_OS_LINUX) return QStringList() + << QString(APP_PREFIX) + "/share/flameshot/translations" << trPath << "/usr/share/flameshot/translations" << "/usr/local/share/flameshot/translations";