Make install in qmake. Path to translation in release build.
--HG-- branch : develop
This commit is contained in:
parent
e4a4261fb5
commit
c98608967f
|
@ -107,3 +107,18 @@ message(Settings: $$[QT_INSTALL_SETTINGS])
|
||||||
message(Examples: $$[QT_INSTALL_EXAMPLES])
|
message(Examples: $$[QT_INSTALL_EXAMPLES])
|
||||||
|
|
||||||
win32:RC_FILE = share/resources/valentina.rc
|
win32:RC_FILE = share/resources/valentina.rc
|
||||||
|
|
||||||
|
unix {
|
||||||
|
#VARIABLES
|
||||||
|
isEmpty(PREFIX) {
|
||||||
|
PREFIX = /usr
|
||||||
|
}
|
||||||
|
BINDIR = $$PREFIX/bin
|
||||||
|
DATADIR =$$PREFIX/share
|
||||||
|
DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
|
||||||
|
#MAKE INSTALL
|
||||||
|
target.path = /usr/bin
|
||||||
|
translations.path = /usr/share/valentina/translations
|
||||||
|
translations.files = bin/*.qm
|
||||||
|
INSTALLS += target translations
|
||||||
|
}
|
||||||
|
|
|
@ -69,7 +69,11 @@ int main(int argc, char *argv[])
|
||||||
app.installTranslator(&qtTranslator);
|
app.installTranslator(&qtTranslator);
|
||||||
|
|
||||||
QTranslator appTranslator;
|
QTranslator appTranslator;
|
||||||
|
#ifdef QT_DEBUG
|
||||||
appTranslator.load("valentina_" + QLocale::system().name(), ".");
|
appTranslator.load("valentina_" + QLocale::system().name(), ".");
|
||||||
|
#else
|
||||||
|
appTranslator.load("valentina_" + QLocale::system().name(), "/usr/share/valentina/translations");
|
||||||
|
#endif
|
||||||
app.installTranslator(&appTranslator);
|
app.installTranslator(&appTranslator);
|
||||||
|
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user