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

Qt Install Framework CopyDirectory

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 851 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.
  • D Offline
    D Offline
    dheerendra
    Qt Champions 2022
    wrote on 10 Dec 2019, 10:06 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

    A 1 Reply Last reply 10 Dec 2019, 10:09
    0
    • D dheerendra
      10 Dec 2019, 10:06

      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 ?

      A Offline
      A Offline
      artwaw
      wrote on 10 Dec 2019, 10:09 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
      • D Offline
        D Offline
        dheerendra
        Qt Champions 2022
        wrote on 10 Dec 2019, 12:30 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
        • A Offline
          A Offline
          artwaw
          wrote on 10 Dec 2019, 12:41 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
          • D Offline
            D Offline
            dheerendra
            Qt Champions 2022
            wrote on 10 Dec 2019, 13:38 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
            • D Offline
              D Offline
              dheerendra
              Qt Champions 2022
              wrote on 11 Dec 2019, 07:04 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

              1/6

              10 Dec 2019, 10:06

              • Login

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