Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74388

qmake ${COPY} on Windows doesn't work with filenames that have a plus in it

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.11.2
    • Build tools: qmake
    • None
    • Windows 10
    • Windows

    Description

      When trying to copy the file `libstdc++6.dll` with `qmake` from one directory to another in my .pro file, it worked when called inside qt creator (installed and executed from msys2/mingw64), but later when I was running it in our build server or from the command prompt using `qmake; make` from a Windows batch file, it consistently failed.

      Apparently the built-in `copy` in `cmd` has support for concatenating two or more files into a destination file if you use the plus sign operator `+`, and it doesn't need to be padded by spaces.  To get around this you have to wrap the filename in quotes to ignore this functionality.  But qmake and the `${COPY}` command don't let the file keep its quotes if there are no spaces in the file name.

      So in summary, if a file to be copied in Windows has plus sign in it, it needs to be wrapped in quotes to protect it from the oddball concatenation feature of `copy` in cmd in Windows.

      Attachments

        Issue Links

          Activity

            People

              Eddy Edward Welbourne
              peteristhegreat Peter H
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: