Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Install Framework CopyDirectory
Forum Updated to NodeBB v4.3 + New Features

Qt Install Framework CopyDirectory

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 946 Views 2 Watching
  • 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.
  • dheerendraD Offline
    dheerendraD Offline
    dheerendra
    Qt Champions 2022
    wrote on last edited by
    #1

    Hi

    Qt Install Framework 3.1.1.
    Windows & Mac.

    I'm trying to copy the directory with following code snippet during the installation.

    var sourceDir = "/Users/dheeru/Desktop/Bax1";
    var destDir = "/Users/dheeru/Desktop/dheeru";
    var val = installer.performOperation("CopyDirectory"[sourceDir,destDir,"forceOverwrite"]);
    

    This does not work. Any idea about this ?

    Dheerendra
    @Community Service
    Certified Qt Specialist
    http://www.pthinks.com

    artwawA 1 Reply Last reply
    0
    • dheerendraD dheerendra

      Hi

      Qt Install Framework 3.1.1.
      Windows & Mac.

      I'm trying to copy the directory with following code snippet during the installation.

      var sourceDir = "/Users/dheeru/Desktop/Bax1";
      var destDir = "/Users/dheeru/Desktop/dheeru";
      var val = installer.performOperation("CopyDirectory"[sourceDir,destDir,"forceOverwrite"]);
      

      This does not work. Any idea about this ?

      artwawA Offline
      artwawA Offline
      artwaw
      wrote on last edited by
      #2

      @dheerendra Hi, what's the value of val after the operations fails?

      For more information please re-read.

      Kind Regards,
      Artur

      1 Reply Last reply
      0
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

        false. It is not copying the contents.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply
        0
        • artwawA Offline
          artwawA Offline
          artwaw
          wrote on last edited by
          #4

          I think you are missing a colon, definition states performOperation(string name, stringlist arguments)?
          If that's just a typo in the post, are access rights for the user associated with the installer ok? It might run without sufficient privileges.

          For more information please re-read.

          Kind Regards,
          Artur

          1 Reply Last reply
          0
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #5

            Oh Sorry. It is typo when I did copy-paste here.

            Actual code is

            var val = installer.performOperation("CopyDirectory", [sourceDir,destDir,"forceOverwrite"]);
            

            Priviledges are perfectly fine. It does not copy.

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            1 Reply Last reply
            0
            • dheerendraD Offline
              dheerendraD Offline
              dheerendra
              Qt Champions 2022
              wrote on last edited by
              #6

              After analysing the QtIFW source code, Here is my final input on this.

              With the following code snippet we think that

              1. Contents of 'Bax1' will be copied to 'dheeru' directory.
              2. This understanding is wrong.
              3. Documentation also does not clearly explains this.
              var sourceDir = "/Users/dheeru/Desktop/Bax1";
              var destDir = "/Users/dheeru/Desktop/dheeru";
              var val = installer.performOperation("CopyDirectory",[sourceDir,destDir,"forceOverwrite"]);
              

              Following is the actual meaning of above code.

              1. Actually 'Bax1' directory itself get cloned in to 'dheeru' directory
              2. 'Bax1' directory should be already existing under 'dheeru' directory before starting the CopyOperation.
              3. If the 'Bax1' directory does not exist under 'dheeru', copy fails.

              I will file the documentation Documentation bug and fix the same as well.

              Dheerendra
              @Community Service
              Certified Qt Specialist
              http://www.pthinks.com

              1 Reply Last reply
              3

              • Login

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