I would like to force my targetDir directory installation usign QT Installer Framework v. 3.0.
Currently this is my config.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>QSSWeb2Board</Name>
<Version>1.0.0</Version>
<Title>QSSWeb2Board</Title>
<Publisher>BQ Educacion</Publisher>
<ProductURL>https://bitbloq.bq.com</ProductURL>
<InstallerWindowIcon>bitbloq</InstallerWindowIcon>
<InstallerApplicationIcon>bitbloq</InstallerApplicationIcon>
<Logo>bitbloq.png</Logo>
<StartMenuDir>Bitbloq</StartMenuDir>
<TargetDir>C:/QSSWeb2Board</TargetDir>
</Installer>
It works well, but I can modify the target dir on the installer. I would like to set a fixed value that cannot be modified.
Try to use installer.setDefaultPageVisible(QInstaller.TargetDirectory, false)
as in http://doc.qt.io/qtinstallerframework/qt-installer-framework-systeminfo-packages-root-meta-installscript-qs.html . Since the default page for the choice of the install directory will not be shown thus, the install directory path will not be modified.
Self-solution:
On the installer script, adding this line:
currentPage.TargetDirectoryLineEdit.enabled = false;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.