Qt 5.0.0 for MSVC out of the box has HEAVY dependencies
-
[quote author="astodolski" date="1358555667"]I located in the folder C:\Qt\Qt5.0.0\5.0.0\msvc2010\plugins\platforms the file qwindows.dll and added it to the folder which holds the app.exe[/quote]It needs to be in a SUB-folder:
C:\MyApp\app.exe
C:\MyApp\platforms\qwindows.dll[quote]The app doesn't even complain about any other missing dependency. No exception, no error dialog, nothing.
....
3: Using the utility depends.exe (for Windows), determine each dependency and locally copy each DLL from where it is located on the build machine.[/quote]Note: Dependency Walker can't identify all DLLs. Specifically, if a DLL is loaded AFTER the app has started running (instead of getting loaded when the app is launched), Dependency Walker won't report it. In such a case, your app probably won't give an error message either.
libEGL.dll is one dependency that isn't reported; try including that too.
-
[quote author="JKSH" date="1358611592"][quote author="astodolski" date="1358555667"]I located in the folder C:\Qt\Qt5.0.0\5.0.0\msvc2010\plugins\platforms the file qwindows.dll and added it to the folder which holds the app.exe[/quote]It needs to be in a SUB-folder:
C:\MyApp\app.exe
C:\MyApp\platforms\qwindows.dll[quote]The app doesn't even complain about any other missing dependency. No exception, no error dialog, nothing.
....
3: Using the utility depends.exe (for Windows), determine each dependency and locally copy each DLL from where it is located on the build machine.[/quote]Note: Dependency Walker can't identify all DLLs. Specifically, if a DLL is loaded AFTER the app has started running (instead of getting loaded when the app is launched), Dependency Walker won't report it. In such a case, your app probably won't give an error message either.
libEGL.dll is one dependency that isn't reported; try including that too.[/quote]
Works as instructed. Why the added libraries and folder requirement?
-
D3DCompiler_46.dll, libEGL.dll and libGLESv2.dll are requirements of ANGLE, which was chosen to address the fact Microsoft no longer provides OpenGL in "metro" mode in Windows 8. You can lose those dependencies by building Qt for desktop OpenGL or without OpenGL support.
Building without the webkit will get rid of the ICU* dependencies.
So in the end, you can limit your dependencies to Qt5Widgets.dll, Qt5Gui.dll, Qt5Core.dll which cannot really be classified as dependencies, since they are essential parts of Qt. Also the MSVC runtimes, if not present on the machine already.
The decision to use a dynamically loading platoform plugin was to make it easier to use different plugins and to make porting to new platforms easier. As of why the decision to put the platform plugin in a separate folder - I cannot tell.
-
[quote author="utcenter" date="1358618851"]D3DCompiler_46.dll, libEGL.dll and libGLESv2.dll are requirements of ANGLE, which was chosen to address the fact Microsoft no longer provides OpenGL in "metro" mode in Windows 8. You can lose those dependencies by building Qt for desktop OpenGL or without OpenGL support.
Building without the webkit will get rid of the ICU* dependencies.
So in the end, you can limit your dependencies to Qt5Widgets.dll, Qt5Gui.dll, Qt5Core.dll which cannot really be classified as dependencies, since they are essential parts of Qt. Also the MSVC runtimes, if not present on the machine already.
The decision to use a dynamically loading platoform plugin was to make it easier to use different plugins and to make porting to new platforms easier. As of why the decision to put the platform plugin in a separate folder - I cannot tell.[/quote]
Very helpful!
I (and I think most) can live with 3 - 4 core libraries. The choice then is to have at least two builds - one without webkit and OpenGL and one with them included? It seems that if there is a need for OpenGL then a rebuild of the core libraries is required?
-
[quote author="Lukas Geyer" date="1358500494"]Deployment size has unfortunately increased quite a bit on Windows, mostly due to the use of ICU for globalization support (which is mandatory for WebKit, not necessarily Qt) and DirectX for native hardware acceleration support on Windows.
The 'good' thing is that this only affects the builds of Qt released by the QtProject (which are targetted at the largest possible audience and therefore include ICU, DirectX and WebKit support by default), and you are free to deploy a <code>-opengl desktop</code> and <code>-no-icu</code> Qt with your application, which has no dependency on icu*.dll, D3D*.dll and lib*.dll.
You do not need a commerical license or a static build for that and building Qt is actually quite easy. Just "download the sources":http://qt-project.org/downloads, and run <code>configure -opengl desktop -no-icu</code> and <code>nmake</code> and grab a coffee.[/quote]
Easy in theory.
Rebuilding from source yields a different folder structure that what is represented by the SDK.
There is no platforms folder.
If opengl is to be removed, why are you suggesting -opengl desktop? Shouldn't it be -no-opengl?
-
utcenter wrote:
bq. As of why the decision to put the platform plugin in a separate folder – I cannot tell.
That is the way all the standard plugin groups are: each group has a sub folder (imageformats, sqldrivers etc.). Handling platform plugins differently would just be adding an exception to the established pattern.
astodolski wrote:
bq. If opengl is to be removed, why are you suggesting -opengl desktop? Shouldn’t it be -no-opengl?
Maybe. If you want OpenGL support without ANGLE then use the desktop OpenGL option and understand you will have to revisit the decision for Windows 8 later on when some sort of whatever-we-are-supposed-call-Metro-now support is added and you want to use it. If you want no OpenGL support at all then build it out.
-
[quote author="astodolski" date="1358803926"]Rebuilding from source yields a different folder structure that what is represented by the SDK.[/quote]qtbase resembles Qt5.0.0/5.0.0/msvc2010.
[quote author="astodolski" date="1358803926"]There is no platforms folder.[/quote]Take a look at qtbase/plugins.
[quote author="astodolski" date="1358803926"]If opengl is to be removed, why are you suggesting -opengl desktop? Shouldn't it be -no-opengl?[/quote]<code>-no-opengl</code> will remove all OpenGL support in Qt, <code>-opengl desktop</code> will just remove DirectX support and the dependency on D3D*.dll and lib*.dll. You can pick whichever you prefer.
-
[quote author="Lukas Geyer" date="1358500494"]Just "download the sources":http://qt-project.org/downloads, and run <code>configure -opengl desktop -no-icu</code> and <code>nmake</code> and grab a coffee.[/quote]
Near the end of the configure step, I get an error as shown in the console output:
copy qmake.exe C:\Qt\qt-everywhere-opensource-src-5.0.0\qtbase\bin\qmake.exe 1 file(s) copied.
ASSERT: "fileName.isEmpty() || isAbsolutePath(fileName)" in file C:\Qt\qt-everywhere-opens
ource-src-5.0.0\qtbase\qmake\library\ioutils.cpp, line 61
QMake failed!
*** qtbase/configure exited with non-zero status.C:\Qt\qt-everywhere-opensource-src-5.0.0>
Starting to be quite the rabbit hole
-
hello,
if you have download Qt pre-built with webkit and icu support, here is something you can do to reduce the size of you package by 20MB:
https://github.com/neolit123/dummy_icuit basically populates dummy ICU shared libraries with NOP entry points, which may not be called at all depending on your app.
i explain in the readme that i'm not exactly sure how legal in terms of licensing or volatile in terms of stability this is, so use at your own risk.
if you have built Qt yourself you certainly won't be needing this.--
-
[quote author="lubomir.ivanov" date="1360348617"]hello,
if you have download Qt pre-built with webkit and icu support, here is something you can do to reduce the size of you package by 20MB:
https://github.com/neolit123/dummy_icuit basically populates dummy ICU shared libraries with NOP entry points, which may not be called at all depending on your app.
i explain in the readme that i'm not exactly sure how legal in terms of licensing or volatile in terms of stability this is, so use at your own risk.
if you have built Qt yourself you certainly won't be needing this.[/quote]
I appreciate the suggestion. However, it is the second part of your comment where I am experiencing the problem. I can't get a successful build with the following configure line options:
-opengl desktop -no-icu