Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QMAKE_COPY_DIR on Windows uses cp over xcopy if found on path.

QMAKE_COPY_DIR on Windows uses cp over xcopy if found on path.

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 3 Posters 589 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.
  • P Offline
    P Offline
    Patrick N
    wrote on last edited by
    #1

    Windows 10
    mingw 5.12.2 32/64 bit.

    Building for Windows 10 I would expect QMAKE_COPY_DIR to use 'xcopy /s /q /y /i' as defined in mkspecs, which normally it does. However, if it finds 'cp' on the path (after installing msys2 for example) it uses 'cp -R -f' and subtely changes the result of the copy.

    I don't really want to explicitly use xcopy, but is there some way to detect or force xcopy? Is this a qmake bug?

    K 1 Reply Last reply
    0
    • P Patrick N

      Windows 10
      mingw 5.12.2 32/64 bit.

      Building for Windows 10 I would expect QMAKE_COPY_DIR to use 'xcopy /s /q /y /i' as defined in mkspecs, which normally it does. However, if it finds 'cp' on the path (after installing msys2 for example) it uses 'cp -R -f' and subtely changes the result of the copy.

      I don't really want to explicitly use xcopy, but is there some way to detect or force xcopy? Is this a qmake bug?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Patrick-N

      Hi and welcome to devnet forum

      Where did you find this variable?
      There you will probably find the answer.
      It is not part of https://doc.qt.io/qt-5/qmake-variable-reference.html

      Vote the answer(s) that helped you to solve your issue(s)

      P 1 Reply Last reply
      0
      • K koahnig

        @Patrick-N

        Hi and welcome to devnet forum

        Where did you find this variable?
        There you will probably find the answer.
        It is not part of https://doc.qt.io/qt-5/qmake-variable-reference.html

        P Offline
        P Offline
        Patrick N
        wrote on last edited by
        #3

        @koahnig I inherited it in the qmake file, if this is not the 'official' way to copy files in qmake then what is?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          I think the simplest would be to remove MSys from your PATH environment variable.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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