mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 11:35:56 +00:00
linux
linux编译通过
This commit is contained in:
parent
b3f584f9de
commit
761a871dbf
3 changed files with 34 additions and 6 deletions
|
@ -73,8 +73,8 @@ win32 {
|
|||
|
||||
# 依赖模块
|
||||
LIBS += \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavcodec \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavformat \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavcodec \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavutil \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lswscale \
|
||||
-lUser32
|
||||
|
@ -96,8 +96,8 @@ macos {
|
|||
|
||||
# 依赖模块
|
||||
LIBS += \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavcodec.58 \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavformat.58 \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavcodec.58 \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavutil.56 \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lswscale.5
|
||||
|
||||
|
@ -106,7 +106,7 @@ macos {
|
|||
APP_SCRCPY_SERVER.path = Contents/MacOS
|
||||
QMAKE_BUNDLE_DATA += APP_SCRCPY_SERVER
|
||||
|
||||
APP_ADB.files = $$files($$PWD/../third_party/adb/adb)
|
||||
APP_ADB.files = $$files($$PWD/../third_party/adb/mac/adb)
|
||||
APP_ADB.path = Contents/MacOS
|
||||
QMAKE_BUNDLE_DATA += APP_ADB
|
||||
|
||||
|
@ -114,6 +114,29 @@ macos {
|
|||
ICON = $$PWD/res/QtScrcpy.icns
|
||||
}
|
||||
|
||||
# ***********************************************************
|
||||
# Linux平台下配置
|
||||
# ***********************************************************
|
||||
linux {
|
||||
# 输出目录
|
||||
CONFIG(debug, debug|release) {
|
||||
DESTDIR = $$PWD/../output/linux/debug
|
||||
} else {
|
||||
DESTDIR = $$PWD/../output/linux/release
|
||||
}
|
||||
|
||||
# 依赖模块
|
||||
LIBS += \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavformat \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavcodec \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lavutil \
|
||||
-L$$PWD/../third_party/ffmpeg/lib -lswscale
|
||||
|
||||
# linux set app icon: https://blog.csdn.net/MrNoboday/article/details/82870853
|
||||
}
|
||||
|
||||
# message("test")
|
||||
|
||||
RESOURCES += \
|
||||
res.qrc
|
||||
|
||||
|
|
|
@ -15,14 +15,19 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
//QApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
|
||||
//QApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||
//QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
||||
//QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
||||
|
||||
g_oldMessageHandler = qInstallMessageHandler(myMessageOutput);
|
||||
Decoder::init();
|
||||
QApplication a(argc, argv);
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
qputenv("QTSCRCPY_ADB_PATH", "../../../third_party/adb/adb.exe");
|
||||
qputenv("QTSCRCPY_ADB_PATH", "../../../third_party/adb/win/adb.exe");
|
||||
qputenv("QTSCRCPY_SERVER_PATH", "../../../third_party/scrcpy-server.jar");
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
qputenv("QTSCRCPY_ADB_PATH", "../../../third_party/adb/linux/adb");
|
||||
qputenv("QTSCRCPY_SERVER_PATH", "../../../third_party/scrcpy-server.jar");
|
||||
#endif
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <QObject>
|
||||
#include <QPointer>
|
||||
|
||||
#include "tcpServer.h"
|
||||
#include "tcpserver.h"
|
||||
#include "devicesocket.h"
|
||||
#include "adbprocess.h"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue