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. The command line is too long Qt5.14.2
QtWS25 Last Chance

The command line is too long Qt5.14.2

Scheduled Pinned Locked Moved Unsolved General and Desktop
prorelease modecommandcopy files
5 Posts 2 Posters 734 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.
  • S Offline
    S Offline
    sayan275
    wrote on last edited by
    #1

    Hello,
    When am build a project in release mode from Qt creator and also cmd line, it throws error The command line is too long when am adding a copyQtdata cmd in pro file to copy a folder in bin/release.
    In Debug there is no error, builds successfully and the folder is also copied in bin/debug.

    copyQtdata.commands += $(COPY_DIR) /f $$shell_path($$top_srcdir\CANvAS_Tasks) $$shell_path($$DESTDIR/CANvAS_Tasks) &
    

    e5f443ac-f0ef-43aa-85c6-5181f9e4a0a5-image.png
    If I comment out that cmd, then it builds successfully in release mode.
    Not able to understand the issue, as other team members are not facing this issue.

    Any suggestion is appreciated.

    Thank you!

    JonBJ 1 Reply Last reply
    0
    • S sayan275

      Hello,
      When am build a project in release mode from Qt creator and also cmd line, it throws error The command line is too long when am adding a copyQtdata cmd in pro file to copy a folder in bin/release.
      In Debug there is no error, builds successfully and the folder is also copied in bin/debug.

      copyQtdata.commands += $(COPY_DIR) /f $$shell_path($$top_srcdir\CANvAS_Tasks) $$shell_path($$DESTDIR/CANvAS_Tasks) &
      

      e5f443ac-f0ef-43aa-85c6-5181f9e4a0a5-image.png
      If I comment out that cmd, then it builds successfully in release mode.
      Not able to understand the issue, as other team members are not facing this issue.

      Any suggestion is appreciated.

      Thank you!

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @sayan275
      Can't see the full length of your command-line, but presumably it has exceeded whatever length Windows allows for one. It is possible that having to use release instead of debug multiple times just pushes it over the limit?

      So far as I can see from the screenshot there are multiple xcopy commands each joined with an &. Built by a whole bunch of copyQtdata.commands += ... statements. So in some shape or form you need to shorten that. Can you build separate/multiple commands so one does not get too long? Can you factor the logic into a .bat file which takes suitable parameters (not so many) and executes multiple statements from there?

      S 1 Reply Last reply
      1
      • JonBJ JonB

        @sayan275
        Can't see the full length of your command-line, but presumably it has exceeded whatever length Windows allows for one. It is possible that having to use release instead of debug multiple times just pushes it over the limit?

        So far as I can see from the screenshot there are multiple xcopy commands each joined with an &. Built by a whole bunch of copyQtdata.commands += ... statements. So in some shape or form you need to shorten that. Can you build separate/multiple commands so one does not get too long? Can you factor the logic into a .bat file which takes suitable parameters (not so many) and executes multiple statements from there?

        S Offline
        S Offline
        sayan275
        wrote on last edited by
        #3

        @JonB so you mean to say

        copyQtdata.commands += $(COPY_DIR) /f $$shell_path($$top_srcdir\CANvAS_Tasks) $$shell_path($$DESTDIR/CANvAS_Tasks) ;
        

        Separate out each command with ";"

        JonBJ 1 Reply Last reply
        0
        • S sayan275

          @JonB so you mean to say

          copyQtdata.commands += $(COPY_DIR) /f $$shell_path($$top_srcdir\CANvAS_Tasks) $$shell_path($$DESTDIR/CANvAS_Tasks) ;
          

          Separate out each command with ";"

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @sayan275
          No. (Unless the Qt/make process knows to split lines on ; and issue each command separately, which I doubt, but have no idea.) It is complaining that the built line in copyQtdata.commands is too long. So you need to find a way to shorten it, either by having multiple copyQtdata so they each have separate commands (I know nothing about how you use this or whether it is built into Qt-build), or by maybe doing the copy via a .bat script which can take a shorter command-line, or by some other means,

          S 1 Reply Last reply
          0
          • JonBJ JonB

            @sayan275
            No. (Unless the Qt/make process knows to split lines on ; and issue each command separately, which I doubt, but have no idea.) It is complaining that the built line in copyQtdata.commands is too long. So you need to find a way to shorten it, either by having multiple copyQtdata so they each have separate commands (I know nothing about how you use this or whether it is built into Qt-build), or by maybe doing the copy via a .bat script which can take a shorter command-line, or by some other means,

            S Offline
            S Offline
            sayan275
            wrote on last edited by
            #5

            @JonB I removed the last line...ie copy cmd of folder "Settings" and then I was able to build properly in release mode.

            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