1 (edited by alexandre.Ribault 2019-06-30 15:14:07)

Topic: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

Bonjour, 

je souhaite recompiler le projet chez moi, après avoir téléchargé les sources depuis de le git.
J'ai ouvert le projet avec Qtcreator, mais lorsque je demande à compiler j'ai une erreur qui s'affiche.
Il me dit qu'il me manque les modules :
- KwidgetAddons 
- KcoreAddons

Je ne sais pas comment les installer:-(
Je suis allé sur la page internet du "projet" KwidgetAddons  , pour le premier module, mais ça ne m'aide pas.

Je compte sur vous pour m'aider à me débloquer.
Faut-il configurer le projet depuis QT.
Faut réinstaller certain élément dans QT.
Autre chose ?

Je n'ai même pas commencé à regarder pour KcoreAddons

Merci d'avance
(je suis spekkio09)

2 (edited by stromie 2019-07-14 14:57:37)

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

Install Qt Creator, MinGW and the latest Qt version using the online installer from qt.io i use the 5.12.4
Install cmake (https://cmake.org/install/)
Add gcc and cmake bin directories to PATH environment variable
SET QTPATH=C:\Qt\5.12.4\mingw73_32

Download cmake-extra-modules (https://github.com/KDE/extra-cmake-modules)

Unpack cmake-extra-modules


Build ecm
cd(path to ecm)
cmake -DCMAKE_INSTALL_PREFIX=%QTPATH% -G "MinGW Makefiles"
mingw32-make install

build kcoreaddons
download an unpacktkcoreaddons (https://github.com/KDE/kcoreaddons)
cd (path to kcoreaddons)
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=%QTPATH% -DCMAKE_PREFIX_PATH=$QTPATH -G "MinGW Makefiles" -DZLIB_LIBRARY:FILEPATH=C:\Qt\Tools\mingw730_32\i686-w64-mingw32\lib\libz.a
mingw32-make
mingw32-make install

build kwidgetsaddons

downloadan unpack kwidgetsaddons (https://github.com/KDE/kwidgetsaddons)

cd (path to kwidgetsaddons)
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=%QTPATH% -DCMAKE_PREFIX_PATH=$QTPATH -G "MinGW Makefiles" -DZLIB_LIBRARY:FILEPATH=C:\Qt\Tools\mingw730_32\i686-w64-mingw32\lib\libz.a
mingw32-make
mingw32-make install

rename C:\Qt\5.12.4\mingw73_32\lib\libKF5CoreAddons.dll.a to libKF5CoreAddons.a
rename C:\Qt\5.12.4\mingw73_32\lib\libKF5WidgetsAddons.dll.a to libKF5WidgetsAddons.a

3 (edited by Re-searcher 2020-08-18 16:02:40)

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

@stromie
ecm Cmake error with qt5.12.4

no mingw32-make file in qt5.12.4

C:\Users\test\Documents\ecm>SET QTPATH=C:\Qt\5.12.4\mingw73_32

C:\Users\test\Documents\ecm>
C:\Users\test\Documents\ecm>cmake -DCMAKE_INSTALL_PREFIX=%QTPATH% -G "MinGW Makefiles"
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!

C:\Users\test\Documents\ecm>

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

https://qelectrotech.org/wiki_new/doc/qt_pour_windows

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

mingw32-make is on C:\Qt\Tools\mingw810_64\bin\

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

@ Erik :
https://download.tuxfamily.org/qet/forum_img_2/Qt_install.png
https://download.tuxfamily.org/qet/forum_img_2/path.png
Install cmake (https://cmake.org/install/)
https://github.com/Kitware/CMake/releas … 64-x64.msi


Install CMAKE and chose add PATH for all users

Build ecm
Download cmake-extra-modules (https://github.com/KDE/extra-cmake-modules)

Unpack cmake-extra-modules

SET QTPATH=C:\Qt\5.12.4\mingw73_64

cd(path to ecm)

cmake -DCMAKE_INSTALL_PREFIX=%QTPATH% -G "MinGW Makefiles"
mingw32-make install

https://download.tuxfamily.org/qet/forum_img_2/ecm_cmake.png


build kcoreaddons
download an unpack tkcoreaddons (https://github.com/KDE/kcoreaddons)
cd (path to kcoreaddons)
mkdir build
cd build

cmake .. -DCMAKE_INSTALL_PREFIX=%QTPATH% -DCMAKE_PREFIX_PATH=$QTPATH -G "MinGW Makefiles" -DZLIB_LIBRARY:FILEPATH=C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\libz.a

https://download.tuxfamily.org/qet/forum_img_2/kcoreaddons.png
https://download.tuxfamily.org/qet/forum_img_2/kcoreaddons2.png

mingw32-make

https://download.tuxfamily.org/qet/forum_img_2/kcoreaddons3.png

mingw32-make install

https://download.tuxfamily.org/qet/forum_img_2/kcoreaddons4.png


build kwidgetsaddons

downloadan unpack kwidgetsaddons (https://github.com/KDE/kwidgetsaddons)

cd (path to kwidgetsaddons)
mkdir build
cd build

cmake .. -DCMAKE_INSTALL_PREFIX=%QTPATH% -DCMAKE_PREFIX_PATH=$QTPATH -G "MinGW Makefiles" -DZLIB_LIBRARY:FILEPATH=C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\libz.a

https://download.tuxfamily.org/qet/forum_img_2/kwidget.png

mingw32-make

https://download.tuxfamily.org/qet/forum_img_2/kwidget2.png

mingw32-make install

https://download.tuxfamily.org/qet/forum_img_2/kwidget3.png



https://download.tuxfamily.org/qet/forum_img_2/win_qt12.4.png

7 (edited by Re-searcher 2020-08-23 14:14:14)

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

@Laurent :

merci pour votre explication d'expert  ;  thanks for your explanation

cmake-extra-modules   =  construit  ;  builds
KcoreAddons  =  construit  ;  builds
KwidgetsAddons  =  construit  ;  builds

fichier source QET  =  builds   ;  source file QET  =  builds
dans les fichiers release .O et .cpp   e qelectrotech.exe  ; in file release .O and .cpp files and qelectrotech.exe


minw32-make install  fonctionne ; mingw32-make install  works


Que devez-vous faire pour installer le programme QET ?  ; What do you have to do to install the program ?
Version prête à l'emploi ?                                                ReadyToUse version ?

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

It 's packaging work.
You build in shared mode also you need to learn windeployqt to find DLL's to put in bin folder with .exe binary.
https://doc.qt.io/qt-5/windows-deployment.html
http://renaudguezennec.eu/index.php/201 … cation-qt/

https://qelectrotech.org/wiki_new/doc/d … lectrotech

https://qelectrotech.org/wiki_new/doc/d … mande_tree

9 (edited by scorpio810 2020-08-27 08:50:54)

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

After many false leads I finally managed to complete a static build of Qelectrotech on Windows.
Learning a lot, I guess. I didn't end up using my complete static build of Qt, jasper, kcoreaddons and kwidgetaddons...

Here is a partial description, if I get a chance to do a clean VM build I should be able to fill in any blanks.
This was on a Win7 box, I may try it on Win10 next.

The whole install/build should be scriptable.
It may be an idea to add it to the WiKi, where it can be polished and kept up to date?

--- Several attempts at posting later ---

So, the forum doesn't like URLs, and I couldn't post in-line, see attached text file for what I had written here!



1. Install Msys64
   Instructions at https://www.msys2.org/
   Download installer https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20200720.exe
   
2. Install build environment with pacman ("pacman -Syuu" updates system, "pacman -S package_name" installs package)
   Or install as required when attemt builds!

3. Install Qt5 Static build (Probably want to install default shared build as well)
   pacman -S mingw-w64-x86_64-qt5-static

4. Install the extras required for Qet, kcoreaddons and kwidgetaddons
   Not currently available as packages, so have to build them yourself!
   Clone the msys2/MINGW-packages repo https://github.com/msys2/MINGW-packages somewhere local
   Fire up your Msys64 shell and:
   
   git clone https://github.com/msys2/MINGW-packages.git
   cd MINGW-packages
   cd mingw-w64-kcoreaddons-qt5
   KF5_VARIANT=static MINGW_INSTALLS=mingw64 makepkg-mingw -sLf
   pacman -U mingw-w64-x86_64-kcoreddons-qt5-static-5.68.0-1-any.pkg.tar.zst
   cd ..
   cd cd mingw-w64-kwidgetsaddons-qt5
   KF5_VARIANT=static MINGW_INSTALLS=mingw64 makepkg-mingw -sLf
   pacman -U mingw-w64-x86_64-kwidgetsaddons-qt5-static-5.68.0-1-any.pkg.tar.zst

5. Clone the qelectrotech main or mirror repo if not already done
   
   Details to be added:
   Run up qtcreator from your Msys64 shell
   Create a static build package, based on the static qmake
   Open the qelectrotech.pro project from the repo
   Attempt a build from qtcreator (which fails for me) (static, release only. debug is HUGE!)
   cd to the build directory where the qtcreator build failed
   mingw32-make
   Which (for me) succeeds, despite appearing to run exactly the same commands that failed from qtcreator!

Post's attachments

Attachment icon HowToBuildQetStaticQt.txt 2.29 kb, 21 downloads since 2020-08-27 

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

thanks David, I added you on Wiki if you want to add this.
You saw a different speed with my Windows packages based on MXE cross-compiler?

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

Thanks David, I also added link here :
https://qelectrotech.org/wiki_new/doc/q … atic_build

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

Maybe in the future we need to think about paying a registration key for a Windows developer account in order to sign our Windows QET packages?
https://docs.microsoft.com/fr-fr/window … s-and-fees

Installation of QET on Windows is a pain...
If somebodody have NSIS knowege to upgrade NSIS package to version 2-> 3, thanks and welcome.

https://git.tuxfamily.org/qet/qet.git/t … ws/QET.nsi
https://git.tuxfamily.org/qet/qet.git/t … /QET64.nsi

Re: How can i build in Windows QTcreator : KwidgetAddons KcoreAddons

https://www.phoronix.com/forums/forum/p … -rome-cpus