Do I really have to deploy 700 files with my QML application?
-
Hi and welcome to devnet,
How many different QtQuick modules are you using ?
Maybe a silly question but did you point qmldir to your application sources ? -
@SGaist Thanks.
I only have one QML file and it imports
QtQuick 2.12
QtQuick.Window 2.12
QtQuick.Controls 2.12
QtQuick.Layouts 1.3
QtQuick.Dialogs 1.0The rest is C++.
I pointed the --qmldir to my source code directory.
So I take it this is uncommon?
-
@JoeCFD said in Do I really have to deploy 700 files with my QML application?:
@David_S right. Put all of them into one qrc file. Use qml files from qrc. Then they will not be needed for deployment. Same as ui files.
omg, just dont do it.... how can you give such a terrible advise?!
Beside that it wont work anyway afterall ... -
@David_S The thing is, the windepolyqt tool is not perfect.
it will parse your project, it sees
Oh you're using layouts! Let me get EVERYTHING layout related!
when in fact, you only use it for one row layout or something.The tool errors on the side of caution. Same with dlls actually,
Oh, you're loading an Image, let me get all the image formats dll's even if you only use pngs!
It gets the job done, you hardly ever have to add something from the Qt directory by hand, when you used the tool(correctly)
On the up side: Your application folder, from now on, will hardly grow bigger, compared to its current size. As long as you do not add additional modules or such.
On the down side: If you actually want to ship a minimalistic folder, you'll have to manually check the content folder and remove unneeded stuff.
Make sure to test the application after each removal. The problem with this is also, that a bunch of QML stuff is not loaded/needed on start up and you may only later on, notice this, deep inside the application on page 215 when 20 other conditions are met.
So, be cautious!
-
@J-Hilk Thanks for the reply. This adds a bit of complexity to my WIX installer since I don't want to list all 700+ files individually. Do you know if there is anyway to deploy these files in a folder other than where the executable is located? I would like to dump all of the QT dependencies in one folder (which can have subfolders) but I need to be able to "blow away" all of the Qt related dependencies by deleting one directory while being confident that I didn't delete anything but Qt dependencies.