mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 11:35:56 +00:00
调整项目输出目录
This commit is contained in:
parent
e31c55f080
commit
5b23da7114
4 changed files with 16 additions and 9 deletions
|
@ -39,7 +39,14 @@ FORMS += \
|
|||
dialog.ui \
|
||||
videoform.ui
|
||||
|
||||
#子工程
|
||||
# 指定可执行程序输出目录
|
||||
CONFIG(debug, debug|release) {
|
||||
DESTDIR = $$PWD/../output/debug
|
||||
} else {
|
||||
DESTDIR = $$PWD/../output/release
|
||||
}
|
||||
|
||||
# 子工程
|
||||
include ($$PWD/common/common.pri)
|
||||
include ($$PWD/server/server.pri)
|
||||
include ($$PWD/adb/adb.pri)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "adbprocess.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
|
||||
#include "adbprocess.h"
|
||||
|
||||
QString AdbProcess::s_adbPath = "";
|
||||
|
||||
AdbProcess::AdbProcess(QObject *parent)
|
||||
|
@ -24,7 +24,7 @@ const QString& AdbProcess::getAdbPath()
|
|||
if (s_adbPath.isEmpty()) {
|
||||
s_adbPath = QString::fromLocal8Bit(qgetenv("QTSCRCPY_ADB_PATH"));
|
||||
if (s_adbPath.isEmpty()) {
|
||||
s_adbPath = "adb";
|
||||
s_adbPath = QCoreApplication::applicationDirPath() + "/adb";
|
||||
}
|
||||
}
|
||||
return s_adbPath;
|
||||
|
@ -49,7 +49,7 @@ void AdbProcess::initSignals()
|
|||
});
|
||||
|
||||
connect(this, &QProcess::errorOccurred, this,
|
||||
[this](QProcess::ProcessError error){
|
||||
[this](QProcess::ProcessError error){
|
||||
if (QProcess::FailedToStart == error) {
|
||||
emit adbProcessResult(AER_ERROR_MISSING_BINARY);
|
||||
} else {
|
||||
|
@ -86,7 +86,6 @@ void AdbProcess::execute(const QString& serial, const QStringList& args)
|
|||
adbArgs << args;
|
||||
qDebug() << getAdbPath() << adbArgs.join(" ");
|
||||
start(getAdbPath(), adbArgs);
|
||||
//start("C:\\Users\\Barry\\Desktop\\sockettool.exe", Q_NULLPTR);
|
||||
}
|
||||
|
||||
bool AdbProcess::isRuning()
|
||||
|
|
|
@ -15,8 +15,8 @@ int main(int argc, char *argv[])
|
|||
Decoder::init();
|
||||
QApplication a(argc, argv);
|
||||
|
||||
qputenv("QTSCRCPY_ADB_PATH", "G:\\mygitcode\\QtScrcpy\\src\\adb.exe");
|
||||
qputenv("QTSCRCPY_SERVER_PATH", "G:\\mygitcode\\QtScrcpy\\src\\scrcpy-server.jar");
|
||||
//qputenv("QTSCRCPY_ADB_PATH", "G:\\mygitcode\\QtScrcpy\\src\\adb.exe");
|
||||
//qputenv("QTSCRCPY_SERVER_PATH", "G:\\mygitcode\\QtScrcpy\\src\\scrcpy-server.jar");
|
||||
|
||||
Dialog* w = new Dialog;
|
||||
w->show();
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <QThread>
|
||||
#include <QSize>
|
||||
#include <QTimerEvent>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "server.h"
|
||||
|
||||
|
@ -52,7 +53,7 @@ const QString& Server::getServerPath()
|
|||
if (m_serverPath.isEmpty()) {
|
||||
m_serverPath = QString::fromLocal8Bit(qgetenv("QTSCRCPY_SERVER_PATH"));
|
||||
if (m_serverPath.isEmpty()) {
|
||||
m_serverPath = "scrcpy-server.jar";
|
||||
m_serverPath = QCoreApplication::applicationDirPath() + "/scrcpy-server.jar";
|
||||
}
|
||||
}
|
||||
return m_serverPath;
|
||||
|
|
Loading…
Add table
Reference in a new issue