mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-21 03:55:04 +00:00
update:修复发布问题
This commit is contained in:
parent
00054b808d
commit
a6fc4e5200
2 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
|||
#include <QProcess>
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
|
||||
#include "adbprocess.h"
|
||||
|
||||
|
@ -23,7 +25,8 @@ const QString& AdbProcess::getAdbPath()
|
|||
{
|
||||
if (s_adbPath.isEmpty()) {
|
||||
s_adbPath = QString::fromLocal8Bit(qgetenv("QTSCRCPY_ADB_PATH"));
|
||||
if (s_adbPath.isEmpty()) {
|
||||
QFileInfo fileInfo(s_adbPath);
|
||||
if (s_adbPath.isEmpty() || !fileInfo.isFile()) {
|
||||
s_adbPath = QCoreApplication::applicationDirPath() + "/adb";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <QSize>
|
||||
#include <QTimerEvent>
|
||||
#include <QCoreApplication>
|
||||
#include <QFileInfo>
|
||||
|
||||
#include "server.h"
|
||||
|
||||
|
@ -52,7 +53,8 @@ const QString& Server::getServerPath()
|
|||
{
|
||||
if (m_serverPath.isEmpty()) {
|
||||
m_serverPath = QString::fromLocal8Bit(qgetenv("QTSCRCPY_SERVER_PATH"));
|
||||
if (m_serverPath.isEmpty()) {
|
||||
QFileInfo fileInfo(m_serverPath);
|
||||
if (m_serverPath.isEmpty() || !fileInfo.isFile()) {
|
||||
m_serverPath = QCoreApplication::applicationDirPath() + "/scrcpy-server.jar";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue