美文网首页
Qt PRO 中执行bat命令xcopy

Qt PRO 中执行bat命令xcopy

作者: Feel君 | 来源:发表于2017-03-01 23:03 被阅读76次

参考: http://www.jianshu.com/p/166871ab31ef

#----------------------------------------------------------------
win32{
    dst_file = $$PWD\\deploy\\

    CONFIG(debug, debug|release){
        src_file = $$OUT_PWD\debug\\$${TARGET}.exe
    }else{
        src_file = $$OUT_PWD\release\\$${TARGET}.exe
    }

    # dst_file 最后的 \\ 是必须的,用来标示 xcopy 到一个文件夹,若不存在,创建之

    # Replace slashes in paths with backslashes for Windows
    src_file ~= s,/,\\,g
    dst_file ~= s,/,\\,g

    system(xcopy $$src_file $$dst_file /y /e)

    message($$dst_file)
    message($$src_file)
}
#------------copy Target File to deploy folder end---------------

相关文章

网友评论

      本文标题:Qt PRO 中执行bat命令xcopy

      本文链接:https://www.haomeiwen.com/subject/osocgttx.html