[docs] document IP direct mode and refresh desktop screenshots
@@ -22,13 +22,14 @@
|
|||||||
|
|
||||||
CrossDesk 让你从电脑、浏览器或手机连接远端电脑,也能通过 **桌面墙(DeskHub)** 集中查看与操控多台设备。项目基于 [MiniRTC](https://github.com/kunkundi/minirtc),支持自托管。
|
CrossDesk 让你从电脑、浏览器或手机连接远端电脑,也能通过 **桌面墙(DeskHub)** 集中查看与操控多台设备。项目基于 [MiniRTC](https://github.com/kunkundi/minirtc),支持自托管。
|
||||||
|
|
||||||
[主要功能](#features) · [下载与平台支持](#download) · [快速连接](#quick-start) · [界面预览](#preview) · [使用指南](docs/USER_GUIDE.md) · [自托管](#self-hosting) · [构建与反馈](#development) · [赞助](#sponsor)
|
[主要功能](#features) · [下载与平台支持](#download) · [快速连接](#quick-start) · [IP 直连](#lan-direct) · [界面预览](#preview) · [使用指南](docs/USER_GUIDE.md) · [自托管](#self-hosting) · [构建与反馈](#development) · [赞助](#sponsor)
|
||||||
|
|
||||||
<a id="features"></a>
|
<a id="features"></a>
|
||||||
|
|
||||||
## 主要功能
|
## 主要功能
|
||||||
|
|
||||||
- **跨平台远控:** Windows、macOS、Linux 桌面互控,浏览器及原生 iOS / Android 客户端访问电脑;鸿蒙 PC 与移动端处于开发阶段。
|
- **跨平台远控:** Windows、macOS、Linux 桌面互控,浏览器及原生 iOS / Android 客户端访问电脑;鸿蒙 PC 与移动端处于开发阶段。
|
||||||
|
- **局域网 IP 直连:** 桌面客户端通过 IP、端口和六位密码连接,无需云端信令服务;支持独立端口、记住密码及按模式显示近期设备。
|
||||||
- **桌面墙:** 多设备实时预览、分组、放大操控、群控和批量文件分发。
|
- **桌面墙:** 多设备实时预览、分组、放大操控、群控和批量文件分发。
|
||||||
- **画面与声音:** H.264 / AV1、硬件编解码、远端音频,以及会话内画质和帧率调整;可用能力随平台与设备而异。
|
- **画面与声音:** H.264 / AV1、硬件编解码、远端音频,以及会话内画质和帧率调整;可用能力随平台与设备而异。
|
||||||
- **日常协作:** 多显示器切换、键鼠与组合键、文本剪贴板、文件传输。
|
- **日常协作:** 多显示器切换、键鼠与组合键、文本剪贴板、文件传输。
|
||||||
@@ -61,22 +62,42 @@ CrossDesk 让你从电脑、浏览器或手机连接远端电脑,也能通过
|
|||||||
|
|
||||||
## 快速连接
|
## 快速连接
|
||||||
|
|
||||||
1. **准备被控电脑。** 安装并运行 CrossDesk,等待显示“已连接服务器”,查看“本桌面”中的本机 ID 和密码。
|
### 通过设备 ID 连接
|
||||||
|
|
||||||
|
1. **准备被控电脑。** 安装并运行 CrossDesk,切换至 ID 连接模式,等待显示“已连接服务器”,查看“本桌面”中的本机 ID 和密码。
|
||||||
2. **发起连接。** 在另一台电脑的 CrossDesk 中输入被控电脑的 9 位 ID,点击“连接”;也可使用原生移动端或 [Web 客户端](https://web.crossdesk.cn/)。
|
2. **发起连接。** 在另一台电脑的 CrossDesk 中输入被控电脑的 9 位 ID,点击“连接”;也可使用原生移动端或 [Web 客户端](https://web.crossdesk.cn/)。
|
||||||
3. **验证密码。** 输入被控电脑当前的连接密码,等待远程画面出现。桌面端可勾选“记住密码”,后续从“近期连接”重连。
|
3. **验证密码。** 输入被控电脑当前的连接密码,等待远程画面出现。桌面端可勾选“记住密码”,后续从“近期连接”重连。
|
||||||
|
|
||||||
使用自建服务器时,两端需要接入同一服务。更多连接、密码及浏览器操作见 [使用指南](docs/USER_GUIDE.md#quick-start);连接失败、黑屏或无法操作键鼠时先查阅 [常见问题](docs/FAQ.md)。
|
使用自建服务器时,两端需要接入同一服务。更多连接、密码及浏览器操作见 [使用指南](docs/USER_GUIDE.md#quick-start);连接失败、黑屏或无法操作键鼠时先查阅 [常见问题](docs/FAQ.md)。
|
||||||
|
|
||||||
|
<a id="lan-direct"></a>
|
||||||
|
|
||||||
|
### 通过局域网 IP 直连
|
||||||
|
|
||||||
|
1. **切换模式。** 两台电脑均运行支持 IP 直连的桌面客户端,点击左上角模式按钮切换到 **IP 直连模式**。若按钮未显示,在 **设置 → 常规 → 网络连接** 中勾选 **启用 IP 直连** 并保存。
|
||||||
|
2. **填写地址。** 在控制端输入被控电脑显示的 `IP:端口`,例如 `192.168.1.20:52888`,点击“连接”。只输入 IP 时使用默认端口 **52888**;请以对方界面显示的实际端口为准。
|
||||||
|
3. **输入密码。** 输入被控电脑在 IP 直连模式下显示的 **6 位英文字母或数字密码**,可勾选“记住密码”。切换模式时,“近期连接”同步切换为对应模式的设备记录。
|
||||||
|
|
||||||
|
两台电脑需要在局域网内可互相访问;网络可以有外网,也可以没有外网,直连会话不依赖云端信令服务。主窗口可直接切换本机 IP、修改各 IP 的端口和密码;关闭设置中的“启用 IP 直连”会停止监听、断开 IP 直连会话并隐藏模式按钮。详见 [IP 直连使用指南](docs/USER_GUIDE.md#lan-direct)。
|
||||||
|
|
||||||
<a id="preview"></a>
|
<a id="preview"></a>
|
||||||
|
|
||||||
## 界面预览
|
## 界面预览
|
||||||
|
|
||||||
### 桌面客户端
|
### 桌面客户端
|
||||||
|
|
||||||
本机凭据、远程连接和近期设备集中在主窗口,左上角进入桌面墙。
|
本机凭据、远程连接和近期设备集中在主窗口,左上角提供连接模式切换和桌面墙入口。
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="docs/images/desktop-main-zh.png" width="800" alt="CrossDesk 主窗口:本机凭据、远程连接入口和近期设备;数据为演示" />
|
<img src="docs/images/desktop-main-zh.png" width="800" alt="CrossDesk ID 连接模式:模式切换、本机 ID、远程连接入口和近期设备;数据为演示" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
### IP 直连模式
|
||||||
|
|
||||||
|
切换本机 IP、修改端口与密码,通过对方地址连接;下方展示独立的局域网近期设备。
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="docs/images/desktop-lan-zh.png" width="800" alt="CrossDesk IP 直连模式:本机 IP 和端口编辑入口、六位密码、远端地址输入和局域网近期设备;数据为演示" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<a id="deskhub"></a>
|
<a id="deskhub"></a>
|
||||||
@@ -96,7 +117,7 @@ CrossDesk 让你从电脑、浏览器或手机连接远端电脑,也能通过
|
|||||||
|
|
||||||
## 会话操作与设置
|
## 会话操作与设置
|
||||||
|
|
||||||
远程会话支持显示器切换、画质与帧率调整、声音、文本剪贴板同步和文件传输。工具栏还可查看网络状态、控制隐私屏;桌面设置中可配置编码、中继、自托管与桌面墙画面预算。
|
远程会话支持显示器切换、画质与帧率调整、声音、文本剪贴板同步和文件传输。工具栏还可查看网络状态、控制隐私屏;桌面设置中可配置 IP 直连开关、编码、中继、自托管与桌面墙画面预算。
|
||||||
|
|
||||||
- [会话操作](docs/USER_GUIDE.md#session):工具栏、文本剪贴板、文件保存和隐私屏。
|
- [会话操作](docs/USER_GUIDE.md#session):工具栏、文本剪贴板、文件保存和隐私屏。
|
||||||
- [客户端设置与更新](docs/USER_GUIDE.md#settings):常规设置、桌面墙传输及版本检查。
|
- [客户端设置与更新](docs/USER_GUIDE.md#settings):常规设置、桌面墙传输及版本检查。
|
||||||
|
|||||||
@@ -22,13 +22,14 @@
|
|||||||
|
|
||||||
CrossDesk connects your computers from desktop, browser, and mobile clients, with **DeskHub** for viewing and controlling multiple devices together. It is built on [MiniRTC](https://github.com/kunkundi/minirtc) and supports self-hosting.
|
CrossDesk connects your computers from desktop, browser, and mobile clients, with **DeskHub** for viewing and controlling multiple devices together. It is built on [MiniRTC](https://github.com/kunkundi/minirtc) and supports self-hosting.
|
||||||
|
|
||||||
[Features](#features) · [Download and platforms](#download) · [Quick start](#quick-start) · [Preview](#preview) · [User guide](docs/USER_GUIDE_EN.md) · [Self-hosting](#self-hosting) · [Build and feedback](#development) · [Sponsor](#sponsor)
|
[Features](#features) · [Download and platforms](#download) · [Quick start](#quick-start) · [Direct IP](#lan-direct) · [Preview](#preview) · [User guide](docs/USER_GUIDE_EN.md) · [Self-hosting](#self-hosting) · [Build and feedback](#development) · [Sponsor](#sponsor)
|
||||||
|
|
||||||
<a id="features"></a>
|
<a id="features"></a>
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Cross-platform access:** control Windows, macOS, and Linux desktops from computers, browsers, or native iOS / Android clients. HarmonyOS PC and mobile clients are in development.
|
- **Cross-platform access:** control Windows, macOS, and Linux desktops from computers, browsers, or native iOS / Android clients. HarmonyOS PC and mobile clients are in development.
|
||||||
|
- **Direct IP over LAN:** connect desktop clients using an IP address, port, and six-character password without a cloud signaling service. Each local IP has its own port; passwords can be remembered and recent devices are separated by mode.
|
||||||
- **DeskHub:** live multi-device previews, groups, enlarged control, group input, and batch file distribution.
|
- **DeskHub:** live multi-device previews, groups, enlarged control, group input, and batch file distribution.
|
||||||
- **Video and audio:** H.264 / AV1, hardware codecs, remote audio, and in-session quality and frame-rate controls. Capabilities depend on the platform and device.
|
- **Video and audio:** H.264 / AV1, hardware codecs, remote audio, and in-session quality and frame-rate controls. Capabilities depend on the platform and device.
|
||||||
- **Everyday controls:** monitor switching, keyboard and mouse input, shortcuts, text clipboard, and file transfer.
|
- **Everyday controls:** monitor switching, keyboard and mouse input, shortcuts, text clipboard, and file transfer.
|
||||||
@@ -61,22 +62,42 @@ Requirements follow the current source and build configuration. Check the releas
|
|||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
1. **Prepare the host.** Install and run CrossDesk on the computer to control. Wait for the server-connected status, then find its ID and password under **Local Desktop**.
|
### Connect by device ID
|
||||||
|
|
||||||
|
1. **Prepare the host.** Install and run CrossDesk on the computer to control, select ID mode, and wait for the server-connected status, then find its ID and password under **Local Desktop**.
|
||||||
2. **Connect.** On another computer, enter the host's 9-digit ID and click **Connect**. Native mobile clients and the [Web Client](https://web.crossdesk.cn/) can also connect.
|
2. **Connect.** On another computer, enter the host's 9-digit ID and click **Connect**. Native mobile clients and the [Web Client](https://web.crossdesk.cn/) can also connect.
|
||||||
3. **Verify the password.** Enter the host's current connection password and wait for the desktop to appear. On desktop, select **Remember password** to reconnect later from **Recent Connections**.
|
3. **Verify the password.** Enter the host's current connection password and wait for the desktop to appear. On desktop, select **Remember password** to reconnect later from **Recent Connections**.
|
||||||
|
|
||||||
For self-hosting, both ends must use the same service. See the [user guide](docs/USER_GUIDE_EN.md#quick-start) for connection, password, and browser controls, or the [FAQ](docs/FAQ.md#english) for failed connections, blank video, and input problems.
|
For self-hosting, both ends must use the same service. See the [user guide](docs/USER_GUIDE_EN.md#quick-start) for connection, password, and browser controls, or the [FAQ](docs/FAQ.md#english) for failed connections, blank video, and input problems.
|
||||||
|
|
||||||
|
<a id="lan-direct"></a>
|
||||||
|
|
||||||
|
### Connect directly over LAN
|
||||||
|
|
||||||
|
1. **Switch modes.** Run a desktop client with direct IP support on both computers. Click the top-left mode button to select **Direct IP mode**. If the button is hidden, select **Enable direct IP** under **Settings → General → Network** and save.
|
||||||
|
2. **Enter the address.** On the controller, enter the host's displayed `IP:port`, for example `192.168.1.20:52888`, and click **Connect**. Omitting the port uses **52888**; use the actual port shown on the host.
|
||||||
|
3. **Enter the password.** Use the host's **six-character ASCII letter/digit password** shown in Direct IP mode. You can select **Remember password**. Switching modes also switches the recent device list.
|
||||||
|
|
||||||
|
Both computers must be reachable over the LAN. Internet access may be available or absent; direct sessions do not depend on a cloud signaling service. The main window lets you select the local IP, edit its port, and change the password. Disabling **Enable direct IP** stops listeners, disconnects direct IP sessions, and hides the mode button. See the [direct IP guide](docs/USER_GUIDE_EN.md#lan-direct).
|
||||||
|
|
||||||
<a id="preview"></a>
|
<a id="preview"></a>
|
||||||
|
|
||||||
## Preview
|
## Preview
|
||||||
|
|
||||||
### Desktop client
|
### Desktop client
|
||||||
|
|
||||||
Local credentials, remote connections, and recent devices share the main window. Open DeskHub from the top-left corner.
|
Local credentials, remote connections, and recent devices share the main window. The top-left controls switch connection modes and open DeskHub.
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="docs/images/desktop-main-en.png" width="800" alt="CrossDesk main window with local credentials, remote connection controls, and recent devices; demonstration data" />
|
<img src="docs/images/desktop-main-en.png" width="800" alt="CrossDesk ID mode with the mode switch, local ID, remote connection controls, and recent devices; demonstration data" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
### Direct IP mode
|
||||||
|
|
||||||
|
Select the local IP, edit its port and password, and connect using the other desktop's address. Recent LAN devices have their own list below.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="docs/images/desktop-lan-en.png" width="800" alt="CrossDesk Direct IP mode with local IP and port editing, a six-character password, remote address input, and recent LAN devices; demonstration data" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<a id="deskhub"></a>
|
<a id="deskhub"></a>
|
||||||
@@ -96,7 +117,7 @@ Group control sends input to all connected devices; closing DeskHub disconnects
|
|||||||
|
|
||||||
## Session controls and settings
|
## Session controls and settings
|
||||||
|
|
||||||
Remote sessions support monitor switching, video quality and frame-rate controls, audio, text clipboard synchronization, and file transfer. The toolbar also provides network statistics and privacy screen controls. Desktop settings configure codecs, relay, self-hosting, and the DeskHub video budget.
|
Remote sessions support monitor switching, video quality and frame-rate controls, audio, text clipboard synchronization, and file transfer. The toolbar also provides network statistics and privacy screen controls. Desktop settings configure direct IP availability, codecs, relay, self-hosting, and the DeskHub video budget.
|
||||||
|
|
||||||
- [Session controls](docs/USER_GUIDE_EN.md#session): toolbar, text clipboard, received files, and privacy screens.
|
- [Session controls](docs/USER_GUIDE_EN.md#session): toolbar, text clipboard, received files, and privacy screens.
|
||||||
- [Client settings and updates](docs/USER_GUIDE_EN.md#settings): general options, DeskHub video settings, and version checks.
|
- [Client settings and updates](docs/USER_GUIDE_EN.md#settings): general options, DeskHub video settings, and version checks.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
首次使用请先查看 [下载与安装](../README.md#download)。本文介绍当前源码中的客户端操作;安装包的可用功能以对应 Release 为准。
|
首次使用请先查看 [下载与安装](../README.md#download)。本文介绍当前源码中的客户端操作;安装包的可用功能以对应 Release 为准。
|
||||||
|
|
||||||
[安装与权限](#installation) · [快速连接](#quick-start) · [桌面墙](#deskhub) · [会话操作](#session) · [设置与更新](#settings) · [iOS](#ios) · [Android](#android) · [鸿蒙](#harmonyos) · [Windows 无人值守](#windows-service) · [自托管](#self-hosting)
|
[安装与权限](#installation) · [快速连接](#quick-start) · [IP 直连](#lan-direct) · [桌面墙](#deskhub) · [会话操作](#session) · [设置与更新](#settings) · [iOS](#ios) · [Android](#android) · [鸿蒙](#harmonyos) · [Windows 无人值守](#windows-service) · [自托管](#self-hosting)
|
||||||
|
|
||||||
截图使用演示设备和凭据,来源与生成方式见 [截图说明](images/README.md)。
|
截图使用演示设备和凭据,来源与生成方式见 [截图说明](images/README.md)。
|
||||||
|
|
||||||
@@ -39,15 +39,36 @@ sudo apt install "./crossdesk-virtual-desktop-xfce-linux-amd64-<version>.deb"
|
|||||||
|
|
||||||
## 快速连接
|
## 快速连接
|
||||||
|
|
||||||
### 从另一台电脑连接
|
### 通过设备 ID 从另一台电脑连接
|
||||||
|
|
||||||
1. **准备被控电脑。** 安装并运行 CrossDesk,等待底部显示“已连接服务器”。在左侧“本桌面”查看 **本机 ID** 和 **密码**,提供给控制端。
|
1. **准备被控电脑。** 安装并运行 CrossDesk,切换至 ID 连接模式,等待底部显示“已连接服务器”。在左侧“本桌面”查看 **本机 ID** 和 **密码**,提供给控制端。
|
||||||
2. **输入对端 ID。** 在控制端右侧“远程桌面 → 对端 ID”输入被控电脑的 **9 位 ID**,点击 **连接**。
|
2. **输入对端 ID。** 在控制端右侧“远程桌面 → 对端 ID”输入被控电脑的 **9 位 ID**,点击 **连接**。
|
||||||
3. **完成密码验证。** 按弹窗输入被控电脑当前的连接密码,确认后等待远程画面出现。需要保存密码时勾选“记住密码”。
|
3. **完成密码验证。** 按弹窗输入被控电脑当前的连接密码,确认后等待远程画面出现。需要保存密码时勾选“记住密码”。
|
||||||
4. **再次连接。** 成功连接过的设备会出现在“近期连接”中,可通过卡片重连。点击卡片右上角的“…”菜单可编辑别名、修改分组或删除记录,右下角按钮用于连接 / 断开;标题右侧可按分组筛选设备。
|
4. **再次连接。** 成功连接过的设备会出现在“近期连接”中,可通过卡片重连。点击卡片右上角的“…”菜单可编辑别名、修改分组或删除记录,右下角按钮用于连接 / 断开;标题右侧可按分组筛选设备。
|
||||||
|
|
||||||
本机密码旁的眼睛按钮用于显示 / 隐藏密码,刷新按钮用于生成新的随机密码,铅笔按钮用于手动修改。密码统一为 **6 位数字或英文字母**。修改或刷新时需保持连接服务器;等待修改成功、客户端重新连接后,再复制当前密码。已保存旧密码的控制端需重新输入。
|
本机密码旁的眼睛按钮用于显示 / 隐藏密码,刷新按钮用于生成新的随机密码,铅笔按钮用于手动修改。密码统一为 **6 位数字或英文字母**。修改或刷新时需保持连接服务器;等待修改成功、客户端重新连接后,再复制当前密码。已保存旧密码的控制端需重新输入。
|
||||||
|
|
||||||
|
<a id="lan-direct"></a>
|
||||||
|
|
||||||
|
### 通过局域网 IP 直连
|
||||||
|
|
||||||
|
当前 IP 直连入口用于 Windows、macOS、Linux 的普通桌面客户端。两台电脑的 IPv4 地址需要可互相访问;有无外网均可,不需要等待连接信令服务器。浏览器、移动端、Windows 登录前服务及 Linux 无头控制台目前继续使用设备 ID 连接流程。
|
||||||
|
|
||||||
|
1. **启用并切换。** 两端在 **设置 → 常规 → 网络连接** 中启用 **IP 直连** 并保存(默认开启),再用主窗口左上角按钮切换到 **IP 直连模式**。
|
||||||
|
2. **获取对方地址。** 被控端在“本机 IP / 端口”查看地址,复制按钮会复制完整的 `IP:端口`。有多个地址时,选择控制端能够访问的地址。
|
||||||
|
3. **连接并验证。** 控制端在“远端 IP / 端口”输入例如 `192.168.1.20:52888`,点击“连接”,再输入被控端此模式下的六位密码。省略端口时使用 **52888**;当前支持数字 IPv4,不支持主机名或 IPv6。
|
||||||
|
4. **保存与重连。** 密码弹窗可勾选“记住密码”。近期连接按 ID / IP 模式分别显示;不勾选也会保存设备记录,下次连接需重新输入密码。可从卡片重连、修改别名或删除记录。
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="images/desktop-lan-password-zh.png" width="720" alt="IP 直连密码弹窗与记住密码选项,背景为演示局域网设备" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
**地址和端口:** 点击“切换 IP”选择展示与分享的地址,点击“修改端口”编辑该 IP 的端口。程序同时监听可用物理网卡上的 IPv4,每个 IP 单独保存端口;切换展示地址不会停用其他地址。首次为某个 IP 分配端口时优先使用 **52888**,被占用时自动分配并保存可用端口。已有配置的端口发生冲突时会提示,需手动修改。端口范围为 **1–65535**,修改失败会保留原设置;连接方需要使用界面显示的实际端口。局域网防火墙需允许 CrossDesk 的 TCP 协商连接和 UDP 远控流量。
|
||||||
|
|
||||||
|
**密码:** IP 直连使用独立的 **6 位英文字母或数字密码,区分大小写**。没有设置时自动生成,眼睛、刷新和铅笔按钮分别用于显示 / 隐藏、随机生成和自定义;修改成功后即时生效,无需重启或连接服务器。已保存旧密码的控制端需要重新输入。
|
||||||
|
|
||||||
|
**模式和开关:** 模式切换会保存,下次启动沿用。切回 ID 模式仅切换连接入口和近期记录,IP 监听仍然运行。需要停止 IP 直连时,在设置中取消“启用 IP 直连”并保存:程序会断开现有 IP 直连会话、释放监听端口、回到 ID 模式并隐藏模式按钮;原有 ID 会话继续运行,IP 密码、端口及近期记录保留。重新启用后沿用这些设置。
|
||||||
|
|
||||||
### 从浏览器连接
|
### 从浏览器连接
|
||||||
|
|
||||||
1. 保持被控电脑上的 CrossDesk 运行,并确认已连接服务器。
|
1. 保持被控电脑上的 CrossDesk 运行,并确认已连接服务器。
|
||||||
@@ -127,6 +148,7 @@ sudo apt install "./crossdesk-virtual-desktop-xfce-linux-amd64-<version>.deb"
|
|||||||
| 语言 | 中文、English、Русский |
|
| 语言 | 中文、English、Русский |
|
||||||
| 采集方式(Windows) | 自动 / DXGI / WGC / GDI;无显示器主机使用“自动”启用自动适配 |
|
| 采集方式(Windows) | 自动 / DXGI / WGC / GDI;无显示器主机使用“自动”启用自动适配 |
|
||||||
| 视频编码格式 | H.264 / AV1;H.264 自动优先使用硬件编解码,不可用或初始化失败时回退到软件;桌面端 AV1 使用软件编解码 |
|
| 视频编码格式 | H.264 / AV1;H.264 自动优先使用硬件编解码,不可用或初始化失败时回退到软件;桌面端 AV1 使用软件编解码 |
|
||||||
|
| 启用 IP 直连 | 默认开启;保存后即时启停 IP 直连。关闭会断开 IP 会话、停止监听并隐藏主窗口模式按钮,重启后保持 |
|
||||||
| 启用中继服务 | 允许借助 TURN 中继建立连接;P2P 连接失败时先检查此项 |
|
| 启用中继服务 | 允许借助 TURN 中继建立连接;P2P 连接失败时先检查此项 |
|
||||||
| 强制中继连接 | 启用中继服务后可勾选,让连接通过中继建立;关闭中继服务会同时关闭此项 |
|
| 强制中继连接 | 启用中继服务后可勾选,让连接通过中继建立;关闭中继服务会同时关闭此项 |
|
||||||
| 保存远程画面预览 | 默认开启,保存远程画面预览;关闭后缩略图区域显示被控端平台,并清除已有预览,保留连接记录和密码 |
|
| 保存远程画面预览 | 默认开启,保存远程画面预览;关闭后缩略图区域显示被控端平台,并清除已有预览,保留连接记录和密码 |
|
||||||
@@ -135,6 +157,12 @@ sudo apt install "./crossdesk-virtual-desktop-xfce-linux-amd64-<version>.deb"
|
|||||||
| 开机自启 / 启用守护进程 | 调整启动与进程守护行为,按界面提示重启后生效 |
|
| 开机自启 / 启用守护进程 | 调整启动与进程守护行为,按界面提示重启后生效 |
|
||||||
| 文件保存路径 | 选择接收文件的目录 |
|
| 文件保存路径 | 选择接收文件的目录 |
|
||||||
|
|
||||||
|
网络连接分组中的 IP 直连开关独立于 ID 连接使用的中继设置:
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="images/desktop-settings-network-zh.png" width="720" alt="常规设置的网络连接分组:启用 IP 直连开关及关闭后的行为说明" />
|
||||||
|
</p>
|
||||||
|
|
||||||
### 桌面墙画面传输
|
### 桌面墙画面传输
|
||||||
|
|
||||||
在 **设置 → 桌面墙** 中统一配置墙内设备,保存后立即应用到当前桌面墙会话,并用于后续连接;普通连接不受影响。
|
在 **设置 → 桌面墙** 中统一配置墙内设备,保存后立即应用到当前桌面墙会话,并用于后续连接;普通连接不受影响。
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Start with [download and installation](../README_EN.md#download). This guide describes the current source; check the release notes for the features available in a downloaded build.
|
Start with [download and installation](../README_EN.md#download). This guide describes the current source; check the release notes for the features available in a downloaded build.
|
||||||
|
|
||||||
[Installation and permissions](#installation) · [Quick start](#quick-start) · [DeskHub](#deskhub) · [Session controls](#session) · [Settings and updates](#settings) · [iOS](#ios) · [Android](#android) · [HarmonyOS](#harmonyos) · [Windows unattended access](#windows-service) · [Self-hosting](#self-hosting)
|
[Installation and permissions](#installation) · [Quick start](#quick-start) · [Direct IP](#lan-direct) · [DeskHub](#deskhub) · [Session controls](#session) · [Settings and updates](#settings) · [iOS](#ios) · [Android](#android) · [HarmonyOS](#harmonyos) · [Windows unattended access](#windows-service) · [Self-hosting](#self-hosting)
|
||||||
|
|
||||||
Screenshots use demonstration devices and credentials. See the [screenshot notes](images/README.md) for sources and reproduction instructions.
|
Screenshots use demonstration devices and credentials. See the [screenshot notes](images/README.md) for sources and reproduction instructions.
|
||||||
|
|
||||||
@@ -39,15 +39,36 @@ Both contain the same complete application, replace each other and preserve user
|
|||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
### Connect from another computer
|
### Connect from another computer by device ID
|
||||||
|
|
||||||
1. **Prepare the host.** Install and run CrossDesk on the computer to control. Wait for the bottom status bar to show that the server is connected. Share the **Local ID** and **Password** shown under **Local Desktop** with the controller.
|
1. **Prepare the host.** Install and run CrossDesk on the computer to control and select ID mode. Wait for the bottom status bar to show that the server is connected. Share the **Local ID** and **Password** shown under **Local Desktop** with the controller.
|
||||||
2. **Enter the remote ID.** On the controlling computer, enter the host's **9-digit ID** in **Remote Desktop → Remote ID**, then click **Connect**.
|
2. **Enter the remote ID.** On the controlling computer, enter the host's **9-digit ID** in **Remote Desktop → Remote ID**, then click **Connect**.
|
||||||
3. **Verify the password.** Enter the host's current connection password when prompted and confirm. Select **Remember password** if you want to save it.
|
3. **Verify the password.** Enter the host's current connection password when prompted and confirm. Select **Remember password** if you want to save it.
|
||||||
4. **Reconnect later.** Previously connected devices appear under **Recent Connections**. Reconnect from a card, open its top-right **…** menu to rename it, edit its groups, or remove its record, and use the bottom-right button to connect / disconnect. Use the group filter beside the heading to narrow the list.
|
4. **Reconnect later.** Previously connected devices appear under **Recent Connections**. Reconnect from a card, open its top-right **…** menu to rename it, edit its groups, or remove its record, and use the bottom-right button to connect / disconnect. Use the group filter beside the heading to narrow the list.
|
||||||
|
|
||||||
The eye button shows or hides the local password, the refresh button generates a new random password, and the pencil button lets you edit it. Passwords use **6 ASCII letters or digits**. Stay connected to the server when editing or refreshing a password. Wait for the change to succeed and the client to reconnect, then copy the current password. Controllers that saved the old password must enter it again.
|
The eye button shows or hides the local password, the refresh button generates a new random password, and the pencil button lets you edit it. Passwords use **6 ASCII letters or digits**. Stay connected to the server when editing or refreshing a password. Wait for the change to succeed and the client to reconnect, then copy the current password. Controllers that saved the old password must enter it again.
|
||||||
|
|
||||||
|
<a id="lan-direct"></a>
|
||||||
|
|
||||||
|
### Connect directly over LAN
|
||||||
|
|
||||||
|
The direct IP entry is available in the regular Windows, macOS, and Linux desktop clients. The computers must have mutually reachable IPv4 addresses. Internet access is optional, and there is no need to wait for a signaling server connection. Browsers, mobile clients, the Windows pre-sign-in service, and the Linux headless console currently use the device ID workflow.
|
||||||
|
|
||||||
|
1. **Enable and switch.** On both computers, select **Enable direct IP** under **Settings → General → Network** and save (enabled by default). Use the top-left button to switch to **Direct IP mode**.
|
||||||
|
2. **Get the host address.** Read **Local IP / Port** on the host. The copy button copies the full `IP:port`. If several addresses are available, choose one reachable from the controller.
|
||||||
|
3. **Connect and verify.** Enter an address such as `192.168.1.20:52888` under **Remote IP / Port**, click **Connect**, and enter the host's six-character password for this mode. Omitting the port uses **52888**. Only numeric IPv4 addresses are currently supported, not hostnames or IPv6.
|
||||||
|
4. **Save and reconnect.** Select **Remember password** in the password dialog if needed. Recent connections are separated by ID / IP mode. Device records are kept even without a saved password; you will be prompted next time. Cards let you reconnect, rename devices, or remove records.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="images/desktop-lan-password-en.png" width="720" alt="Direct IP password dialog with Remember password and demonstration LAN devices in the background" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
**Addresses and ports:** use **Switch IP** to choose the displayed address and **Edit port** to change its port. The app listens on available physical-interface IPv4 addresses simultaneously and saves a separate port for each IP. Selecting a displayed address keeps the others listening. The first port assignment for an IP tries **52888**; if busy, it allocates and saves an available port. A conflict on an already saved port is reported and requires a manual change. Valid ports are **1–65535**; failed changes preserve the previous settings. Connect using the actual port displayed on the host. The LAN firewall must allow CrossDesk's TCP negotiation connection and UDP remote-control traffic.
|
||||||
|
|
||||||
|
**Passwords:** direct IP has its own **six-character, case-sensitive ASCII letter/digit password**. A missing password is generated automatically. Use the eye, refresh, and pencil buttons to show/hide, randomly generate, or customize it. A successful change applies immediately without restarting or connecting to a server. Controllers that saved the old password must enter the new one.
|
||||||
|
|
||||||
|
**Mode and availability:** the selected mode is remembered at the next launch. Switching back to ID mode changes the connection controls and recent list while IP listeners keep running. To stop direct IP, clear **Enable direct IP** in Settings and save. This disconnects IP sessions, releases listening ports, returns to ID mode, and hides the mode button. Existing ID sessions continue; IP passwords, ports, and recent records are retained for re-enabling.
|
||||||
|
|
||||||
### Connect from a browser
|
### Connect from a browser
|
||||||
|
|
||||||
1. Keep CrossDesk running and connected to the server on the host computer.
|
1. Keep CrossDesk running and connected to the server on the host computer.
|
||||||
@@ -127,6 +148,7 @@ Open **☰ → Settings** in the top-right corner, choose **General / DeskHub**,
|
|||||||
| Language | 中文, English, Русский |
|
| Language | 中文, English, Русский |
|
||||||
| Capture Method (Windows) | Auto / DXGI / WGC / GDI; choose Auto for automatic headless adaptation |
|
| Capture Method (Windows) | Auto / DXGI / WGC / GDI; choose Auto for automatic headless adaptation |
|
||||||
| Video Encode Format | H.264 / AV1; H.264 automatically prefers hardware codecs, with software fallback when unavailable or initialization fails; desktop AV1 uses software codecs |
|
| Video Encode Format | H.264 / AV1; H.264 automatically prefers hardware codecs, with software fallback when unavailable or initialization fails; desktop AV1 uses software codecs |
|
||||||
|
| Enable direct IP | Enabled by default; saving starts or stops direct IP immediately. Disabling disconnects IP sessions, stops listeners, and hides the mode button; the choice persists across restarts |
|
||||||
| Enable TURN Service | Allow relay-assisted connections; check this setting if P2P fails |
|
| Enable TURN Service | Allow relay-assisted connections; check this setting if P2P fails |
|
||||||
| Force Relay | Require relay connections when TURN is enabled; turning TURN off also disables this option |
|
| Force Relay | Require relay connections when TURN is enabled; turning TURN off also disables this option |
|
||||||
| Save remote screen previews | On by default. When disabled, the thumbnail area shows the remote device’s platform and existing previews are cleared; connection records and passwords are preserved |
|
| Save remote screen previews | On by default. When disabled, the thumbnail area shows the remote device’s platform and existing previews are cleared; connection records and passwords are preserved |
|
||||||
@@ -135,6 +157,12 @@ Open **☰ → Settings** in the top-right corner, choose **General / DeskHub**,
|
|||||||
| Auto Start / Enable Daemon | Configure startup and process supervision; restart as indicated by the UI |
|
| Auto Start / Enable Daemon | Configure startup and process supervision; restart as indicated by the UI |
|
||||||
| File Save Path | Choose where received files are saved |
|
| File Save Path | Choose where received files are saved |
|
||||||
|
|
||||||
|
The direct IP switch in the Network group is independent of the relay settings used for ID connections:
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="images/desktop-settings-network-en.png" width="720" alt="Network settings with Enable direct IP and an explanation of what happens when disabled" />
|
||||||
|
</p>
|
||||||
|
|
||||||
### DeskHub video transmission
|
### DeskHub video transmission
|
||||||
|
|
||||||
Use **Settings → DeskHub** to configure wall sessions together. Saving applies changes immediately to current DeskHub sessions and future connections; ordinary connections are unaffected.
|
Use **Settings → DeskHub** to configure wall sessions together. Saving applies changes immediately to current DeskHub sessions and future connections; ordinary connections are unaffected.
|
||||||
|
|||||||
@@ -4,96 +4,127 @@
|
|||||||
|
|
||||||
## 来源 / Sources
|
## 来源 / Sources
|
||||||
|
|
||||||
- 两张常规设置截图(`desktop-settings-zh.png` / `desktop-settings-en.png`)于 **2026-10-22** 从 `f8f4aa3c` 加当前工作区修改重新渲染,移除硬件编解码开关;使用现有 `slint_ui_smoke_test`、macOS arm64 和 2× 软件渲染,PPM 中间文件存放在工程外临时目录。
|
- **2026-10-25** 从 `ae6f81e8` 的实际 Slint 组件重新生成 16 张中英文截图:更新主窗口、常规设置、桌面墙设置、自托管及关于共 10 张,新增 IP 直连主界面、记住密码弹窗和网络设置共 6 张。使用 Slint 1.17.1、macOS arm64 和 2× 软件渲染。
|
||||||
- 16 张中英文桌面截图更新于 **2026-10-19**,UI 源代码为 `1ef372d2`,使用 Slint 1.17.1、macOS arm64 和软件渲染器。图片直接渲染仓库中的 Slint 组件。
|
- 捕获程序在**工程外临时目录**中复用现有 [`slint_ui_smoke_test`](../../apps/desktop/tests/slint_ui_smoke_test.cpp) 的截图辅助函数,并注入演示界面状态;没有启动应用运行时、打开监听端口或建立远控会话。没有修改产品组件或工程内测试,临时源码、可执行程序与 PPM 均位于工程外。
|
||||||
- 捕获程序来自现有 [`slint_ui_smoke_test`](../../apps/desktop/tests/slint_ui_smoke_test.cpp),在**工程外的临时目录**中复制源文件,仅为桌面墙调整演示设备数量、单元格宽度和网格窗口高度。Slint 组件没有改动,工程内没有新增或修改测试文件。
|
- 主窗口展示 ID / IP 模式切换、桌面墙入口和各自的近期设备;IP 模式展示地址编辑、六位密码和默认端口 52888,网络设置展示“启用 IP 直连”及关闭说明。IP 近期设备的 `LAN` 标记表示记录类型,不代表在线探测结果。
|
||||||
- 主窗口展示桌面墙入口、连接区、近期设备卡片与分组筛选;设置展示“常规 / 桌面墙”选项卡,关于窗口展示三个赞助入口。桌面墙网格展示六台演示设备;放大图展示只读预览、群控和接管入口,没有建立真实连接。
|
- 本机 ID `123 456 789`、密码 `Ab12Cd` / `Cd34Ef`、地址 `192.168.1.10` 与 `192.168.1.20–22`、设备名称和连接状态均为演示数据,不是真实设备凭据。IP 列表还包含 `192.168.2.10` 作为切换示例。截图中勾选的“记住密码”是演示选择,配置状态不代表全部运行时默认值。
|
||||||
- 本机 ID `123 456 789`、密码 `123456`、设备名称、在线 / 连接状态及记录均为演示数据。主窗口展示三台设备,桌面墙展示六台;它们不是真实设备凭据或真实远程会话。示例配置不代表所有运行时默认值。
|
- 桌面墙网格、放大视图和会话画面设置共 6 张继续沿用 **2026-10-19** 从 `1ef372d2` 渲染的截图。桌面墙展示六台演示设备,主窗口展示三台;本轮没有重新采集这些页面。
|
||||||
- “关于”中的 `v1.5.2` 和“已是最新版本”是捕获工具的示例值,不代表当前发布版本或实际在线检查结果。会话图使用公开页面作为远端画面,展示真实工具栏与画面设置菜单;隐私屏按钮处于关闭状态。
|
- “关于”中的 `v1.5.2` 和“已是最新版本”是捕获工具的示例值,不代表当前发布版本或实际在线检查结果。会话图使用公开页面作为远端画面,展示真实工具栏与画面设置菜单;隐私屏按钮处于关闭状态。
|
||||||
- 缩略图沿用既有公开页面截图:`fixtures/source.png` 来自 [CrossDesk Xmake 源码页](https://github.com/kunkundi/crossdesk/blob/ios-support/xmake.lua),`fixtures/website.png` 来自 [CrossDesk 官网](https://www.crossdesk.cn/),两者采集于 2026-09-07。它们只用于展示预览效果,不代表这些页面正在对应设备上运行,页面中的版本信息也不代表最新发布。
|
- 缩略图沿用既有公开页面截图:`fixtures/source.png` 来自 [CrossDesk Xmake 源码页](https://github.com/kunkundi/crossdesk/blob/ios-support/xmake.lua),`fixtures/website.png` 来自 [CrossDesk 官网](https://www.crossdesk.cn/),两者采集于 2026-09-07。它们只用于展示预览效果,不代表这些页面正在对应设备上运行,页面中的版本信息也不代表最新发布。
|
||||||
- `web-client.png` 保留 **2026-09-25** 从 [Web 客户端](https://web.crossdesk.cn/) 采集的 1280 × 720 连接首页,页面版本为 `2026.09.24.2`,ID 与密码为空。本次未重新采集 Web 页面;桌面设备预览继续复用这张图片。
|
- `web-client.png` 保留 **2026-09-25** 从 [Web 客户端](https://web.crossdesk.cn/) 采集的 1280 × 720 连接首页,页面版本为 `2026.09.24.2`,ID 与密码为空。本次未重新采集 Web 页面;桌面设备预览继续复用这张图片。
|
||||||
|
|
||||||
The two General settings images were refreshed again on **2026-10-22** from `f8f4aa3c` plus the current working-tree changes to remove the hardware codec switch, using the existing `slint_ui_smoke_test` on macOS arm64 at 2× software rendering scale. Intermediate PPM files were kept outside the repository.
|
On **2026-10-25**, 16 images were rendered from the actual Slint components at `ae6f81e8`: ten refreshed images (main window, General settings, DeskHub settings, self-hosting, and About) and six additions (Direct IP mode, its password dialog, and Network settings), in Chinese and English. The capture-only program reused the existing helper functions in an external temporary directory, using Slint 1.17.1 on macOS arm64 at 2× scale. No product components or repository tests were changed, and no listeners or remote sessions were opened. IDs, IPs, passwords, device records, connection states, and update results are illustrative; `LAN` labels indicate record type, not an online check. The checked Remember password box is a demonstration choice. The other six desktop screenshots remain from 2026-10-19, public-page fixtures from 2026-09-07, and the Web image from 2026-09-25. Native mobile screenshots are not included.
|
||||||
|
|
||||||
All 16 desktop images were previously refreshed on **2026-10-19** from UI source `1ef372d2`, using Slint 1.17.1 on macOS arm64. They render the actual components with demonstration data. The capture program is an external temporary copy of the existing source, adjusted only for DeskHub's six sample devices, 300 logical-pixel cells, and shorter grid window; no UI components or repository tests were changed in that refresh. The About view includes all three sponsorship links. IDs, credentials, connection states, versions, and update results are illustrative. No remote sessions were opened. Public-page fixtures remain from 2026-09-07, and the Web screenshot remains from 2026-09-25. This refresh does not include native mobile screenshots.
|
|
||||||
|
|
||||||
## 文件 / Files
|
## 文件 / Files
|
||||||
|
|
||||||
| 文件(`zh` / `en`) | 页面 | PNG 尺寸 |
|
| 文件(`zh` / `en`) | 页面 | PNG 尺寸 |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `desktop-main-*.png` | 主窗口 / Main window | 1280 × 944 |
|
| `desktop-main-*.png` | ID 连接模式 / ID mode | 1280 × 944 |
|
||||||
|
| `desktop-lan-*.png`(不含 `password`) | IP 直连模式 / Direct IP mode | 1280 × 944 |
|
||||||
|
| `desktop-lan-password-*.png` | IP 直连密码与记住密码 / Direct IP password dialog | 1280 × 944 |
|
||||||
|
| `desktop-settings-network-*.png` | IP 直连开关与网络设置 / Direct IP switch and Network settings | 1280 × 944 |
|
||||||
| `desktop-deskhub-*.png`(不含 `focus`) | 六设备桌面墙 / Six-device DeskHub grid | 1920 × 1000 |
|
| `desktop-deskhub-*.png`(不含 `focus`) | 六设备桌面墙 / Six-device DeskHub grid | 1920 × 1000 |
|
||||||
| `desktop-deskhub-focus-*.png` | 桌面墙放大视图 / Enlarged DeskHub view | 1920 × 1396 |
|
| `desktop-deskhub-focus-*.png` | 桌面墙放大视图 / Enlarged DeskHub view | 1920 × 1396 |
|
||||||
| `desktop-settings-*.png`(不含 `deskhub`) | 常规设置 / General settings | 1280 × 944 |
|
| `desktop-settings-zh.png` / `desktop-settings-en.png` | 常规设置 / General settings | 1280 × 944 |
|
||||||
| `desktop-settings-deskhub-*.png` | 桌面墙传输设置 / DeskHub video settings | 1280 × 944 |
|
| `desktop-settings-deskhub-*.png` | 桌面墙传输设置 / DeskHub video settings | 1280 × 944 |
|
||||||
| `desktop-self-hosted-*.png` | 自托管设置 / Self-hosting | 1280 × 944 |
|
| `desktop-self-hosted-*.png` | 自托管设置 / Self-hosting | 1280 × 944 |
|
||||||
| `desktop-stream-video-settings-*.png` | 会话工具栏与画面设置 / Session video settings | 1920 × 1200 |
|
| `desktop-stream-video-settings-*.png` | 会话工具栏与画面设置 / Session video settings | 1920 × 1200 |
|
||||||
| `desktop-about-*.png` | 关于与检查更新 / About and update check | 1280 × 944 |
|
| `desktop-about-*.png` | 关于与检查更新 / About and update check | 1280 × 944 |
|
||||||
| `web-client.png`(中文) | Web 连接首页 / Web connection page | 1280 × 720 |
|
| `web-client.png`(中文) | Web 连接首页 / Web connection page | 1280 × 720 |
|
||||||
|
|
||||||
桌面图片使用 2× 原生渲染缩放,捕获窗口内容区,不包含 macOS 原生标题栏。未放大旧 UI 截图,也未重绘控件;演示远端画面由实际组件按比例显示。Markdown 只设置展示宽度。常规设置可滚动,截图仅展示首屏;Windows 专属采集方式与便携版服务入口不会出现在这些 macOS 图片中。
|
桌面图片使用 2× 原生渲染缩放,捕获窗口内容区,不包含 macOS 原生标题栏。未放大旧 UI 截图,也未重绘控件;演示远端画面由实际组件按比例显示。Markdown 只设置展示宽度。常规设置可滚动,`desktop-settings` 展示首屏,`desktop-settings-network` 展示网络连接分组;Windows 专属采集方式与便携版服务入口不会出现在这些 macOS 图片中。
|
||||||
|
|
||||||
## 重新生成 / Regenerate
|
## 重新生成 / Regenerate
|
||||||
|
|
||||||
以下命令在仓库根目录、已配置依赖的 macOS 开发环境执行。所有临时源码、PPM 和额外捕获程序均写入系统临时目录,最终 PNG 才写入 `docs/images`。`sips` 仅做 PPM 到 PNG 的无损格式转换,其他平台可使用支持 PPM 的转换工具。
|
以下命令在已配置依赖的 macOS 工程根目录执行。生成程序只渲染演示状态;所有临时源码、可执行文件和 PPM 均存放在工程外,确认图片后才将 PNG 复制进 `docs/images`。`sips` 仅做无损格式转换,图片没有重绘或后期修改。
|
||||||
|
|
||||||
先检查 `/tmp/crossdesk-ui-capture-page` 和 `/tmp/crossdesk-ui-capture-language`:旧覆盖文件存在且非空时会优先于环境变量,应确认并移开后再捕获。`CROSSDESK_UI_CAPTURE_DEMO_ASSETS` 必须包含上述公开页面图片,缺失图片会导致捕获失败。工具等待窗口尺寸与缩放初始化后再截图。
|
先检查 `/tmp/crossdesk-ui-capture-page` 和 `/tmp/crossdesk-ui-capture-language`:旧覆盖文件存在且非空时会优先于环境变量,需确认并移开后再捕获。`CROSSDESK_UI_CAPTURE_DEMO_ASSETS` 指向本目录,供近期设备缩略图使用。
|
||||||
|
|
||||||
### 主窗口、设置与会话
|
### 生成捕获程序
|
||||||
|
|
||||||
|
复用现有源文件的捕获辅助函数,截去测试入口,在临时目录加入演示状态及独立入口;保持工程内测试文件不变。源码结构变化时需复核替换位置。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -e
|
set -e
|
||||||
xmake b -y slint_ui_smoke_test
|
xmake b -y crossdesk_ui
|
||||||
capture_dir=$(mktemp -d "${TMPDIR:-/tmp}/crossdesk-readme-capture.XXXXXX")
|
capture_dir=$(mktemp -d "${TMPDIR:-/tmp}/crossdesk-readme-capture.XXXXXX")
|
||||||
export capture_dir
|
export capture_dir
|
||||||
|
|
||||||
for locale in zh en; do
|
|
||||||
language=0
|
|
||||||
if [ "$locale" = en ]; then language=1; fi
|
|
||||||
for page in main settings settings-deskhub self-hosted about stream-video-settings; do
|
|
||||||
snapshot="$capture_dir/desktop-$page-$locale.ppm"
|
|
||||||
SLINT_BACKEND=winit-software SLINT_SCALE_FACTOR=2 \
|
|
||||||
CROSSDESK_UI_CAPTURE=1 \
|
|
||||||
CROSSDESK_UI_CAPTURE_DEMO_ASSETS="$PWD/docs/images" \
|
|
||||||
CROSSDESK_UI_CAPTURE_PAGE="$page" \
|
|
||||||
CROSSDESK_UI_CAPTURE_LANGUAGE="$language" \
|
|
||||||
CROSSDESK_UI_CAPTURE_SNAPSHOT="$snapshot" \
|
|
||||||
xmake r slint_ui_smoke_test
|
|
||||||
sips -s format png "$snapshot" \
|
|
||||||
--out "docs/images/desktop-$page-$locale.png"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
```
|
|
||||||
|
|
||||||
### 六设备桌面墙
|
|
||||||
|
|
||||||
现有捕获模式的 `gallery` / `gallery-focus` 默认使用三台设备。要复现本页的六设备图,在上一步同一 shell 中创建临时副本,只修改演示场景:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
python3 - <<'PY'
|
python3 - <<'PY'
|
||||||
import os
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import os
|
||||||
source = Path('apps/desktop/tests/slint_ui_smoke_test.cpp').read_text()
|
root = Path.cwd()
|
||||||
changes = [
|
out = Path(os.environ['capture_dir'])
|
||||||
('options.page != "main-recent-scrolled") {',
|
source = (root / 'apps/desktop/tests/slint_ui_smoke_test.cpp').read_text()
|
||||||
'options.page != "main-recent-scrolled" &&\n'
|
source = source[:source.index('// Sample the native window while')]
|
||||||
' !options.page.starts_with("gallery")) {'),
|
old = ' // Preview DeskHub with the same demo images, without opening any sessions.'
|
||||||
('window->set_gallery_mode(true);\n std::vector',
|
new = ''' // Documentation-only state; no runtime, listeners, or remote sessions.
|
||||||
'window->set_gallery_mode(true);\n'
|
window->set_local_password("Ab12Cd");
|
||||||
' window->set_gallery_tile_width(300);\n std::vector'),
|
window->set_ip_direct_enabled(true);
|
||||||
('698.0f;\n#else\n 720.0f;',
|
window->set_ip_direct_enabled_draft(true);
|
||||||
'options.page == "gallery" ? 500.0f : 698.0f;\n#else\n'
|
if (options.page == "settings-network") window->set_settings_open(true);
|
||||||
' options.page == "gallery" ? 500.0f : 720.0f;'),
|
if (options.page == "lan" || options.page == "lan-password") {
|
||||||
]
|
window->set_lan_mode(true);
|
||||||
for old, new in changes:
|
window->set_lan_listener_ip("192.168.1.10");
|
||||||
assert source.count(old) == 1, 'Capture source changed; review the fixture adjustment.'
|
window->set_lan_listener_port("52888");
|
||||||
source = source.replace(old, new, 1)
|
window->set_lan_local_port("52888");
|
||||||
Path(os.environ['capture_dir'], 'readme_capture.cpp').write_text(source)
|
window->set_lan_interfaces(std::make_shared<slint::VectorModel<slint::SharedString>>(
|
||||||
|
std::vector<slint::SharedString>{"192.168.1.10", "192.168.2.10"}));
|
||||||
|
window->set_lan_new_password("Cd34Ef");
|
||||||
|
window->set_lan_listening(true);
|
||||||
|
window->set_remote_id_input("192.168.1.20:52888");
|
||||||
|
const auto recent = window->get_recent_connections();
|
||||||
|
for (size_t i = 0; i < recent->row_count(); ++i) {
|
||||||
|
auto device = recent->row_data(i).value();
|
||||||
|
device.lan = true;
|
||||||
|
device.online = false;
|
||||||
|
device.remote_id = slint::SharedString(("lan-demo-" + std::to_string(i)).c_str());
|
||||||
|
device.endpoint = slint::SharedString(("192.168.1." + std::to_string(20 + i) + ":52888").c_str());
|
||||||
|
recent->set_row_data(i, device);
|
||||||
|
}
|
||||||
|
if (options.page == "lan-password") {
|
||||||
|
window->set_lan_remote_address("192.168.1.20");
|
||||||
|
window->set_lan_remote_port("52888");
|
||||||
|
window->set_lan_open(true);
|
||||||
|
window->set_lan_remember_password(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''' + old
|
||||||
|
assert source.count(old) == 1
|
||||||
|
source = source.replace(old,new)
|
||||||
|
old = ' // Let settings scroll animations settle as well as hover/focus feedback.'
|
||||||
|
new = ''' if (options.page == "settings-deskhub") window->set_settings_tab(1);
|
||||||
|
if (options.page == "settings-network") {
|
||||||
|
window->window().dispatch_pointer_scroll_event(
|
||||||
|
slint::LogicalPosition({400.0f, 250.0f}), 0.0f, -148.0f);
|
||||||
|
window->window().dispatch_pointer_move_event(slint::LogicalPosition({2.0f, 2.0f}));
|
||||||
|
}
|
||||||
|
''' + old
|
||||||
|
assert source.count(old) == 1
|
||||||
|
source = source.replace(old,new)
|
||||||
|
source += '''} // namespace
|
||||||
|
int main() {
|
||||||
|
const auto options = LoadCaptureOptions();
|
||||||
|
if (!options.enabled || options.snapshot_path.empty()) return 1;
|
||||||
|
auto window = crossdesk::ui::MainWindow::create();
|
||||||
|
auto stream = crossdesk::ui::StreamWindow::create();
|
||||||
|
auto server = crossdesk::ui::ServerWindow::create();
|
||||||
|
if (!RegisterFontAwesome(window->window()) || !RegisterFontAwesome(stream->window()) ||
|
||||||
|
!RegisterFontAwesome(server->window())) return 2;
|
||||||
|
window->set_local_id("123 456 789");
|
||||||
|
window->set_local_password("Ab12Cd");
|
||||||
|
window->set_turn_enabled(true);
|
||||||
|
window->window().set_size(slint::LogicalSize({640.0f, 472.0f}));
|
||||||
|
return RunCaptureMode(options, window, stream, server);
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
(out / 'readme_capture.cpp').write_text(source)
|
||||||
|
print(out / 'readme_capture.cpp')
|
||||||
PY
|
PY
|
||||||
```
|
```
|
||||||
|
|
||||||
以下编译路径对应本次的 `macosx / arm64 / debug` 配置。其他配置先用 `xmake show -t slint_ui_smoke_test` 查看当前生成头文件和库目录,再替换路径;不要在工程内添加临时构建入口。
|
### 编译与捕获
|
||||||
|
|
||||||
|
以下路径对应 `macosx / arm64 / debug` 配置;其他配置先用 `xmake show -t slint_ui_smoke_test` 查看生成头文件与库路径,再调整。捕获按顺序执行,避免窗口互相抢占焦点。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
slint_prefix=$(xmake lua -c 'import("core.project.config"); config.load(); import("core.project.project"); print(project.target("slint_ui_smoke_test"):pkg("slint"):installdir())')
|
slint_prefix=$(xmake lua -c 'import("core.project.config"); config.load(); import("core.project.project"); print(project.target("slint_ui_smoke_test"):pkg("slint"):installdir())')
|
||||||
@@ -111,10 +142,8 @@ xcrun clang++ -std=c++20 \
|
|||||||
for locale in zh en; do
|
for locale in zh en; do
|
||||||
language=0
|
language=0
|
||||||
if [ "$locale" = en ]; then language=1; fi
|
if [ "$locale" = en ]; then language=1; fi
|
||||||
for page in gallery gallery-focus; do
|
for page in main lan lan-password settings settings-network settings-deskhub self-hosted about; do
|
||||||
name=deskhub
|
snapshot="$capture_dir/desktop-$page-$locale.ppm"
|
||||||
if [ "$page" = gallery-focus ]; then name=deskhub-focus; fi
|
|
||||||
snapshot="$capture_dir/desktop-$name-$locale.ppm"
|
|
||||||
SLINT_BACKEND=winit-software SLINT_SCALE_FACTOR=2 \
|
SLINT_BACKEND=winit-software SLINT_SCALE_FACTOR=2 \
|
||||||
CROSSDESK_UI_CAPTURE=1 \
|
CROSSDESK_UI_CAPTURE=1 \
|
||||||
CROSSDESK_UI_CAPTURE_DEMO_ASSETS="$PWD/docs/images" \
|
CROSSDESK_UI_CAPTURE_DEMO_ASSETS="$PWD/docs/images" \
|
||||||
@@ -123,9 +152,15 @@ for locale in zh en; do
|
|||||||
CROSSDESK_UI_CAPTURE_SNAPSHOT="$snapshot" \
|
CROSSDESK_UI_CAPTURE_SNAPSHOT="$snapshot" \
|
||||||
"$capture_dir/readme_capture"
|
"$capture_dir/readme_capture"
|
||||||
sips -s format png "$snapshot" \
|
sips -s format png "$snapshot" \
|
||||||
--out "docs/images/desktop-$name-$locale.png"
|
--out "$capture_dir/desktop-$page-$locale.png"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
更新后逐张检查文字、布局、演示数据和文档引用,并同步日期、源码版本与图片尺寸。若更新 Web 图片,应打开 Web 客户端,等待表单与底部版本号加载完成,保持 ID 与密码为空,再截取页面视口;替换后也需重新生成桌面图以同步缩略图。
|
逐张检查语言、页面、文字裁切、尺寸和演示数据后,将这些 PNG 复制到 `docs/images`,并更新日期与源码版本。桌面墙设置的标签在窗口初始化后设置,网络页滚动到对应分组,避免捕获尚未稳定的页面。
|
||||||
|
|
||||||
|
### 其他页面
|
||||||
|
|
||||||
|
会话图可用相同程序的 `stream-video-settings` 页面捕获。六设备桌面墙需要先调整**临时** `readme_capture.cpp` 的演示场景:在 `ConfigureDocumentationDemo` 的三设备限制中排除 `gallery` 开头的页面;在开启 gallery 模式后设置 `gallery_tile_width` 为 300;将 `gallery` 网格窗口的内容高度设为 500,`gallery-focus` 保持 698(macOS)。重新编译后,分别捕获 `gallery` / `gallery-focus` 并命名为 `desktop-deskhub-*` / `desktop-deskhub-focus-*`。这些调整只影响示例数据和窗口尺寸,不改变实际组件。
|
||||||
|
|
||||||
|
若更新 Web 图片,应打开 Web 客户端,等待表单与底部版本号加载完成,保持 ID 与密码为空,再截取页面视口;替换后也需重新生成桌面图以同步缩略图。
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 187 KiB |
|
After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 154 KiB |
|
After Width: | Height: | Size: 192 KiB |
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 190 KiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 147 KiB |