Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, January 2008
lrelease in project file


Message 1 in thread

Is there some smart way to get the Makefile generated by qmake to run lrelease 
to compile the message files before it compiles the rest.

I include my compiled translation files in a resource file, so they have to 
exist when make runs the rcc command.

Now i have to run my commands in this sequence:
qmake myproject.pro
lrelease myproject.pro
make

What i want is:
qmake myproject.pro
make

Thanks

--
 [ signature omitted ] 

Message 2 in thread

Works great. Excactly what i was looking for. Thanks!

Now i just need a qmake-mode for emacs:)


On Tuesday 22 January 2008 11:06, Ivan Kharin wrote:
> > What i want is:
> > qmake myproject.pro
> > make
>
> add to .pro
>
>
> !isEmpty(TRANSLATIONS) {
>
>   isEmpty(QMAKE_LRELEASE) {
>     win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
>     else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
>   }
>
>   isEmpty(TS_DIR):TS_DIR = Translations
>
>   TSQM.name = lrelease ${QMAKE_FILE_IN}
>   TSQM.input = TRANSLATIONS
>   TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
>   TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
>   TSQM.CONFIG = no_link
>   QMAKE_EXTRA_COMPILERS += TSQM
>   PRE_TARGETDEPS += compiler_TSQM_make_all
> } else:message(No translation files in project)

--
 [ signature omitted ]