From: MASM fan Date: Sat, 2 Aug 2014 22:01:33 +0000 (+0400) Subject: Split off translations code into separate .pro file X-Git-Tag: v0.4.4.6-nvc-update7~2 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=c940c5662e5318a337670a84cf1c9b097011656d Split off translations code into separate .pro file This is required to resolve issues with detection of configuration flags. --- diff --git a/novacoin-qt.pro b/novacoin-qt.pro index e4bbcd9..bce60b9 100644 --- a/novacoin-qt.pro +++ b/novacoin-qt.pro @@ -92,7 +92,7 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) { } contains(USE_LEVELDB, 1) { - message(Building with LevelDB) + message(Building with LevelDB transaction index) DEFINES += USE_LEVELDB INCLUDEPATH += src/leveldb/include src/leveldb/helpers @@ -116,7 +116,7 @@ contains(USE_LEVELDB, 1) { # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it. QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean } else { - message(Building without LevelDB) + message(Building with Berkeley DB transaction index) SOURCES += src/txdb-bdb.cpp } @@ -442,4 +442,4 @@ contains(RELEASE, 1) { } } -system($$QMAKE_LRELEASE -silent $$_PRO_FILE_) +system($$QMAKE_LRELEASE -silent $$PWD/src/qt/locale/translations.pro) diff --git a/src/qt/locale/translations.pro b/src/qt/locale/translations.pro new file mode 100644 index 0000000..ada7a2f --- /dev/null +++ b/src/qt/locale/translations.pro @@ -0,0 +1,17 @@ +CODECFORTR = UTF-8 + +# for lrelease/lupdate +# also add new translations to src/qt/bitcoin.qrc under translations/ +TRANSLATIONS = $$files(bitcoin_*.ts) + +isEmpty(QM_DIR):QM_DIR = $$PWD/src/qt/locale +# automatically build translations, so they can be included in resource file +TSQM.name = lrelease ${QMAKE_FILE_IN} +TSQM.input = TRANSLATIONS +TSQM.output = $$QM_DIR/${QMAKE_FILE_BASE}.qm +TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} +TSQM.CONFIG = no_link +QMAKE_EXTRA_COMPILERS += TSQM + +windows:DEFINES += WIN32 +windows:RC_FILE = $$PWD/src/qt/res/bitcoin-qt.rc