Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Changing TargetDir in Component.prototype.beginInstallation
Qt 6.11 is out! See what's new in the release blog

Changing TargetDir in Component.prototype.beginInstallation

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 216 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Omid1976
    wrote on last edited by Omid1976
    #1

    I have an application which I want to install files in 2 different directories, Say FixedDir and SelectableDir. I also want the installer base files (maintenancetool.exe , installerResources etc) to be installed in the FixedDir. Also I want the User to be able to select the SelectedDir as TargetDir
    1- Is there a way to instruct the QTIFW to install the base installers files in a directory other than the TargetDir.

    I found a solution for the above question: I let the SelectedDir to be the TargetDir. Then I swap the SelectedDir and the TargetDir in the installscript.qs as follows:

    Component.prototype.beginInstallation = function()
    {
    installer.setValue("SelectedDir", "@TargetDir@");
    installer.setValue("TargetDir", "C:\Users\Public\Documents");
    component.beginInstallation();
    }

    Everything seems to be fine. Is this solution safe?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved