mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-19 19:15:07 +00:00
commit
5537a15a48
15 changed files with 89 additions and 13 deletions
4
.github/workflows/macos.yml
vendored
4
.github/workflows/macos.yml
vendored
|
@ -13,10 +13,10 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: macos-10.15
|
||||
runs-on: macos-11
|
||||
strategy:
|
||||
matrix:
|
||||
qt-ver: [5.15.1]
|
||||
qt-ver: [5.15.2]
|
||||
qt-arch-install: [clang_64]
|
||||
clang-arch: [x64]
|
||||
env:
|
||||
|
|
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
|||
# 矩阵配置 https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
|
||||
strategy:
|
||||
matrix:
|
||||
qt-ver: [5.15.1]
|
||||
qt-ver: [5.15.2]
|
||||
qt-arch: [win64_msvc2019_64, win32_msvc2019]
|
||||
# 配置qt-arch的额外设置msvc-arch,qt-arch-install
|
||||
include:
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9b81a312ad2e8157c48dc042e973a81702357509
|
||||
Subproject commit 0ed6236e0a43cf27baef51dab7a64cb36fd068c0
|
|
@ -113,6 +113,9 @@ int main(int argc, char *argv[])
|
|||
"following address:");
|
||||
qInfo() << QString("QtScrcpy %1 <https://github.com/barry-ran/QtScrcpy>").arg(QCoreApplication::applicationVersion());
|
||||
|
||||
qInfo() << QObject::tr("If you need more professional screen projection control software, you can try the following software:");
|
||||
qInfo() << QString(QObject::tr("QuickMirror") + " <https://lrbnfell4p.feishu.cn/docx/QRMhd9nImorAGgxVLlmczxSdnYf>");
|
||||
|
||||
int ret = a.exec();
|
||||
delete g_mainDlg;
|
||||
|
||||
|
|
Binary file not shown.
|
@ -38,6 +38,14 @@
|
|||
<source>This software is completely open source and free. Use it at your own risk. You can download it at the following address:</source>
|
||||
<translation>This software is completely open source and free. Use it at your own risk. You can download it at the following address:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>If you need more professional screen projection control software, you can try the following software:</source>
|
||||
<translation>If you need more professional screen projection control software, you can try the following software:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>QuickMirror</source>
|
||||
<translation>QuickMirror</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ToolForm</name>
|
||||
|
|
Binary file not shown.
|
@ -38,6 +38,14 @@
|
|||
<source>This software is completely open source and free. Use it at your own risk. You can download it at the following address:</source>
|
||||
<translation>本软件完全开源免费,作者不对使用该软件产生的一切后果负责。你可以在以下地址下载:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>If you need more professional screen projection control software, you can try the following software:</source>
|
||||
<translation>如果你需要更加专业的投屏控制软件,可以尝试作者开发的商业版:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>QuickMirror</source>
|
||||
<translation>极限投屏</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ToolForm</name>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <QFile>
|
||||
#include <QFileDialog>
|
||||
#include <QKeyEvent>
|
||||
#include <QRandomGenerator>
|
||||
#include <QTime>
|
||||
#include <QTimer>
|
||||
|
||||
|
@ -272,10 +273,13 @@ void Dialog::slotActivated(QSystemTrayIcon::ActivationReason reason)
|
|||
void Dialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
this->hide();
|
||||
m_hideIcon->showMessage(tr("Notice"),
|
||||
tr("Hidden here!"),
|
||||
QSystemTrayIcon::Information,
|
||||
3000);
|
||||
if (!Config::getInstance().getTrayMessageShown()) {
|
||||
Config::getInstance().setTrayMessageShown(true);
|
||||
m_hideIcon->showMessage(tr("Notice"),
|
||||
tr("Hidden here!"),
|
||||
QSystemTrayIcon::Information,
|
||||
3000);
|
||||
}
|
||||
event->ignore();
|
||||
}
|
||||
|
||||
|
@ -317,6 +321,7 @@ void Dialog::on_startServerBtn_clicked()
|
|||
params.logLevel = Config::getInstance().getLogLevel();
|
||||
params.codecOptions = Config::getInstance().getCodecOptions();
|
||||
params.codecName = Config::getInstance().getCodecName();
|
||||
params.scid = QRandomGenerator::global()->bounded(1, 10000) & 0x7FFFFFFF;
|
||||
|
||||
qsc::IDeviceManage::getInstance().connectDevice(params);
|
||||
}
|
||||
|
@ -454,8 +459,10 @@ void Dialog::onDeviceConnected(bool success, const QString &serial, const QStrin
|
|||
videoForm->staysOnTop();
|
||||
}
|
||||
|
||||
#ifndef Q_OS_WIN32
|
||||
// must be show before updateShowSize
|
||||
videoForm->show();
|
||||
#endif
|
||||
QString name = Config::getInstance().getNickName(serial);
|
||||
if (name.isEmpty()) {
|
||||
name = Config::getInstance().getTitle();
|
||||
|
@ -473,6 +480,11 @@ void Dialog::onDeviceConnected(bool success, const QString &serial, const QStrin
|
|||
videoForm->setGeometry(rc);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
// windows是show太早可以看到resize的过程
|
||||
QTimer::singleShot(200, videoForm, [videoForm](){videoForm->show();});
|
||||
#endif
|
||||
|
||||
GroupController::instance().addDevice(serial);
|
||||
}
|
||||
|
||||
|
|
|
@ -513,6 +513,9 @@ void VideoForm::switchFullScreen()
|
|||
|
||||
bool VideoForm::isHost()
|
||||
{
|
||||
if (!m_toolForm) {
|
||||
return false;
|
||||
}
|
||||
return m_toolForm->isHost();
|
||||
}
|
||||
|
||||
|
@ -719,7 +722,9 @@ void VideoForm::showEvent(QShowEvent *event)
|
|||
{
|
||||
Q_UNUSED(event)
|
||||
if (!isFullScreen()) {
|
||||
showToolForm();
|
||||
QTimer::singleShot(500, this, [this](){
|
||||
showToolForm();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#define COMMON_PUSHFILE_DEF "/sdcard/"
|
||||
|
||||
#define COMMON_SERVER_VERSION_KEY "ServerVersion"
|
||||
#define COMMON_SERVER_VERSION_DEF "1.24"
|
||||
#define COMMON_SERVER_VERSION_DEF "2.1.1"
|
||||
|
||||
#define COMMON_SERVER_PATH_KEY "ServerPath"
|
||||
#define COMMON_SERVER_PATH_DEF "/data/local/tmp/scrcpy-server.jar"
|
||||
|
@ -93,6 +93,9 @@
|
|||
#define COMMON_AUTO_UPDATE_DEVICE_KEY "AutoUpdateDevice"
|
||||
#define COMMON_AUTO_UPDATE_DEVICE_DEF true
|
||||
|
||||
#define COMMON_TRAY_MESSAGE_SHOWN_KEY "TrayMessageShown"
|
||||
#define COMMON_TRAY_MESSAGE_SHOWN_DEF false
|
||||
|
||||
// device config
|
||||
#define SERIAL_WINDOW_RECT_KEY_X "WindowRectX"
|
||||
#define SERIAL_WINDOW_RECT_KEY_Y "WindowRectY"
|
||||
|
@ -187,6 +190,23 @@ UserBootConfig Config::getUserBootConfig()
|
|||
return config;
|
||||
}
|
||||
|
||||
void Config::setTrayMessageShown(bool shown)
|
||||
{
|
||||
m_userData->beginGroup(GROUP_COMMON);
|
||||
m_userData->setValue(COMMON_TRAY_MESSAGE_SHOWN_KEY, shown);
|
||||
m_userData->endGroup();
|
||||
m_userData->sync();
|
||||
}
|
||||
|
||||
bool Config::getTrayMessageShown()
|
||||
{
|
||||
bool shown;
|
||||
m_userData->beginGroup(GROUP_COMMON);
|
||||
shown = m_userData->value(COMMON_TRAY_MESSAGE_SHOWN_KEY, COMMON_TRAY_MESSAGE_SHOWN_DEF).toBool();
|
||||
m_userData->endGroup();
|
||||
return shown;
|
||||
}
|
||||
|
||||
void Config::setRect(const QString &serial, const QRect &rc)
|
||||
{
|
||||
m_userData->beginGroup(serial);
|
||||
|
|
|
@ -50,6 +50,8 @@ public:
|
|||
// user data:common
|
||||
void setUserBootConfig(const UserBootConfig &config);
|
||||
UserBootConfig getUserBootConfig();
|
||||
void setTrayMessageShown(bool shown);
|
||||
bool getTrayMessageShown();
|
||||
|
||||
// user data:device
|
||||
void setNickName(const QString &serial, const QString &name);
|
||||
|
|
22
README_zh.md
22
README_zh.md
|
@ -30,6 +30,24 @@ QtScrcpy 可以通过 USB / 网络连接Android设备,并进行显示和控制
|
|||
|
||||

|
||||
|
||||
## 作者开发了更加专业的投屏软件`极限投屏`
|
||||
极限投屏功能&特点:
|
||||
- 设备投屏&控制:批量投屏、单个控制、批量控制
|
||||
- 分组管理
|
||||
- wifi投屏/OTG投屏
|
||||
- adb shell快捷指令
|
||||
- 文件传输、apk安装
|
||||
- 投屏数量多:在OTG投屏模式,设置分辨率和流畅度为低的情况下,单台电脑可以同时管理500+台手机
|
||||
- 低延迟:usb投屏1080p延迟在30ms以内,在相同分辨率流畅度情况下,比市面上所有投屏软件延迟都低
|
||||
- cpu占用率低:纯C++开发,高性能GPU视频渲染
|
||||
- 高分辨率:可调节,最大支持安卓终端的原生分辨率
|
||||
- 完美中文输入:支持闲鱼app,支持三星手机
|
||||
- 免费版最多投屏20台,功能无限制(除了自动重新投屏)
|
||||
- 极限投屏使用教程:https://lrbnfell4p.feishu.cn/docx/QRMhd9nImorAGgxVLlmczxSdnYf
|
||||
- 极限投屏qq交流群:822464342
|
||||
- 极限投屏界面预览:
|
||||

|
||||
|
||||
## 自定义按键映射
|
||||
可以根据需要,自己编写脚本将键盘按键映射为手机的触摸点击,编写规则在[这里](docs/KeyMapDes_zh.md)。
|
||||
|
||||
|
@ -48,7 +66,7 @@ QtScrcpy 可以通过 USB / 网络连接Android设备,并进行显示和控制
|
|||
- 再次按~键切换为正常控制模式
|
||||
- (对于和平精英等游戏)若想使用方向盘控制载具,记得在载具设置中设置为单摇杆模式
|
||||
|
||||
## 群控
|
||||
## 批量操作
|
||||
你可以同时控制所有的手机
|
||||
|
||||

|
||||
|
@ -176,7 +194,7 @@ Mac OS 平台,你可以直接使用我编译好的可执行程序:
|
|||
- 屏幕录制
|
||||
- 截图
|
||||
- 无线连接
|
||||
- 多设备连接与群控
|
||||
- 多设备连接与批量操作
|
||||
- 全屏显示
|
||||
- 窗口置顶
|
||||
- 安装 apk:拖拽apk到显示窗口即可安装
|
||||
|
|
|
@ -10,7 +10,7 @@ RenderExpiredFrames=0
|
|||
# 视频解码方式:-1 自动,0 软解,1 dx硬解,2 opengl硬解
|
||||
UseDesktopOpenGL=-1
|
||||
# scrcpy-server的版本号(不要修改)
|
||||
ServerVersion=1.24
|
||||
ServerVersion=2.1.1
|
||||
# scrcpy-server推送到安卓设备的路径
|
||||
ServerPath=/data/local/tmp/scrcpy-server.jar
|
||||
# 自定义adb路径,例如D:/android/tools/adb.exe
|
||||
|
|
BIN
docs/image/quickmirror.png
Normal file
BIN
docs/image/quickmirror.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 MiB |
Loading…
Add table
Reference in a new issue