From 74ce0c25de7ccbf6bcf05e3b30a5c2d65aa0dacc Mon Sep 17 00:00:00 2001 From: tianduanrui <2407223896@qq.com> Date: Sun, 24 Dec 2017 22:02:09 +0800 Subject: [PATCH] update app deploy command --- src/app_deploy.pri | 13 ++++++++----- src/qqt_function.pri | 12 ++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/app_deploy.pri b/src/app_deploy.pri index 764077a7..3f73cc7d 100644 --- a/src/app_deploy.pri +++ b/src/app_deploy.pri @@ -9,20 +9,24 @@ isEmpty(APP_DEPLOY_ROOT){ } message($${TARGET} deploy root: $$APP_DEPLOY_ROOT) +#set app deploy pwd +APP_DEPLOY_PWD = $${APP_DEPLOY_ROOT}/$${TARGET}/$${QKIT_STD_DIR} +contains(QKIT_PRIVATE, WIN32||WIN64) { + APP_DEPLOY_PWD~=s,/,\\,g +} + defineReplace(deploy_app_on_mac) { #need QQT_BUILD_PWD - APP_DEPLOY_PWD = $${APP_DEPLOY_ROOT}/$${TARGET}/$${QKIT_STD_DIR} command = && command += $$MK_DIR $${APP_DEPLOY_PWD} $$CMD_SEP - command += rm -fr $${APP_DEPLOY_PWD}/$${TARGET}.app && - command += cp -fa $${DESTDIR}/$${TARGET}.app $${APP_DEPLOY_PWD}/$${TARGET}.app + command += $$RM_DIR $${APP_DEPLOY_PWD}/$${TARGET}.app && + command += $$COPY_DIR $${DESTDIR}/$${TARGET}.app $${APP_DEPLOY_PWD}/$${TARGET}.app #message($$command) return ($$command) } defineReplace(deploy_app_on_win) { #need QQT_BUILD_PWD - APP_DEPLOY_PWD = $${APP_DEPLOY_ROOT}\\$${TARGET}\\$${QKIT_STD_DIR} command = command += $$MK_DIR $${APP_DEPLOY_PWD} $$CMD_SEP command += $$RM $${APP_DEPLOY_PWD}\\$${TARGET}.exe $$CMD_SEP @@ -41,7 +45,6 @@ defineReplace(deploy_app_on_win) { defineReplace(deploy_app_on_linux) { #need QQT_BUILD_PWD - APP_DEPLOY_PWD = $${APP_DEPLOY_ROOT}/$${TARGET}/$${QKIT_STD_DIR} command = command += $$MK_DIR $${APP_DEPLOY_PWD} $$CMD_SEP diff --git a/src/qqt_function.pri b/src/qqt_function.pri index bb23a657..c8399960 100644 --- a/src/qqt_function.pri +++ b/src/qqt_function.pri @@ -14,6 +14,18 @@ contains(QMAKE_HOST.os,Windows) { CD = cd /d RM_DIR = rd /s /q #PATH_SEP=\\ +} else:contains(QMAKE_HOST.os, Darwin) { + SCRIPT_SUFFIX=sh + CMD_SEP = && + MOVE = mv + COPY = cp -f + COPY_DIR = cp -fa + MK_DIR = mkdir -p + RM = rm -f + CD = cd + LN = ln -sf + RM_DIR = rm -rf + #PATH_SEP=/ } else { SCRIPT_SUFFIX=sh CMD_SEP = &&