diff --git a/QQtExample.pro b/QQtExample.pro index 88bf4bf9..3dd0a4cf 100644 --- a/QQtExample.pro +++ b/QQtExample.pro @@ -109,7 +109,8 @@ greaterThan(QT_VERSION, 4.6.0):SUBDIRS += test/voicetest mac:lessThan(QT_MAJOR_VERSION , 5):SUBDIRS -= test/voicetest #网络创建工具 -#SUBDIRS += demo/QQtClientCreator +# +SUBDIRS += demo/QQtClientCreator #SUBDIRS += demo/QQtServerCreator #这边是个组合项,客户端和服务器一起的。必看 #SUBDIRS += examples/qqtclientexample diff --git a/multi-link/add_base_manager.pri b/multi-link/add_base_manager.pri index 18740747..06a47722 100644 --- a/multi-link/add_base_manager.pri +++ b/multi-link/add_base_manager.pri @@ -73,7 +73,9 @@ defineTest(add_dependent_library) { ##need QSYS ################################################################# #这个编译,build pane比较简洁 -CONFIG += silent +#CONFIG += silent +#CONFIG += debug_and_release +#CONFIG += build_all contains(TEMPLATE, app) { #add base manager对App的处理很少,App通过函数基本上能解决所有的事情 @@ -104,7 +106,7 @@ contains(TEMPLATE, app) { CONFIG += dll DEFINES += LIB_LIBRARY #mingw编译为静态有原因:动态库可以编译成功,但是无法链接成功。 - #message(Build $${TARGET} LIB_LIBRARY is defined. build) + message(Build $${TARGET} LIB_LIBRARY is defined. build) } else { #create dynamic lib (important, only occured at builder pro) CONFIG += dll diff --git a/multi-link/add_sdk.pri b/multi-link/add_sdk.pri index e65b880a..a4ea1108 100644 --- a/multi-link/add_sdk.pri +++ b/multi-link/add_sdk.pri @@ -206,7 +206,7 @@ defineReplace(get_add_sdk_work_flow){ command += $$get_add_mac_sdk_fix_building_framework() $$CMD_SEP #command += echo $$libname fix framework success. $$CMD_SEP } - command += $$RM_DIR $${LIB_SDK_PWD} $$CMD_SEP + #command += $$RM_DIR $${LIB_SDK_PWD} $$CMD_SEP command += $$MK_DIR $${LIB_SDK_PWD} $$CMD_SEP command += $$CD $${LIB_SDK_PWD} $$CMD_SEP command += $$get_add_sdk_dir_struct() $$CMD_SEP @@ -437,3 +437,59 @@ defineTest(add_sdk_to_Qt){ message(QQt sdk install here:$${LIB_SDK_PWD}) return (1) } + +defineTest(del_sdk){ + #isEmpty(1):error(del_sdk(libname, libsrcdir, libdstdir) need at last one argument) + + contains(QSYS_PRIVATE, macOS) { + #equals(APP_MAJOR_VERSION, 0):message(add_sdk(libname, libsrcdir, libdstdir) macos app major version is "0," have you setted it?) + } + + libname = $$1 + isEmpty(1):libname = $$TARGET + libname_lower = $$lower($${libname}) + #LIB std dir is not same to app std dir + LIB_STD_DIR = $${libname}/$${QSYS_STD_DIR} + + #create platform sdk need this + #源代码目录 + LIB_SRC_PWD=$$2 + isEmpty(2):LIB_SRC_PWD=$${PWD} + + #编译目标位置 + LIB_DST_DIR=$$DESTDIR + !isEmpty(3):LIB_DST_DIR = $$3 + + #need use qqt subdir proj + LIB_BUILD_PWD=$${APP_BUILD_ROOT}/$${LIB_STD_DIR} + !isEmpty(LIB_DST_DIR):LIB_BUILD_PWD=$${LIB_BUILD_PWD}/$${LIB_DST_DIR} + + #sdk path + LIB_SDK_PWD = $${LIB_SDK_ROOT}/$${LIB_STD_DIR} + #message(QQt sdk install here:$${LIB_SDK_PWD}) + + #这里不仅仅目标为windows的时候,才会转换, + #开发Host为Windows的时候,都要转换。 + #contains(QSYS_PRIVATE, Win32|Windows||Win64) { + equals(QMAKE_HOST.os, Windows) { + APP_BUILD_ROOT~=s,/,\\,g + LIB_SDK_ROOT~=s,/,\\,g + APP_DEPLOY_ROOT~=s,/,\\,g + + QSYS_STD_DIR~=s,/,\\,g + LIB_STD_DIR~=s,/,\\,g + LIB_DST_DIR~=s,/,\\,g + LIB_BUILD_PWD~=s,/,\\,g + LIB_SDK_PWD~=s,/,\\,g + } + + command += $$RM_DIR $${LIB_SDK_PWD} + #message($$command) + + !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += $$CMD_SEP + QMAKE_POST_LINK += $$command + + export(QMAKE_POST_LINK) + + return (1) +} diff --git a/test/QQtQwtTest/mainwindow.cpp b/test/QQtQwtTest/mainwindow.cpp index 19c44e6a..a8eee975 100644 --- a/test/QQtQwtTest/mainwindow.cpp +++ b/test/QQtQwtTest/mainwindow.cpp @@ -1,8 +1,5 @@ #include "mainwindow.h" #include "ui_mainwindow.h" - - - #include MainWindow::MainWindow ( QWidget* parent ) : @@ -10,20 +7,15 @@ MainWindow::MainWindow ( QWidget* parent ) : ui ( new Ui::MainWindow ) { ui->setupUi ( this ); - return; - //setupRealtimeDataDemo ( ui->qwtPlot ); QQtTcpClient t; + setupRealtimeDataDemo ( ui->qwtPlot ); } - - MainWindow::~MainWindow() { delete ui; } - - void MainWindow::setupRealtimeDataDemo ( QwtPlot* qwtplot ) { @@ -111,8 +103,8 @@ void MainWindow::updatedataSlot() } curve->setSamples ( xdata, ydata ); - //curve->attach ( ui->qwtPlot ); - //ui->qwtPlot->replot(); + curve->attach ( ui->qwtPlot ); + ui->qwtPlot->replot(); static double lastFpsKey; static int frameCount; diff --git a/test/QQtQwtTest/mainwindow.ui b/test/QQtQwtTest/mainwindow.ui index 221b2912..496b0bd6 100644 --- a/test/QQtQwtTest/mainwindow.ui +++ b/test/QQtQwtTest/mainwindow.ui @@ -14,16 +14,11 @@ MainWindow - - - - 40 - 30 - 311 - 201 - - - + + + + + diff --git a/usage.md b/usage.md index 57bab392..4585a23f 100644 --- a/usage.md +++ b/usage.md @@ -179,6 +179,9 @@ App和Lib的目标,一直从Build位置,持续发布到Deploy位置和SDK位 ####多链接技术创造的生产线 Multi-link会一直处于App/Lib生产线的控制器地位。 +Multi-link允许用户自行添加任何依赖项,我把一些常用的依赖项添加用pri放在了app-lib里, +而这些依赖项的SDK我保存在了百度网盘,以方便用户取用,用户只需要下载下来解压到自己的LIB_SDK_ROOT里。 +网盘地址:.... 我计划在LibQQt 3.0的时机将Multi-link合并到master分支进行正式发布。 ![Multi-link技术的能力](screenshot/13.png "这是Multi-link技术的能力")