qt - QMAKE / QT5:平台无关复制命令?
问题描述
QMAKE 中是否有独立于平台的方式来复制文件?目前我xcopy
在windows下使用,它能够处理德语变音符号。
# Simple "Release" target related copy of compiled .exe file into .compiledOutput folder
# xcopy is windows dependant, but necessary to handle german umlauts
win32 {
build_pass: CONFIG(release, debug|release) {
QMAKE_POST_LINK += xcopy /Y $$quote($$system_path($$absolute_path($$OUT_PWD/release/$${TARGET}.exe))) \
$$quote($$system_path($$absolute_path($$OUT_PWD/../$${TARGET}/.compiledOutput/)))
}
else: build_pass {
# Do nothing, only copy release build to .compiledOutput
}
}
我知道$$QMAKE_COPY
不幸的是copy
,我的 Qt5.8 设置解决了这个copy
问题,并且有德语变音符号的问题。
解决方案
不确定,但您可以尝试:
- 将常见的 Windows cp.exe 替换为 xcopy.exe 。
- 将 cp.exe 软链接或硬链接到 xcopy.exe。并在 PATH 环境变量中的 cp.exe 文件夹之前包含文件夹。Qmake 必须使用您的 cp.exe 版本而不是系统版本。
- 在其他系统(而不是 Windows)上,您可以将 xcopy.exe 模拟为符号链接或可执行脚本。
推荐阅读
- karate - 空手道 GET 调用中未返回 Content-Encoding 响应标头
- mysql - 如何优化以下查询以及什么是(使用 where;使用连接缓冲区(块嵌套循环))与 EXPLAIN
- typescript - 如果未提供所有对象键,如何使用给定值更新对象
- c# - C# 到节点加密散列 - md5 和 sha256
- javascript - 编写使用立即调用函数表达式 (IIFE) 的代码来创建指示的斐波那契函数
- flutter - 在flutter中点击设备返回按钮时刷新返回页面
- xml - powershell 中的 Save() 正在破坏 xml 文件
- javascript - 在同一台服务器上获取多个数据库
- python - 在 macOS 上从我的 Python 代码打开屏幕键盘
- r - 循环使用 r 中的相应值标记标记