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