mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
update qqt install script and qqt library script
This commit is contained in:
parent
751c8d76ef
commit
854137cc54
@ -46,7 +46,7 @@ FORMS += \
|
||||
|
||||
|
||||
|
||||
#equals(QKIT_, macOS) {
|
||||
#equals(QKIT_PRIVATE, macOS) {
|
||||
# QMAKE_CFLAGS_X86_64 += -mmacosx-version-min=10.7
|
||||
# QMAKE_CXXFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64
|
||||
# msgpacklib.path = Contents/Frameworks
|
||||
|
@ -27,11 +27,11 @@ contains (CONFIG, BUILD_SRC) {
|
||||
##install
|
||||
############
|
||||
#CONFIG += can_install
|
||||
can_install:equals(QKIT_, EMBEDDED) {
|
||||
can_install:equals(QKIT_PRIVATE, EMBEDDED) {
|
||||
target.path = /Application
|
||||
INSTALLS += target
|
||||
} else: unix {
|
||||
equals(QKIT_, macOS) {
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
target.path = /Applications
|
||||
INSTALLS += target
|
||||
}
|
||||
|
@ -10,3 +10,4 @@ int main(int argc, char* argv[])
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#QQT_OUT_BIN = $${QQT_OUT_PWD}/$${DESTDIR}
|
||||
#QQT_LIB_PWD = $$BUILDROOT/$$QQT_OUT_BIN
|
||||
|
||||
message(Link QQt to $${TARGET} $${QKIT_} \
|
||||
message(Link QQt to $${TARGET} $${QKIT_PRIVATE} \
|
||||
at $${QT_VERSION} $${SYSNAME} $${BUILD} \
|
||||
on $${QMAKE_HOST.os})
|
||||
|
||||
@ -39,11 +39,11 @@ contains(DEFINES, __DARWIN__) {
|
||||
##install
|
||||
############
|
||||
#CONFIG += can_install
|
||||
can_install:equals(QKIT_, EMBEDDED) {
|
||||
can_install:equals(QKIT_PRIVATE, EMBEDDED) {
|
||||
target.path = /Application
|
||||
INSTALLS += target
|
||||
} else: unix {
|
||||
equals(QKIT_, macOS) {
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
target.path = /Applications
|
||||
INSTALLS += target
|
||||
}
|
||||
@ -51,7 +51,7 @@ can_install:equals(QKIT_, EMBEDDED) {
|
||||
|
||||
#not good to use, some function error
|
||||
#CONFIG += qmake_deploy
|
||||
qmake_deploy:equals(QKIT_, macOS) {
|
||||
qmake_deploy:equals(QKIT_PRIVATE, macOS) {
|
||||
QQT_MAJOR_VERSION = 1
|
||||
QMAKE_POST_LINK += install_name_tool -change QQt.framework/Versions/$${QQT_MAJOR_VERSION}/QQt \
|
||||
@rpath/QQt.framework/Versions/$${QQT_MAJOR_VERSION}/QQt \
|
||||
@ -64,10 +64,10 @@ qmake_deploy:equals(QKIT_, macOS) {
|
||||
############
|
||||
##config defination
|
||||
############
|
||||
equals(QKIT_, macOS) {
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
CONFIG += app_bundle
|
||||
}
|
||||
equals(QKIT_, Android) {
|
||||
equals(QKIT_PRIVATE, Android) {
|
||||
CONFIG += mobility
|
||||
MOBILITY =
|
||||
#DISTFILES += \
|
||||
|
@ -29,18 +29,16 @@ contains (CONFIG, BUILD_SRC) {
|
||||
##install
|
||||
############
|
||||
#CONFIG += can_install
|
||||
can_install:equals(QKIT_, EMBEDDED) {
|
||||
can_install:equals(QKIT_PRIVATE, EMBEDDED) {
|
||||
target.path = /Application
|
||||
INSTALLS += target
|
||||
} else: unix {
|
||||
equals(QKIT_, macOS) {
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
target.path = /Applications
|
||||
INSTALLS += target
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
40
src/qqt.pro
40
src/qqt.pro
@ -9,18 +9,23 @@
|
||||
TARGET = QQt
|
||||
TEMPLATE = lib
|
||||
|
||||
################################################
|
||||
##project config definition
|
||||
##need QKIT to compitible with some occasion
|
||||
################################################
|
||||
##default build dll but some occasion
|
||||
CONFIG += dll
|
||||
#QQt library export (DLL) static lib is not needed
|
||||
DEFINES += QQT_LIBRARY
|
||||
##special lib lib_bundle/staticlib
|
||||
equals(QKIT_, macOS) {
|
||||
QKIT_PRIVATE = $$(QKIT)
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
CONFIG += lib_bundle
|
||||
} else:equals(QKIT_, iOS) {
|
||||
} else:equals(QKIT_PRIVATE, iOS) {
|
||||
DEFINES -= QQT_LIBRARY
|
||||
CONFIG -= dll
|
||||
CONFIG += staticlib
|
||||
} else:equals(QKIT_, WIN) {
|
||||
} else:equals(QKIT_PRIVATE, WIN) {
|
||||
#when Qt is static by mingw32 building 5.9.1
|
||||
equals(QT_VERSION, 5.9.1){
|
||||
DEFINES -= QQT_LIBRARY
|
||||
@ -30,7 +35,7 @@ equals(QKIT_, macOS) {
|
||||
}
|
||||
#create prl
|
||||
CONFIG += create_prl
|
||||
CONFIG += build_pass
|
||||
#CONFIG += build_pass
|
||||
build_pass:CONFIG(debug, debug|release) {
|
||||
#troublesome
|
||||
#win32: TARGET = $$join(TARGET,,,d)
|
||||
@ -38,6 +43,16 @@ build_pass:CONFIG(debug, debug|release) {
|
||||
#CONFIG += debug_and_release
|
||||
#CONFIG += build_all
|
||||
|
||||
#################################################################
|
||||
##project Headers
|
||||
#################################################################
|
||||
include ($$PWD/qqt_header.pri)
|
||||
|
||||
#################################################################
|
||||
##project source
|
||||
#################################################################
|
||||
include ($$PWD/qqt_source.pri)
|
||||
|
||||
#################################################################
|
||||
##project version
|
||||
#################################################################
|
||||
@ -64,15 +79,7 @@ win32 {
|
||||
}
|
||||
|
||||
|
||||
#################################################################
|
||||
##project source
|
||||
#################################################################
|
||||
include ($$PWD/qqt_header.pri)
|
||||
include ($$PWD/qqt_source.pri)
|
||||
################################################
|
||||
##install to Qt library
|
||||
################################################
|
||||
include ($$PWD/qqt_install.pri)
|
||||
|
||||
|
||||
################################################
|
||||
##project resource
|
||||
@ -80,6 +87,13 @@ include ($$PWD/qqt_install.pri)
|
||||
RESOURCES += \
|
||||
qqt.qrc
|
||||
|
||||
|
||||
################################################
|
||||
##install to Qt library
|
||||
################################################
|
||||
include ($$PWD/qqt_install.pri)
|
||||
|
||||
|
||||
#################################################################
|
||||
##project environ
|
||||
#################################################################
|
||||
|
@ -19,13 +19,16 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
#################################################################
|
||||
##definition and configration
|
||||
##need QKIT
|
||||
#################################################################
|
||||
|
||||
##Qt version
|
||||
QT += core sql network gui xml
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
##target arch type
|
||||
#You need define a env variable QKIT=XX
|
||||
QKIT_PRIVATE = $$(QKIT)
|
||||
#处理文件内平台小差异
|
||||
#EMBEDDED __EMBEDDED_LINUX__
|
||||
#MIPS __MIPS_LINUX__
|
||||
@ -37,38 +40,36 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
#macOS __DARWIN__
|
||||
#ANDROID __ANDROID__
|
||||
#ANDROIDX86 __ANDROIDX86__
|
||||
##target arch type
|
||||
QKIT_ = $$(QKIT)
|
||||
message(Build $${TARGET} to $${QKIT_})
|
||||
equals(QKIT_, EMBEDDED) {
|
||||
message(Build $${TARGET} to $${QKIT_PRIVATE})
|
||||
equals(QKIT_PRIVATE, EMBEDDED) {
|
||||
#embedded common macro
|
||||
DEFINES += __EMBEDDED_LINUX__
|
||||
} else:equals(QKIT_, ARM32) {
|
||||
} else:equals(QKIT_PRIVATE, ARM32) {
|
||||
DEFINES += __EMBEDDED_LINUX__
|
||||
#arm32 private
|
||||
DEFINES += __ARM_LINUX__
|
||||
} else:equals(QKIT_, MIPS32) {
|
||||
} else:equals(QKIT_PRIVATE, MIPS32) {
|
||||
QT += multimedia
|
||||
DEFINES += __EMBEDDED_LINUX__
|
||||
#mips32 private
|
||||
DEFINES += __MIPS_LINUX__
|
||||
} else:equals(QKIT_, LINUX) {
|
||||
} else:equals(QKIT_PRIVATE, LINUX) {
|
||||
DEFINES += __LINUX__
|
||||
} else:equals(QKIT_, LINUX64) {
|
||||
} else:equals(QKIT_PRIVATE, LINUX64) {
|
||||
DEFINES += __LINUX64__
|
||||
} else:equals(QKIT_, WIN) {
|
||||
} else:equals(QKIT_PRIVATE, WIN) {
|
||||
DEFINES += __WIN__
|
||||
} else:equals(QKIT_, WIN64) {
|
||||
} else:equals(QKIT_PRIVATE, WIN64) {
|
||||
DEFINES += __WIN64__
|
||||
} else:equals(QKIT_, macOS) {
|
||||
} else:equals(QKIT_PRIVATE, macOS) {
|
||||
DEFINES += __DARWIN__
|
||||
} else:equals(QKIT_, iOS) {
|
||||
} else:equals(QKIT_PRIVATE, iOS) {
|
||||
DEFINES += __IOS__
|
||||
} else:equals(QKIT_, iOSSimulator) {
|
||||
} else:equals(QKIT_PRIVATE, iOSSimulator) {
|
||||
DEFINES += __IOS__
|
||||
} else:equals(QKIT_, ANDROID) {
|
||||
} else:equals(QKIT_PRIVATE, ANDROID) {
|
||||
DEFINES += __ANDROID__
|
||||
} else:equals(QKIT_, ANDROIDX86) {
|
||||
} else:equals(QKIT_PRIVATE, ANDROIDX86) {
|
||||
DEFINES += __ANDROID__
|
||||
#todo:no customplot word printer
|
||||
}
|
||||
@ -130,25 +131,25 @@ greaterThan(QT_MAJOR_VERSION, 4): DEFINES += __QT5__
|
||||
CONFIG(debug, debug|profile|release):BUILD=Debug
|
||||
CONFIG(profile, debug|profile|release):BUILD=Profile
|
||||
CONFIG(release, debug|profile|release):BUILD=Release
|
||||
equals(QKIT_, MIPS32) {
|
||||
equals(QKIT_PRIVATE, MIPS32) {
|
||||
SYSNAME = Mips32
|
||||
} else:equals(QKIT_, LINUX) {
|
||||
} else:equals(QKIT_PRIVATE, LINUX) {
|
||||
SYSNAME = Linux
|
||||
} else:equals(QKIT_, LINUX64) {
|
||||
} else:equals(QKIT_PRIVATE, LINUX64) {
|
||||
SYSNAME = Linux64
|
||||
} else:equals(QKIT_, WIN) {
|
||||
} else:equals(QKIT_PRIVATE, WIN) {
|
||||
SYSNAME = Windows
|
||||
} else:equals(QKIT_, WIN64) {
|
||||
} else:equals(QKIT_PRIVATE, WIN64) {
|
||||
SYSNAME = Win64
|
||||
} else:equals(QKIT_, macOS) {
|
||||
} else:equals(QKIT_PRIVATE, macOS) {
|
||||
SYSNAME = MacOS
|
||||
} else:equals(QKIT_, iOS) {
|
||||
} else:equals(QKIT_PRIVATE, iOS) {
|
||||
SYSNAME = iOS
|
||||
} else:equals(QKIT_, iOSSimulator) {
|
||||
} else:equals(QKIT_PRIVATE, iOSSimulator) {
|
||||
SYSNAME = iOS-simulator
|
||||
} else:equals(QKIT_, ANDROID) {
|
||||
} else:equals(QKIT_PRIVATE, ANDROID) {
|
||||
SYSNAME = Android
|
||||
} else:equals(QKIT_, ANDROIDX86) {
|
||||
} else:equals(QKIT_PRIVATE, ANDROIDX86) {
|
||||
SYSNAME = Android_x86
|
||||
}
|
||||
message(Build $${TARGET} at $${QT_VERSION} $${SYSNAME} $${BUILD})
|
||||
@ -228,14 +229,14 @@ contains (DEFINES, __CPP11__) {
|
||||
#if you use printsupport , open this annotation
|
||||
DEFINES += __PRINTSUPPORT__
|
||||
#ios android can't support this function now
|
||||
contains(QKIT_, iOS||iOSSimulator||ANDROID||ANDROIDX86) {
|
||||
contains(QKIT_PRIVATE, iOS||iOSSimulator||ANDROID||ANDROIDX86) {
|
||||
DEFINES -= __PRINTSUPPORT__
|
||||
}
|
||||
contains (DEFINES, __PRINTSUPPORT__) {
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
|
||||
#if you use qcustomplot, open this annotation
|
||||
DEFINES += __CUSTOMPLOT__
|
||||
contains(QKIT_, iOS||iOSSimulator||ANDROID||ANDROIDX86) {
|
||||
contains(QKIT_PRIVATE, iOS||iOSSimulator||ANDROID||ANDROIDX86) {
|
||||
DEFINES -= __CUSTOMPLOT__
|
||||
}
|
||||
}
|
||||
@ -251,7 +252,7 @@ contains (DEFINES, __EXQUISITE__) {
|
||||
##################WebSocket Module###############################
|
||||
#if you use QWebSocketSupport , open this annotation
|
||||
#DEFINES += __WEBSOCKETSUPPORT__
|
||||
equals(QKIT_, macOS):DEFINES += __WEBSOCKETSUPPORT__
|
||||
equals(QKIT_PRIVATE, macOS):DEFINES += __WEBSOCKETSUPPORT__
|
||||
contains (DEFINES, __WEBSOCKETSUPPORT__) {
|
||||
#QSslError not found, you need recompiler Qt4
|
||||
#TODO: QT += webkit
|
||||
@ -262,14 +263,14 @@ contains (DEFINES, __WEBSOCKETSUPPORT__) {
|
||||
##################################################################
|
||||
##library
|
||||
##################################################################
|
||||
equals (QKIT_, iOSSimulator):{
|
||||
equals (QKIT_PRIVATE, iOSSimulator):{
|
||||
#error need
|
||||
#QMAKE_CXXFLAGS +=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
|
||||
}
|
||||
win32 {
|
||||
LIBS += -luser32
|
||||
}else: unix {
|
||||
equals(QKIT_, macOS) {
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
#min macosx target
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
|
||||
#deperated
|
||||
@ -279,7 +280,7 @@ win32 {
|
||||
#LIBS += -F$${MACOSXSDK}/System/Library/Frameworks
|
||||
#LIBS += -L$${MACOSXSDK}/usr/lib
|
||||
LIBS += -framework DiskArbitration -framework Cocoa -framework IOKit
|
||||
} else:contains(QKIT_, iOS|iOSSimulator) {
|
||||
} else:contains(QKIT_PRIVATE, iOS|iOSSimulator) {
|
||||
LIBS += -l DiskArbitration -l Cocoa -l IOKit
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
################################################
|
||||
##qqt_install.pri
|
||||
##install to Qt library
|
||||
##need qqt_version.pri
|
||||
################################################
|
||||
contains(QMAKE_HOST.os,Windows) {
|
||||
SCRIPT_SUFFIX=bat
|
||||
@ -20,7 +22,7 @@ contains(QMAKE_HOST.os,Windows) {
|
||||
MK_DIR = mkdir -p
|
||||
RM = rm -f
|
||||
CD = cd
|
||||
LN = ln -s
|
||||
LN = ln -sf
|
||||
RM_DIR = rm -rf
|
||||
}
|
||||
################################################
|
||||
@ -137,7 +139,7 @@ defineReplace(create_dir_struct) {
|
||||
#if it's qt library, don't create
|
||||
command =
|
||||
!equals(QQT_SDK_DIR , $$[QT_INSTALL_DATA]){
|
||||
!contains(QKIT_, macOS) {
|
||||
!contains(QKIT_PRIVATE, macOS) {
|
||||
command += $$MK_DIR $$QQT_INC_DIR $$CMD_SEP
|
||||
}
|
||||
command += $$MK_DIR $$QQT_LIB_DIR $$CMD_SEP
|
||||
@ -163,30 +165,35 @@ defineReplace(create_mac_sdk){
|
||||
#need cd framework root
|
||||
#QQT_BUILD_DIR MODULE_NAME QQT_MAJOR_VERSION
|
||||
module_name = $$lower($$MODULE_NAME)
|
||||
QQT_BUNDLE_CUR_DIR = Versions/$${QQT_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_NAME}
|
||||
QQT_BUNDLE_VER_DIR = Versions/$${QQT_MAJOR_VERSION}
|
||||
QQT_BUNDLE_CUR_DIR = Versions/Current
|
||||
QQT_BUNDLE_INC_DIR = $${QQT_BUNDLE_VER_DIR}/Headers
|
||||
QQT_BUNDLE_RES_DIR = $${QQT_BUNDLE_VER_DIR}/Resources
|
||||
QQT_BUNDLE_EXE_FILE = $${QQT_BUNDLE_VER_DIR}/$${MODULE_NAME}
|
||||
|
||||
QQT_BUNDLE_CUR_LINK = Versions/Current
|
||||
QQT_BUNDLE_CUR_INC_DIR = $${QQT_BUNDLE_CUR_DIR}/Headers
|
||||
QQT_BUNDLE_CUR_RES_DIR = $${QQT_BUNDLE_CUR_DIR}/Resources
|
||||
QQT_BUNDLE_CUR_EXE_FILE = $${QQT_BUNDLE_CUR_DIR}/$${MODULE_NAME}
|
||||
|
||||
QQT_BUNDLE_CUR_LINK = Current
|
||||
QQT_BUNDLE_INC_LINK = Headers
|
||||
QQT_BUNDLE_RES_LINK = Resources
|
||||
QQT_BUNDLE_EXE_LINK = $${MODULE_NAME}
|
||||
|
||||
command =
|
||||
command += $$MK_DIR $$QQT_BUNDLE_CUR_DIR $$CMD_SEP
|
||||
command += $$MK_DIR $$QQT_BUNDLE_VER_DIR $$CMD_SEP
|
||||
command += $$MK_DIR $$QQT_BUNDLE_INC_DIR $$CMD_SEP
|
||||
#copy lib
|
||||
command += $$COPY_DIR $$QQT_BUILD_DIR/$${MODULE_NAME}.framework/$${QQT_BUNDLE_CUR_DIR}/* $$QQT_BUNDLE_CUR_DIR $$CMD_SEP
|
||||
command += $$COPY_DIR $$QQT_BUILD_DIR/$${MODULE_NAME}.framework/$${QQT_BUNDLE_VER_DIR}/* $$QQT_BUNDLE_VER_DIR $$CMD_SEP
|
||||
#copy header
|
||||
command += $$COPY $$HEADERS $$QQT_BUNDLE_INC_DIR $$CMD_SEP
|
||||
#link header current resources
|
||||
command += $$CD Versions $$CMD_SEP
|
||||
command += $$LN $${QQT_MAJOR_VERSION} Current $$CMD_SEP
|
||||
command += $$CD .. $$CMD_SEP
|
||||
command += $$LN $$QQT_BUNDLE_INC_DIR $${QQT_BUNDLE_INC_LINK} $$CMD_SEP
|
||||
command += $$LN $$QQT_BUNDLE_RES_DIR $${QQT_BUNDLE_RES_LINK} $$CMD_SEP
|
||||
command += $$LN $$QQT_BUNDLE_EXE_FILE $${QQT_BUNDLE_EXE_LINK}
|
||||
command += $$CD Versions $$CMD_SEP
|
||||
command += $$LN $${QQT_MAJOR_VERSION} $${QQT_BUNDLE_CUR_LINK} $$CMD_SEP
|
||||
command += $$CD .. $$CMD_SEP
|
||||
command += $$LN $$QQT_BUNDLE_CUR_INC_DIR $${QQT_BUNDLE_INC_LINK} $$CMD_SEP
|
||||
command += $$LN $$QQT_BUNDLE_CUR_RES_DIR $${QQT_BUNDLE_RES_LINK} $$CMD_SEP
|
||||
command += $$LN $$QQT_BUNDLE_CUR_EXE_FILE $${QQT_BUNDLE_EXE_LINK}
|
||||
|
||||
return ($$command)
|
||||
}
|
||||
@ -206,7 +213,7 @@ defineReplace(create_qt_lib_pri){
|
||||
command += echo "QT.$${module_name}.module = $${MODULE_NAME}" >> $${QQT_PRI_FILEPATH} $$CMD_SEP
|
||||
command += echo "QT.$${module_name}.libs = '\$$QT_MODULE_LIB_BASE'" >> $${QQT_PRI_FILEPATH} $$CMD_SEP
|
||||
command += echo "QT.$${module_name}.bins = '\$$QT_MODULE_BIN_BASE'" >> $${QQT_PRI_FILEPATH} $$CMD_SEP
|
||||
equals(QKIT_, macOS) {
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
command += echo "QT.$${module_name}.includes = '\$$QT_MODULE_LIB_BASE/$${MODULE_NAME}.framework/Headers'" >> $${QQT_PRI_FILEPATH} $$CMD_SEP
|
||||
command += echo "QT.$${module_name}.frameworks = '\$$QT_MODULE_LIB_BASE'" >> $${QQT_PRI_FILEPATH} $$CMD_SEP
|
||||
command += echo "QT.$${module_name}.module_config = v2 lib_bundle" >> $${QQT_PRI_FILEPATH} $$CMD_SEP
|
||||
@ -235,8 +242,8 @@ defineReplace(create_qt_lib_pri){
|
||||
#use to output sdk
|
||||
CONFIG += create_sdk
|
||||
contains(CONFIG, create_sdk){
|
||||
#test case
|
||||
#system("touch $${PWD}/exquisite/qqtcustomeffectprogressbar.cpp")
|
||||
#debug
|
||||
#system("touch $${PWD}/widgets/qqtapplication.cpp")
|
||||
MODULE_NAME=QQt
|
||||
QQT_BUILD_DIR=$$OUT_PWD/bin
|
||||
#sdk path
|
||||
@ -249,13 +256,13 @@ contains(CONFIG, create_sdk){
|
||||
post_link += $$CD $$QQT_SDK_DIR $$CMD_SEP
|
||||
post_link += $$create_dir_struct()
|
||||
|
||||
contains(QKIT_, macOS) {
|
||||
contains(QKIT_PRIVATE, macOS) {
|
||||
post_link += $$MK_DIR lib/$${MODULE_NAME}.framework $$CMD_SEP
|
||||
post_link += $$CD lib/$${MODULE_NAME}.framework $$CMD_SEP
|
||||
post_link += $$create_mac_sdk() $$CMD_SEP
|
||||
post_link += $$CD ../../ $$CMD_SEP
|
||||
#create prl
|
||||
post_link += $$COPY $$QQT_BUILD_DIR/lib$${MODULE_NAME}.prl lib/$${MODULE_NAME}.prl $$CMD_SEP
|
||||
post_link += $$COPY $$QQT_BUILD_DIR/$${MODULE_NAME}.framework/$${MODULE_NAME}.prl lib/$${MODULE_NAME}.framework/$${MODULE_NAME}.prl $$CMD_SEP
|
||||
} else {
|
||||
post_link += $$create_linux_sdk() $$CMD_SEP
|
||||
post_link += $$COPY $$QQT_BUILD_DIR/*.prl lib $$CMD_SEP
|
||||
|
@ -1,6 +1,13 @@
|
||||
#don't modify this pri file.
|
||||
################################################
|
||||
##qqt_library.pri
|
||||
##QQt based app contains qqt library
|
||||
##need qqt_version.pri
|
||||
##don't modify this pri file, if you cache 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
|
||||
################################################
|
||||
|
||||
message(Link QQt to $${TARGET} $${QKIT_} \
|
||||
message(Link QQt to $${TARGET} $${QKIT_PRIVATE} \
|
||||
at $${QT_VERSION} $${SYSNAME} $${BUILD} \
|
||||
on $${QMAKE_HOST.os})
|
||||
|
||||
@ -20,22 +27,23 @@ contains(DEFINES, __DARWIN__) {
|
||||
LIBS += -l QQt
|
||||
}
|
||||
|
||||
equals(QKIT_, macOS) {
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
QMAKE_POST_LINK += rm -rf bin/$${TARGET}.app/Contents/Frameworks/QQt.framework &&
|
||||
QMAKE_POST_LINK += cp -af $${QQT_LIB_PWD}/QQt.framework \
|
||||
bin/$${TARGET}.app/Contents/Frameworks &&
|
||||
QMAKE_POST_LINK += install_name_tool -change QQt.framework/Versions/$${QQT_MAJOR_VERSION}/QQt \
|
||||
@rpath/QQt.framework/Versions/$${QQT_MAJOR_VERSION}/QQt \
|
||||
bin/$${TARGET}.app/Contents/MacOS/$$TARGET &&
|
||||
QMAKE_POST_LINK += cp -rf $${QQT_LIB_PWD}/QQt.framework \
|
||||
bin/$${TARGET}.app/Contents/Frameworks &&
|
||||
QMAKE_POST_LINK += macdeployqt bin/$${TARGET}.app -verbose=1
|
||||
}
|
||||
|
||||
############
|
||||
##config defination
|
||||
############
|
||||
equals(QKIT_, macOS) {
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
CONFIG += app_bundle
|
||||
}
|
||||
equals(QKIT_, ANDROID) {
|
||||
equals(QKIT_PRIVATE, ANDROID) {
|
||||
CONFIG += mobility
|
||||
MOBILITY =
|
||||
}
|
||||
|
@ -13,13 +13,13 @@ win32 {
|
||||
HEADERS += $$PWD/qqtwin.h
|
||||
}
|
||||
unix {
|
||||
equals(QKIT_, macOS) {
|
||||
equals(QKIT_PRIVATE, macOS) {
|
||||
HEADERS += $$PWD/qqtdarwin.h
|
||||
} else: contains(QKIT_, LINUX|LINUX64) {
|
||||
} else: contains(QKIT_PRIVATE, LINUX|LINUX64) {
|
||||
HEADERS += $$PWD/qqtlinux.h
|
||||
}
|
||||
}
|
||||
contains (QKIT_, ANDROID||ANDROIDX86) {
|
||||
contains (QKIT_PRIVATE, ANDROID||ANDROIDX86) {
|
||||
HEADERS += $$PWD/qqtandroid.h
|
||||
}
|
||||
HEADERS += $$PWD/qqt.h \
|
||||
@ -146,7 +146,7 @@ FORMS += \
|
||||
#dmmu preview
|
||||
#arm mips
|
||||
#TODO: +wince +android +ios +macOS +win +linux
|
||||
equals(QKIT_, EMBEDDED) {
|
||||
equals(QKIT_PRIVATE, EMBEDDED) {
|
||||
SOURCES += $$PWD/dmmu/dmmu.c
|
||||
HEADERS += $$PWD/dmmu/dmmu.h \
|
||||
$$PWD/dmmu/jz_cim.h \
|
||||
@ -264,7 +264,7 @@ contains (DEFINES, __BLUETOOTH__) {
|
||||
#ethnet(+wifi) manager
|
||||
#arm mips
|
||||
#TODO: +wince +android +ios +macOS? +win? +linux?
|
||||
equals(QKIT_, EMBEDDED) {
|
||||
equals(QKIT_PRIVATE, EMBEDDED) {
|
||||
SOURCES += $$PWD/network/qqtethenetmanager.cpp
|
||||
HEADERS += $$PWD/network/qqtethenetmanager.h
|
||||
SOURCES += $$PWD/frame/qqtwifiwidget.cpp
|
||||
|
@ -1,3 +1,8 @@
|
||||
#################################################################
|
||||
##project QQt version pri
|
||||
#################################################################
|
||||
##qqt_library qqt_install all need this pri
|
||||
|
||||
QQT_MAJOR_VERSION = 1
|
||||
QQT_MINOR_VERSION = 6
|
||||
QQT_PATCH_VERSION = 0
|
||||
|
@ -39,6 +39,7 @@ void QQTProgressBar::setValue(int value)
|
||||
int w = ui->widgetBack->width() * (m_value - m_min) / (m_max - m_min);
|
||||
int h = ui->widgetBack->height();
|
||||
ui->widthTrunk->setFixedSize(w, h);
|
||||
|
||||
//pline() << width() << ui->widgetBack->width() << w << h;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user