mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-02 13:58:37 +00:00
linux
linux编译通过
This commit is contained in:
parent
0b92c998d2
commit
32d6f40b14
14 changed files with 34 additions and 6 deletions
|
@ -73,8 +73,8 @@ win32 {
|
||||||
|
|
||||||
# 依赖模块
|
# 依赖模块
|
||||||
LIBS += \
|
LIBS += \
|
||||||
-L$$PWD/../third_party/ffmpeg/lib -lavcodec \
|
|
||||||
-L$$PWD/../third_party/ffmpeg/lib -lavformat \
|
-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 -lavutil \
|
||||||
-L$$PWD/../third_party/ffmpeg/lib -lswscale \
|
-L$$PWD/../third_party/ffmpeg/lib -lswscale \
|
||||||
-lUser32
|
-lUser32
|
||||||
|
@ -96,8 +96,8 @@ macos {
|
||||||
|
|
||||||
# 依赖模块
|
# 依赖模块
|
||||||
LIBS += \
|
LIBS += \
|
||||||
-L$$PWD/../third_party/ffmpeg/lib -lavcodec.58 \
|
|
||||||
-L$$PWD/../third_party/ffmpeg/lib -lavformat.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 -lavutil.56 \
|
||||||
-L$$PWD/../third_party/ffmpeg/lib -lswscale.5
|
-L$$PWD/../third_party/ffmpeg/lib -lswscale.5
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ macos {
|
||||||
APP_SCRCPY_SERVER.path = Contents/MacOS
|
APP_SCRCPY_SERVER.path = Contents/MacOS
|
||||||
QMAKE_BUNDLE_DATA += APP_SCRCPY_SERVER
|
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
|
APP_ADB.path = Contents/MacOS
|
||||||
QMAKE_BUNDLE_DATA += APP_ADB
|
QMAKE_BUNDLE_DATA += APP_ADB
|
||||||
|
|
||||||
|
@ -114,6 +114,29 @@ macos {
|
||||||
ICON = $$PWD/res/QtScrcpy.icns
|
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 += \
|
RESOURCES += \
|
||||||
res.qrc
|
res.qrc
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,19 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
//QApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
|
//QApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
|
||||||
//QApplication::setAttribute(Qt::AA_UseOpenGLES);
|
//QApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||||
//QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
//QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
||||||
|
|
||||||
g_oldMessageHandler = qInstallMessageHandler(myMessageOutput);
|
g_oldMessageHandler = qInstallMessageHandler(myMessageOutput);
|
||||||
Decoder::init();
|
Decoder::init();
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
#ifdef Q_OS_WIN32
|
#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");
|
qputenv("QTSCRCPY_SERVER_PATH", "../../../third_party/scrcpy-server.jar");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
#include "tcpServer.h"
|
#include "tcpserver.h"
|
||||||
#include "devicesocket.h"
|
#include "devicesocket.h"
|
||||||
#include "adbprocess.h"
|
#include "adbprocess.h"
|
||||||
|
|
||||||
|
|
BIN
backup/ffmpeg-4.0.2.tar.xz
Executable file
BIN
backup/ffmpeg-4.0.2.tar.xz
Executable file
Binary file not shown.
BIN
third_party/adb/linux/adb
vendored
Executable file
BIN
third_party/adb/linux/adb
vendored
Executable file
Binary file not shown.
BIN
third_party/ffmpeg/lib/libavcodec.a
vendored
Normal file
BIN
third_party/ffmpeg/lib/libavcodec.a
vendored
Normal file
Binary file not shown.
BIN
third_party/ffmpeg/lib/libavformat.a
vendored
Normal file
BIN
third_party/ffmpeg/lib/libavformat.a
vendored
Normal file
Binary file not shown.
BIN
third_party/ffmpeg/lib/libavutil.a
vendored
Normal file
BIN
third_party/ffmpeg/lib/libavutil.a
vendored
Normal file
Binary file not shown.
BIN
third_party/ffmpeg/lib/libswresample.a
vendored
Normal file
BIN
third_party/ffmpeg/lib/libswresample.a
vendored
Normal file
Binary file not shown.
BIN
third_party/ffmpeg/lib/libswscale.a
vendored
Normal file
BIN
third_party/ffmpeg/lib/libswscale.a
vendored
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue