mirror of
https://github.com/jaredtao/TaoQuick.git
synced 2025-01-31 21:22:58 +08:00
update prf
This commit is contained in:
parent
c0bc2f96b7
commit
c7f152026e
@ -4,4 +4,4 @@ TaoQuick_BUILD_TREE = $$PWD/build
|
|||||||
|
|
||||||
TaoQuick_RUN_TREE = $$PWD/bin
|
TaoQuick_RUN_TREE = $$PWD/bin
|
||||||
|
|
||||||
TaoQuick_VERSION_MAJOR = 1.0
|
TaoQuick_VERSION_MAJOR = 0.3
|
||||||
|
@ -3,7 +3,6 @@ lessThan(QT_MAJOR_VERSION, 5) {
|
|||||||
} else: lessThan(QT_MINOR_VERSION, 12){
|
} else: lessThan(QT_MINOR_VERSION, 12){
|
||||||
error("current Qt version $$QT_VERSION, this project need grather than 5.12.0")
|
error("current Qt version $$QT_VERSION, this project need grather than 5.12.0")
|
||||||
}
|
}
|
||||||
load(taoVersion)
|
|
||||||
|
|
||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
|
|
||||||
|
@ -19,14 +19,18 @@
|
|||||||
MAJ = $$take_first(VerList)
|
MAJ = $$take_first(VerList)
|
||||||
MIN = $$take_first(VerList)
|
MIN = $$take_first(VerList)
|
||||||
PAT = $$take_first(VerList)
|
PAT = $$take_first(VerList)
|
||||||
VER_MAJ = $${MAJ}
|
# VER_MAJ = $${MAJ}
|
||||||
VER_MIN = $${MIN}
|
# VER_MIN = $${MIN}
|
||||||
VER_PAT = $${PAT}
|
# VER_PAT = $${PAT}
|
||||||
VERSION = $${Ver}
|
# VERSION = $${Ver}
|
||||||
|
|
||||||
DEFINES += TaoREVISION=$${REVISION}
|
DEFINES += TaoREVISION=$${REVISION}
|
||||||
DEFINES += TaoREVISIONSTR=\"\\\"$${REVISION}\\\"\"
|
DEFINES += TaoREVISIONSTR=\"\\\"$${REVISION}\\\"\"
|
||||||
|
DEFINES += TaoVer=\"\\\"$${Ver}\\\"\"
|
||||||
|
DEFINES += TaoMAJ=$${MAJ}
|
||||||
|
DEFINES += TaoMIN=$${MIN}
|
||||||
|
DEFINES += TaoPAT=$${PAT}
|
||||||
DEFINES += TaoDATETIME=\"\\\"$${_DATE_}\\\"\"
|
DEFINES += TaoDATETIME=\"\\\"$${_DATE_}\\\"\"
|
||||||
DEFINES += TaoCompilerVendor=\"\\\"$${QT_VERSION} $${QMAKE_PLATFORM} $${QMAKE_COMPILER} $${QMAKE_TARGET.arch}\\\"\"
|
DEFINES += TaoCompilerVendor=\"\\\"$${QT_VERSION} $${QMAKE_PLATFORM} $${QMAKE_COMPILER} $${QMAKE_TARGET.arch}\\\"\"
|
||||||
# message($${DEFINES})
|
# message($${DEFINES})
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,20 @@ msvc {
|
|||||||
}
|
}
|
||||||
load(taoVersion)
|
load(taoVersion)
|
||||||
include(../TaoPlugin.pri)
|
include(../TaoPlugin.pri)
|
||||||
include(../TaoBundle.pri)
|
|
||||||
|
|
||||||
|
load(taoBundle)
|
||||||
|
BundlePath = $$getBundlePath("TaoQuickApp")
|
||||||
|
|
||||||
|
load(taoBuildPath)
|
||||||
|
setBuildPath($${TaoQuick_BUILD_TREE}/$${TARGET})
|
||||||
|
|
||||||
|
CONFIG(debug, debug|release){
|
||||||
|
DESTDIR=$${TaoQuick_RUN_TREE}/debug/$${BundlePath}TaoPlugin
|
||||||
|
} else {
|
||||||
|
DESTDIR=$${TaoQuick_RUN_TREE}/release/$${BundlePath}TaoPlugin
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
Src/EffectsPlugin.cpp
|
Src/EffectsPlugin.cpp
|
||||||
@ -20,23 +33,4 @@ HEADERS += \
|
|||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
Qml.qrc
|
Qml.qrc
|
||||||
CONFIG(debug, debug|release){
|
|
||||||
tgt=$$absolute_path($${_PRO_FILE_PWD_}/../../bin/debug/$${BundlePath}TaoPlugin)
|
|
||||||
} else {
|
|
||||||
tgt=$$absolute_path($${_PRO_FILE_PWD_}/../../bin/release/$${BundlePath}TaoPlugin)
|
|
||||||
}
|
|
||||||
win32 {
|
|
||||||
tgt ~= s,/,\\\\,g
|
|
||||||
}
|
|
||||||
DESTDIR = $${tgt}
|
|
||||||
CONFIG(debug,debug|release){
|
|
||||||
MOC_DIR = build/debug/moc
|
|
||||||
RCC_DIR = build/debug/rcc
|
|
||||||
UI_DIR = build/debug/ui
|
|
||||||
OBJECTS_DIR = build/debug/obj
|
|
||||||
} else {
|
|
||||||
MOC_DIR = build/release/moc
|
|
||||||
RCC_DIR = build/release/rcc
|
|
||||||
UI_DIR = build/release/ui
|
|
||||||
OBJECTS_DIR = build/release/obj
|
|
||||||
}
|
|
||||||
|
@ -14,6 +14,7 @@ public:
|
|||||||
void initializeEngine(QQmlEngine* engine, const char* uri) override
|
void initializeEngine(QQmlEngine* engine, const char* uri) override
|
||||||
{
|
{
|
||||||
Q_INIT_RESOURCE(Qml);
|
Q_INIT_RESOURCE(Qml);
|
||||||
|
|
||||||
qInfo() << "\033[35m"
|
qInfo() << "\033[35m"
|
||||||
<< "Your application is using TaoQuick ";
|
<< "Your application is using TaoQuick ";
|
||||||
qInfo() << " Version:" << TaoVer;
|
qInfo() << " Version:" << TaoVer;
|
||||||
@ -27,6 +28,7 @@ public:
|
|||||||
qInfo() << "\033[0m\033[32m"
|
qInfo() << "\033[0m\033[32m"
|
||||||
<< "Good luck to you."
|
<< "Good luck to you."
|
||||||
<< "\033[0m";
|
<< "\033[0m";
|
||||||
|
|
||||||
QQmlEngineExtensionPlugin::initializeEngine(engine, uri);
|
QQmlEngineExtensionPlugin::initializeEngine(engine, uri);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -40,7 +42,9 @@ class TaoQuickPlugin : public QQmlExtensionPlugin {
|
|||||||
public:
|
public:
|
||||||
void registerTypes(const char*) override
|
void registerTypes(const char*) override
|
||||||
{
|
{
|
||||||
|
|
||||||
Q_INIT_RESOURCE(Qml);
|
Q_INIT_RESOURCE(Qml);
|
||||||
|
|
||||||
qInfo() << "\033[35m"
|
qInfo() << "\033[35m"
|
||||||
<< "Your application is using TaoQuick ";
|
<< "Your application is using TaoQuick ";
|
||||||
qInfo() << " Version:" << TaoVer;
|
qInfo() << " Version:" << TaoVer;
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
QT += qml quick
|
||||||
|
|
||||||
|
CONFIG += plugin c++11 qtquickcompiler
|
||||||
|
|
||||||
|
CONFIG += file_copies
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
$$PWD/Src/taoquick_plugin.h
|
$$PWD/Src/taoquick_plugin.h
|
||||||
|
|
||||||
@ -7,7 +13,23 @@ RESOURCES += \
|
|||||||
$$PWD/Qml.qrc
|
$$PWD/Qml.qrc
|
||||||
|
|
||||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||||
QML2_IMPORT_PATH += $$_PRO_FILE_PWD_/Qml
|
QML2_IMPORT_PATH += $$PWD/TaoQuick
|
||||||
|
|
||||||
# Additional import path used to resolve QML modules just for Qt Quick Designer
|
# Additional import path used to resolve QML modules just for Qt Quick Designer
|
||||||
QML_DESIGNER_IMPORT_PATH += $$_PRO_FILE_PWD_/Qml
|
QML_DESIGNER_IMPORT_PATH += $$PWD/TaoQuick
|
||||||
|
!android {
|
||||||
|
qmldirFile = $$PWD/qmldir
|
||||||
|
|
||||||
|
#copy_qmldir for general run
|
||||||
|
copy_qmldir.files = $${qmldirFile}
|
||||||
|
copy_qmldir.path = $$DESTDIR
|
||||||
|
COPIES += copy_qmldir
|
||||||
|
|
||||||
|
#install_qmldir for install
|
||||||
|
installPath = $$[QT_INSTALL_QML]/$${uri}
|
||||||
|
install_qmldir.files = $${qmldirFile}
|
||||||
|
install_qmldir.path = $${installPath}
|
||||||
|
INSTALLS += install_qmldir
|
||||||
|
target.path = $$installPath
|
||||||
|
INSTALLS += target
|
||||||
|
}
|
||||||
|
@ -2,10 +2,6 @@ TEMPLATE = lib
|
|||||||
|
|
||||||
TARGET = TaoQuick
|
TARGET = TaoQuick
|
||||||
|
|
||||||
QT += qml quick
|
|
||||||
|
|
||||||
CONFIG += plugin c++11 qtquickcompiler
|
|
||||||
CONFIG += file_copies
|
|
||||||
|
|
||||||
versionAtLeast(QT_VERSION, 5.15.0) {
|
versionAtLeast(QT_VERSION, 5.15.0) {
|
||||||
# 5.15 use new feature: qmltypes,QML_IMPORT_NAME
|
# 5.15 use new feature: qmltypes,QML_IMPORT_NAME
|
||||||
@ -15,47 +11,20 @@ versionAtLeast(QT_VERSION, 5.15.0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uri = $$TARGET
|
uri = $$TARGET
|
||||||
#load(taoVersion)
|
load(taoVersion)
|
||||||
|
|
||||||
load(taoBundle)
|
load(taoBundle)
|
||||||
load(taoBuildPath)
|
|
||||||
BundlePath = $$getBundlePath("TaoQuickApp")
|
BundlePath = $$getBundlePath("TaoQuickApp")
|
||||||
#include(../TaoBundle.pri)
|
|
||||||
include(TaoQuick.pri)
|
load(taoBuildPath)
|
||||||
include(TaoQuick/TaoQuickDesigner.pri)
|
setBuildPath($${TaoQuick_BUILD_TREE}/$${TARGET})
|
||||||
|
|
||||||
CONFIG(debug, debug|release){
|
CONFIG(debug, debug|release){
|
||||||
DESTDIR = $${TaoQuick_RUN_TREE}/debug/$${BundlePath}$${uri}
|
DESTDIR = $${TaoQuick_RUN_TREE}/debug/$${BundlePath}$${uri}
|
||||||
} else {
|
} else {
|
||||||
DESTDIR = $${TaoQuick_RUN_TREE}/release/$${BundlePath}$${uri}
|
DESTDIR = $${TaoQuick_RUN_TREE}/release/$${BundlePath}$${uri}
|
||||||
}
|
}
|
||||||
setBuildPath($${TaoQuick_BUILD_TREE}/$${TARGET})
|
|
||||||
|
|
||||||
#copy_qmldir
|
include(TaoQuick.pri)
|
||||||
!android {
|
include(TaoQuick/TaoQuickDesigner.pri)
|
||||||
# copy_qmldir.target = $$DESTDIR/qmldir
|
|
||||||
# copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
|
|
||||||
# win32 {
|
|
||||||
# copy_qmldir.target ~= s,/,\\\\,g
|
|
||||||
# copy_qmldir.depends ~= s,/,\\\\,g
|
|
||||||
# }
|
|
||||||
# copy_qmldir.commands = $${QMAKE_COPY_FILE} $${copy_qmldir.depends} $${copy_qmldir.target}
|
|
||||||
# QMAKE_EXTRA_TARGETS += copy_qmldir
|
|
||||||
# PRE_TARGETDEPS += $$copy_qmldir.target
|
|
||||||
copy_qmldir.files = $$_PRO_FILE_PWD_/qmldir
|
|
||||||
copy_qmldir.path = $$DESTDIR
|
|
||||||
COPIES += copy_qmldir
|
|
||||||
}
|
|
||||||
|
|
||||||
#install_qmldir
|
|
||||||
!android {
|
|
||||||
installPath = $$[QT_INSTALL_QML]/$${uri}
|
|
||||||
# win32 {
|
|
||||||
# installPath ~= s,/,\\,g
|
|
||||||
# }
|
|
||||||
install_qmldir.files = $$_PRO_FILE_PWD_/qmldir
|
|
||||||
install_qmldir.path = $$installPath
|
|
||||||
INSTALLS += install_qmldir
|
|
||||||
|
|
||||||
target.path = $$installPath
|
|
||||||
INSTALLS += target
|
|
||||||
}
|
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
|
|
||||||
QT += qml quick
|
QT += qml quick
|
||||||
|
|
||||||
CONFIG += plugin c++14 qtquickcompiler
|
CONFIG += plugin c++14 qtquickcompiler
|
||||||
|
|
||||||
CONFIG += file_copies
|
CONFIG += file_copies
|
||||||
|
|
||||||
|
#msvc {
|
||||||
|
# HEADERS += $$PWD/Ver-u16.h
|
||||||
|
# DEFINES += VER_Utf16
|
||||||
|
#} else {
|
||||||
|
# HEADERS += $$PWD/Ver-u8.h
|
||||||
|
#}
|
||||||
|
|
||||||
msvc{
|
msvc{
|
||||||
QMAKE_CFLAGS += -source-charset:utf-8
|
QMAKE_CFLAGS += -source-charset:utf-8
|
||||||
QMAKE_CXXFLAGS += -source-charset:utf-8
|
QMAKE_CXXFLAGS += -source-charset:utf-8
|
||||||
@ -10,18 +18,12 @@ msvc{
|
|||||||
#一部分头文件加入编译预处理,提高编译速度
|
#一部分头文件加入编译预处理,提高编译速度
|
||||||
msvc {
|
msvc {
|
||||||
CONFIG += precompile_header
|
CONFIG += precompile_header
|
||||||
PRECOMPILED_HEADER = Src/stdafx.h
|
PRECOMPILED_HEADER = $$PWD/Src/stdafx.h
|
||||||
precompile_header:!isEmpty(PRECOMPILED_HEADER) {
|
precompile_header:!isEmpty(PRECOMPILED_HEADER) {
|
||||||
DEFINES += USING_PCH
|
DEFINES += USING_PCH
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#msvc {
|
|
||||||
# HEADERS += $$PWD/Ver-u16.h
|
|
||||||
# DEFINES += VER_Utf16
|
|
||||||
#} else {
|
|
||||||
HEADERS += $$PWD/Ver-u8.h
|
|
||||||
#}
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
$$PWD/Src/ITaoQuickPlugin.h \
|
$$PWD/Src/ITaoQuickPlugin.h \
|
||||||
$$PWD/Src/Logger/Logger.h \
|
$$PWD/Src/Logger/Logger.h \
|
||||||
@ -42,3 +44,9 @@ SOURCES += \
|
|||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
$$PWD/Qml.qrc \
|
$$PWD/Qml.qrc \
|
||||||
$$PWD/Image.qrc
|
$$PWD/Image.qrc
|
||||||
|
|
||||||
|
!android {
|
||||||
|
trans.files = $$files($$_PRO_FILE_PWD_/Trans/language_*.json)
|
||||||
|
trans.path = $$DESTDIR/Trans
|
||||||
|
COPIES += trans
|
||||||
|
}
|
||||||
|
@ -1,9 +1,21 @@
|
|||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET = TaoQuickApp
|
TARGET = TaoQuickApp
|
||||||
|
|
||||||
#load(taoVersion)
|
load(taoVersion)
|
||||||
#include(../TaoBundle.pri)
|
|
||||||
|
|
||||||
|
load(taoBundle)
|
||||||
|
BundlePath = $$getBundlePath("TaoQuickApp")
|
||||||
|
|
||||||
|
load(taoBuildPath)
|
||||||
|
setBuildPath($${TaoQuick_BUILD_TREE}/$${TARGET})
|
||||||
|
|
||||||
|
CONFIG(debug,debug|release) {
|
||||||
|
DESTDIR = $${TaoQuick_RUN_TREE}/debug
|
||||||
|
} else {
|
||||||
|
DESTDIR = $${TaoQuick_RUN_TREE}/release
|
||||||
|
}
|
||||||
|
|
||||||
|
include(TaoQuickApp.pri)
|
||||||
|
|
||||||
win32:!mingw {
|
win32:!mingw {
|
||||||
RC_FILE = App.rc
|
RC_FILE = App.rc
|
||||||
@ -11,28 +23,3 @@ win32:!mingw {
|
|||||||
macos {
|
macos {
|
||||||
ICON = milk.icns
|
ICON = milk.icns
|
||||||
}
|
}
|
||||||
|
|
||||||
CONFIG(debug,debug|release) {
|
|
||||||
DESTDIR = $$absolute_path($${_PRO_FILE_PWD_}/../../bin/debug/)
|
|
||||||
} else {
|
|
||||||
DESTDIR = $$absolute_path($${_PRO_FILE_PWD_}/../../bin/release/)
|
|
||||||
}
|
|
||||||
CONFIG(debug,debug|release) {
|
|
||||||
MOC_DIR = build/debug/moc
|
|
||||||
RCC_DIR = build/debug/rcc
|
|
||||||
UI_DIR = build/debug/ui
|
|
||||||
OBJECTS_DIR = build/debug/obj
|
|
||||||
} else {
|
|
||||||
MOC_DIR = build/release/moc
|
|
||||||
RCC_DIR = build/release/rcc
|
|
||||||
UI_DIR = build/release/ui
|
|
||||||
OBJECTS_DIR = build/release/obj
|
|
||||||
}
|
|
||||||
include(TaoQuickApp.pri)
|
|
||||||
|
|
||||||
|
|
||||||
!android {
|
|
||||||
trans.files = $$files($$_PRO_FILE_PWD_/Trans/language_*.json)
|
|
||||||
trans.path = $$DESTDIR/Trans
|
|
||||||
COPIES += trans
|
|
||||||
}
|
|
||||||
|
Binary file not shown.
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#define VER_COMPANYNAME_STR "JaredTao\0"
|
#define VER_COMPANYNAME_STR "JaredTao\0"
|
||||||
|
|
||||||
#define VER_FILEDESCRIPTION_STR "TaoQuickDemo,未经授权不得商用,侵权必究\0"
|
#define VER_FILEDESCRIPTION_STR "TaoQuickDemo\0"
|
||||||
#define VER_INTERNALNAME_STR "jaredtao.github.io\0"
|
#define VER_INTERNALNAME_STR "jaredtao.github.io\0"
|
||||||
#define VER_LEGALCOPYRIGHT_STR "Copyright(C)2019-2029 JaredTao\0"
|
#define VER_LEGALCOPYRIGHT_STR "Copyright(C)2019-2029 JaredTao\0"
|
||||||
#define VER_LEGALTRADEMARKS_STR "JaredTao\0"
|
#define VER_LEGALTRADEMARKS_STR "JaredTao\0"
|
||||||
|
@ -9,8 +9,20 @@ msvc {
|
|||||||
QMAKE_CXXFLAGS += -source-charset:utf-8
|
QMAKE_CXXFLAGS += -source-charset:utf-8
|
||||||
}
|
}
|
||||||
load(taoVersion)
|
load(taoVersion)
|
||||||
|
|
||||||
include(../TaoPlugin.pri)
|
include(../TaoPlugin.pri)
|
||||||
include(../TaoBundle.pri)
|
|
||||||
|
load(taoBundle)
|
||||||
|
BundlePath = $$getBundlePath("TaoQuickApp")
|
||||||
|
|
||||||
|
load(taoBuildPath)
|
||||||
|
setBuildPath($${TaoQuick_BUILD_TREE}/$${TARGET})
|
||||||
|
|
||||||
|
CONFIG(debug, debug|release){
|
||||||
|
DESTDIR=$${TaoQuick_RUN_TREE}/debug/$${BundlePath}TaoPlugin
|
||||||
|
} else {
|
||||||
|
DESTDIR=$${TaoQuick_RUN_TREE}/release/$${BundlePath}TaoPlugin
|
||||||
|
}
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
Src/TaoQuickPlugin.cpp
|
Src/TaoQuickPlugin.cpp
|
||||||
@ -20,26 +32,3 @@ HEADERS += \
|
|||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
Qml.qrc
|
Qml.qrc
|
||||||
CONFIG(debug, debug|release){
|
|
||||||
tgt=$$absolute_path($${_PRO_FILE_PWD_}/../../bin/debug/$${BundlePath}TaoPlugin)
|
|
||||||
} else {
|
|
||||||
tgt=$$absolute_path($${_PRO_FILE_PWD_}/../../bin/release/$${BundlePath}TaoPlugin)
|
|
||||||
}
|
|
||||||
win32 {
|
|
||||||
tgt ~= s,/,\\\\,g
|
|
||||||
}
|
|
||||||
DESTDIR = $${tgt}
|
|
||||||
CONFIG(debug,debug|release){
|
|
||||||
MOC_DIR = build/debug/moc
|
|
||||||
RCC_DIR = build/debug/rcc
|
|
||||||
UI_DIR = build/debug/ui
|
|
||||||
OBJECTS_DIR = build/debug/obj
|
|
||||||
} else {
|
|
||||||
MOC_DIR = build/release/moc
|
|
||||||
RCC_DIR = build/release/rcc
|
|
||||||
UI_DIR = build/release/ui
|
|
||||||
OBJECTS_DIR = build/release/obj
|
|
||||||
}
|
|
||||||
OTHER_FILES += README.md \
|
|
||||||
.clang-format \
|
|
||||||
LICENSE
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user