diff --git a/goldendict.pro b/goldendict.pro index df472511..b37f4bd7 100644 --- a/goldendict.pro +++ b/goldendict.pro @@ -431,6 +431,14 @@ win32 { win32:# Windows doesn't seem to have *-qt4 symlinks isEmpty(QMAKE_LRELEASE):QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease isEmpty(QMAKE_LRELEASE):QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease-qt4 + +# The *.qm files might not exist when qmake is run for the first time, +# causing the standard install rule to be ignored, and no translations +# will be installed. With this, we create the qm files during qmake run. +!win32 { + system($${QMAKE_LRELEASE} -silent $${_PRO_FILE_} 2> /dev/null) +} + updateqm.input = TRANSLATIONS updateqm.output = locale/${QMAKE_FILE_BASE}.qm updateqm.commands = $$QMAKE_LRELEASE \