De-Backer wrote:on linux it is no problem
but i wanted to see if it would work on windows without too many changes.
Building KF5 works in linux because it is a KDE version
but on windows, a disaster.
you essentially end up building a complete KDE and Python and Cmake and ReuseTool and Sphinx and qt and .... => it takes longer to build QET from code than to install linux on virtualbox and build it there!
You could try MXE with Digikam script like me to cross-compile QET for Windows.
https://mxe.cc/#requirements
git clone https://invent.kde.org/graphics/digikam.git
cd digikam/project/bundles/mxe/
1) I edit config.sh script for static build, but if you found a solution for shared build work.
2 ) edit 01-build-mxe.sh
I add sqlite and -j48 for make
and delete some package
3 ) run 01-build-mxe.sh
laurent@debian:~/digikam2/project/bundles/mxe$ ./01-build-mxe.sh
It may take a while, several hours depending on the power of your machine
When finish edit 02-build-extralibs.sh and remove some packages not which not compile in static mode.
Run 02-build-extralibs.sh
laurent@debian:~/digikam3/project/bundles/mxe$ ./02-build-extralibs.sh
If build ok, go to
cd /project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.static/mkspecs/modules/
and copy *.pri files to /project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.static/qt5/mkspecs/modules/
Since last KF5 change libs = $$PWD/../../lib I change path in these .pri files, like :
QT.KWidgetsAddons.VERSION = 5.77.0
QT.KWidgetsAddons.MAJOR_VERSION = 5
QT.KWidgetsAddons.MINOR_VERSION = 77
QT.KWidgetsAddons.PATCH_VERSION = 0
QT.KWidgetsAddons.name = KF5WidgetsAddons
QT.KWidgetsAddons.module = KF5WidgetsAddons
QT.KWidgetsAddons.defines =
QT.KWidgetsAddons.includes = /home/laurent/digikam3/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.static/include/KF5/KWidgetsAddons
QT.KWidgetsAddons.private_includes =
QT.KWidgetsAddons.libs = /home/laurent/digikam3/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.static/lib
QT.KWidgetsAddons.depends = widgets
QT.KWidgetsAddons.module_config = staticlib
Now edit again config.sh MXE_ARCHBITS 64 to 32
run again 01-build-mxe.sh and 02-build-extralibs.sh to cross-compil 32 bits env
Go to your /project/bundles/mxe/build.win32/usr/i686-w64-mingw32.static/mkspecs/modules/
edit path in yours *.pri files like
QT.KCoreAddons.VERSION = 5.77.0
QT.KCoreAddons.MAJOR_VERSION = 5
QT.KCoreAddons.MINOR_VERSION = 77
QT.KCoreAddons.PATCH_VERSION = 0
QT.KCoreAddons.name = KF5CoreAddons
QT.KCoreAddons.module = KF5CoreAddons
QT.KCoreAddons.defines =
QT.KCoreAddons.includes = /home/laurent/digikam3/project/bundles/mxe/build.win32/usr/i686-w64-mingw32.static/include/KF5/KCoreAddons
QT.KCoreAddons.private_includes =
QT.KCoreAddons.libs = /home/laurent/digikam3/project/bundles/mxe/build.win32/usr/i686-w64-mingw32.static/lib
QT.KCoreAddons.depends = core
QT.KCoreAddons.module_config = staticlib
and copy these to /project/bundles/mxe/build.win32/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/
You can now test if QET cross-compile in 64 bits
git clone --recursive https://github.com/qelectrotech/qelectrotech-source-mirror.git qet && cd qet
mkdir build && cd build
export PATH=/home/laurent/digikam3/project/bundles/mxe/build.win64/usr/bin:$PATH
/home/laurent/digikam23project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 ../qelectrotech.pro
time make -j48
For 32 bits :
rm -Rf build
mkdir build && cd build
export PATH=/home/laurent/digikam3/project/bundles/mxe/build.win32/usr/bin:$PATH
/home/laurent/digikam3/project/bundles/mxe/build.win32/usr/bin/i686-w64-mingw32.static-qmake-qt5 ../qelectrotech.pro
time make -j48
If you are curious saw 03-build-digikam.sh for compile Digikam with shared libs
"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."