1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00

update: MLMA use .qmake/app_configure.pri

This commit is contained in:
tianduanrui 2017-12-02 21:39:01 +08:00
parent 23529dac35
commit 4a99a83dbe
34 changed files with 107 additions and 144 deletions

View File

@ -29,7 +29,8 @@ SUBDIRS += examples/qqtframe2
##need GumoQuery
##-----------------------------------------------------------------
#greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += examples/QtSdkManager
#greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += demo/VegeTablesPrice
#
greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += demo/VegeTablesPrice
#SUBDIRS += examples/GuiBuildTool
##-----------------------------------------------------------------
##some test project

View File

@ -41,8 +41,8 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../examples/qqtframe2/app_deploy.pri)
include(../../src/app_configure.pri)
include(../../src/app_deploy.pri)
#-------------------------------------------------
#install app

View File

@ -45,7 +45,7 @@ UI_DIR = obj/ui.h
RCC_DIR = qrc
DESTDIR = bin
include(../qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#install app

View File

@ -51,7 +51,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -28,7 +28,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -55,7 +55,7 @@ equals(QKIT_PRIVATE, macOS) {
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -44,7 +44,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -25,7 +25,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -77,12 +77,6 @@ contains(CONFIG, TDR) {
#-------------------------------------------------------------
#link qqt settings: use source or link library?
#-------------------------------------------------------------
#if you dont modify Qt Creator default build directory, you may need mod this path variable.
#link operation all will need this variable
QQT_STD_DIR = QQt/$${QT_VERSION}/$${SYSNAME}/$${BUILD}
#link from build need this, if you havent mod QQt.pro, this can only be two value, qqt's: [src]/$DESTDIR
QQT_DST_DIR = src/bin
#if you want to build qqt source open this annotation
#CONFIG += QQT_SOURCE_BUILDIN
contains (CONFIG, QQT_SOURCE_BUILDIN) {

View File

@ -51,7 +51,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
contains (DEFINES, __BLUETOOTH__){
SOURCES += \

View File

@ -43,7 +43,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -44,7 +44,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -19,15 +19,6 @@ 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
################################################################

View File

@ -2,34 +2,12 @@
#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})
}
APP_DEPLOY_ROOT = $$read_ini("$${CONFIG_FILE}", "$${TARGET}", "APP_DEPLOY_ROOT")
isEmpty(APP_DEPLOY_ROOT){
message([$${TARGET}])
message($${TARGET} $${CONFIG_FILE})
message(APP_DEPLOY_ROOT = is required )
error( please check app.ini at $$CONFIG_PATH)
error( please check $$CONFIG_FILE)
}
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

View File

@ -31,9 +31,6 @@ include($${QQT_SOURCE_ROOT}/qqt_version.pri)
#qqt header
include($${QQT_SOURCE_ROOT}/qqt_header.pri)
#-------------------------------------------------------------
#link path init
#-------------------------------------------------------------
isEmpty(QKIT_PRIVATE) {
message(env variable QKIT is required!)
message(pleace check qqt_qkit.pri)
@ -43,71 +40,8 @@ isEmpty(QKIT_PRIVATE) {
#-------------------------------------------------------------
#link qqt settings: use source or link library?
#-------------------------------------------------------------
#if you dont modify Qt Creator default build directory, you may need mod this path variable.
#link operation all will need this variable
QQT_STD_DIR = QQt/$${QT_VERSION}/$${SYSNAME}/$${BUILD}
#link from build need this, if you havent mod QQt.pro, this can only be two value, qqt's: [src]/$DESTDIR
QQT_DST_DIR = src/bin
#if you want to build qqt source open this annotation
#CONFIG += QQT_SOURCE_BUILDIN
#-------------------------------------------------------------
#link path init
#-------------------------------------------------------------
!contains (CONFIG, QQT_SOURCE_BUILDIN) {
#qqt build root, build station root
#link_from_build will need this path.
#default sdk root is qqt-source/..
#user can modify this path
#create_qqt_sdk and link_from_sdk will need this.
#different in every operate system
CONFIG_PATH =
CONFIG_FILE =
win32 {
CONFIG_PATH = $$user_config_path()\\QQt
CONFIG_FILE = $${CONFIG_PATH}\\config.ini
} else {
CONFIG_PATH = $$user_config_path()/.QQt
CONFIG_FILE = $${CONFIG_PATH}/config.ini
}
message(config path: $$CONFIG_PATH config file: $${CONFIG_FILE})
!exists($${CONFIG_FILE}) {
mkdir("$${CONFIG_PATH}")
empty_file($${CONFIG_FILE})
#qt4 need this ret, why?
ret = $$system(echo [ROOT] >> $${CONFIG_FILE})
ret = $$system(echo QQT_SDK_ROOT = >> $${CONFIG_FILE})
ret = $$system(echo QQT_BUILD_ROOT = >> $${CONFIG_FILE})
}
isEmpty(QQT_BUILD_ROOT): QQT_BUILD_ROOT = $$read_ini("$${CONFIG_FILE}", "ROOT", "QQT_BUILD_ROOT")
isEmpty(QQT_SDK_ROOT): QQT_SDK_ROOT = $$read_ini($${CONFIG_FILE}, ROOT, QQT_SDK_ROOT)
message(QQt build root: $$QQT_BUILD_ROOT)
message(QQt sdk root: $$QQT_SDK_ROOT)
isEmpty(QQT_BUILD_ROOT)|isEmpty(QQT_SDK_ROOT):error(QQT_BUILD_ROOT and QQT_SDK_ROOT required please check config.ini at $$CONFIG_PATH)
}
#-------------------------------------------------------------
#install qqt to sdk or qt library path
#include qqt_install.pri using these function to install qqt
#install to Qt library
#install to SDK path
#in this section, I use QMAKE_PRE_LINK QMAKE_POST_LINK, it won't work until project source changed
#on windows, I use touch.exe, you need download it and put it in system dir.
#-------------------------------------------------------------
#QMAKE_POST_LINK won't work until source changed
#qmake pro pri prf change won't effect to QMAKE_POST_LINK
#but I need it before I complete this pri.
!contains (CONFIG, QQT_SOURCE_BUILDIN) {
#debug.
system("touch $${QQT_SOURCE_ROOT}/frame/qqtapplication.cpp")
include ($${QQT_SOURCE_ROOT}/qqt_install.pri)
}
contains (CONFIG, QQT_SOURCE_BUILDIN) {
#if you want to build src but not link QQt lib in your project
#if you don't want to modify Qt Creator's default build directory, this maybe a choice.
@ -138,7 +72,27 @@ contains (CONFIG, QQT_SOURCE_BUILDIN) {
#...
}
#QQT_SDK_ROOT QQT_SDK_PWD QQT_LIB_PWD
#-------------------------------------------------------------
#install qqt to sdk or qt library path
#include qqt_install.pri using these function to install qqt
#install to Qt library
#install to SDK path
#in this section, I use QMAKE_PRE_LINK QMAKE_POST_LINK, it won't work until project source changed
#on windows, I use touch.exe, you need download it and put it in system dir.
#-------------------------------------------------------------
#QMAKE_POST_LINK won't work until source changed
#qmake pro pri prf change won't effect to QMAKE_POST_LINK
#but I need it before I complete this pri.
#debug.
#move to app link pri
#link_from_sdk do move qqt to sdk path at app pre link command not lib build time
#mod qqt source to start post link is not needed here.
#need mod app souce after every pri mod.
#system("touch $${QQT_SOURCE_ROOT}/frame/qqtapplication.cpp")
include ($${QQT_SOURCE_ROOT}/qqt_install.pri)
#in this pri use QQT_SDK_ROOT QQT_SDK_PWD QQT_LIB_PWD
#need qqt_install.pri
include($${QQT_SOURCE_ROOT}/qqt_library.pri)
}

View File

@ -11,10 +11,10 @@ function WriteINIfile()
echo $WriteINI
}
WriteINIfile $1 $2 $3 $4
#WriteINIfile $1 $2 $3 $4
# 解析INI
function rini()
rini()
{
# 判断参数数量
if [ $# -lt 2 ];then
@ -65,4 +65,6 @@ function rini()
fi
fi
fi
}
}
rini $1 $2 $3 $4

View File

@ -121,6 +121,7 @@ DISTFILES += \
linux_cur_path.sh \
linux_cd_path.sh \
linux_read_ini.sh \
linux_write_ini.sh \
win_read_ini.bat

View File

@ -67,6 +67,7 @@ contains(QKIT_PRIVATE, WIN32) {
#Qt is static by mingw32 building
mingw{
DEFINES += QQT_STATIC_LIBRARY
message($${TARGET} QQT_STATIC_LIBRARY is defined. build or link)
}
#link and build all need this macro
contains(DEFINES, QQT_STATIC_LIBRARY) {

View File

@ -3,8 +3,6 @@
##install to Qt library
##install to SDK path
##link from build
##MLMA technology (Multi Link, Multi App technology)
##MLMA技术支持多链接、多应用的一门工程管理技术。
##please don't modify this pri
##need qqt_version.pri qqt_header.pri qqt_source.pri
################################################

View File

@ -6,13 +6,6 @@
##https://gitee.com/drabel/LibQt/issues/new?issue%5Bassignee_id%5D=0&issue%5Bmilestone_id%5D=0
##2017年10月29日08:54:28
################################################
#TARGET must be equals to pro name ? no, TARGET must be placeed before qqt_library.pri
#qmake pro pri is sequential
message(Link QQt to $${TARGET} $${QKIT_PRIVATE} \
at $${QT_VERSION} $${SYSNAME} $${BUILD} \
on $${QMAKE_HOST.os})
################################################
##link QQt logic function
################################################
@ -74,11 +67,61 @@ defineReplace(copy_qqt_on_mac) {
################################################
##link qqt work flow
################################################
#TARGET must be equals to pro name ? no, TARGET must be placeed before qqt_library.pri
#qmake pro pri is sequential
message(Link QQt to $${TARGET} $${QKIT_PRIVATE} \
at $${QT_VERSION} $${SYSNAME} $${BUILD} \
on $${QMAKE_HOST.os})
#-------------------------------------------------------------
#link path init
#-------------------------------------------------------------
##MLMA technology (Multi Link, Multi App technology)
##MLMA技术支持多链接、多应用的一门工程管理技术。
#default sdk root is qqt-source/..
#user can modify this path in user_config_path/app_configure.pri
#create_qqt_sdk and link_from_sdk will need this.
#different in every operate system
CONFIG_PATH =
CONFIG_FILE =
win32 {
CONFIG_PATH = $$user_config_path()\\qmake
CONFIG_FILE = $${CONFIG_PATH}\\app_configure.pri
} else {
CONFIG_PATH = $$user_config_path()/.qmake
CONFIG_FILE = $${CONFIG_PATH}/app_configure.pri
}
message($${TARGET} config file: $${CONFIG_FILE})
!exists($${CONFIG_FILE}) {
mkdir("$${CONFIG_PATH}")
empty_file($${CONFIG_FILE})
}
include ($${CONFIG_FILE})
#qqt build root, build station root
#link_from_build will need this path.
isEmpty(QQT_BUILD_ROOT)|isEmpty(QQT_SDK_ROOT) {
message($${TARGET})
message($${CONFIG_FILE})
message(QQT_BUILD_ROOT = is required )
message(QQT_SDK_ROOT = is required )
error( please check $$CONFIG_FILE)
}
message(QQt build root: $$QQT_BUILD_ROOT)
message(QQt sdk root: $$QQT_SDK_ROOT)
#-------module name QQt
MODULE_NAME=QQt
module_name = $$lower($${MODULE_NAME})
#-------define the all path
#if you dont modify Qt Creator default build directory, you may need mod this path variable.
#link operation all will need this variable
QQT_STD_DIR = QQt/$${QT_VERSION}/$${SYSNAME}/$${BUILD}
#link from build need this, if you havent mod QQt.pro, this can only be two value, qqt's: [src]/$DESTDIR
QQT_DST_DIR = src/bin
#create platform sdk need this
QQT_SRC_PWD=$${PWD}
#need use qqt subdir proj

View File

@ -28,7 +28,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -41,7 +41,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -14,7 +14,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -40,7 +40,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -27,7 +27,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -47,7 +47,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -37,7 +37,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -3,7 +3,7 @@
# Project created by QtCreator 2016-06-17T10:03:52
#
#-------------------------------------------------
include(../qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
QT += core gui

View File

@ -3,7 +3,7 @@
# Project created by QtCreator 2016-06-17T10:03:52
#
#-------------------------------------------------
include(../qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
QT += core gui

View File

@ -28,7 +28,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -27,7 +27,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -38,7 +38,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -45,7 +45,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly

View File

@ -45,7 +45,7 @@ system("touch main.cpp")
#if you link a library to your app, on android you must select the running kit to the app, not LibQQt e.g.
#user can modify any infomation under this annotation
#-------------------------------------------------
include(../../examples/qqtframe2/link_qqt_library.pri)
include(../../src/app_configure.pri)
#-------------------------------------------------
#user app may use these these settings prefertly