mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
update MLMA
This commit is contained in:
parent
31adde3112
commit
6bd892de75
@ -46,6 +46,11 @@ include(../../src/link_qqt_library.pri)
|
|||||||
##link Other library
|
##link Other library
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
##deploy app for install update deploy
|
||||||
|
################################################################
|
||||||
|
include(app_deploy.pri)
|
||||||
|
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
##project environ print
|
##project environ print
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
@ -2,19 +2,36 @@
|
|||||||
#user computer path settings
|
#user computer path settings
|
||||||
#-------------------------------------------------------------
|
#-------------------------------------------------------------
|
||||||
#deploy root
|
#deploy root
|
||||||
equals(QMAKE_HOST.os, Darwin) {
|
CONFIG_PATH =
|
||||||
APP_DEPLOY_ROOT = $$PWD/../../../deployer
|
CONFIG_FILE =
|
||||||
} else: equals(QMAKE_HOST.os, Linux) {
|
|
||||||
APP_DEPLOY_ROOT = $$PWD/../../../deployer
|
win32 {
|
||||||
} else: equals(QMAKE_HOST.os, Windows) {
|
CONFIG_PATH = $$user_config_path()\\QQt
|
||||||
APP_DEPLOY_ROOT = $$PWD/../../../deployer
|
CONFIG_FILE = $${CONFIG_PATH}\\app.ini
|
||||||
|
} else {
|
||||||
|
CONFIG_PATH = $$user_config_path()/.QQt
|
||||||
|
CONFIG_FILE = $${CONFIG_PATH}/app.ini
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message($${TARGET} config path: $$CONFIG_PATH config file: $${CONFIG_FILE})
|
||||||
|
|
||||||
|
!exists($${CONFIG_FILE}) {
|
||||||
|
empty_file($${CONFIG_FILE})
|
||||||
|
#qt4 need this ret, why?
|
||||||
|
ret = $$system(echo [$${TARGET}] >> $${CONFIG_FILE})
|
||||||
|
ret = $$system(echo APP_DEPLOY_ROOT = >> $${CONFIG_FILE})
|
||||||
|
}
|
||||||
|
|
||||||
|
isEmpty(APP_DEPLOY_ROOT): APP_DEPLOY_ROOT = $$read_ini("$${CONFIG_FILE}", "$${TARGET}", "APP_DEPLOY_ROOT")
|
||||||
|
message($${TARGET} deploy root: $$APP_DEPLOY_ROOT)
|
||||||
|
isEmpty(APP_DEPLOY_ROOT):error(APP_DEPLOY_ROOT required please check app.ini at $$CONFIG_PATH)
|
||||||
|
|
||||||
|
|
||||||
defineReplace(deploy_app_on_mac) {
|
defineReplace(deploy_app_on_mac) {
|
||||||
#need QQT_BUILD_PWD
|
#need QQT_BUILD_PWD
|
||||||
command = &&
|
command = &&
|
||||||
command += rm -fr $${APP_DEPLOY_ROOT}/$${TARGET}.app &&
|
command += rm -fr $${APP_DEPLOY_ROOT}/$${TARGET}.app &&
|
||||||
command += cp -fa $${DESTDIR}/$${TARGET}.app $${APP_DEPLOY_ROOT}
|
command += cp -fa $${DESTDIR}/$${TARGET}.app $${APP_DEPLOY_ROOT}/
|
||||||
message($$command)
|
message($$command)
|
||||||
return ($$command)
|
return ($$command)
|
||||||
}
|
}
|
||||||
|
@ -28,5 +28,4 @@ FORMS += \
|
|||||||
|
|
||||||
system(touch main.cpp)
|
system(touch main.cpp)
|
||||||
|
|
||||||
include(../qqtframe2/app_configure.pri)
|
include(../../src/app_configure.pri)
|
||||||
include(../qqtframe2/app_deploy.pri)
|
|
||||||
|
59
src/app_configure.pri
Normal file
59
src/app_configure.pri
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#-------------------------------------------------
|
||||||
|
#install app
|
||||||
|
#-------------------------------------------------
|
||||||
|
#CONFIG += can_install
|
||||||
|
can_install:equals(QKIT_PRIVATE, EMBEDDED) {
|
||||||
|
target.path = /Application
|
||||||
|
INSTALLS += target
|
||||||
|
} else: unix {
|
||||||
|
equals(QKIT_PRIVATE, macOS) {
|
||||||
|
target.path = /Applications
|
||||||
|
INSTALLS += target
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
############
|
||||||
|
##config defination
|
||||||
|
############
|
||||||
|
equals(QKIT_PRIVATE, macOS) {
|
||||||
|
CONFIG += app_bundle
|
||||||
|
}
|
||||||
|
|
||||||
|
contains(QKIT_PRIVATE, ANDROID|ANDROIDX86) {
|
||||||
|
CONFIG += mobility
|
||||||
|
MOBILITY =
|
||||||
|
DISTFILES += \
|
||||||
|
android/AndroidManifest.xml
|
||||||
|
|
||||||
|
ANDROID_PACKAGE_SOURCE_DIR = $${PWD}/android
|
||||||
|
}
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
##build cache
|
||||||
|
################################################################
|
||||||
|
OBJECTS_DIR = obj
|
||||||
|
MOC_DIR = obj/moc.cpp
|
||||||
|
UI_DIR = obj/ui.h
|
||||||
|
RCC_DIR = qrc
|
||||||
|
DESTDIR = bin
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
##link QQt
|
||||||
|
################################################################
|
||||||
|
include($${PWD}/link_qqt_library.pri)
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
##link Other library
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
##deploy app for install update deploy
|
||||||
|
################################################################
|
||||||
|
include($${PWD}/app_deploy.pri)
|
||||||
|
|
||||||
|
#-------------------------------------------------
|
||||||
|
##project environ print
|
||||||
|
#-------------------------------------------------
|
||||||
|
#default
|
||||||
|
message ($${TARGET} config $${CONFIG})
|
||||||
|
message ($${TARGET} define $${DEFINES})
|
44
src/app_deploy.pri
Normal file
44
src/app_deploy.pri
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#-------------------------------------------------------------
|
||||||
|
#user computer path settings
|
||||||
|
#-------------------------------------------------------------
|
||||||
|
#deploy root
|
||||||
|
CONFIG_PATH =
|
||||||
|
CONFIG_FILE =
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
CONFIG_PATH = $$user_config_path()\\QQt
|
||||||
|
CONFIG_FILE = $${CONFIG_PATH}\\app.ini
|
||||||
|
} else {
|
||||||
|
CONFIG_PATH = $$user_config_path()/.QQt
|
||||||
|
CONFIG_FILE = $${CONFIG_PATH}/app.ini
|
||||||
|
}
|
||||||
|
|
||||||
|
message($${TARGET} config path: $$CONFIG_PATH config file: $${CONFIG_FILE})
|
||||||
|
|
||||||
|
!exists($${CONFIG_FILE}) {
|
||||||
|
empty_file($${CONFIG_FILE})
|
||||||
|
#qt4 need this ret, why?
|
||||||
|
ret = $$system(echo [$${TARGET}] >> $${CONFIG_FILE})
|
||||||
|
ret = $$system(echo APP_DEPLOY_ROOT = >> $${CONFIG_FILE})
|
||||||
|
}
|
||||||
|
|
||||||
|
isEmpty(APP_DEPLOY_ROOT): APP_DEPLOY_ROOT = $$read_ini("$${CONFIG_FILE}", "$${TARGET}", "APP_DEPLOY_ROOT")
|
||||||
|
message($${TARGET} deploy root: $$APP_DEPLOY_ROOT)
|
||||||
|
isEmpty(APP_DEPLOY_ROOT):error(APP_DEPLOY_ROOT required please check app.ini at $$CONFIG_PATH)
|
||||||
|
|
||||||
|
|
||||||
|
defineReplace(deploy_app_on_mac) {
|
||||||
|
#need QQT_BUILD_PWD
|
||||||
|
command = &&
|
||||||
|
command += rm -fr $${APP_DEPLOY_ROOT}/$${TARGET}.app &&
|
||||||
|
command += cp -fa $${DESTDIR}/$${TARGET}.app $${APP_DEPLOY_ROOT}/
|
||||||
|
message($$command)
|
||||||
|
return ($$command)
|
||||||
|
}
|
||||||
|
|
||||||
|
CONFIG += deploy_app
|
||||||
|
contains(CONFIG, deploy_app) {
|
||||||
|
contains(QKIT_PRIVATE, macOS) {
|
||||||
|
QMAKE_POST_LINK += $$deploy_app_on_mac()
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user