Make install in qmake. Path to translation in release build.

--HG--
branch : develop
This commit is contained in:
dismine 2013-11-21 15:06:23 +02:00
parent e4a4261fb5
commit c98608967f
2 changed files with 19 additions and 0 deletions

View file

@ -107,3 +107,18 @@ message(Settings: $$[QT_INSTALL_SETTINGS])
message(Examples: $$[QT_INSTALL_EXAMPLES])
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
}

View file

@ -69,7 +69,11 @@ int main(int argc, char *argv[])
app.installTranslator(&qtTranslator);
QTranslator appTranslator;
#ifdef QT_DEBUG
appTranslator.load("valentina_" + QLocale::system().name(), ".");
#else
appTranslator.load("valentina_" + QLocale::system().name(), "/usr/share/valentina/translations");
#endif
app.installTranslator(&appTranslator);
MainWindow w;