Run binarycreator after install from .pro
-
What is a convenient way to run binarycreator from the .pro file to automate setup package creation?
I have created a deployable folder using windeployqt and also an appropriate package directory using the install target:
wdq.extra += $$[QT_INSTALL_BINS]/windeployqt --no-qml --no-sql "$$shell_path($$PREFIX/myapp.exe)" $$escape_expand(\n\t) INSTALLS += wdqHow can I run binarycreator from the .pro file? It has to run after the install target so windeployqt gets run before it.
Can I just use QMAKE_EXTRA_TARGETS? -
Hi,
AFAIK, that would it yes. The variable documentation shows how to setup dependencies.
-
Hi,
AFAIK, that would it yes. The variable documentation shows how to setup dependencies.
This worked:
qif.target = .binarycreator qif.commands += echo "Building $${qif.target}" $$escape_expand(\n\t) qif.commands += $$shell_path($$[QT_INSTALL_BINS]/../../../Tools/QtInstallerFramework/4.8/bin/binarycreator.exe) \ --offline-only -c "$$shell_path($$PREFIX/../../../config/config.xml)" -p "$$shell_path($$PREFIX/../../)" \ $$shell_path($${OUT_PWD}/MyAppSetup.exe) $$escape_expand(\n\t) # type nul >> <filename> is the equivalent of touch qif.commands += type nul >> $$OUT_PWD/.binarycreator $$escape_expand(\n\t) qif.depends = install QMAKE_EXTRA_TARGETS += qifTo make it run use:
make .binarycreator -
G g1ennr has marked this topic as solved on
-
One thing, a make target starting with a dot is pretty unusual. This is not something developers / users would expect.
-
One thing, a make target starting with a dot is pretty unusual. This is not something developers / users would expect.
Yeah, but that's what the Qt documentation on adding custom targets does. Although I guess in that case they aren't intending for the target to be referred to explicitly.
-
Oh, I missed it.
Since it's a Makefile target, it implies that it should be a file or a phony target such as clean.