Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
some future version
-
None
Description
When working with the `windeployqt` tool, it's necessary to determine if the `--no-install` option has been set from the command line. Currently, I rely on `qbs.installRoot`, but this is more of a hack and not an ideal solution. The check is done by verifying whether the `installRoot` directory exists, which feels like a dirty workaround.
For example:
if (!File.exists(product.qbs.installRoot)) { var cmd = new JavaScriptCommand(); cmd.windeployqtProgram = windeployqtProgram; cmd.description = "Cannot invoke '" + windeployqtProgram + "' when '--no-install' option has been set from command line"; cmd.sourceCode = function () { console.warn("Cannot invoke '" + windeployqtProgram + "' when '--no-install' option has been set from command line (tip: remove your build directory entirely after unchecking '--no-install' option)"); } } else { // Calling windeployqt }
Proposal:
I suggest adding a noInstall property to the qbs module, which would allow developers to properly detect when the --no-install option has been set without resorting to hacks like checking directory existence.