16
TCB Dev / OP-Config Qt 6 upgrade
« on: December 31, 2024, 09:27:34 AM »
Afternoon,
I tried to use the latest OP-Config with the new board from Torro and found that even though the latest version had the High DPI fix in it I still got the weird old formatting issue, which was strange. So I had a bit of a tinker and I have upgraded the whole application to Qt 6.8.1 (Using Qt Creator 15).
I know on previous blogs there may have been some other reasons Luke hasn't previously upgraded the software level but I'm not totally sure what those reasons are.
I had to make a couple of small changes to the code to handle some deprecated functionality (QRegExp needed replacing and some of the currentIndexChanged functions no longer support QString) and I corrected a couple of items in the help files as well.
There was one initilization routine that was setting a QByteArray to values of '\0' that crashed the whole app. I couldn't see why this was actually needed and commenting it out has made things work so that might need a look into later.
I had previously looked at using the QHelpEngine API for the documentation to get around using the Qt Assistant but it turned out it might be quite a lot of work to figure out how to open a new window with that in it so instead I worked our from the old InnoSetup post and a few other docs how to build the application and a include Assistant.exe and the required libraries as part of the installer. I've scripted it and included all of the extra files needed to be able to produce the setup.exe automatically.
It's actually a bash shell script i run in gitbash on windows rather than a bat file but that was just because I could more easily do stuff like use which to find files on the path without having to figure out how to do that in Windoze.
I've branched from the master branch into my own repo and generated a pull request of my changes here: https://github.com/OpenPanzerProject/OP-Config/pull/1
I need to do a little more testing with it I think but the core functionality works. There are a couple of things niggling at the minute that I need to look at.
1) Connecting to the TCB directly is flakey and doesn't work very often at all. There were a couple of small changes due to deprecation of functions in the SerialPort library so it might be related to that. However, using snoop first and then connecting seems to work pretty much every time so that is the already known work around.
2) Downloading the latest hex for the TCB claims to work but "can't save" the file. I need to look into that one.
I don't know what the numbering strategy is for version control at the moment and I figured a major upgrade of the software is probably big enough to increment to 0.94.0 which I have done for now but obviously that can be changed.
Hope that all makes some sense anyway and if anyone has chance to test it and find any issues let me know.
I have this working with the new TCB and need to fit it in to my Sherman but I may also be looking again at using some separate components and different sound options again. Currently using the Taigen card and the engine running sounds are a bit more limited than I thought they might be. Better than sounding like a Henglong Tiger 1 though!
I tried to use the latest OP-Config with the new board from Torro and found that even though the latest version had the High DPI fix in it I still got the weird old formatting issue, which was strange. So I had a bit of a tinker and I have upgraded the whole application to Qt 6.8.1 (Using Qt Creator 15).
I know on previous blogs there may have been some other reasons Luke hasn't previously upgraded the software level but I'm not totally sure what those reasons are.
I had to make a couple of small changes to the code to handle some deprecated functionality (QRegExp needed replacing and some of the currentIndexChanged functions no longer support QString) and I corrected a couple of items in the help files as well.
There was one initilization routine that was setting a QByteArray to values of '\0' that crashed the whole app. I couldn't see why this was actually needed and commenting it out has made things work so that might need a look into later.
I had previously looked at using the QHelpEngine API for the documentation to get around using the Qt Assistant but it turned out it might be quite a lot of work to figure out how to open a new window with that in it so instead I worked our from the old InnoSetup post and a few other docs how to build the application and a include Assistant.exe and the required libraries as part of the installer. I've scripted it and included all of the extra files needed to be able to produce the setup.exe automatically.
It's actually a bash shell script i run in gitbash on windows rather than a bat file but that was just because I could more easily do stuff like use which to find files on the path without having to figure out how to do that in Windoze.
I've branched from the master branch into my own repo and generated a pull request of my changes here: https://github.com/OpenPanzerProject/OP-Config/pull/1
I need to do a little more testing with it I think but the core functionality works. There are a couple of things niggling at the minute that I need to look at.
1) Connecting to the TCB directly is flakey and doesn't work very often at all. There were a couple of small changes due to deprecation of functions in the SerialPort library so it might be related to that. However, using snoop first and then connecting seems to work pretty much every time so that is the already known work around.
2) Downloading the latest hex for the TCB claims to work but "can't save" the file. I need to look into that one.
I don't know what the numbering strategy is for version control at the moment and I figured a major upgrade of the software is probably big enough to increment to 0.94.0 which I have done for now but obviously that can be changed.
Hope that all makes some sense anyway and if anyone has chance to test it and find any issues let me know.
I have this working with the new TCB and need to fit it in to my Sherman but I may also be looking again at using some separate components and different sound options again. Currently using the Taigen card and the engine running sounds are a bit more limited than I thought they might be. Better than sounding like a Henglong Tiger 1 though!