Commit 3b9438f7 authored by Alessandro Portale's avatar Alessandro Portale

Fix deployment with MinGW and sh.exe in path

When building with MinGW and sh.exe is in the path, we should/can
not use xcopy in our deployment code. This patch detects the
presence of sh.exe and adjusts the behavior accordingly.

'cp -r' is used directly instead of $(COPY_DIR), because the fix
for QTBUG-17315 is not yet in a released Qt version.

'mkdir -p' is used directly instead of $(MKDIR), because the
QMAKE_MKDIR for win32-g++ (in case of QMAKE_SH) does not have
the '-p'. A least not til Qt 4.7.3.

Task-Number: QTCREATORBUG-3094
Reviewed-by: Oswald Buddenhagen
parent c00f2720
......@@ -31,7 +31,14 @@ symbian {
target = $$replace(target, /, \\)
!isEqual(source,$$target) {
!isEmpty(copyCommand):copyCommand += &&
copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
isEmpty(QMAKE_SH) {
copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
} else {
source = $$replace(source, \\\\, /)
target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
target = $$replace(target, \\\\, /)
copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
!isEmpty(copyCommand) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment