How can I build/compile Qt installer fromwork from source? - qt

I have to build Qt installer framework from source because of this problem that is mentioned here
Qt Installer Framework - Removing the Maintenance Tool
Based on this answer, this is the only way to solve my issue. Although I attempted to build it, I encountered several linker issues. I've read the documents in the zip folder, and now I'm not sure if I followed the right procedures. I am wondering if there is any tutorial or instruction for compiling IFW from source.

Related

Qt, Visual Studio 2017 and .vcxproj.user Files

I am using Visual Studio 15.9.14 and Qt 5.13.0 on multiple machines. When I check out my source from version control:
If I open the VS IDE to build my solutions, everything compiles and links correctly.
If I build the solutions from the command line using devenv.exe, there are multiple compile and link errors in the Qt projects.
The problem is that when building from the command line, the .vcxproj.user files are NOT generated, and therefore $QTDIR is not defined for use in my projects. The result is my automated/nightly builds fail.
I can build a tool to create the files and integrate it into my build process, but I shouldn't have to. This problem seems to be related to the VS/Qt integration. I have also encountered a similar problem in the IDE where I had to force the files to regenerate by touching the projects.
Any suggestions/help would be appreciated.

Is there any basic tutorial on how to compile software from source under windows

I'm a beginner on open source world.
I can compile my own C++ code in VS 2015. but, I have little knowledge about compiling open source code. I can't even find a project file of that.
Anyway, I'd like to compile Sigil 0.9.4 version from source. My system is Windows 10 64 bit, and Qt 5.6.0 is installed. I've been looking for any basic guide for that but I haven't found yet.
I have downloaded a source code zip file from the link
https://github.com/Sigil-Ebook/Sigil/releases
And I have no idea what's the difference between Sigil-0.9.4-Code.zip and Source code (zip).
Which one should I download to compile?
Intuitively, I used 'importing project' in Qt but I get message 'no rule to make target all. stop'
Any instructions for that?
Thank you in advance!!!
For compilation you will need to use CMake. I recommend going through their web-site and read about it.
If you look at the source repository of the software you are trying to build (Sigil), you will see the root folder contains CMakeLists.txt. This is the file that will tell cmake program how to build and configure the software.
If you are planning to use Qt as your IDE, I recommend to download and install cmake first. Then make sure, Qt's toolchain is set up properly with the cmake. Then all you have to do is to open that CMakeLists.txt in Qt (see more details in the aforementioned link). Also, you can find plenty other tutorials on how to use cmake to compile your projects.
Hope this will help you get started.

Deploying Qt C++ Application from Visual Studio qwindows.dll error

I've been googling for a solution to this issue and although I've found many people sharing my problem none of their solutions work for me.
I wrote a C++ application using Qt framework using Visual Studio 2010. I built and ran the application in "Release" mode from Visual Studio without issue, but when I copy that exe from the Release folder to a new destination (pretend its a new PC) it fails to run providing this error:
---------------------------
TestApplication
---------------------------
This application failed to start because it could not find or load the Qt platform plugin "windows".
Available platform plugins are: windows.
Reinstalling the application may fix this problem.
Within the executable directory I have the following file structure:
./TestApplication.exe
./libGLESv2.dll
./Qt5Core.dll
./Qt5Gui.dll
./QtWidgets.dll
./platforms/qwindows.dll
./qt.conf
All dll files were taken from the 5.0.0 build of Qt in the Qtbase folder where the libraries reside.
The qt.conf file is:
[Paths]
Plugins=.
Without it, the launch error is the same except it says "minimal" and "offscreen" are available platforms as well.
For all other people experiencing this error it seemed to be solved by creating the platforms folder and putting in the qwindows.dll. But doing that myself doesn't change any behavior.
Is there something I've done wrong? Perhaps my method of generating the .exe in the first place is wrong?
If you are using libGLESv2.dll, then you must include libEGL.dll, too.
You can't see that in depends.exe, don't know how the Qt developers managed to hide this.
If your Qt is out of the box, then both Dlls are necessary even if you are not using OpenGL.
Also, if your Qt is out of the box, you need to include also the three ic*.dll, which contain information for Unicode handling.
You can see which DLLs are needed by looking at which ones are invoked when running Debug (F5) in Qt Creator.
=Carl
The release is likely missing a library/plugin or the library is in the wrong directory and or from the wrong directory.
Qt intended answer: Use windeployqt.
Qt comes with platform console applications that will add all dependencies (including ones like qwindows.dll and libEGL.dll) into the folder of your deployed executable. This is the intended way to deploy your application, so you do not miss any libraries (which is the main issue with all of these answers). The application for windows is called windeployqt. There is likely a deployment console app for each OS.

Adding Qt Sources to QtCreator 2.4.1

I am currently using QtCreator 2.4.1 with Qt 4.7.4 development libraries (in Ubuntu) and am trying to track down a bug which after profiling with valgrind seems to occur internally within QGraphicsView::paintEvent(…) method
To help isolate this problem I would like to step into the Qt sources. Having done some searching through both the Qt forums and stack overflow and have not being able to find a way to integrate the sources with my version of QtCreator.
I have currently tried downloading the sources via the QtSDK manager and adding a “Source Path Mapping” within Tools->Options->Debugger. I am sure that this step is where I am making a mistake as I am unable to even switch to source when viewing internal Qt header files i.e. from QGraphicsView.h
I have so far tried adding the following Source Path Mappings
Source Path=/var/tmp/qt-src
TargetPath=/home/paul/QtSDK/QtSources/4.7.4
and
Source Path=/var/tmp/qt-src
TargetPath=/home/paul/QtSDK/QtSources/4.7.4/src
Neither works.
I have also tried building Qt directly from source, adding this to my "Qt versions" list within Qt Creator and creating a new project configuration using this version. This also did not work.
Likewise I have tried adding the src folders to my gdbinit file. This also fails to work.
I am completely lost with this.
Paul
Someone asked a similar question here: Need to step into Qt sources (my IDE is Qt Creator).
Someone else asked about Valgrind errors with Qt here: Suppression files for Qt memory leaks with Valgrind
And here is a little more info about Using Valgrind with Qt Creator along with some explanation about how to read the results. Its a little dated from late 2010.
Related Suggestions
I wouldn't debug the QGraphicsView class just because of all the effort to make it work or find the problem might be for nothing... Qt is moving to using the SceneGraph as the backend for QML and the rendering engine for QGraphicsView might become obsolete.
Updating to the latest stable build of the Qt libraries may make a big difference for QGraphicsView.
If you post the valgrind error you are getting to the Qt Trolls, someone might be able to explain what is going on for you.
There are other debugging techniques besides the traditional debugger. I've been programming in Qt in Windows (without valgrind) and with a large multi-threaded application, that loads a bunch of Dll's. I've had to put some faith into the Object Tree Model clean up and work on all the new calls I put in. Most of the time I just use QDebug to find errors. Then I am also using a combination of qInstallMessageHandler() with QDebug to implement decent logging for the hard to track bugs.
See also Qt Debugging Techniques.

Linking Application to static version of QT

I'm new to QT and I've been trying to compile a static build of QT of DAYS (literally) I'm pretty much out of Ideas and the QT documentation is probably the least helpful I have ever read. It doesn't work out of the box thats the problem. It needs to be tweaked a considerable amount before you can compile it as static. Finally the other night I managed to compile it statically and then followed the instructions to deploy it. I then copied the executable to another machine where it promptly complained for the lack of dll msvcp100. WTF! I thought that the static build was dependency free! Can you guys give me a definitive answer that can solve my problems?
That's the Visual C++ runtime library, not QT. You need to install http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en

Resources