mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-02 21:58:42 +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 \
|
dialog.ui \
|
||||||
videoform.ui
|
videoform.ui
|
||||||
|
|
||||||
#子工程
|
# 指定可执行程序输出目录
|
||||||
|
CONFIG(debug, debug|release) {
|
||||||
|
DESTDIR = $$PWD/../output/debug
|
||||||
|
} else {
|
||||||
|
DESTDIR = $$PWD/../output/release
|
||||||
|
}
|
||||||
|
|
||||||
|
# 子工程
|
||||||
include ($$PWD/common/common.pri)
|
include ($$PWD/common/common.pri)
|
||||||
include ($$PWD/server/server.pri)
|
include ($$PWD/server/server.pri)
|
||||||
include ($$PWD/adb/adb.pri)
|
include ($$PWD/adb/adb.pri)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#include "adbprocess.h"
|
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
#include "adbprocess.h"
|
||||||
|
|
||||||
QString AdbProcess::s_adbPath = "";
|
QString AdbProcess::s_adbPath = "";
|
||||||
|
|
||||||
AdbProcess::AdbProcess(QObject *parent)
|
AdbProcess::AdbProcess(QObject *parent)
|
||||||
|
@ -24,7 +24,7 @@ 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()) {
|
if (s_adbPath.isEmpty()) {
|
||||||
s_adbPath = "adb";
|
s_adbPath = QCoreApplication::applicationDirPath() + "/adb";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return s_adbPath;
|
return s_adbPath;
|
||||||
|
@ -49,7 +49,7 @@ void AdbProcess::initSignals()
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(this, &QProcess::errorOccurred, this,
|
connect(this, &QProcess::errorOccurred, this,
|
||||||
[this](QProcess::ProcessError error){
|
[this](QProcess::ProcessError error){
|
||||||
if (QProcess::FailedToStart == error) {
|
if (QProcess::FailedToStart == error) {
|
||||||
emit adbProcessResult(AER_ERROR_MISSING_BINARY);
|
emit adbProcessResult(AER_ERROR_MISSING_BINARY);
|
||||||
} else {
|
} else {
|
||||||
|
@ -86,7 +86,6 @@ void AdbProcess::execute(const QString& serial, const QStringList& args)
|
||||||
adbArgs << args;
|
adbArgs << args;
|
||||||
qDebug() << getAdbPath() << adbArgs.join(" ");
|
qDebug() << getAdbPath() << adbArgs.join(" ");
|
||||||
start(getAdbPath(), adbArgs);
|
start(getAdbPath(), adbArgs);
|
||||||
//start("C:\\Users\\Barry\\Desktop\\sockettool.exe", Q_NULLPTR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AdbProcess::isRuning()
|
bool AdbProcess::isRuning()
|
||||||
|
|
|
@ -15,8 +15,8 @@ int main(int argc, char *argv[])
|
||||||
Decoder::init();
|
Decoder::init();
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
qputenv("QTSCRCPY_ADB_PATH", "G:\\mygitcode\\QtScrcpy\\src\\adb.exe");
|
//qputenv("QTSCRCPY_ADB_PATH", "G:\\mygitcode\\QtScrcpy\\src\\adb.exe");
|
||||||
qputenv("QTSCRCPY_SERVER_PATH", "G:\\mygitcode\\QtScrcpy\\src\\scrcpy-server.jar");
|
//qputenv("QTSCRCPY_SERVER_PATH", "G:\\mygitcode\\QtScrcpy\\src\\scrcpy-server.jar");
|
||||||
|
|
||||||
Dialog* w = new Dialog;
|
Dialog* w = new Dialog;
|
||||||
w->show();
|
w->show();
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <QTimerEvent>
|
#include <QTimerEvent>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
|
|
||||||
|
@ -52,7 +53,7 @@ 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()) {
|
if (m_serverPath.isEmpty()) {
|
||||||
m_serverPath = "scrcpy-server.jar";
|
m_serverPath = QCoreApplication::applicationDirPath() + "/scrcpy-server.jar";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return m_serverPath;
|
return m_serverPath;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue