diff --git a/.gitignore b/.gitignore index c66f4ec..ed0859b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ ui/*.h .qmake.stash *.pro.user *.qm +Makefile diff --git a/lolautoaccept.pro b/lolautoaccept.pro index bee0099..c26ae6c 100644 --- a/lolautoaccept.pro +++ b/lolautoaccept.pro @@ -16,6 +16,12 @@ DEFINES += QT_DEPRECATED_WARNINGS # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 +# parameters: var, prepend, append +defineReplace(prependAll) { + for(a,$$1):result += $$2$${a}$$3 + return($$result) +} + SOURCES += \ src/fakescreen.cpp \ src/lolautoaccept.cpp \ @@ -46,15 +52,26 @@ OBJECTS_DIR = build/ FORMS += \ ui/mainwindow.ui -TRANSLATIONS += \ - ts/de_DE.ts \ - ts/en.ts - INCLUDEPATH += $$PWD/include/ \ $$PWD/thirdparty/Log/ \ /usr/include/opencv4/opencv \ /usr/include/opencv4 +#TRANSLATIONS += \ +# ts/de_DE.ts \ +# ts/en.ts + +LANGUAGES = de_DE en + +TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/ts/, .ts) +TRANSLATIONSQM = $$prependAll(LANGUAGES, $$PWD/ts/, .qm) + +makelang.commands = lrelease $$_PRO_FILE_ +QMAKE_EXTRA_TARGETS += makelang +PRE_TARGETDEPS += makelang + +QMAKE_CLEAN += $$TRANSLATIONSQM + # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin