复制目录和文件的Qmake命令 [英] Qmake Command to copy directory and files

查看:73
本文介绍了复制目录和文件的Qmake命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将目录temp"中的内容复制到dd"

I want to copy the contents in directory "temp" to "dd"

BINARY_DESTINATION_PATH = $$PWD$$SEPARATOR/dd/
RESOURCE_SOURCE_PATH = $$PWD$$SEPARATOR/temp

EXPORTED_DESTINATION_PATH = $${BINARY_DESTINATION_PATH}
EXPORTED_DESTINATION_PATH ~= s,/,\\,g

EXPORTED_SOURCE_PATH = $${RESOURCE_SOURCE_PATH}
EXPORTED_SOURCE_PATH ~= s,/,\\,g

QT += core
QT -= gui

CONFIG += c++11

TARGET = sample
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp

win32 {
QMAKE_POST_LINK += $$quote(cmd /c xcopy /S /I /Y $${EXPORTED_HEADERS}\\copy_to_output $${EXPORTED_HEADERS_WIN})
}

但这并不是将文件添加到 dd 中并在构建时显示错误.错误行QMAKE_POST_LINK"

but this is not adding the files into dd and showing error on build. Error i son line "QMAKE_POST_LINK"

推荐答案

引用(字符串)

将整个字符串转换为单个实体并返回结果.这只是将字符串括在双引号中的一种奇特方式.

Converts a whole string into a single entity and returns the result. This is just a fancy way of enclosing the string into double quotes.

您可能正在寻找的是<代码>系统(命令).

What you're probably looking for is system(command).

这篇关于复制目录和文件的Qmake命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆