mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
update project manager technology
This commit is contained in:
parent
1de4c6b5ea
commit
048b87c13b
238
QQtExample.pro
238
QQtExample.pro
@ -1,117 +1,121 @@
|
||||
##-----------------------------------------------------------------
|
||||
##LibQQt样例工程入口
|
||||
##不能随便编译,初始设置要求比较严格,请按照规程设置完整。
|
||||
##Example要编译,必须先编译完LibQQt
|
||||
##-----------------------------------------------------------------
|
||||
TEMPLATE = subdirs
|
||||
#如果不加order,发布LibQQt的时候会进程间冲突。
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
##-----------------------------------------------------------------
|
||||
##Q1级别 V1 第一版、第一代
|
||||
##-----------------------------------------------------------------
|
||||
#古老的链接LibQQt的方式废弃。
|
||||
#App管理Application句柄的方式废弃。
|
||||
#SUBDIRS += examples/qqtframe
|
||||
|
||||
#SUBDIRS += examples/animationframe
|
||||
#
|
||||
#need vlcQt libvlc library
|
||||
#SUBDIRS += test/qqtliveplayer
|
||||
#need ffmpeg library
|
||||
#SUBDIRS += test/qqtffmpegplayer
|
||||
|
||||
#need webkit webkitwidgets - WebSupport
|
||||
#webengine
|
||||
#ignored
|
||||
#lessThan(QT_MAJOR_VERSION , 5):SUBDIRS += test/qqtwebkittest
|
||||
#lessThan(QT_MAJOR_VERSION , 5):SUBDIRS += test/qqtwebclient
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
#Q3级别 V2 第二版、第二代
|
||||
#QQt installed to Qt library or
|
||||
#QQt installed to sdk or
|
||||
#QQt is build
|
||||
#-----------------------------------------------------------------
|
||||
#第二种引用LibQQt的方式
|
||||
#方法:include(.../LibQQt/src/app_base_manager.pri)
|
||||
#QQt提供QQtApplication帮助App管理Application句柄。
|
||||
#SUBDIRS += examples/qqtframe2
|
||||
#必看
|
||||
#SUBDIRS += examples/exquisite
|
||||
#SUBDIRS += examples/tabwidgetexamples
|
||||
#need QZXing, default closed.
|
||||
#SUBDIRS += examples/qrcodeexample
|
||||
|
||||
#SUBDIRS += examples/qqtchartexample
|
||||
#
|
||||
#SUBDIRS += examples/console_app
|
||||
#-----------------------------------------------------------------
|
||||
#need webaccessmanager - WebSupport
|
||||
#need QSsl
|
||||
#need GumoQuery
|
||||
#-----------------------------------------------------------------
|
||||
#greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += demo/QtSdkManager
|
||||
#greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += demo/VegeTablesPrice
|
||||
#SUBDIRS += demo/GuiBuildTool
|
||||
#SUBDIRS += demo/LearnCookieTest
|
||||
#-----------------------------------------------------------------
|
||||
#some test project
|
||||
#SUBDIRS += test/gumbo_query_test
|
||||
#SUBDIRS += test/customqvariant
|
||||
#SUBDIRS += test/framelesshelperwidget
|
||||
#SUBDIRS += test/treeviewtest
|
||||
#SUBDIRS += test/bytearraytest
|
||||
#!contains(QKIT_PRIVATE, iOS|iOSSimulator){
|
||||
# SUBDIRS += test/cmdwidget
|
||||
#}
|
||||
#SUBDIRS += test/coretest
|
||||
#SUBDIRS += test/tmpproj
|
||||
|
||||
#
|
||||
#need QtSoap - WebSupport
|
||||
##SUBDIRS += test/easter
|
||||
#SUBDIRS += demo/soapQQtOnline
|
||||
#
|
||||
##need bluetooth library
|
||||
#greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += test/qqtbtfileserver
|
||||
|
||||
#0000
|
||||
#SUBDIRS += test/svgtest
|
||||
#SUBDIRS += test/qqtdicttest
|
||||
#必开
|
||||
#SUBDIRS += test/qqtdicttest2
|
||||
#必开
|
||||
#SUBDIRS += test/giftest
|
||||
|
||||
#必开 这两个例子是关于QQtAudio的最好展示
|
||||
#SUBDIRS += examples/qqtaudioexample
|
||||
#111111
|
||||
#greaterThan(QT_VERSION, 4.6.0):SUBDIRS += test/voicetest
|
||||
#mac:lessThan(QT_MAJOR_VERSION , 5):SUBDIRS -= test/voicetest
|
||||
|
||||
#网络创建工具
|
||||
#SUBDIRS += demo/QQtClientCreator
|
||||
#SUBDIRS += demo/QQtServerCreator
|
||||
#这边是个组合项,客户端和服务器一起的。必看
|
||||
#SUBDIRS += examples/qqtclientexample
|
||||
#SUBDIRS += examples/qqtserverexample
|
||||
#通信协议的复杂的例子
|
||||
#SUBDIRS += examples/qqtnetworkexample
|
||||
|
||||
#udp 嵌入式linux,Qt编译了udp支持,默认是支持的
|
||||
#SUBDIRS += examples/qqtudpexample
|
||||
#lessThan(QT_VERSION , 5.8.0):SUBDIRS -= examples/qqtudpexample
|
||||
|
||||
#SUBDIRS += test/openglwidgettest
|
||||
#SUBDIRS += test/osdtest
|
||||
#SUBDIRS += test/inputtest
|
||||
#SUBDIRS += demo/SysInfoNotify
|
||||
#移除
|
||||
#SUBDIRS += demo/TouchMonitor
|
||||
#SUBDIRS += demo/TouchMonitorServer
|
||||
|
||||
#SUBDIRS += test/QQtWidgetClickHelperTest
|
||||
SUBDIRS += test/QQtWidgetClickSoundHelperTest
|
||||
##-----------------------------------------------------------------
|
||||
##LibQQt样例工程入口
|
||||
##不能随便编译,初始设置要求比较严格,请按照规程设置完整。
|
||||
##Example要编译,必须先编译完LibQQt
|
||||
##-----------------------------------------------------------------
|
||||
TEMPLATE = subdirs
|
||||
#如果不加order,发布LibQQt的时候会进程间冲突。
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
##-----------------------------------------------------------------
|
||||
##Q1级别 V1 第一版、第一代
|
||||
##-----------------------------------------------------------------
|
||||
#古老的链接LibQQt的方式废弃。
|
||||
#App管理Application句柄的方式废弃。
|
||||
#SUBDIRS += examples/qqtframe
|
||||
|
||||
#SUBDIRS += examples/animationframe
|
||||
#
|
||||
#need vlcQt libvlc library
|
||||
#SUBDIRS += test/qqtliveplayer
|
||||
#need ffmpeg library
|
||||
#SUBDIRS += test/qqtffmpegplayer
|
||||
|
||||
#need webkit webkitwidgets - WebSupport
|
||||
#webengine
|
||||
#ignored
|
||||
#lessThan(QT_MAJOR_VERSION , 5):SUBDIRS += test/qqtwebkittest
|
||||
#lessThan(QT_MAJOR_VERSION , 5):SUBDIRS += test/qqtwebclient
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
#Q3级别 V2 第二版、第二代
|
||||
#QQt installed to Qt library or
|
||||
#QQt installed to sdk or
|
||||
#QQt is build
|
||||
#-----------------------------------------------------------------
|
||||
#第二种引用LibQQt的方式
|
||||
#方法:include(.../LibQQt/app/app_base_manager.pri)
|
||||
#QQt提供QQtApplication帮助App管理Application句柄。
|
||||
#SUBDIRS += examples/qqtframe2
|
||||
#必看
|
||||
#SUBDIRS += examples/exquisite
|
||||
#SUBDIRS += examples/tabwidgetexamples
|
||||
#need QZXing, default closed.
|
||||
#SUBDIRS += examples/qrcodeexample
|
||||
|
||||
#SUBDIRS += examples/qqtchartexample
|
||||
#
|
||||
#SUBDIRS += examples/console_app
|
||||
#-----------------------------------------------------------------
|
||||
#need webaccessmanager - WebSupport
|
||||
#need QSsl
|
||||
#need GumoQuery
|
||||
#-----------------------------------------------------------------
|
||||
#greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += demo/QtSdkManager
|
||||
#greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += demo/VegeTablesPrice
|
||||
#SUBDIRS += demo/GuiBuildTool
|
||||
#SUBDIRS += demo/LearnCookieTest
|
||||
#-----------------------------------------------------------------
|
||||
#some test project
|
||||
#SUBDIRS += test/gumbo_query_test
|
||||
#SUBDIRS += test/customqvariant
|
||||
#SUBDIRS += test/framelesshelperwidget
|
||||
#SUBDIRS += test/treeviewtest
|
||||
#SUBDIRS += test/bytearraytest
|
||||
#!contains(QKIT_PRIVATE, iOS|iOSSimulator){
|
||||
# SUBDIRS += test/cmdwidget
|
||||
#}
|
||||
#SUBDIRS += test/coretest
|
||||
#SUBDIRS += test/tmpproj
|
||||
|
||||
#
|
||||
#need QtSoap - WebSupport
|
||||
##SUBDIRS += test/easter
|
||||
#SUBDIRS += demo/soapQQtOnline
|
||||
#
|
||||
##need bluetooth library
|
||||
#greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += test/qqtbtfileserver
|
||||
|
||||
#0000
|
||||
#SUBDIRS += test/svgtest
|
||||
#SUBDIRS += test/qqtdicttest
|
||||
#必开
|
||||
#SUBDIRS += test/qqtdicttest2
|
||||
#必开
|
||||
#SUBDIRS += test/giftest
|
||||
|
||||
#必开 这两个例子是关于QQtAudio的最好展示
|
||||
#SUBDIRS += examples/qqtaudioexample
|
||||
#111111
|
||||
#greaterThan(QT_VERSION, 4.6.0):SUBDIRS += test/voicetest
|
||||
#mac:lessThan(QT_MAJOR_VERSION , 5):SUBDIRS -= test/voicetest
|
||||
|
||||
#网络创建工具
|
||||
#SUBDIRS += demo/QQtClientCreator
|
||||
#SUBDIRS += demo/QQtServerCreator
|
||||
#这边是个组合项,客户端和服务器一起的。必看
|
||||
#SUBDIRS += examples/qqtclientexample
|
||||
#SUBDIRS += examples/qqtserverexample
|
||||
#通信协议的复杂的例子
|
||||
#SUBDIRS += examples/qqtnetworkexample
|
||||
|
||||
#udp 嵌入式linux,Qt编译了udp支持,默认是支持的
|
||||
#SUBDIRS += examples/qqtudpexample
|
||||
#lessThan(QT_VERSION , 5.8.0):SUBDIRS -= examples/qqtudpexample
|
||||
|
||||
#SUBDIRS += test/openglwidgettest
|
||||
#SUBDIRS += test/osdtest
|
||||
#SUBDIRS += test/inputtest
|
||||
#SUBDIRS += demo/SysInfoNotify
|
||||
#移除
|
||||
#SUBDIRS += demo/TouchMonitor
|
||||
#SUBDIRS += demo/TouchMonitorServer
|
||||
|
||||
#SUBDIRS += test/QQtWidgetClickHelperTest
|
||||
#SUBDIRS += test/QQtWidgetClickSoundHelperTest
|
||||
|
||||
#这是一对,用于测试Multi-link对其他的lib的链接能力
|
||||
SUBDIRS += test/QQtBasedLibTest
|
||||
SUBDIRS += test/QQtMultiLinkTest
|
||||
|
@ -94,6 +94,7 @@ github link: https://github.com/AbelTian/LibQQt
|
||||
========================================================================
|
||||
# 多链接发布技术
|
||||
|
||||
[Multiple Link Technology](multi-link.md)
|
||||
LibQQt为方便用户开发App过程方便的发布程序,所以添加了多链接和自动发布功能,基于qmake工程管理器的多链接发布技术。
|
||||
用户只需要做相应的目录设定,甚至包括自己的配置文件的目录设置,LibQQt提供的base manager就会自动将用户的程序,配置发布到指定位置,
|
||||
并且支持其他依赖的链接库。
|
||||
@ -112,7 +113,7 @@ LibQQt为方便用户开发App过程方便的发布程序,所以添加了多
|
||||
在Windows平台上,
|
||||
*把LibQQt/extra/touch.exe 复制到C:\Windows*
|
||||
*把LibQQt/extra/md5.exe 复制到C:\Windows*
|
||||
|
||||
|
||||
[走,去看看入门用法](usage.md)
|
||||
[入门了,去看看学习设置工程目录](project.md)
|
||||
发现了一个问题: [new issue link](https://gitee.com/drabel/LibQQt/issues/new?issue%5Bassignee_id%5D=0&issue%5Bmilestone_id%5D=0)
|
||||
@ -122,9 +123,6 @@ LibQQt为方便用户开发App过程方便的发布程序,所以添加了多
|
||||
# 依赖学习知识
|
||||
|
||||
[预习Git入门](usage-git.md)
|
||||
[去看看软件基础概念](software.md)
|
||||
[去看看Qt入门基础须知](usage-Qt.md)
|
||||
[去看看Qt Creator入门安装须知](usage-QtCreator.md)
|
||||
|
||||
|
||||
========================================================================
|
||||
|
@ -3,6 +3,23 @@
|
||||
#包含:link libqqt;deploy app;deploy config files;
|
||||
#App翻译 App版本 由App工程自行管理
|
||||
#------------------------------------------------------------------
|
||||
################################################################
|
||||
##app 的 config defination 先一步设置好
|
||||
################################################################
|
||||
contains(CONFIG, mac) {
|
||||
CONFIG += app_bundle
|
||||
}
|
||||
|
||||
################################################################
|
||||
##administrator policy
|
||||
##如果用户App需要管理员权限,那么打开这个CONFIG
|
||||
################################################################
|
||||
#CONFIG += administrator
|
||||
contains(CONFIG, administrator){
|
||||
win32 {
|
||||
QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
|
||||
}
|
||||
}
|
||||
|
||||
################################################################
|
||||
##build cache (此处为中间目标目录,对用户并不重要)
|
||||
@ -20,31 +37,26 @@ RCC_DIR = qrc
|
||||
#这样做保持了App工程和LibQQt工程目录的一致性,但是并不必要。
|
||||
DESTDIR = bin
|
||||
|
||||
################################################################
|
||||
##administrator policy
|
||||
##如果用户App需要管理员权限,那么打开这个CONFIG
|
||||
################################################################
|
||||
#CONFIG += administrator
|
||||
contains(CONFIG, administrator){
|
||||
win32 {
|
||||
QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
|
||||
}
|
||||
}
|
||||
|
||||
################################################################
|
||||
##Multi-link technology
|
||||
################################################################
|
||||
include($$PWD/app_multi_link_technology.pri)
|
||||
|
||||
################################################################
|
||||
##用户lib链接其他Library的函数库
|
||||
################################################################
|
||||
include ($${PWD}/app_multi_link_function.pri)
|
||||
|
||||
################################################################
|
||||
##link QQt
|
||||
################################################################
|
||||
include($${PWD}/app_link_qqt_library.pri)
|
||||
|
||||
|
||||
################################################################
|
||||
##deploy app for install update deploy
|
||||
##config defination
|
||||
##依赖:DESTDIR APP_DEPLOY_ROOT
|
||||
##依赖 APP_DEPLOY_ROOT DESTDIR(can set)
|
||||
################################################################
|
||||
#Qt4 is not a very good Cross Qt version, Qt5 suggest.
|
||||
#if you have this request, include this pri in your app pro
|
||||
@ -58,13 +70,6 @@ include($${PWD}/app_deploy.pri)
|
||||
#if you have this request, include this pri in your app pro
|
||||
include($${PWD}/app_deploy_config.pri)
|
||||
|
||||
################################################################
|
||||
##config defination
|
||||
################################################################
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
CONFIG += app_bundle
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
#install app
|
||||
#-------------------------------------------------
|
||||
@ -88,4 +93,7 @@ can_install: unix {
|
||||
#message ($${TARGET} config $${CONFIG})
|
||||
#message ($${TARGET} define $${DEFINES})
|
||||
|
||||
#message ($${TARGET} QMAKE_PRE_LINK $${QMAKE_PRE_LINK})
|
||||
#message ($${TARGET} QMAKE_POST_LINK $${QMAKE_POST_LINK})
|
||||
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#----------------------------------------------------------------
|
||||
#app_custom_manager.pri
|
||||
#这个文件用于给用户自定义管理内容,随意添加自己所需要的library、defines、config等等。
|
||||
#拷贝到用户app工程目录里使用用
|
||||
#----------------------------------------------------------------
|
||||
################################################################
|
||||
##link Other library
|
||||
|
@ -1,7 +1,9 @@
|
||||
#-------------------------------------------------------------
|
||||
#user computer path settings
|
||||
#-------------------------------------------------------------
|
||||
#windows: C:\Users\[userName]\AppData\Roaming\qmake\app_configure.pri
|
||||
#Multi-link技术 app_deploy部分只能应用于Qt5,Qt4没有windeployqt程序,如果用户为Qt4编译了windeployqt那么也可以用于Qt4。
|
||||
|
||||
#windows: C:\Users\[userName]\.qmake\app_configure.pri
|
||||
#linux: /home/[usrName]/.qmake/app_configure.pri
|
||||
#macOS: /Users/[userName]/.qmake/app_configure.pri
|
||||
|
||||
@ -10,9 +12,8 @@
|
||||
|
||||
defineReplace(deploy_app_on_mac) {
|
||||
#need QQT_BUILD_PWD
|
||||
command = &&
|
||||
command += $$MK_DIR $${APP_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$RM_DIR $${APP_DEPLOY_PWD}/$${TARGET}.app &&
|
||||
command += $$RM_DIR $${APP_DEPLOY_PWD}/$${TARGET}.app $$CMD_SEP
|
||||
command += $$COPY_DIR $${APP_DEST_DIR}/$${TARGET}.app $${APP_DEPLOY_PWD}/$${TARGET}.app
|
||||
#message($$command)
|
||||
return ($$command)
|
||||
@ -47,12 +48,12 @@ defineReplace(deploy_app_on_linux) {
|
||||
|
||||
command =
|
||||
command += $$MK_DIR $${APP_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$RM $${APP_DEPLOY_PWD}/libQQt.so* &&
|
||||
command += $$COPY_DIR $${QQT_BUILD_PWD}/libQQt.so.$${QQT_VERSION3} $${APP_DEPLOY_PWD} &&
|
||||
command += $$COPY_DIR $${QQT_BUILD_PWD}/libQQt.so.$${QQT_VERSION2} $${APP_DEPLOY_PWD} &&
|
||||
command += $$COPY_DIR $${QQT_BUILD_PWD}/libQQt.so.$${QQT_VERSION1} $${APP_DEPLOY_PWD} &&
|
||||
command += $$COPY_DIR $${QQT_BUILD_PWD}/libQQt.so $${APP_DEPLOY_PWD} &&
|
||||
command += $$RM $${APP_DEPLOY_PWD}/$${TARGET} &&
|
||||
command += $$RM $${APP_DEPLOY_PWD}/libQQt.so* $$CMD_SEP
|
||||
command += $$COPY_DIR $${QQT_BUILD_PWD}/libQQt.so.$${QQT_VERSION3} $${APP_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$COPY_DIR $${QQT_BUILD_PWD}/libQQt.so.$${QQT_VERSION2} $${APP_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$COPY_DIR $${QQT_BUILD_PWD}/libQQt.so.$${QQT_VERSION1} $${APP_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$COPY_DIR $${QQT_BUILD_PWD}/libQQt.so $${APP_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$RM $${APP_DEPLOY_PWD}/$${TARGET} $$CMD_SEP
|
||||
command += $$COPY $${APP_DEST_DIR}/$${TARGET} $${APP_DEPLOY_PWD}/$${TARGET}
|
||||
#message($$command)
|
||||
return ($$command)
|
||||
@ -63,9 +64,9 @@ defineReplace(deploy_app_on_android) {
|
||||
|
||||
command =
|
||||
command += $$MK_DIR $${APP_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$RM $${APP_DEPLOY_PWD}/libQQt.so* &&
|
||||
command += $$COPY_DIR $${QQT_BUILD_PWD}/libQQt.so $${APP_DEPLOY_PWD} &&
|
||||
command += $$RM $${APP_DEPLOY_PWD}/$${TARGET} &&
|
||||
command += $$RM $${APP_DEPLOY_PWD}/libQQt.so* $$CMD_SEP
|
||||
command += $$COPY_DIR $${QQT_BUILD_PWD}/libQQt.so $${APP_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$RM $${APP_DEPLOY_PWD}/$${TARGET} $$CMD_SEP
|
||||
command += $$COPY $${APP_DEST_DIR}/$${TARGET} $${APP_DEPLOY_PWD}/$${TARGET}
|
||||
#message($$command)
|
||||
return ($$command)
|
||||
@ -91,9 +92,9 @@ isEmpty(APP_DEST_DIR):APP_DEST_DIR=.
|
||||
isEmpty(APP_DEPLOY_ROOT){
|
||||
message($${TARGET} $${CONFIG_FILE})
|
||||
message(APP_DEPLOY_ROOT = /user/set/path is required, please modify .qmake/app_configure.pri )
|
||||
error( please check $$CONFIG_FILE under link_qqt_library.pri)
|
||||
error( please check $$CONFIG_FILE under app_multi_link_technology.pri)
|
||||
}
|
||||
message($${TARGET} deploy root: $$APP_DEPLOY_ROOT)
|
||||
message(Deploy $${TARGET} to $$APP_DEPLOY_ROOT/$${TARGET}/$$QKIT_STD_DIR)
|
||||
|
||||
#如果 配置文件里 没有配置 APP_DEPLOY_ROOT 那么返回,不拷贝发布任何应用
|
||||
#不会走到
|
||||
@ -115,7 +116,7 @@ contains(CONFIG, deploy_app) {
|
||||
QMAKE_POST_LINK += $$deploy_app_on_win()
|
||||
} else: contains(QKIT_PRIVATE, macOS) {
|
||||
#发布苹果版本,iOS版本也是这个?
|
||||
QMAKE_POST_LINK += $$deploy_app_on_mac()
|
||||
QMAKE_POST_LINK += $$CMD_SEP $$deploy_app_on_mac()
|
||||
} else: contains(QKIT_PRIVATE, ANDROID||ANDROIDX86) {
|
||||
#发布Android版本,这个分为开发Host为windows和类Unix两种情况。
|
||||
#Android下Qt Creator自动使用androidDeployQt,无法发布应用。
|
||||
|
@ -20,7 +20,6 @@ defineReplace(copy_config_on_mac) {
|
||||
isEmpty(1): error("copy_config_on_mac(dirs) requires one argument")
|
||||
|
||||
command =
|
||||
command += $$CMD_SEP
|
||||
command += $$COPY_DIR $${dirs} $${APP_DEST_DIR}/$${TARGET}.app/Contents/MacOS/ $$CMD_SEP
|
||||
command += $$COPY_DIR $${dirs} $${APP_DEPLOY_PWD}/$${TARGET}.app/Contents/MacOS/
|
||||
#message($$command)
|
||||
@ -34,7 +33,6 @@ defineReplace(copy_config) {
|
||||
!isEmpty(2): error("copy_config(dirs) requires one argument")
|
||||
isEmpty(1): error("copy_config(dirs) requires one argument")
|
||||
command =
|
||||
command += $$CMD_SEP
|
||||
command += $$COPY_DIR $${dirs} $${APP_DEST_DIR} $$CMD_SEP
|
||||
command += $$COPY_DIR $${dirs} $${APP_DEPLOY_PWD}
|
||||
#message($$command)
|
||||
@ -62,9 +60,9 @@ contains(CONFIG, app_copy_config) {
|
||||
APP_DEST_DIR=$${DESTDIR}
|
||||
isEmpty(APP_DEST_DIR):APP_DEST_DIR=.
|
||||
contains(QKIT_PRIVATE, WIN32||WIN64) {
|
||||
QMAKE_POST_LINK += $$copy_config("$${APP_CONFIG_PWD}\\*")
|
||||
QMAKE_POST_LINK += $$CMD_SEP $$copy_config("$${APP_CONFIG_PWD}\\*")
|
||||
} else: contains(QKIT_PRIVATE, macOS) {
|
||||
QMAKE_POST_LINK += $$copy_config_on_mac("$${APP_CONFIG_PWD}/*")
|
||||
QMAKE_POST_LINK += $$CMD_SEP $$copy_config_on_mac("$${APP_CONFIG_PWD}/*")
|
||||
} else: contains(QKIT_PRIVATE, ANDROID||ANDROIDX86) {
|
||||
#分为Host为Windows和类Unix两种情况。
|
||||
#Android下使用qrc,无法发布配置文件。
|
||||
@ -73,6 +71,6 @@ contains(CONFIG, app_copy_config) {
|
||||
}
|
||||
#QMAKE_POST_LINK += $$deploy_app_on_android()
|
||||
} else {
|
||||
QMAKE_POST_LINK += $$copy_config("$${APP_CONFIG_PWD}/*")
|
||||
QMAKE_POST_LINK += $$CMD_SEP $$copy_config("$${APP_CONFIG_PWD}/*")
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
#---------------------------------------------------------------------
|
||||
#应用程序语言翻译qmake文件。通过qmake与编译调用。
|
||||
#如果需要增加某国语言,修改这个文件即可。
|
||||
#拷贝到用户app工程目录里使用用
|
||||
#---------------------------------------------------------------------
|
||||
#$$APP_SOURCE_PWD on mac TRANSLATIONS error, why?
|
||||
APP_SOURCE_PWD=$${PWD}
|
||||
|
||||
TRANSLATIONS = $${PWD}/../AppRoot/lang/zh_CN.ts $${PWD}/../AppRoot/lang/en_US.ts
|
||||
TRANSLATIONS = $${PWD}/AppRoot/lang/zh_CN.ts $${PWD}/AppRoot/lang/en_US.ts
|
||||
|
||||
defineReplace(lupdate_language){
|
||||
command =
|
||||
command += $$CMD_SEP
|
||||
#only pro path
|
||||
command += $$get_lupdate_language($${PWD}/$${TARGET}.pro)
|
||||
return ($$command)
|
||||
@ -17,12 +17,14 @@ defineReplace(lupdate_language){
|
||||
|
||||
defineReplace(lrelease_language){
|
||||
command =
|
||||
command += $$CMD_SEP
|
||||
#only pro path
|
||||
command += $$get_lrelease_language($${PWD}/../AppRoot/lang, zh_CN) $$CMD_SEP
|
||||
command += $$get_lrelease_language($${PWD}/../AppRoot/lang, en_US)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
QMAKE_PRE_LINK += $$lupdate_language()
|
||||
QMAKE_PRE_LINK += $$lrelease_language()
|
||||
##########################################################################################
|
||||
##Work flow
|
||||
##########################################################################################
|
||||
QMAKE_PRE_LINK += $$CMD_SEP $$lupdate_language()
|
||||
QMAKE_PRE_LINK += $$CMD_SEP $$lrelease_language()
|
||||
|
@ -11,6 +11,8 @@
|
||||
#auto link QQt when build source
|
||||
#auto copy QQt when deploy app
|
||||
|
||||
#第一 拷贝Library为SDK到SDKROOT
|
||||
#第二 从SDK ROOT 链接 QQt Library
|
||||
#-------------------------------------------------------------
|
||||
#user computer path settings
|
||||
#-------------------------------------------------------------
|
||||
@ -26,6 +28,12 @@ QQT_SOURCE_ROOT = $${PWD}/../src
|
||||
#all cross platform setting is from here.
|
||||
include($${QQT_SOURCE_ROOT}/qqt_qkit.pri)
|
||||
|
||||
isEmpty(QKIT_PRIVATE) {
|
||||
message(env variable QKIT is required!)
|
||||
message(pleace check qqt_qkit.pri)
|
||||
error("error occured, please check build output panel.")
|
||||
}
|
||||
|
||||
#qqt function
|
||||
include($${QQT_SOURCE_ROOT}/qqt_function.pri)
|
||||
|
||||
@ -35,12 +43,6 @@ include($${QQT_SOURCE_ROOT}/qqt_version.pri)
|
||||
#qqt header
|
||||
include($${QQT_SOURCE_ROOT}/qqt_header.pri)
|
||||
|
||||
isEmpty(QKIT_PRIVATE) {
|
||||
message(env variable QKIT is required!)
|
||||
message(pleace check qqt_qkit.pri)
|
||||
error("error occured, please check build output panel.")
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------
|
||||
#link qqt settings: use source or link library?
|
||||
#-------------------------------------------------------------
|
||||
@ -55,7 +57,7 @@ contains (CONFIG, QQT_SOURCE_BUILDIN) {
|
||||
system("touch $${QQT_SOURCE_ROOT}/frame/qqtapplication.cpp")
|
||||
#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.
|
||||
include($${QQT_SOURCE_ROOT}/qqt_source.pri)
|
||||
#include($${QQT_SOURCE_ROOT}/qqt_source.pri)
|
||||
} else {
|
||||
#if you want to link QQt library
|
||||
#qqt will install sdk to sdk path you set, then link it, or link from build station
|
||||
|
148
app/app_multi_link_function.pri
Normal file
148
app/app_multi_link_function.pri
Normal file
@ -0,0 +1,148 @@
|
||||
#------------------------------------------------------------------------------------
|
||||
#app_multi_link_function.pri
|
||||
#App多链接技术函数库
|
||||
#用户app从这里调用关于app link的函数
|
||||
#------------------------------------------------------------------------------------
|
||||
################################################################################
|
||||
#app获取功能命令函数
|
||||
#一般不会拿出去用,除非你懂得LIBS+= INCLUDEPATH+= 语法
|
||||
################################################################################
|
||||
defineReplace(get_app_link) {
|
||||
libname = $$1
|
||||
isEmpty(1): error("get_app_link(libname) requires one argument")
|
||||
!isEmpty(2): error("get_app_link(libname) requires one argument")
|
||||
|
||||
CUR_LIB_PWD = $${QQT_SDK_ROOT}/$${libname}/$${QKIT_STD_DIR}/lib
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
CUR_LIB_PWD~=s,/,\\,g
|
||||
}
|
||||
|
||||
contains(DEFINES, __DARWIN__) {
|
||||
LINK += -F$${CUR_LIB_PWD}
|
||||
LINK += -framework $${libname}
|
||||
} else {
|
||||
LINK += -L$${CUR_LIB_PWD}
|
||||
#win can't with the blank! error: -l QQt
|
||||
LINK += -l$${libname}
|
||||
}
|
||||
return ($${LINK})
|
||||
}
|
||||
|
||||
defineReplace(get_app_include) {
|
||||
libname = $$1
|
||||
isEmpty(1): error("get_app_include(libname) requires one argument")
|
||||
!isEmpty(2): error("get_app_include(libname) requires one argument")
|
||||
|
||||
INCLUDE =
|
||||
contains(DEFINES, __DARWIN__) {
|
||||
CUR_INC_PWD = $${QQT_SDK_ROOT}/$${libname}/$${QKIT_STD_DIR}/$${libname}.framework/Headers
|
||||
INCLUDE += $${CUR_INC_PWD}
|
||||
} else {
|
||||
CUR_INC_PWD = $${QQT_SDK_ROOT}/$${libname}/$${QKIT_STD_DIR}/include
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
CUR_INC_PWD~=s,/,\\,g
|
||||
}
|
||||
|
||||
INCLUDE += $${CUR_INC_PWD}
|
||||
}
|
||||
|
||||
return ($${INCLUDE})
|
||||
}
|
||||
|
||||
defineReplace(get_app_add_link) {
|
||||
libname = $$1
|
||||
lib_real_name = $$2
|
||||
isEmpty(2): error("get_app_add_link(libname, lib_real_name) requires two argument")
|
||||
!isEmpty(3): error("get_app_add_link(libname, lib_real_name) requires two argument")
|
||||
|
||||
CUR_LIB_PWD = $${QQT_SDK_ROOT}/$${libname}/$${QKIT_STD_DIR}/lib
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
CUR_LIB_PWD~=s,/,\\,g
|
||||
}
|
||||
|
||||
contains(DEFINES, __DARWIN__) {
|
||||
LINK += -F$${CUR_LIB_PWD}
|
||||
LINK += -framework $${lib_real_name}
|
||||
} else {
|
||||
LINK += -L$${CUR_LIB_PWD}
|
||||
#win can't with the blank! error: -l QQt
|
||||
LINK += -l$${lib_real_name}
|
||||
}
|
||||
return ($${LINK})
|
||||
}
|
||||
|
||||
defineReplace(get_app_add_include) {
|
||||
libname = $$1
|
||||
lib_inc_name = $$2
|
||||
isEmpty(2): error("get_app_add_link(libname, lib_inc_name) requires two argument")
|
||||
!isEmpty(3): error("get_app_add_link(libname, lib_inc_name) requires two argument")
|
||||
|
||||
INCLUDE =
|
||||
contains(DEFINES, __DARWIN__) {
|
||||
CUR_INC_PWD = $${QQT_SDK_ROOT}/$${libname}/$${QKIT_STD_DIR}/$${lib_inc_name}.framework/Headers
|
||||
INCLUDE += $${CUR_INC_PWD}
|
||||
} else {
|
||||
CUR_INC_PWD = $${QQT_SDK_ROOT}/$${libname}/$${QKIT_STD_DIR}/include/$${lib_inc_name}
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
CUR_INC_PWD~=s,/,\\,g
|
||||
}
|
||||
|
||||
INCLUDE += $${CUR_INC_PWD}
|
||||
}
|
||||
|
||||
return ($${INCLUDE})
|
||||
}
|
||||
|
||||
################################################################################
|
||||
#app link 功能函数
|
||||
#app通过调用这些函数实现从SDK标准路径加载各种lib
|
||||
################################################################################
|
||||
#从QQT_SDK_ROOT按照标准路径QKIT_STD_DIR链接 [libname/5.9.2/macOS/Debug/lib/libname.framework]
|
||||
defineTest(app_link) {
|
||||
libname = $$1
|
||||
isEmpty(1): error("app_link(libname) requires one argument")
|
||||
!isEmpty(2): error("app_link(libname) requires one argument")
|
||||
command = $$get_app_link($${libname})
|
||||
#message ($$command)
|
||||
LIBS += $${command}
|
||||
return (1)
|
||||
}
|
||||
|
||||
|
||||
#从QQT_SDK_ROOT按照标准路径QKIT_STD_DIR包含 [libname/5.9.2/macOS/Debug/lib/libname.framework/Headers]
|
||||
defineTest(app_include) {
|
||||
libname = $$1
|
||||
isEmpty(1): error("app_include(libname) requires one argument")
|
||||
!isEmpty(2): error("app_include(libname) requires one argument")
|
||||
command = $$get_app_include($${libname})
|
||||
#message ($$command)
|
||||
INCLUDEPATH += $${command}
|
||||
return (1)
|
||||
}
|
||||
|
||||
#从QQT_SDK_ROOT按照Lib标准路径QKIT_STD_DIR链接Lib2 [libname/5.9.2/macOS/Debug/lib/librealname.framework]
|
||||
defineTest(app_add_link) {
|
||||
libname = $$1
|
||||
lib_real_name = $$1
|
||||
isEmpty(2): error("app_add_link(libname) requires two argument")
|
||||
!isEmpty(3): error("app_add_link(libname) requires two argument")
|
||||
|
||||
command = $$get_app_add_link($${libname}, $${lib_real_name})
|
||||
#message ($$command)
|
||||
LIBS += $${command}
|
||||
return (1)
|
||||
}
|
||||
|
||||
|
||||
#从QQT_SDK_ROOT按照Lib标准路径QKIT_STD_DIR包含sub_inc [libname/5.9.2/macOS/Debug/lib/libincname.framework/Headers]
|
||||
defineTest(app_add_include) {
|
||||
libname = $$1
|
||||
lib_inc_name = $$2
|
||||
isEmpty(2): error("app_add_include(libname, lib_inc_name) requires two argument")
|
||||
!isEmpty(3): error("app_add_include(libname, lib_inc_name) requires two argument")
|
||||
|
||||
command = $$get_app_add_include($${libname}, $${lib_inc_name})
|
||||
#message ($$command)
|
||||
INCLUDEPATH += $${command}
|
||||
return (1)
|
||||
}
|
@ -15,17 +15,59 @@
|
||||
#Mac OS X: /Users/xxx/.qmake/app_configure.pri
|
||||
#Ubuntu: /home/xxx/.qmake/app_configure.pri
|
||||
#公共路径:应用编译路径、LibrarySDK路径、产品输出路径
|
||||
#Multi-link技术只能应用于Qt5,Qt4没有windeployqt程序。
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
|
||||
#废弃
|
||||
#这个pri依赖qqt_function.pri
|
||||
#qqt_function.pri,哪里需要就在哪里包含。
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
include ($${PWD}\\..\\src\\qqt_function.pri)
|
||||
} else {
|
||||
include ($${PWD}/../src/qqt_function.pri)
|
||||
#equals(QMAKE_HOST.os, Windows) {
|
||||
# include ($${PWD}\\..\\src\\qqt_function.pri)
|
||||
#} else {
|
||||
# include ($${PWD}/../src/qqt_function.pri)
|
||||
#}
|
||||
|
||||
defineReplace(get_user_home) {
|
||||
command =
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
command = echo %HOMEDRIVE%%HOMEPATH%
|
||||
} else {
|
||||
command = echo $HOME
|
||||
}
|
||||
#message ($$command)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
defineReplace(get_user_config_path) {
|
||||
command =
|
||||
#windows下编译android工程,qmake CONFIG里面不包含win32而是android、linux、unix。
|
||||
#win32 只有在目标是win32的时候才会在CONFIG里面出现。开发平台用QMAKE_HOST.os
|
||||
#注意:qmake在windows平台下,无论目标,明令行一律按照windows控制台风格。不以目标区分,Attention!。
|
||||
#win32 {
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
command = echo %APPDATA%
|
||||
} else {
|
||||
command = echo $HOME
|
||||
}
|
||||
#message ($$command)
|
||||
return ($$command)
|
||||
}
|
||||
defineReplace(user_home) {
|
||||
command = $$get_user_home()
|
||||
echo = $$system("$${command}")
|
||||
#message($$command)
|
||||
#message($$echo)
|
||||
return ($${echo})
|
||||
}
|
||||
|
||||
defineReplace(user_config_path) {
|
||||
command = $$get_user_config_path()
|
||||
echo = $$system("$${command}")
|
||||
#message($$command)
|
||||
#message($$echo)
|
||||
return ($${echo})
|
||||
}
|
||||
|
||||
|
||||
CONFIG_PATH =
|
||||
CONFIG_FILE =
|
||||
|
||||
@ -63,4 +105,3 @@ isEmpty(QQT_BUILD_ROOT)|isEmpty(QQT_SDK_ROOT) {
|
||||
message(QQt build root: $$QQT_BUILD_ROOT)
|
||||
message(QQt sdk root: $$QQT_SDK_ROOT)
|
||||
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#################################################################
|
||||
##project $${TARGET} version pri
|
||||
#################################################################
|
||||
#拷贝到用户app工程目录里使用用
|
||||
|
||||
APP_MAJOR_VERSION = 0
|
||||
APP_MINOR_VERSION = 0
|
||||
|
@ -45,7 +45,7 @@ UI_DIR = obj/ui.h
|
||||
RCC_DIR = qrc
|
||||
DESTDIR = bin
|
||||
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#install app
|
||||
|
@ -36,4 +36,4 @@ FORMS += \
|
||||
#这句话很重要 启动拷贝很多东西
|
||||
system (touch main.cpp)
|
||||
|
||||
include (../../src/app_base_manager.pri)
|
||||
include (../../app/app_base_manager.pri)
|
||||
|
@ -47,4 +47,4 @@ equals(QMAKE_HOST.os, Windows) {
|
||||
|
||||
#促使编译源代码,qmake pri配置里面的QMAKE_XX_LINK命令就会执行。
|
||||
system("touch main.cpp")
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -47,4 +47,4 @@ equals(QMAKE_HOST.os, Windows) {
|
||||
|
||||
#促使编译源代码,qmake pri配置里面的QMAKE_XX_LINK命令就会执行。
|
||||
system("touch main.cpp")
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -41,5 +41,5 @@ contains(CONFIG, deploy_config) {
|
||||
APP_CONFIG_PWD ~=s,/,\\,g
|
||||
}
|
||||
}
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
include(app_version.pri)
|
||||
|
@ -47,7 +47,7 @@ system("touch main.cpp")
|
||||
msvc{
|
||||
include($${PWD}\\..\\..\\src\\app_base_manager.pri)
|
||||
}else{
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
}
|
||||
#-------------------------------------------------
|
||||
#install app
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -25,4 +25,4 @@ SOURCES += main.cpp
|
||||
system("touch main.cpp")
|
||||
#用户在console工程中,只要不使用LibQQt的图形Class,就可以在控制台程序中游刃有余的完成app功能了。
|
||||
#你用也没必要,而且不能用,控制台工程就是不能用widgets。不如在widgets工程当中隐藏窗口,然后在某个时机显示。
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -55,8 +55,8 @@ 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(../../src/app_base_manager.pri)
|
||||
#include(/Users/abel/Develop/a0-develop/LibQQt/src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
#include(/Users/abel/Develop/a0-develop/LibQQt/app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -43,7 +43,7 @@ equals(QMAKE_HOST.os, Windows) {
|
||||
|
||||
system(touch main.cpp)
|
||||
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
contains(QKIT_PRIVATE, ANDROID|ANDROIDX86) {
|
||||
CONFIG += mobility
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -40,7 +40,7 @@ DESTDIR = bin
|
||||
################################################################
|
||||
##link QQt
|
||||
################################################################
|
||||
include(../../src/link_qqt_library.pri)
|
||||
include(../../src/qqt_library.pri)
|
||||
|
||||
################################################################
|
||||
##link Other library
|
||||
|
@ -28,4 +28,4 @@ FORMS += \
|
||||
|
||||
system(touch main.cpp)
|
||||
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -64,7 +64,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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
contains (DEFINES, __BLUETOOTH__){
|
||||
SOURCES += \
|
||||
|
@ -45,4 +45,4 @@ 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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -50,4 +50,4 @@ MOBILITY =
|
||||
|
||||
#促使编译源代码,qmake pri配置里面的QMAKE_XX_LINK命令就会执行。
|
||||
system("touch main.cpp")
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
93
lib/lib_base_manager.pri
Normal file
93
lib/lib_base_manager.pri
Normal file
@ -0,0 +1,93 @@
|
||||
#------------------------------------------------------------------
|
||||
#工程组织管理器
|
||||
#包含:link libqqt;deploy lib;deploy lib config files;
|
||||
#Lib翻译 Lib版本 由Lib工程自行管理
|
||||
#用于帮助用户基于LibQQt编写Lib程序
|
||||
#------------------------------------------------------------------
|
||||
################################################################
|
||||
##lib 的 config defination 先一步设置好
|
||||
################################################################
|
||||
contains(CONFIG, mac) {
|
||||
CONFIG += lib_bundle
|
||||
}
|
||||
|
||||
################################################################
|
||||
##administrator policy
|
||||
##如果用户Lib需要管理员权限,那么打开这个CONFIG
|
||||
################################################################
|
||||
#CONFIG += administrator
|
||||
contains(CONFIG, administrator){
|
||||
win32 {
|
||||
QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
|
||||
}
|
||||
}
|
||||
|
||||
################################################################
|
||||
##build cache (此处为中间目标目录,对用户并不重要)
|
||||
##此处加以干涉,使目录清晰。
|
||||
##此处关于DESTDIR的设置,导致用户必须把这个文件的包含,提前到最前边的位置,才能进行App里的目录操作。
|
||||
##删除干涉?
|
||||
##用户注意:(done in lib_base_manager), 首先include(lib_link_qqt_library.pri),然后做lib的工作,和include其他pri,包括LibQQt提供的其他pri,保证这个顺序就不会出错了。
|
||||
##对编译目标目录进行干涉管理,显得更加细腻。
|
||||
##用户注意:这里相当于给编译中间目录加了一个自动校准,属于校正范畴。
|
||||
################################################################
|
||||
OBJECTS_DIR = obj
|
||||
MOC_DIR = obj/moc.cpp
|
||||
UI_DIR = obj/ui.h
|
||||
RCC_DIR = qrc
|
||||
#这样做保持了Lib工程和LibQQt工程目录的一致性,但是并不必要。
|
||||
DESTDIR = bin
|
||||
|
||||
################################################################
|
||||
##Multi-link technology
|
||||
################################################################
|
||||
include($$PWD/lib_multi_link_technology.pri)
|
||||
|
||||
################################################################
|
||||
##link QQt
|
||||
################################################################
|
||||
include($${PWD}/lib_link_qqt_library.pri)
|
||||
|
||||
################################################################
|
||||
##用户lib链接其他Library的函数库
|
||||
################################################################
|
||||
include ($$PWD/lib_multi_link_function.pri)
|
||||
|
||||
################################################################
|
||||
##deploy lib to sdk path
|
||||
##config defination
|
||||
##依赖 QQT_SDK_ROOT DESTDIR(can set)
|
||||
################################################################
|
||||
#Qt4 is not a very good Cross Qt version, Qt5 suggest.
|
||||
#if you have this request, include this pri in your app pro
|
||||
include($${PWD}/lib_deploy.pri)
|
||||
|
||||
################################################################
|
||||
##deploy lib config files to config path
|
||||
##config defination
|
||||
##in sdk path root/libname/xx/xx/xx/config 与include、lib目录平行
|
||||
#依赖 QQT_SDK_ROOT DESTDIR(can set)
|
||||
################################################################
|
||||
#if you have this request, include this pri in your app pro
|
||||
#include($${PWD}/lib_deploy_config.pri)
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
#install lib
|
||||
#-------------------------------------------------
|
||||
contains(QKIT_PRIVATE, EMBEDDED||MIPS32||ARM32) {
|
||||
target.path = /Application
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
##project environ print
|
||||
#-------------------------------------------------
|
||||
#default ignore
|
||||
message ($${TARGET} config $${CONFIG})
|
||||
message ($${TARGET} define $${DEFINES})
|
||||
|
||||
message ($${TARGET} QMAKE_PRE_LINK $${QMAKE_PRE_LINK})
|
||||
message ($${TARGET} QMAKE_POST_LINK $${QMAKE_POST_LINK})
|
||||
|
||||
|
9
lib/lib_custom_manager.pri
Normal file
9
lib/lib_custom_manager.pri
Normal file
@ -0,0 +1,9 @@
|
||||
#----------------------------------------------------------------
|
||||
#app_custom_manager.pri
|
||||
#这个文件用于给用户自定义管理内容,随意添加自己所需要的library、defines、config等等。
|
||||
#拷贝到用户app工程目录里使用用
|
||||
#----------------------------------------------------------------
|
||||
################################################################
|
||||
##link Other library
|
||||
################################################################
|
||||
#LIBS +=
|
109
lib/lib_deploy.pri
Normal file
109
lib/lib_deploy.pri
Normal file
@ -0,0 +1,109 @@
|
||||
#-------------------------------------------------------------
|
||||
#user computer path settings
|
||||
#-------------------------------------------------------------
|
||||
#windows: C:\Users\[userName]\.qmake\app_configure.pri
|
||||
#linux: /home/[usrName]/.qmake/app_configure.pri
|
||||
#macOS: /Users/[userName]/.qmake/app_configure.pri
|
||||
|
||||
#example(in /user/conf/path/.qmake/app_configure.pri)
|
||||
#QQT_SDK_ROOT = /where/lib/wants/to/deploy/lib/sdk/root
|
||||
|
||||
defineReplace(deploy_lib_on_mac) {
|
||||
#need QQT_BUILD_PWD
|
||||
command += $$MK_DIR $${LIB_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$RM_DIR $${LIB_DEPLOY_PWD}/$${TARGET}.framework $$CMD_SEP
|
||||
command += $$COPY_DIR $${LIB_DEST_DIR}/$${TARGET}.framework $${LIB_DEPLOY_PWD}/$${TARGET}.framework
|
||||
#message($$command)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
defineReplace(deploy_lib_on_win) {
|
||||
#need QQT_BUILD_PWD
|
||||
command =
|
||||
command += $$MK_DIR $${LIB_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$RM $${LIB_DEPLOY_PWD}\\$${TARGET}.* $$CMD_SEP
|
||||
command += $$COPY_DIR $${LIB_DEST_DIR}\\$${TARGET}.* $${LIB_DEPLOY_PWD}\\ $$CMD_SEP
|
||||
#message($$command)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
defineReplace(deploy_lib_on_linux) {
|
||||
#need QQT_BUILD_PWD
|
||||
|
||||
command =
|
||||
command += $$MK_DIR $${LIB_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$RM $${LIB_DEPLOY_PWD}/$${TARGET}.* $$CMD_SEP
|
||||
command += $$COPY_DIR $${LIB_DEST_DIR}/$${TARGET}.* $${LIB_DEPLOY_PWD}/
|
||||
#message($$command)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
defineReplace(deploy_lib_on_android) {
|
||||
#need QQT_BUILD_PWD
|
||||
|
||||
command =
|
||||
command += $$MK_DIR $${LIB_DEPLOY_PWD} $$CMD_SEP
|
||||
command += $$RM $${LIB_DEPLOY_PWD}/$${TARGET}.* $$CMD_SEP
|
||||
command += $$COPY_DIR $${LIB_DEST_DIR}/$${TARGET}.* $${LIB_DEPLOY_PWD}/
|
||||
#message($$command)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
##-------------------------------------------------
|
||||
##work flow
|
||||
##-------------------------------------------------
|
||||
#set app deploy pwd
|
||||
#LIB_DEPLOY_PWD is here.
|
||||
LIB_DEPLOY_PWD = $${QQT_SDK_ROOT}/$${TARGET}/$${QKIT_STD_DIR}
|
||||
#不仅仅发布目标为Windows的时候,才需要改变路径
|
||||
#开发机为Windows就必须改变。
|
||||
#contains(QKIT_PRIVATE, WIN32||WIN64) {
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
LIB_DEPLOY_PWD~=s,/,\\,g
|
||||
}
|
||||
|
||||
LIB_DEST_DIR=$${DESTDIR}
|
||||
isEmpty(LIB_DEST_DIR):LIB_DEST_DIR=.
|
||||
|
||||
#deploy root
|
||||
isEmpty(QQT_SDK_ROOT){
|
||||
message($${TARGET} $${CONFIG_FILE})
|
||||
message(QQT_SDK_ROOT = /user/set/path is required, please modify user/config/path/.qmake/app_configure.pri )
|
||||
error(please check $$CONFIG_FILE under lib_multi_link_technology.pri)
|
||||
}
|
||||
message($${TARGET} sdk root: $$QQT_SDK_ROOT/$${TARGET}/$$QKIT_STD_DIR)
|
||||
|
||||
#如果 配置文件里 没有配置 QQT_SDK_ROOT 那么返回,不拷贝发布任何应用
|
||||
#不会走到
|
||||
isEmpty(QQT_SDK_ROOT) {
|
||||
message("$${TARGET} hasn't deploied any lib files")
|
||||
greaterThan(QT_MAJOR_VERSION, 5):return()
|
||||
}
|
||||
|
||||
##4.8 qmake arm32 return() 函数无效
|
||||
!isEmpty(QQT_SDK_ROOT) {
|
||||
CONFIG += deploy_lib
|
||||
message("$${TARGET} has deploied some lib files")
|
||||
}
|
||||
|
||||
|
||||
contains(CONFIG, deploy_lib) {
|
||||
contains(QKIT_PRIVATE, WIN32||WIN64) {
|
||||
#发布windows版本
|
||||
QMAKE_POST_LINK += $$deploy_lib_on_win()
|
||||
} else: contains(QKIT_PRIVATE, macOS) {
|
||||
#发布苹果版本,iOS版本也是这个?
|
||||
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += $$CMD_SEP
|
||||
QMAKE_POST_LINK += $$deploy_lib_on_mac()
|
||||
} else: contains(QKIT_PRIVATE, ANDROID||ANDROIDX86) {
|
||||
#发布Android版本,这个分为开发Host为windows和类Unix两种情况。
|
||||
#Android下Qt Creator自动使用androidDeployQt,无法发布应用。
|
||||
equals(QMAKE_HOST.os, Windows){
|
||||
#
|
||||
} else { }
|
||||
#QMAKE_POST_LINK += $$deploy_lib_on_android()
|
||||
} else {
|
||||
#发布linux、e-linux,这个是一样的。
|
||||
QMAKE_POST_LINK += $$deploy_lib_on_linux()
|
||||
}
|
||||
}
|
76
lib/lib_deploy_config.pri
Normal file
76
lib/lib_deploy_config.pri
Normal file
@ -0,0 +1,76 @@
|
||||
#---------------------------------------------------------------------
|
||||
#app_deploy_config.pri
|
||||
#用于发布app的配置文件。
|
||||
#
|
||||
#应用程序配置文件拷贝qmake文件。通过qmake与编译调用。
|
||||
#如果需要修改拷贝到发布目录里的配置文件,修改配置PWD下的文件,即可引起编译PWD和发布PWD配置文件的改变。
|
||||
#这个pri会拷贝配置PWD下的所有文件、文件夹到编译PWD和发布PWD下。
|
||||
#依赖 APP_CONFIG_PWD(in app pro) APP_DEPLOY_PWD(in app deploy)
|
||||
#---------------------------------------------------------------------
|
||||
#example(in app's pro file)
|
||||
#APP_CONFIG_PWD = $${PWD}/../AppRoot
|
||||
#equals(QMAKE_HOST.os, Windows) {
|
||||
# APP_CONFIG_PWD ~=s,/,\\,g
|
||||
#}
|
||||
|
||||
defineReplace(copy_config_on_mac) {
|
||||
#need QQT_BUILD_PWD
|
||||
dirs = $$1
|
||||
!isEmpty(2): error("copy_config_on_mac(dirs) requires one argument")
|
||||
isEmpty(1): error("copy_config_on_mac(dirs) requires one argument")
|
||||
|
||||
command =
|
||||
command += $$COPY_DIR $${dirs} $${APP_DEST_DIR}/$${TARGET}.app/Contents/MacOS/ $$CMD_SEP
|
||||
command += $$COPY_DIR $${dirs} $${APP_DEPLOY_PWD}/$${TARGET}.app/Contents/MacOS/
|
||||
#message($$command)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
|
||||
defineReplace(copy_config) {
|
||||
#need QQT_BUILD_PWD
|
||||
dirs = $$1
|
||||
!isEmpty(2): error("copy_config(dirs) requires one argument")
|
||||
isEmpty(1): error("copy_config(dirs) requires one argument")
|
||||
command =
|
||||
command += $$COPY_DIR $${dirs} $${APP_DEST_DIR} $$CMD_SEP
|
||||
command += $$COPY_DIR $${dirs} $${APP_DEPLOY_PWD}
|
||||
#message($$command)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
##-------------------------------------------------
|
||||
##work flow
|
||||
##-------------------------------------------------
|
||||
#如果 TARGET 没有配置 APP_CONFIG_PWD 那么返回,不拷贝任何配置
|
||||
#qmake 或逻辑为 | 或者 ||
|
||||
isEmpty(APP_CONFIG_PWD)|isEmpty(APP_DEPLOY_PWD) {
|
||||
message("$${TARGET} hasn't deploied any config files")
|
||||
greaterThan(QT_MAJOR_VERSION, 5):return()
|
||||
}
|
||||
|
||||
##4.8 qmake arm32 return() 函数无效
|
||||
##qmake 与逻辑为 :
|
||||
!isEmpty(APP_CONFIG_PWD):!isEmpty(APP_DEPLOY_PWD) {
|
||||
CONFIG += app_copy_config
|
||||
message("$${TARGET} has deploied some config files")
|
||||
}
|
||||
|
||||
contains(CONFIG, app_copy_config) {
|
||||
APP_DEST_DIR=$${DESTDIR}
|
||||
isEmpty(APP_DEST_DIR):APP_DEST_DIR=.
|
||||
contains(QKIT_PRIVATE, WIN32||WIN64) {
|
||||
QMAKE_POST_LINK += $$CMD_SEP $$copy_config("$${APP_CONFIG_PWD}\\*")
|
||||
} else: contains(QKIT_PRIVATE, macOS) {
|
||||
QMAKE_POST_LINK += $$CMD_SEP $$copy_config_on_mac("$${APP_CONFIG_PWD}/*")
|
||||
} else: contains(QKIT_PRIVATE, ANDROID||ANDROIDX86) {
|
||||
#分为Host为Windows和类Unix两种情况。
|
||||
#Android下使用qrc,无法发布配置文件。
|
||||
equals(QMAKE_HOST.os, Windows){
|
||||
} else {
|
||||
}
|
||||
#QMAKE_POST_LINK += $$deploy_app_on_android()
|
||||
} else {
|
||||
QMAKE_POST_LINK += $$CMD_SEP $$copy_config("$${APP_CONFIG_PWD}/*")
|
||||
}
|
||||
}
|
29
lib/lib_language.pri
Normal file
29
lib/lib_language.pri
Normal file
@ -0,0 +1,29 @@
|
||||
#---------------------------------------------------------------------
|
||||
#应用程序语言翻译qmake文件。通过qmake与编译调用。
|
||||
#如果需要增加某国语言,修改这个文件即可。
|
||||
#拷贝到用户app工程目录里使用用
|
||||
#---------------------------------------------------------------------
|
||||
#$$APP_SOURCE_PWD on mac TRANSLATIONS error, why?
|
||||
APP_SOURCE_PWD=$${PWD}
|
||||
|
||||
TRANSLATIONS = $${PWD}/../AppRoot/lang/zh_CN.ts $${PWD}/../AppRoot/lang/en_US.ts
|
||||
|
||||
defineReplace(lupdate_language){
|
||||
command =
|
||||
command += $$CMD_SEP
|
||||
#only pro path
|
||||
command += $$get_lupdate_language($${PWD}/$${TARGET}.pro)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
defineReplace(lrelease_language){
|
||||
command =
|
||||
command += $$CMD_SEP
|
||||
#only pro path
|
||||
command += $$get_lrelease_language($${PWD}/../AppRoot/lang, zh_CN) $$CMD_SEP
|
||||
command += $$get_lrelease_language($${PWD}/../AppRoot/lang, en_US)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
QMAKE_PRE_LINK += $$lupdate_language()
|
||||
QMAKE_PRE_LINK += $$lrelease_language()
|
113
lib/lib_link_qqt_library.pri
Normal file
113
lib/lib_link_qqt_library.pri
Normal file
@ -0,0 +1,113 @@
|
||||
################################################################
|
||||
##link QQt
|
||||
################################################################
|
||||
#here is all your app common defination and configration
|
||||
#you can modify this pri to link qqt_library
|
||||
#only link QQt, this pri file.
|
||||
|
||||
#this link need Qt Creator set default build directory, replace
|
||||
#%{JS: Util.asciify("/your/local/path/to/build/root/%{CurrentProject:Name}/%{Qt:Version}/%{CurrentKit:FileSystemName}/%{CurrentBuild:Name}")}
|
||||
|
||||
#auto link QQt when build source
|
||||
#auto copy QQt when deploy app
|
||||
|
||||
#-------------------------------------------------------------
|
||||
#user computer path settings
|
||||
#-------------------------------------------------------------
|
||||
#same app project, same relative path.
|
||||
#qqt source root, QQt's root pro path. subdir and
|
||||
#private using
|
||||
QQT_SOURCE_ROOT = $${PWD}/../src
|
||||
|
||||
#-------------------------------------------------------------
|
||||
#include qqt's pri
|
||||
#-------------------------------------------------------------
|
||||
#qqt qkit
|
||||
#all cross platform setting is from here.
|
||||
include($${QQT_SOURCE_ROOT}/qqt_qkit.pri)
|
||||
|
||||
#qqt function
|
||||
include($${QQT_SOURCE_ROOT}/qqt_function.pri)
|
||||
|
||||
#qqt version
|
||||
include($${QQT_SOURCE_ROOT}/qqt_version.pri)
|
||||
|
||||
#qqt header
|
||||
include($${QQT_SOURCE_ROOT}/qqt_header.pri)
|
||||
|
||||
isEmpty(QKIT_PRIVATE) {
|
||||
message(env variable QKIT is required!)
|
||||
message(pleace check qqt_qkit.pri)
|
||||
error("error occured, please check build output panel.")
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------
|
||||
#link qqt settings: use source or link library?
|
||||
#-------------------------------------------------------------
|
||||
#if you want to build qqt source open this annotation
|
||||
#CONFIG += QQT_SOURCE_BUILDIN
|
||||
contains (CONFIG, QQT_SOURCE_BUILDIN) {
|
||||
#notice: msvc, DLL_IMPORT macro is no problem to use in app + lib source? 静态成员的定义无法编译通过,dllimport在app里不允许实现静态成员变量。
|
||||
#so, here ,force static, QQt的静态编译,dllexport一律定义为空,引用的时候也是空,所以肯定能过。
|
||||
#ignore
|
||||
#nouse. 报告找不到import的符号,几个静态过来的重复定义。如果定义这个宏,必须所有源文件都被覆盖。现在忽略这个功能。
|
||||
DEFINES += QQT_STATIC_LIBRARY
|
||||
system("touch $${QQT_SOURCE_ROOT}/frame/qqtapplication.cpp")
|
||||
#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.
|
||||
include($${QQT_SOURCE_ROOT}/qqt_source.pri)
|
||||
} else {
|
||||
#if you want to link QQt library
|
||||
#qqt will install sdk to sdk path you set, then link it, or link from build station
|
||||
#qqt also can install sdk to qt library path, then to do that.
|
||||
#need QQT_BUILD_ROOT
|
||||
#need QKIT_PRIVATE from qqt_qkit.pri
|
||||
|
||||
#you can open one or more macro to make sdk or link from build.
|
||||
#link from sdk is default setting
|
||||
CONFIG += link_from_sdk
|
||||
#CONFIG += link_from_build
|
||||
#CONFIG += link_from_qt_lib_path
|
||||
|
||||
#especially some occations need some sure macro.
|
||||
contains(QKIT_PRIVATE, iOS|iOSSimulator) {
|
||||
#mac ios .framework .a 里面的快捷方式必须使用里面的相对路径,不能使用绝对路径
|
||||
#但是qtcreator生成framework的时候用了绝对路径,所以导致拷贝后链接失败,库不可用。
|
||||
#qqt_install.pri 里面解决了framework的拷贝问题,但是对于ios里.a的没做,而.a被拷贝了竟然也不能用!
|
||||
#在build的地方link就可以了
|
||||
CONFIG += link_from_build
|
||||
}
|
||||
contains(CONFIG, link_from_build) {
|
||||
#include from source header, default is this, and set in header pri
|
||||
#...
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------
|
||||
#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.
|
||||
#起初,qmake步骤被安置在QQt里,所以只有更改源代码才能启动POSTLINK.现在放置在App里了,这里的touch修改源代码不需要了.
|
||||
#App修改源代码,Creator会自动qmake,启动qmake步骤PRILINK+POSTLINK
|
||||
#App修改pro,必须手动qmake,Creator才会qmake,启动qmake步骤PRILINK+POSTLINK
|
||||
#App必须注意,此处不再持续编译QQt.
|
||||
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)
|
||||
}
|
||||
|
||||
|
5
lib/lib_multi_link_function.pri
Normal file
5
lib/lib_multi_link_function.pri
Normal file
@ -0,0 +1,5 @@
|
||||
#------------------------------------------------------------------------------------
|
||||
#lib_multi_link_function.pri
|
||||
#lib多链接技术函数库
|
||||
#用户lib从这里调用关于lib引用的函数
|
||||
#------------------------------------------------------------------------------------
|
108
lib/lib_multi_link_technology.pri
Normal file
108
lib/lib_multi_link_technology.pri
Normal file
@ -0,0 +1,108 @@
|
||||
#--------------------------------------------------------------------------------
|
||||
#lib_multi_link_technology.pri
|
||||
|
||||
##Multi-link technology (Multi Link technology)
|
||||
##Multi-link 技术,支持多链接库增删的一门工程管理技术。
|
||||
|
||||
#default sdk root is qqt-source/..
|
||||
#user can modify this path in user_config_path()/app_configure.pri, then it will be included here.
|
||||
#at qqt_library.pri, create_qqt_sdk and link_from_sdk will need this.
|
||||
#this is different in every operating system
|
||||
#qqt_library.pri need this configure
|
||||
|
||||
#这个文件用来加载用户电脑上的应用程序公共环境
|
||||
#Windows: C:\\Users\\xxx\\.qmake\\app_configure.pri
|
||||
#Mac OS X: /Users/xxx/.qmake/app_configure.pri
|
||||
#Ubuntu: /home/xxx/.qmake/app_configure.pri
|
||||
#公共路径:应用编译路径、LibrarySDK路径、产品输出路径
|
||||
#Multi-link技术只能应用于Qt5,Qt4没有windeployqt程序。
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
|
||||
#废弃
|
||||
#这个pri依赖qqt_function.pri
|
||||
#qqt_function.pri,哪里需要就在哪里包含。
|
||||
#equals(QMAKE_HOST.os, Windows) {
|
||||
# include ($${PWD}\\..\\src\\qqt_function.pri)
|
||||
#} else {
|
||||
# include ($${PWD}/../src/qqt_function.pri)
|
||||
#}
|
||||
|
||||
defineReplace(get_user_home) {
|
||||
command =
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
command = echo %HOMEDRIVE%%HOMEPATH%
|
||||
} else {
|
||||
command = echo $HOME
|
||||
}
|
||||
#message ($$command)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
defineReplace(get_user_config_path) {
|
||||
command =
|
||||
#windows下编译android工程,qmake CONFIG里面不包含win32而是android、linux、unix。
|
||||
#win32 只有在目标是win32的时候才会在CONFIG里面出现。开发平台用QMAKE_HOST.os
|
||||
#注意:qmake在windows平台下,无论目标,明令行一律按照windows控制台风格。不以目标区分,Attention!。
|
||||
#win32 {
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
command = echo %APPDATA%
|
||||
} else {
|
||||
command = echo $HOME
|
||||
}
|
||||
#message ($$command)
|
||||
return ($$command)
|
||||
}
|
||||
defineReplace(user_home) {
|
||||
command = $$get_user_home()
|
||||
echo = $$system("$${command}")
|
||||
#message($$command)
|
||||
#message($$echo)
|
||||
return ($${echo})
|
||||
}
|
||||
|
||||
defineReplace(user_config_path) {
|
||||
command = $$get_user_config_path()
|
||||
echo = $$system("$${command}")
|
||||
#message($$command)
|
||||
#message($$echo)
|
||||
return ($${echo})
|
||||
}
|
||||
|
||||
|
||||
CONFIG_PATH =
|
||||
CONFIG_FILE =
|
||||
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
#>=v2.4
|
||||
CONFIG_PATH = $$user_home()\\.qmake
|
||||
#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
|
||||
}
|
||||
|
||||
!exists($${CONFIG_FILE}) {
|
||||
mkdir("$${CONFIG_PATH}")
|
||||
empty_file($${CONFIG_FILE})
|
||||
ret = $$system(echo QQT_SDK_ROOT = > $${CONFIG_FILE})
|
||||
ret = $$system(echo QQT_BUILD_ROOT = >> $${CONFIG_FILE})
|
||||
ret = $$system(echo APP_DEPLOY_ROOT = >> $${CONFIG_FILE})
|
||||
}
|
||||
|
||||
#your must config this file! following readme!
|
||||
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} multipal link config file: $${CONFIG_FILE})
|
||||
message("QQT_BUILD_ROOT = is required, please modify $${CONFIG_FILE}")
|
||||
message("QQT_SDK_ROOT = is required")
|
||||
message("APP_DEPLOY_ROOT = is required [optional]")
|
||||
message("[linux platform, ]this pri is under app_multi_link_config.pri")
|
||||
error("please check $$CONFIG_FILE")
|
||||
}
|
||||
message(QQt build root: $$QQT_BUILD_ROOT)
|
||||
message(QQt sdk root: $$QQT_SDK_ROOT)
|
15
lib/lib_version.pri
Normal file
15
lib/lib_version.pri
Normal file
@ -0,0 +1,15 @@
|
||||
#################################################################
|
||||
##project $${TARGET} version pri
|
||||
#################################################################
|
||||
#拷贝到用户app工程目录里使用用
|
||||
|
||||
APP_MAJOR_VERSION = 0
|
||||
APP_MINOR_VERSION = 0
|
||||
APP_PATCH_VERSION = 0
|
||||
APP_BUILD_VERSION = 0
|
||||
|
||||
APP_VERSION = $${APP_MAJOR_VERSION}.$${APP_MINOR_VERSION}.$${APP_PATCH_VERSION}
|
||||
APP_VERSION4 = $${APP_MAJOR_VERSION}.$${APP_MINOR_VERSION}.$${APP_PATCH_VERSION}.$${APP_BUILD_VERSION}
|
||||
DEFINES += APP_VERSION=$${APP_VERSION}
|
||||
message (Build $${TARGET} version: $$APP_VERSION4)
|
||||
unix:VERSION = $${APP_VERSION}
|
@ -24,7 +24,7 @@
|
||||
|
||||
8. qqt_library.pri qqt的sdk发布工作,app链接QQt工作,要求用户进行BUILD-SDK-DEPLOY ROOT路径指定也发生在这里。它会自动生成一个pri,给用户指定这三个变量。
|
||||
|
||||
9. link_qqt_library.pri 包含以上这几个app需要的pri,这个文件现在只能放在library目录里。
|
||||
9. qqt_library.pri 包含以上这几个app需要的pri,这个文件现在只能放在library目录里。
|
||||
|
||||
10. app_configure.pri app配置文件,这个一般是公共配置文件,里面包含了link_qqt_library.pri。更改意义不大,将来可能会被生成,而不是开始就存在。
|
||||
|
22
src/qqt.pro
22
src/qqt.pro
@ -56,7 +56,7 @@ isEmpty(QKIT_PRIVATE) {
|
||||
##project function
|
||||
##support some commonly used function
|
||||
################################################
|
||||
include ($$PWD/qqt_function.pri)
|
||||
#include ($$PWD/qqt_function.pri)
|
||||
|
||||
|
||||
##win platform: some target, special lib lib_bundle staticlib
|
||||
@ -136,7 +136,7 @@ QMAKE_TARGET_FILE = "$${TARGET}"
|
||||
QMAKE_TARGET_PRODUCT = "$${TARGET}"
|
||||
QMAKE_TARGET_COMPANY = "www.qqt.com"
|
||||
QMAKE_TARGET_DESCRIPTION = "QQt Foundation Class"
|
||||
QMAKE_TARGET_COPYRIGHT = "Copyright 2015-2020 QQt Co., Ltd. All rights reserved"
|
||||
QMAKE_TARGET_COPYRIGHT = "Copyright 2017-2022 QQt Co., Ltd. All rights reserved"
|
||||
|
||||
win32 {
|
||||
#common to use upload, this can be ignored.
|
||||
@ -152,14 +152,15 @@ win32 {
|
||||
################################################
|
||||
##project resource
|
||||
################################################
|
||||
DISTFILES += \
|
||||
qqt.qrc \
|
||||
linux_cp_files.sh \
|
||||
linux_cur_path.sh \
|
||||
linux_cd_path.sh \
|
||||
linux_read_ini.sh \
|
||||
linux_write_ini.sh \
|
||||
win_read_ini.bat
|
||||
#DISTFILES += \
|
||||
# linux_cp_files.sh \
|
||||
# linux_cur_path.sh \
|
||||
# linux_cd_path.sh \
|
||||
# linux_read_ini.sh \
|
||||
# linux_write_ini.sh \
|
||||
# win_read_ini.bat
|
||||
RESOURCES += \
|
||||
qqt.qrc
|
||||
|
||||
#################################################################
|
||||
##QQt Lib工程持续编译
|
||||
@ -169,6 +170,7 @@ DISTFILES += \
|
||||
#权衡利弊,在qqt工程里开启开关.保证用户在编译源代码的时候,任何改动一定持续生效.
|
||||
#依赖touch命令 :|
|
||||
#QQt持续编译配置开关
|
||||
#QQt用户请注意,在这里我开启了持续编译,以保证用户对QQt本身的修改生效
|
||||
CONFIG += continued_build
|
||||
contains(CONFIG, continued_build){
|
||||
system("touch $${PWD}/frame/qqtapplication.cpp")
|
||||
|
@ -175,32 +175,6 @@ defineReplace(get_md5_command) {
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
defineReplace(get_user_home) {
|
||||
command =
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
command = echo %HOMEDRIVE%%HOMEPATH%
|
||||
} else {
|
||||
command = echo $HOME
|
||||
}
|
||||
#message ($$command)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
defineReplace(get_user_config_path) {
|
||||
command =
|
||||
#windows下编译android工程,qmake CONFIG里面不包含win32而是android、linux、unix。
|
||||
#win32 只有在目标是win32的时候才会在CONFIG里面出现。开发平台用QMAKE_HOST.os
|
||||
#注意:qmake在windows平台下,无论目标,明令行一律按照windows控制台风格。不以目标区分,Attention!。
|
||||
#win32 {
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
command = echo %APPDATA%
|
||||
} else {
|
||||
command = echo $HOME
|
||||
}
|
||||
#message ($$command)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
#将路径里的[反]斜杠转换为开发机上的格式。
|
||||
#注意:不是按照目标进行转换的,所以仅仅用于命令行操作的FLOW。
|
||||
#defineReplace(get_path) {
|
||||
@ -360,18 +334,3 @@ defineReplace(write_ini) {
|
||||
return ($${echo})
|
||||
}
|
||||
|
||||
defineReplace(user_home) {
|
||||
command = $$get_user_home()
|
||||
echo = $$system("$${command}")
|
||||
#message($$command)
|
||||
#message($$echo)
|
||||
return ($${echo})
|
||||
}
|
||||
|
||||
defineReplace(user_config_path) {
|
||||
command = $$get_user_config_path()
|
||||
echo = $$system("$${command}")
|
||||
#message($$command)
|
||||
#message($$echo)
|
||||
return ($${echo})
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
##qqt_install.pri, making sdk function
|
||||
##install to Qt library
|
||||
##install to SDK path
|
||||
##把QQt Library按照SDK格式安装到SDKROOT
|
||||
##发布到sdk是为Multi link准备的。
|
||||
##link from build
|
||||
##please don't modify this pri
|
||||
##need qqt_version.pri qqt_header.pri qqt_source.pri
|
||||
@ -21,7 +23,7 @@ defineReplace(create_dir_struct) {
|
||||
}
|
||||
command += $$MK_DIR $$QQT_LIB_DIR $$CMD_SEP
|
||||
command += $$MK_DIR $$QQT_CMAKE_DIR $$CMD_SEP
|
||||
command += $$MK_DIR $$QQT_PRI_PATH $$CMD_SEP
|
||||
command += $$MK_DIR $$QQT_PRI_PATH
|
||||
}
|
||||
return ($$command)
|
||||
}
|
||||
@ -143,7 +145,7 @@ defineReplace(create_library_sdk){
|
||||
command += $$RM_DIR $${QQT_SDK_PWD} $$CMD_SEP
|
||||
command += $$MK_DIR $${QQT_SDK_PWD} $$CMD_SEP
|
||||
command += $$CD $${QQT_SDK_PWD} $$CMD_SEP
|
||||
command += $$create_dir_struct()
|
||||
command += $$create_dir_struct() $$CMD_SEP
|
||||
|
||||
#这里不是目标为Windows才拷贝,而是开发机是Windows就得这么拷贝。
|
||||
#Windows下,Win目标、Android目标都走这里。
|
||||
|
@ -2,10 +2,12 @@
|
||||
##qqt_library.pri, linking workflow
|
||||
##QQt based app please include this pri to link qqt library
|
||||
##dependence qqt_version.pri qqt_header.pri
|
||||
##从SDK ROOT链接QQt Library
|
||||
##don't modify this pri file, if you catch any issure, please make issure
|
||||
##https://gitee.com/drabel/LibQt/issues/new?issue%5Bassignee_id%5D=0&issue%5Bmilestone_id%5D=0
|
||||
##2017年10月29日08:54:28
|
||||
################################################
|
||||
|
||||
################################################
|
||||
##link QQt logic function
|
||||
################################################
|
||||
@ -21,12 +23,71 @@ defineReplace(link_qqt_library) {
|
||||
return ($${LINK})
|
||||
}
|
||||
|
||||
#在Mac上,运行前必须拷贝依赖,是个deploy过程。
|
||||
#在Mac上,Creator运行app前必须拷贝依赖,是个deploy过程。
|
||||
#Mac不用于其他操作系统,对于bundle,任何运行时刻都需要拷贝依赖,包括build完成后。
|
||||
defineReplace(deploy_qqt_to_mac) {
|
||||
#build path里的app bundle和deploy root里的app bundle要运行都必须拷贝好QQt,这是macOS特有的。
|
||||
#这个函数可以修正任何位置的app bundle
|
||||
#在链接QQt的时候,也就是这里 修正app bundle有利于统一app deploy过程。app_deploy没有做这个工作,和其他平台相近似。
|
||||
defineReplace(deploy_qqt_to_app_deploy_path_on_mac) {
|
||||
#need QQT_BUILD_PWD
|
||||
deploy_path = $$1
|
||||
isEmpty(1): error("deploy_qqt_to_mac(deploy_path) requires one argument")
|
||||
isEmpty(1): error("deploy_qqt_to_app_deploy_path_on_mac(deploy_path) requires one argument")
|
||||
create_command = $$create_mac_sdk()
|
||||
APP_DEST_DIR=$${deploy_path}
|
||||
isEmpty(APP_DEST_DIR):APP_DEST_DIR=.
|
||||
command =
|
||||
command += chmod +x $${PWD}/linux_cur_path.sh &&
|
||||
command += . $${PWD}/linux_cur_path.sh &&
|
||||
command += rm -rf $${APP_DEST_DIR}/$${TARGET}.app/Contents/Frameworks/QQt.framework &&
|
||||
#拷贝QQt.framework到app bundle里。其实,是直接在app里执行的。这个会移动走。
|
||||
command += mkdir -p $${APP_DEST_DIR}/$${TARGET}.app/Contents/Frameworks/QQt.framework &&
|
||||
command += cd $${APP_DEST_DIR}/$${TARGET}.app/Contents/Frameworks/QQt.framework &&
|
||||
#修复QQt.framework里的快捷方式
|
||||
command += $${create_command} &&
|
||||
command += chmod +x $${PWD}/linux_cd_path.sh &&
|
||||
command += . $${PWD}/linux_cd_path.sh &&
|
||||
|
||||
#Qt Creator create framework but use absolute path to make link
|
||||
#QMAKE_POST_LINK += cp -rf $${QQT_LIB_PWD}/QQt.framework \
|
||||
# $${APP_DEST_DIR}/$${TARGET}.app/Contents/Frameworks &&
|
||||
#更改app bundle链接QQt的位置。
|
||||
command += install_name_tool -change QQt.framework/Versions/$${QQT_MAJOR_VERSION}/QQt \
|
||||
@rpath/QQt.framework/Versions/$${QQT_MAJOR_VERSION}/QQt \
|
||||
$${APP_DEST_DIR}/$${TARGET}.app/Contents/MacOS/$${TARGET} &&
|
||||
command += macdeployqt $${APP_DEST_DIR}/$${TARGET}.app -verbose=1
|
||||
|
||||
lessThan(QT_MAJOR_VERSION, 5){
|
||||
command += &&
|
||||
command += chmod +x $${PWD}/mac_deploy_qt4.sh &&
|
||||
command += $${PWD}/mac_deploy_qt4.sh $${APP_DEST_DIR}/$${TARGET}.app/Contents/MacOS/$${TARGET}
|
||||
}
|
||||
#message($$command)
|
||||
return ($${command})
|
||||
}
|
||||
|
||||
#这个macOS POST LINK其实是因为qmake的一个bug而添加的,qmake生成的framework结构有错误,里边的快捷方式都不对,所以在此修正。
|
||||
#这个只是bug1,还有bug2.
|
||||
#Creator在运行app之前,如果不把这些依赖拷贝到中间目标生成目录里,就不能运行。这是macOS特有的,别的系统都不需要。所以这个修正发生在
|
||||
#这个是bug2,还有bug3
|
||||
#qmake在苹果下生成的app,默认链接QQt的位置是绝对路径!这里修复为相对路径。拷贝过去也失去了相对路径。
|
||||
#好了,经过以上修复,app可以直接使用了。
|
||||
defineReplace(fix_app_bundle_with_qqt_in_building_path_on_mac) {
|
||||
#need QQT_BUILD_PWD
|
||||
APP_DEST_DIR=$${DESTDIR}
|
||||
isEmpty(APP_DEST_DIR):APP_DEST_DIR=.
|
||||
command = $$deploy_qqt_to_app_deploy_path_on_mac($${APP_DEST_DIR})
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
#这个函数用于Lib链接QQt的时候对Lib的针对qmake生成bundle的bug的修正,
|
||||
#把生成的lib的ln绝对路径更换为相对路径
|
||||
#这个事情发生在build station里,Creator要运行这个里边需要依赖这个工作。
|
||||
#multi link需要发布这个lib也需要依赖这个工作。
|
||||
#必经之路。
|
||||
defineReplace(fix_lib_in_building_path_on_mac) {
|
||||
#need QQT_BUILD_PWD
|
||||
deploy_path = $$1
|
||||
isEmpty(1): error("fix_lib_in_building_path_on_mac(deploy_path) requires one argument")
|
||||
create_command = $$create_mac_sdk()
|
||||
APP_DEST_DIR=$${deploy_path}
|
||||
isEmpty(APP_DEST_DIR):APP_DEST_DIR=.
|
||||
@ -57,24 +118,9 @@ defineReplace(deploy_qqt_to_mac) {
|
||||
return ($${command})
|
||||
}
|
||||
|
||||
defineReplace(copy_qqt_on_mac) {
|
||||
#need QQT_BUILD_PWD
|
||||
APP_DEST_DIR=$${DESTDIR}
|
||||
isEmpty(APP_DEST_DIR):APP_DEST_DIR=.
|
||||
command = $$deploy_qqt_to_mac($${APP_DEST_DIR})
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
|
||||
################################################
|
||||
##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(Build $${TARGET} at $${OUT_PWD}/$${QKIT_STD_DIR})
|
||||
message(Link QQt to $${TARGET} $${QKIT_PRIVATE} on $${QMAKE_HOST.os} \
|
||||
\(Qt Kit page FileSystem Name=$${SYSNAME}. Operating System=$${QMAKE_HOST.os}.\) )
|
||||
|
||||
#-------module name QQt
|
||||
MODULE_NAME=QQt
|
||||
module_name = $$lower($${MODULE_NAME})
|
||||
@ -115,16 +161,23 @@ equals(QMAKE_HOST.os, Windows) {
|
||||
QQT_LIB_PWD~=s,/,\\,g
|
||||
}
|
||||
|
||||
#我准备把install qqt sdk移动到更合适的地方。
|
||||
contains(CONFIG, link_from_sdk) {
|
||||
#create sdk first
|
||||
QMAKE_PRE_LINK += $$create_qqt_sdk()
|
||||
#private struct
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
QMAKE_POST_LINK += $$copy_qqt_on_mac()
|
||||
#Fix app里、lib里的路径问题
|
||||
#
|
||||
contains(CONFIG, app_bundle) : !contains(CONFIG, lib_bundle) {
|
||||
QMAKE_POST_LINK += $$fix_app_bundle_with_qqt_in_building_path_on_mac()
|
||||
}
|
||||
}
|
||||
} else : contains(CONFIG, link_from_build) {
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
QMAKE_POST_LINK += $$copy_qqt_on_mac()
|
||||
contains(CONFIG, app_bundle) : !contains(CONFIG, lib_bundle) {
|
||||
QMAKE_POST_LINK += $$fix_app_bundle_with_qqt_in_building_path_on_mac()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,5 +188,12 @@ contains(ANDROID_TARGET_ARCH, armeabi-v7a) {
|
||||
$${QQT_LIB_PWD}/lib$${MODULE_NAME}.so
|
||||
}
|
||||
|
||||
#从SDK里链接QQt
|
||||
LIBS += $$link_qqt_library()
|
||||
|
||||
message (Link QQt from: $${QQT_LIB_PWD})
|
||||
message(Link QQt to $${TARGET} $${QKIT_PRIVATE} on $${QMAKE_HOST.os} \
|
||||
\(Qt Kit page FileSystem Name=$${SYSNAME}. Operating System=$${QMAKE_HOST.os}.\) )
|
||||
#TARGET must be equals to pro name ? no, TARGET must be placeed before qqt_library.pri
|
||||
#qmake pro pri is sequential
|
||||
message(Build $${TARGET} at $${OUT_PWD}/$${QKIT_STD_DIR})
|
||||
|
@ -149,8 +149,14 @@ equals(QKIT_PRIVATE, EMBEDDED) {
|
||||
#link operation all will need this variable
|
||||
QKIT_STD_DIR = $${QT_VERSION}/$${SYSNAME}/$${BUILD}
|
||||
|
||||
message(qqt_qkit.pri initialling)
|
||||
message(qqt_qkit.pri)
|
||||
message(Build $${TARGET} to $${QKIT_PRIVATE} \(QKIT=$${QKIT_PRIVATE} is configed in project build page.\) )
|
||||
message(Build $${TARGET} at $${QKIT_STD_DIR} \(Qt Kit page FileSystem Name=$${SYSNAME}\) )
|
||||
message(Build $${TARGET} on $${QMAKE_HOST.os} \(Operating System=$${QMAKE_HOST.os}\) )
|
||||
isEmpty(QKIT_PRIVATE) : message(Build $${TARGET} Qt Kit page FileSystem Name is decided by env variable QKIT. Please set it. )
|
||||
|
||||
isEmpty(QKIT_PRIVATE) {
|
||||
message(env variable QKIT is required!)
|
||||
message(pleace check qqt_qkit.pri)
|
||||
error("error occured, please check build output panel.")
|
||||
}
|
||||
|
@ -55,4 +55,4 @@ QQT_VERSION4 = $$get_version_string_4( $${QQT_MAJOR_VERSION}, $${QQT_MINOR_VERSI
|
||||
QQT_VERSION = $${QQT_VERSION3}
|
||||
#源代码 域宏
|
||||
DEFINES += QQT_VERSION=$${QQT_VERSION}
|
||||
message (Build QQt version: $$QQT_VERSION4)
|
||||
message (QQt version: v$$QQT_VERSION4)
|
||||
|
46
test/QQtBasedLibTest/QQtBasedLibTest.pro
Normal file
46
test/QQtBasedLibTest/QQtBasedLibTest.pro
Normal file
@ -0,0 +1,46 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2018-05-19T23:32:58
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT -= gui
|
||||
|
||||
TARGET = QQtBasedLibTest
|
||||
TEMPLATE = lib
|
||||
|
||||
DEFINES += QQTBASEDLIBTEST_LIBRARY
|
||||
|
||||
#if defined(QQTBASEDLIBTEST_LIBRARY)
|
||||
# define QQTBASEDLIBTESTSHARED_EXPORT Q_DECL_EXPORT
|
||||
#elif defined (QQTBASEDLIBTEST_STATIC_LIBRARY)
|
||||
#define QQTBASEDLIBTESTSHARED_EXPORT
|
||||
#else
|
||||
# define QQTBASEDLIBTESTSHARED_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
qqtbasedlibtest.cpp
|
||||
|
||||
HEADERS += \
|
||||
qqtbasedlibtest.h \
|
||||
qqtbasedlibtest_global.h
|
||||
|
||||
unix {
|
||||
#target.path = /usr/lib
|
||||
#INSTALLS += target
|
||||
}
|
||||
|
||||
system(touch qqtbasedlibtest.cpp)
|
||||
include (../../lib/lib_base_manager.pri)
|
7
test/QQtBasedLibTest/qqtbasedlibtest.cpp
Normal file
7
test/QQtBasedLibTest/qqtbasedlibtest.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
#include "qqtbasedlibtest.h"
|
||||
|
||||
|
||||
QQtBasedLibTest::QQtBasedLibTest()
|
||||
{
|
||||
pline() << res ( "xxx.png" );
|
||||
}
|
16
test/QQtBasedLibTest/qqtbasedlibtest.h
Normal file
16
test/QQtBasedLibTest/qqtbasedlibtest.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef QQTBASEDLIBTEST_H
|
||||
#define QQTBASEDLIBTEST_H
|
||||
|
||||
#include "qqtbasedlibtest_global.h"
|
||||
|
||||
#include <qqtframe.h>
|
||||
#include <qqtcore.h>
|
||||
|
||||
class QQTBASEDLIBTESTSHARED_EXPORT QQtBasedLibTest
|
||||
{
|
||||
|
||||
public:
|
||||
QQtBasedLibTest();
|
||||
};
|
||||
|
||||
#endif // QQTBASEDLIBTEST_H
|
14
test/QQtBasedLibTest/qqtbasedlibtest_global.h
Normal file
14
test/QQtBasedLibTest/qqtbasedlibtest_global.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef QQTBASEDLIBTEST_GLOBAL_H
|
||||
#define QQTBASEDLIBTEST_GLOBAL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(QQTBASEDLIBTEST_LIBRARY)
|
||||
# define QQTBASEDLIBTESTSHARED_EXPORT Q_DECL_EXPORT
|
||||
#elif defined (QQTBASEDLIBTEST_STATIC_LIBRARY)
|
||||
#define QQTBASEDLIBTESTSHARED_EXPORT
|
||||
#else
|
||||
# define QQTBASEDLIBTESTSHARED_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#endif // QQTBASEDLIBTEST_GLOBAL_H
|
45
test/QQtMultiLinkTest/QQtMultiLinkTest.pro
Normal file
45
test/QQtMultiLinkTest/QQtMultiLinkTest.pro
Normal file
@ -0,0 +1,45 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2018-05-20T13:55:04
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = QQtMultiLinkTest
|
||||
TEMPLATE = app
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui
|
||||
|
||||
APP_CONFIG_PWD = $${PWD}/AppRoot
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
APP_CONFIG_PWD ~=s,/,\\,g
|
||||
}
|
||||
|
||||
system(touch main.cpp)
|
||||
include (../../app/app_base_manager.pri)
|
||||
include (app_custom_manager.pri)
|
||||
include (app_version.pri)
|
||||
include (app_language.pri)
|
29
test/QQtMultiLinkTest/app_custom_manager.pri
Normal file
29
test/QQtMultiLinkTest/app_custom_manager.pri
Normal file
@ -0,0 +1,29 @@
|
||||
#----------------------------------------------------------------
|
||||
#app_custom_manager.pri
|
||||
#这个文件用于给用户自定义管理内容,随意添加自己所需要的library、defines、config等等。
|
||||
#拷贝到用户app工程目录里使用用
|
||||
#----------------------------------------------------------------
|
||||
################################################################
|
||||
##link Other library
|
||||
################################################################
|
||||
#LIBS +=
|
||||
|
||||
#以下是Multi Link技术更新后使用的方式
|
||||
|
||||
#针对QQt 多link技术的App,链接针对QQt 多link技术的Lib 只需要使用这一行代码,别的什么都不用管了。
|
||||
#对没有使用多link技术的Lib 拷贝到QQT_SDK_ROOT下对应目录就行了。
|
||||
#不使用多link技术的App?你不要使用这个函数,无法使用。
|
||||
app_link(QQtBasedLibTest)
|
||||
#还有头文件 :)
|
||||
app_include(QQtBasedLibTest)
|
||||
|
||||
#以上都是标准路径,以下是自定义路径里的。
|
||||
|
||||
#头文件很复杂?也可以支持。建议使用相对路径。确认:SDK ROOT肯定是在一个公共的位置,而且不易改变。
|
||||
#这个函数会到$$QQT_SDK_ROOT/LibName/$$QKIT_STD_DIR/include目录里找。相当于在Lib的需要inlude的头文件目录里有子目录
|
||||
#qmake函数对子目录的兼容不是非常好。所以用户链接Lib,请自行添加include目录子目录的内容
|
||||
#这两个函数的意义是在$$QQT_SDK_ROOT/QQtBasedLibTest/$$QKIT_STD_DIR/include/下的子路径添加include
|
||||
app_add_include(QQtBasedLibTest, QQtBasedLibTest)
|
||||
#这个函数的意义是在$$QQT_SDK_ROOT/QQtBasedLibTest/$$QKIT_STD_DIR/lib里查找添加xxx_lib
|
||||
app_add_link(QQtBasedLibTest, QQtBasedLibTest)
|
||||
|
30
test/QQtMultiLinkTest/app_language.pri
Normal file
30
test/QQtMultiLinkTest/app_language.pri
Normal file
@ -0,0 +1,30 @@
|
||||
#---------------------------------------------------------------------
|
||||
#应用程序语言翻译qmake文件。通过qmake与编译调用。
|
||||
#如果需要增加某国语言,修改这个文件即可。
|
||||
#拷贝到用户app工程目录里使用用
|
||||
#---------------------------------------------------------------------
|
||||
#$$APP_SOURCE_PWD on mac TRANSLATIONS error, why?
|
||||
APP_SOURCE_PWD=$${PWD}
|
||||
|
||||
TRANSLATIONS = $${PWD}/AppRoot/lang/zh_CN.ts $${PWD}/AppRoot/lang/en_US.ts
|
||||
|
||||
defineReplace(lupdate_language){
|
||||
command =
|
||||
#only pro path
|
||||
command += $$get_lupdate_language($${PWD}/$${TARGET}.pro)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
defineReplace(lrelease_language){
|
||||
command =
|
||||
#only pro path
|
||||
command += $$get_lrelease_language($${PWD}/../AppRoot/lang, zh_CN) $$CMD_SEP
|
||||
command += $$get_lrelease_language($${PWD}/../AppRoot/lang, en_US)
|
||||
return ($$command)
|
||||
}
|
||||
|
||||
##########################################################################################
|
||||
##Work flow
|
||||
##########################################################################################
|
||||
QMAKE_PRE_LINK += $$CMD_SEP $$lupdate_language()
|
||||
QMAKE_PRE_LINK += $$CMD_SEP $$lrelease_language()
|
15
test/QQtMultiLinkTest/app_version.pri
Normal file
15
test/QQtMultiLinkTest/app_version.pri
Normal file
@ -0,0 +1,15 @@
|
||||
#################################################################
|
||||
##project $${TARGET} version pri
|
||||
#################################################################
|
||||
#拷贝到用户app工程目录里使用用
|
||||
|
||||
APP_MAJOR_VERSION = 0
|
||||
APP_MINOR_VERSION = 2
|
||||
APP_PATCH_VERSION = 0
|
||||
APP_BUILD_VERSION = 0
|
||||
|
||||
APP_VERSION = $${APP_MAJOR_VERSION}.$${APP_MINOR_VERSION}.$${APP_PATCH_VERSION}
|
||||
APP_VERSION4 = $${APP_MAJOR_VERSION}.$${APP_MINOR_VERSION}.$${APP_PATCH_VERSION}.$${APP_BUILD_VERSION}
|
||||
DEFINES += APP_VERSION=$${APP_VERSION}
|
||||
message (Build $${TARGET} version: $$APP_VERSION4)
|
||||
unix:VERSION = $${APP_VERSION}
|
11
test/QQtMultiLinkTest/main.cpp
Normal file
11
test/QQtMultiLinkTest/main.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
16
test/QQtMultiLinkTest/mainwindow.cpp
Normal file
16
test/QQtMultiLinkTest/mainwindow.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "qqtbasedlibtest.h"
|
||||
|
||||
MainWindow::MainWindow ( QWidget* parent ) :
|
||||
QMainWindow ( parent ),
|
||||
ui ( new Ui::MainWindow )
|
||||
{
|
||||
ui->setupUi ( this );
|
||||
QQtBasedLibTest l;
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
test/QQtMultiLinkTest/mainwindow.h
Normal file
22
test/QQtMultiLinkTest/mainwindow.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
24
test/QQtMultiLinkTest/mainwindow.ui
Normal file
24
test/QQtMultiLinkTest/mainwindow.ui
Normal file
@ -0,0 +1,24 @@
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QMenuBar" name="menuBar" />
|
||||
<widget class="QToolBar" name="mainToolBar" />
|
||||
<widget class="QWidget" name="centralWidget" />
|
||||
<widget class="QStatusBar" name="statusBar" />
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -31,4 +31,4 @@ HEADERS += mainwindow.h
|
||||
FORMS += mainwindow.ui
|
||||
|
||||
system(touch main.cpp)
|
||||
include (../../src/app_base_manager.pri)
|
||||
include (../../app/app_base_manager.pri)
|
||||
|
@ -34,4 +34,4 @@ FORMS += \
|
||||
mainwindow.ui
|
||||
|
||||
system("touch mainwindow.cpp")
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -36,4 +36,4 @@ FORMS += \
|
||||
CONFIG += mobility
|
||||
MOBILITY =
|
||||
|
||||
include ($${PWD}/../../src/app_base_manager.pri)
|
||||
include ($${PWD}/../../app/app_base_manager.pri)
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -41,7 +41,7 @@ equals(QMAKE_HOST.os, Windows) {
|
||||
|
||||
#促使编译源代码,qmake pri配置里面的QMAKE_XX_LINK命令就会执行。
|
||||
system("touch main.cpp")
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
include(./app_custom_manager.pri)
|
||||
|
||||
contains(QKIT_PRIVATE, ANDROID||ANDROIDX86) {
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -41,4 +41,4 @@ APP_CONFIG_PWD = $${PWD}/approot
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
APP_CONFIG_PWD ~=s,/,\\,g
|
||||
}
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -40,4 +40,4 @@ CONFIG += mobility
|
||||
MOBILITY =
|
||||
|
||||
system("touch main.cpp")
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -39,4 +39,4 @@ APP_CONFIG_PWD = $${PWD}/AppRoot
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
APP_CONFIG_PWD ~=s,/,\\,g
|
||||
}
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -37,4 +37,4 @@ CONFIG += mobility
|
||||
MOBILITY =
|
||||
|
||||
system(touch widget.cpp)
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Project created by QtCreator 2016-06-17T10:03:52
|
||||
#
|
||||
#-------------------------------------------------
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
QT += core gui
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Project created by QtCreator 2016-06-17T10:03:52
|
||||
#
|
||||
#-------------------------------------------------
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
|
||||
QT += core gui
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -49,7 +49,7 @@ equals(QMAKE_HOST.os, Windows) {
|
||||
#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(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -37,4 +37,4 @@ HEADERS += \
|
||||
FORMS += \
|
||||
tempwidget.ui
|
||||
|
||||
include (../../src/app_base_manager.pri)
|
||||
include (../../app/app_base_manager.pri)
|
||||
|
@ -52,7 +52,7 @@ equals(QMAKE_HOST.os, Windows) {
|
||||
}
|
||||
|
||||
#include manager
|
||||
include(../../src/app_base_manager.pri)
|
||||
include(../../app/app_base_manager.pri)
|
||||
|
||||
#-------------------------------------------------
|
||||
#user app may use these these settings prefertly
|
||||
|
@ -45,7 +45,7 @@ equals(QMAKE_HOST.os, Windows) {
|
||||
APP_CONFIG_PWD ~=s,/,\\,g
|
||||
}
|
||||
|
||||
include (../../src/app_base_manager.pri)
|
||||
include (../../app/app_base_manager.pri)
|
||||
|
||||
contains(QKIT_PRIVATE, ANDROID|ANDROIDX86) {
|
||||
CONFIG += mobility
|
||||
|
2
usage.md
2
usage.md
@ -26,7 +26,7 @@ APP_DEPLOY_ROOT = /Users/abel/Develop/d1-product
|
||||
1. 按照文章所说,更改Qt Creator的默认编译路径。只有这样,才能实现多平台目标、中间目标不冲突。
|
||||
2. 参照LibQQt/src/qqt_qkit.pri里的SYSNAME变量,在Qt Creator首选项-设置构建和运行-构建套件Kit页面的每个kit的File System Name。(请使用Qt Creator 3.5以上版本,其被佩戴于Qt5.2.)
|
||||
3. 打开LibQQt工程,根据qmake输出,在用户配置目录/[.]qmake/app_configure.pri里面设置QQT_BUILD_ROOT QQT_SDK_ROOT APP_DEPLOY_ROOT三个路径变量
|
||||
4. 仿照LibQQt的例程,在用户工程.pro里include(.../LibQQt/src/app_base_manager.pri)
|
||||
4. 仿照LibQQt的例程,在用户工程.pro里include(.../LibQQt/app/app_base_manager.pri)
|
||||
- 如果需要跟随发布配置文件,按照图里的设置APP_CONFIG_PWD
|
||||
5. 在Qt Creator项目-kit-构建设置页面,配置QKIT环境变量(LibQQt也需要,用户App需要),可以build了。
|
||||
|
||||
|
@ -13,7 +13,7 @@ LibQQt所在的linux操作系统和Android操作系统近似,理论上他们
|
||||
LibQQt就处在Application Frameworks的位置,
|
||||
LibQQt内富含丰富的Manager组件,管理功能无所不包,Manager需要做的工作,LibQQt将会全部提供。
|
||||
|
||||
很明显,Qt RunTime将会取代Android Runtime的位置。
|
||||
在基于LibQQt开发的操作系统中,Qt RunTime将会代替Android Runtime的位置。
|
||||
|
||||
# LibQQt v2.2.2 包含的管理类型
|
||||
|
||||
|
@ -14,7 +14,7 @@ include ($${PWD}/../LibQQt/src/app_deploy.pri) (optional, 发布App用)
|
||||
```
|
||||
|
||||
- 添加QKIT 环境变量,一般桌面上 会选择 QKIT=WIN32 或者 QKIT=LINUX 或者QKIT=macOS等几种,桌面上一般就这三种,相应的还有64位的选择。
|
||||
- 运行qmake,根据错误提示和在qqt_library.pri下面生成的app_configure.pri配置QQT_BUILD_ROOT QQT_SDK_ROOT,如果包含了app_deploy.pri还要配置APP_DEPLOY_ROOT。设他们=XXX目录。遵循qmake语法,这个应该不难。
|
||||
- 运行qmake,根据错误提示和在link_qqt_library.pri下面生成的app_configure.pri配置QQT_BUILD_ROOT QQT_SDK_ROOT,如果包含了app_deploy.pri还要配置APP_DEPLOY_ROOT。设他们=XXX目录。遵循qmake语法,这个应该不难。
|
||||
- 然后就开始编译,坐等编译完成。现在的master还算稳定,也就是v2.1.3,还算稳定,我在几个平台上都测试通过了,windows测试的比较少,但是一般也会通过,等详细测试了更新工程。
|
||||
|
||||
qqtframe2 demo,这个里面个空白的MainWindow工程,用来向用户展示应该如何使用LibQQt。
|
||||
|
Before Width: | Height: | Size: 372 KiB After Width: | Height: | Size: 372 KiB |
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 453 KiB After Width: | Height: | Size: 453 KiB |
@ -20,10 +20,6 @@
|
||||
|
||||
[一个应用案例](an-example.md)
|
||||
|
||||
## Multi link technology
|
||||
|
||||
[Multi-link 技术](Multi-Link.md)
|
||||
|
||||
## LibQQt在操作系统中的地位
|
||||
|
||||
[LibQQt的地位](LibQQt's-position.md)
|
||||
@ -32,6 +28,11 @@
|
||||
|
||||
[QQt应用程序的开发诀窍](knack.md)
|
||||
|
||||
## LibQQt学者的一些依赖知识
|
||||
|
||||
[去看看软件基础概念](software.md)
|
||||
[去看看Qt入门基础须知](usage-Qt.md)
|
||||
[去看看Qt Creator入门安装须知](usage-QtCreator.md)
|
||||
|
||||
## 返回
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user