mar0x / Candle

GRBL controller application with G-Code visualizer written in Qt.
GNU General Public License v3.0
4 stars 1 forks source link

Plugins won't build/translate #3

Closed m-sja closed 8 months ago

m-sja commented 8 months ago

Hi @mar0x, thanks for your effort and support you put in fixing denvis experimental branch. It helped me a lot. I try to build "candle-experimental-fixes" on win10, qt5.12.12, MinGW7.3.0 32-bit. I was able to add custom translations (src\candle\translations\ *.ts) and update them using lupdate and lrelease. It works for the main application, but i have two issues with plugins:

Can i please get some help to fix this.

mar0x commented 8 months ago

Hello, Please share exact commands you are using to build Candle. I've tried to reproduce the issue building Candle from Qt Creator 12.0.1 and command line ("mkdir build", "cd build", ""qmake ../candle.pro", "mingw32-make"). Plugins were built and copied into "build/bin/plugins".

Regarding translations, I'm not sure the proper translation processing enabled in "Experimental" nor "Experimental-fixes" branches. Please let me know what commands resulting output you quote.

I've made some changes in "fixes" branch to process translations automatically (with "CONFIG += lrelease" option), "Experimental-fixes" branch is different because of plugins and other things which is hard to maintain and port to recent Qt versions.

m-sja commented 8 months ago

Hello, i was using the "Hammer"-Button in Qt Creator (GUI) to build the "Release" version. Im not sure about the commands Qt Creator runs in background. Now i tried using the commands you provided. It works and is able to run. Plugins are built as well. Thanks for your Help!

Translations files won't built automatically, but i found out, that lupdate offers the option to pass sourcefiles (like .ui) directly via command line ("cd src\candleplugins\camera", "lupdate settings.ui widget.ui -ts translation_XX.ts") It will generate the .ts file wich can be translated with Qt Linguist and compiled with "lrelease translation_XX.ts". The resulting *.qm files can be copied to the corresponding folders and work successfully.

To built translations automatically i think .pro files are needed for each plugin, and some additional adjustments in the existing .pro files are needed so lupdate and lrelease are executed and the project files of the plugins are included.

I will have a look at your changes later. Just wanted to give some quick feedback. I will post here if i find a solution for building translations of plugins automatically.

As there is a working solution/workaround (translate manual) i will close this issue.

Thanks again!