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

update qqt install pri

This commit is contained in:
tianduanrui 2017-10-28 15:35:58 +08:00
parent 5cb5940078
commit 5cbfbbf7a6
5 changed files with 103 additions and 39 deletions

View File

@ -2,7 +2,6 @@ TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = src/qqt.pro
SUBDIRS += examples/qqtframe3
SUBDIRS += examples/framelesshelperwidget
SUBDIRS += examples/qqtframe
SUBDIRS += examples/qqtframe2
@ -14,6 +13,9 @@ SUBDIRS += examples/QtBuildTool
SUBDIRS += examples/QtSdkManager
SUBDIRS += examples/QQtInstaller
#need QQt installed to Qt library
#SUBDIRS += examples/qqtframe3
#need bluetooth library
#SUBDIRS += examples/qqtbluetoothfiletransferserver

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
@ -5,20 +6,54 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>661</width>
<height>402</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="QWidget" name="centralWidget">
<widget class="QQtCustomSpeedMeter" name="widget" native="true">
<property name="geometry">
<rect>
<x>120</x>
<y>50</y>
<width>361</width>
<height>191</height>
</rect>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>661</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QToolBar" name="mainToolBar">
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<widget class="QStatusBar" name="statusBar"/>
</widget>
<layoutDefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QQtCustomSpeedMeter</class>
<extends>QWidget</extends>
<header location="global">qqtcustomspeedmeter.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -8,6 +8,8 @@ QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
QT += qqt
TARGET = qqtframe3
TEMPLATE = app

View File

@ -15,7 +15,7 @@ contains(QMAKE_HOST.os,Windows) {
CMD_SEP = &&
MOVE = mv
COPY = cp -f
COPY_DIR = $$COPY -R
COPY_DIR = cp -rf
MK_DIR = mkdir -p
RM = rm -f
LN = ln -s
@ -123,19 +123,15 @@ defineTest(write_file) {
system("touch $${PWD}/exquisite/qqtcustomeffectprogressbar.cpp")
MODULE_NAME=qqtcore
MODULE_CNAME=QQtCore
MODULE_NAME=qqt
MODULE_CNAME=QQt
QQT_BUILD_DIR=$$OUT_PWD/bin
QQT_TEMP_DIR=$$PWD/../install
#QQT_BASE_DIR=$$[QT_INSTALL_DATA]
QQT_BASE_DIR=$$QQT_TEMP_DIR
#QQT_BASE_DIR=$$[QT_INSTALL_DATA]
message(QQt sdk install here:$${QQT_BASE_DIR})
defineReplace(create_sdk_dirs) {
return (cccccc)
}
#can be used in condition or values
#must $$ !
#return values. true is 'true', false is 'false', xx0, xx1 is list
@ -143,18 +139,26 @@ defineReplace(create_sdk) {
return (cccccc)
}
!equals(QQT_BASE_DIR , $$[QT_INSTALL_DATA]){
QQT_INC_DIR=$${QQT_BASE_DIR}/include/$${MODULE_CNAME}
QQT_LIB_DIR=$${QQT_BASE_DIR}/lib
QQT_PRI_PATH=$${QQT_BASE_DIR}/mkspecs/modules
QQT_PRI_FILEPATH=$${QQT_PRI_PATH}/qt_lib_$${MODULE_NAME}.pri
QQT_CMAKE_DIR=$${QQT_BASE_DIR}/lib/cmake/$${MODULE_CNAME}
#mac only
contains(QKIT_, macOS) {
QQT_INC_DIR=$${QQT_BASE_DIR}/lib/QQt.framework/Versions/$${TARGET_MAJOR_VERSION}/Headers
QQT_BUNDLE_DIR=$${QQT_BASE_DIR}/lib/$${MODULE_CNAME}.framework
QQT_BUNDLE_CUR_DIR =$${QQT_BUNDLE_DIR}/Versions/$${TARGET_MAJOR_VERSION}
QQT_BUNDLE_INC_DIR =$${QQT_BUNDLE_CUR_DIR}/Headers
QQT_BUNDLE_RES_DIR =$${QQT_BUNDLE_CUR_DIR}/Resources
QQT_BUNDLE_EXE_FILE =$${QQT_BUNDLE_CUR_DIR}/$${MODULE_CNAME}
}
contains(QKIT_, macOS) {
QQT_BUNDLE_CUR_LINK =$${QQT_BUNDLE_DIR}/Versions/Current
QQT_BUNDLE_INC_LINK =$${QQT_BUNDLE_DIR}/Headers
QQT_BUNDLE_RES_LINK =$${QQT_BUNDLE_DIR}/Resources
QQT_BUNDLE_EXE_LINK =$${QQT_BUNDLE_DIR}/$${MODULE_CNAME}
}
#create base dir excide header
!equals(QQT_BASE_DIR , $$[QT_INSTALL_DATA]){
QMAKE_POST_LINK += $$RM_DIR $$QQT_BASE_DIR $$CMD_SEP
@ -164,22 +168,43 @@ defineReplace(create_sdk) {
QMAKE_POST_LINK += $$MK_DIR $$QQT_CMAKE_DIR $$CMD_SEP
}
#create bundle dir
contains(QKIT_, macOS) {
QMAKE_POST_LINK += $$RM_DIR $$QQT_BUNDLE_DIR $$CMD_SEP
QMAKE_POST_LINK += $$MK_DIR $$QQT_BUNDLE_CUR_DIR $$CMD_SEP
}
#copy lib
contains(QKIT_, macOS) {
QMAKE_POST_LINK += "$$COPY_DIR $$QQT_BUILD_DIR/QQt.framework $$QQT_LIB_DIR" $$CMD_SEP
QMAKE_POST_LINK += "$$COPY_DIR $$QQT_BUILD_DIR/$${MODULE_CNAME}.framework/Versions/$${TARGET_MAJOR_VERSION}/* $$QQT_BUNDLE_CUR_DIR" $$CMD_SEP
} else {
QMAKE_POST_LINK += "$$COPY_DIR $$QQT_BUILD_DIR/* $$QQT_LIB_DIR" $$CMD_SEP
}
#create header dir
#copy header
contains(QKIT_, macOS) {
QMAKE_POST_LINK += $$MK_DIR $$QQT_BUNDLE_INC_DIR $$CMD_SEP
QMAKE_POST_LINK += $$COPY $$HEADERS $$QQT_BUNDLE_INC_DIR $$CMD_SEP
}else{
!equals(QQT_BASE_DIR , $$[QT_INSTALL_DATA]){
QMAKE_POST_LINK += $$MK_DIR $$QQT_INC_DIR $$CMD_SEP
}
QMAKE_POST_LINK += $$COPY $$HEADERS $$QQT_INC_DIR $$CMD_SEP
}
#link header
#link header current resources
contains(QKIT_, macOS) {
QMAKE_POST_LINK += "$$LN $$QQT_INC_DIR $$QQT_LIB_DIR/QQt.framework/Headers" $$CMD_SEP
QMAKE_POST_LINK += $$LN $$QQT_BUNDLE_CUR_DIR $${QQT_BUNDLE_CUR_LINK} $$CMD_SEP
QMAKE_POST_LINK += $$LN $$QQT_BUNDLE_INC_DIR $${QQT_BUNDLE_INC_LINK} $$CMD_SEP
QMAKE_POST_LINK += $$LN $$QQT_BUNDLE_RES_DIR $${QQT_BUNDLE_RES_LINK} $$CMD_SEP
QMAKE_POST_LINK += $$LN $$QQT_BUNDLE_EXE_FILE $${QQT_BUNDLE_EXE_LINK} $$CMD_SEP
}
#copy prl
contains(QKIT_, macOS) {
QMAKE_POST_LINK += $$COPY $$QQT_BUILD_DIR/lib$${MODULE_CNAME}.prl $$QQT_BUNDLE_DIR/$${MODULE_CNAME}.prl $$CMD_SEP
} else {
QMAKE_POST_LINK += $$COPY $$QQT_BUILD_DIR/*.prl $$QQT_LIB_DIR $$CMD_SEP
}
##write qt_lib_qqtcore.pri