linux编译通过
This commit is contained in:
barry 2018-11-25 21:36:36 +08:00
parent 0b92c998d2
commit 32d6f40b14
14 changed files with 34 additions and 6 deletions

View file

@ -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

View file

@ -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

View file

@ -4,7 +4,7 @@
#include <QObject>
#include <QPointer>
#include "tcpServer.h"
#include "tcpserver.h"
#include "devicesocket.h"
#include "adbprocess.h"

BIN
backup/ffmpeg-4.0.2.tar.xz Executable file

Binary file not shown.

BIN
third_party/adb/linux/adb vendored Executable file

Binary file not shown.

BIN
third_party/ffmpeg/lib/libavcodec.a vendored Normal file

Binary file not shown.

BIN
third_party/ffmpeg/lib/libavformat.a vendored Normal file

Binary file not shown.

BIN
third_party/ffmpeg/lib/libavutil.a vendored Normal file

Binary file not shown.

BIN
third_party/ffmpeg/lib/libswresample.a vendored Normal file

Binary file not shown.

BIN
third_party/ffmpeg/lib/libswscale.a vendored Normal file

Binary file not shown.