Change TargetDirectory
Solved
Qt Creator and other tools
-
wrote on 5 Jan 2021, 20:14 last edited by Vitali 1 Jun 2021, 07:49
If user choose non-empty TargetDirectory, how I can change this line via adding subfolder?
For example, user choose in TargetDirectoryPage
TargetDirectoryLine = 'c:\Some'
I want in this case make something like
TargetDirectoryLineEdit.setText(targetDirLine + "/" + "ProductName")
and follow to install app to this folder 'c:\Some\ProductName'.
But I do not know how catch - when I can change TargetDirectory.
IFW 3.2
-
wrote on 7 Jan 2021, 08:11 last edited by
I did so:
Controller.prototype.ComponentSelectionPageCallback = function() { var targetDir = gui.pageById(QInstaller.TargetDirectory).TargetDirectoryLineEdit.text; var files = QDesktopServices.findFiles(targetDir, "*.*"); if (files.length!=0) { installer.setValue("TargetDir", targetDir + "\\" + installer.value("ProductName")); } }
2/2