跨平台准备:调整目录结构

This commit is contained in:
rankun 2018-11-23 13:12:08 +08:00
parent 05d5626a84
commit 3d22ae432d
135 changed files with 39 additions and 14 deletions

View file

@ -39,11 +39,25 @@ FORMS += \
dialog.ui \
videoform.ui
# 指定可执行程序输出目录
CONFIG(debug, debug|release) {
DESTDIR = $$PWD/../output/debug
} else {
DESTDIR = $$PWD/../output/release
# ***********************************************************
# 输出目录
# ***********************************************************
# Win平台下输出目录
win32 {
CONFIG(debug, debug|release) {
DESTDIR = $$PWD/../output/win/debug
} else {
DESTDIR = $$PWD/../output/win/release
}
}
# Mac os平台下输出目录
macos {
CONFIG(debug, debug|release) {
DESTDIR = $$PWD/../output/mac/debug
} else {
DESTDIR = $$PWD/../output/mac/release
}
}
# 子工程
@ -57,7 +71,7 @@ include ($$PWD/inputcontrol/inputcontrol.pri)
# 附加包含路径
INCLUDEPATH += \
$$PWD/ffmpeg/include \
$$PWD/../third_party/ffmpeg/include \
$$PWD/common \
$$PWD/server \
$$PWD/adb \
@ -66,12 +80,19 @@ INCLUDEPATH += \
$$PWD/android \
$$PWD/inputcontrol
# 依赖库
# ***********************************************************
# 依赖模块
# ***********************************************************
LIBS += \
-L$$PWD/ffmpeg/lib -lavcodec \
-L$$PWD/ffmpeg/lib -lavformat \
-L$$PWD/ffmpeg/lib -lavutil \
-L$$PWD/ffmpeg/lib -lswscale
-L$$PWD/../third_party/ffmpeg/lib -lavcodec \
-L$$PWD/../third_party/ffmpeg/lib -lavformat \
-L$$PWD/../third_party/ffmpeg/lib -lavutil \
-L$$PWD/../third_party/ffmpeg/lib -lswscale
# Win平台下依赖模块
win32 {
LIBS += -lUser32
}
RESOURCES += \
res.qrc

View file

@ -1,11 +1,13 @@
#include <QDesktopWidget>
#include <QMouseEvent>
#ifdef Q_OS_WIN32
#include <Windows.h>
#endif
#include "videoform.h"
#include "ui_videoform.h"
#include <Windows.h>
#pragma comment(lib, "User32.lib")
VideoForm::VideoForm(const QString& serial, QWidget *parent) :
QWidget(parent),
@ -19,8 +21,9 @@ VideoForm::VideoForm(const QString& serial, QWidget *parent) :
ui->videoWidget->setMouseTracking(true);
connect(&m_inputConvert, &InputConvertGame::grabCursor, this, [this](bool grab){
#ifdef Q_OS_WIN32
if(grab) {
RECT mainRect; //windef.h中被定义
RECT mainRect;
mainRect.left = (LONG)this->geometry().left();
mainRect.right = (LONG)this->geometry().right();
mainRect.top = (LONG)this->geometry().top();
@ -29,6 +32,7 @@ VideoForm::VideoForm(const QString& serial, QWidget *parent) :
} else {
ClipCursor(Q_NULLPTR);
}
#endif
});
m_server = new Server();

Some files were not shown because too many files have changed in this diff Show more