Xcopy文件到pro / pri文件中的新目录 [英] Xcopy files to the new directory in pro/pri file
问题描述
如何使用pro文件将包含目录内容的整个目录复制到新路径。
我尝试了 xcopy / S / I / Y,但是它不起作用。有人可以指出我正在执行的错误
how can I copy the entire directory with the contents to new path using pro file. I tried "xcopy /S /I /Y" but its not working. Can someone point the error I am doing
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_SOURCE_PATH}\\copy_to_output $${EXPORTED_DESTINATION_PATH})
}
推荐答案
I认为您正在寻找Qt部署。
I think you looking for Qt deploy.
部署Qt Ap说明:部署Qt应用程序不需要任何C ++编程。您所需要做的就是按照本文档中描述的步骤在发布模式下构建Qt和应用程序。
Deploying Qt Applications: Deploying an Qt application does not require any C++ programming. All you need to do is to build Qt and your application in release mode, following the procedures described in this documentation.
在Windows中部署应用程序的更多信息此处。
More info for deploy app in windows here.
< a href = http://doc.qt.io/qt-5/windows-deployment.html rel = nofollow noreferrer> Windows部署工具:
Windows部署工具旨在自动化创建可部署文件夹的过程,该文件夹包含从该文件夹运行应用程序所需的Qt相关依赖项(库,QML导入,插件和翻译)。
The Windows Deployment Tool: The Windows deployment tool is designed to automate the process of creating a deployable folder containing the Qt-related dependencies (libraries, QML imports, plugins, and translations) required to run the application from that folder.
还要检查我有关Windeploy的答案: https://stackoverflow.com/a/45531369/5068056
Also check my answer about Windeploy: https://stackoverflow.com/a/45531369/5068056
我用屏幕快照完全解释了它。
I explain it completely with screenshots.
这篇关于Xcopy文件到pro / pri文件中的新目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!