Automatic deployment with inno setup
I have a kinda weird question...
I would like to deploy my application without having to copy all the nessecary files into the setup/folder.
Is there a way with qmake e.g. to get all the files you need and copy them all into a nice little script for Inno Setup for example?
I already tried to solve the problem with a batch file to create the nessecary xml file, which worked fine. But I still couldnt copy the files correctly, I failed miserably in trying to get them with qmake :/.
Sooo... any Ideas perhaps?
I am all out for now.
Hope for some answers :)
I don't get the question.
In InnoSetup you specify the source location of a file (usually on your development machine) and the destination folder on the target machine. InnoSetup put everything into the installer. I don't see any use of copying files around beforehand.
But to answer your question: You can write your own script that copies the stuff around and call that from the qmake file:
QMAKE_POST_LINK = /path/to/your/copy/script
This calls the script every time your application has been linked.
Ok that is a good concept I lost my mind perhaps a little there ;)
Just one more question and thank you for your answer and thank you in advance :)
Which scripting language can I use for this, is there a doc or an example you could link me to?
Would be really appreciated.
Well Sorry I will add more...
Hopefully this is better put.
Right now for example I just need the "QtGui4.dll" to run my project(just an example).
I don't want to go to my /bin/ folder in QtDir to copy it to my release. I want qmake to give me the paths of all files that are needed to deploy the program and then add them to a setup program(Inno setup e.g.) to create a Setup file.
That is the Goal here, to see what is needed, get the path, add it to an Installer and create a Setup file. If possible all in one click, but how it will be put together... well I will figure that out.
Hopefully my concern is now clearer.
Why would you regenerate a InnoSetup project file all the time? That's nonsense, as it contains too much information. You would need to put that into the qmake file (or something else), where you do not have the IS infrastructure around.
Also, qmake can not discover, what DLLs you need to put into your installer - neither for the QtXxx4.dlls and not even to think about the runtime dependencies (C++ libs from Visual Studio or MinGW) or other external libs. There is no automatic "see what is needed".
To ease your InnoSetup configuration, just define a constant with the path to your Qt installation and use that in the Files section. If you change Qt versions, you just need to adjust at this one place.
Me and my collegues are certain that it has to be possible, after all the program knows which dlls are needed if you want to start without them... sooo it must be accessable somehow.
Perhaps not through qmake... I will investigate further :p
We will most proabably simply write a Qt Creator plugin for now, but this problem somehow bugs me ;)
Thanks again for your help!
No, the program does not. For example, it cannot know which plugins (eg. imageformats or sqldrivers) you need, it cannot know which runtime DLLs from your toolchain (msvcrxxx.dll or the MinGW pendants) you need to distribute. It cannot know which additional files you want to put into your distribution. Just to name a few.
Of course you're free to invest a couple of days into fiddling this stuff out and writing the nontheless necessary InnoSetup script, or you go the easy way and write down your InnoSetup script in one or two hours. Not everything that should be possible theoretically makes sense. Your approach belongs into that category, in my opinion.
Alright, thank you for your honesty. :)