Update to Qt6

- New baseline minimum platform is Ubuntu 22.04
    - Qt6 requires at least 6.2
        - some deprecations may be flagged on later versions (e.g. 6.8)
    - CMake requires at least 3.22
- Include build-tests.yml github action to validate builds on mulitple platforms
- QtTest is no longer optional since it easily comes along for the ride with Qt
- Replaced QStringRef in model::SubstitutionField with simple ParserState class
- Removed deprecations up to Qt 6.2
This commit is contained in:
Jaye Evins
2025-05-06 18:26:53 -04:00
parent f683896706
commit f15c21a01d
42 changed files with 478 additions and 226 deletions
+17 -19
View File
@@ -5,8 +5,8 @@ gLabels Linux Build Instructions
### Prerequisites
- g++
- CMake 2.8.12+
- Qt5 5.15+ Development Packages ( Qt5Core, Qt5Widgets, Qt5PrintSupport, Qt5Xml, Qt5Svg )
- CMake 3.22+
- Qt6 6.2+ Development Packages ( Qt6Core, Qt6Widgets, Qt6PrintSupport, Qt6Xml, Qt6Svg, Qt6Test )
- zlib 1.2+ Development Package
> Even if the above library packages are installed, their corresponding development packages
@@ -26,36 +26,32 @@ $ make
$ sudo make install
</pre>
## Example: Ubuntu 19.04
## Example: Ubuntu 24.04
### Installing Prerequisites
```
sudo apt install cmake
sudo apt install qtbase5-dev libqt5svg5-dev qttools5-dev zlib1g-dev
$ sudo apt install cmake
$ sudo apt install qt6-base-dev qt6-svg-dev qt6-tools-dev zlib1g-dev
```
_QREncode (Optional)_
```
sudo apt install pkgconf libqrencode-dev
$ sudo apt install pkgconf libqrencode-dev
```
_Zint (Optional)_
Install zint from source:
```
wget https://downloads.sourceforge.net/project/zint/zint/2.6.3/zint-2.6.3_final.tar.gz
tar xzf zint-2.6.3_final.tar.gz
cd zint-2.6.3.src/
mkdir build && cd build && cmake .. && make
sudo make install
$ wget https://downloads.sourceforge.net/project/zint/zint/2.6.3/zint-2.6.3_final.tar.gz
$ tar xzf zint-2.6.3_final.tar.gz
$ cd zint-2.6.3.src/
$ mkdir build && cd build && cmake .. && make
$ sudo make install
```
_GNU Barcode (Optional)_
As of version 0.99, GNU Barcode no longer installs its library. So install 0.98 from source:
```
wget https://ftp.gnu.org/gnu/barcode/barcode-0.98.tar.gz
tar xzf barcode-0.98.tar.gz
cd barcode-0.98/
./configure && make
sudo make install
$ sudo apt install barcode
```
### Compile and Install gLabels
@@ -67,6 +63,8 @@ $ cmake ..
$ make
$ sudo make install
```
## Example: Fedora 35
### Installing Prerequisites
@@ -76,12 +74,12 @@ We assume the build system already has things like cmake and the GNU C++ suite i
$ sudo dnf install qt5-qtbase-devel qt5-qtsvg-devel qt5-linguist qt5-qttools
```
These installs will pull in additional packages to fill out their prerequisites.
Fedora has a different package naming scheme that Ubuntu. This is to distinguish the QT5
Fedora has a different package naming scheme that Ubuntu. This is to distinguish the QT6
packages from the QT3 and QT4 packages that they still support for compatibility.
If the Cmake pass or build has missing package errors or warnings, you can search for the needed
package with:
```
$ sudo dnf search qt5 |grep <package name substring>
$ sudo dnf search qt6 |grep <package name substring>
```
### Compile and Install gLabels into /usr/local
+4 -4
View File
@@ -13,8 +13,8 @@ Visual Studio
### Prerequisites
- Visual Studio (these instructions are for _Visual Studio 15 2017 Win64_)
- CMake 3.2+
- Qt5 5.9+ for your version of Visual Studio
- CMake 3.22+
- Qt6 6.2+ for your version of Visual Studio
- NSIS 3.03+ (optional -- for creating an installer)
Make sure that CMake and the Qt tools are in your executable search path. For example, you may need to add something like the following to your PATH environment variable:
@@ -67,8 +67,8 @@ MSYS/MINGW
- MSYS/MINGW, including the following packages
+ mingw32-gcc-g++
+ mingw32-libz
- CMake 3.2+
- Qt5 5.9+ for MINGW
- CMake 3.22+
- Qt6 6.2+ for MINGW
Make sure that Qt tools and CMake are in your executable search path. For example, add something like this to your .profile file: