Compare commits

..
3 Commits
Author SHA1 Message Date
rustdeskandClaude Opus 5.5 333bfc6427 Initialize libsodium where Android starts the server
Started at boot, MainService calls startServer with no Flutter engine,
so initialize never ran: the server worked with libsodium uninitialized
until the UI opened, and that first sodium_init() could land while
sessions were running. startServer now makes the call first, before it
verifies the custom client's signature or spawns the server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8
2026-11-17 10:48:58 +08:00
rustdeskandClaude Opus 5.5 289f839646 Log a failed libsodium initialization and start anyway
As hbbs does: a client that does not start is worse than one that
runs with libsodium as it was before this change, and sodium_init()
fails only when it cannot lock its own mutex.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8
2026-11-17 10:47:06 +08:00
rustdeskandClaude Fable 5.2 3dd95ab73b Initialize libsodium before anything uses it
The client called sodium_init() only when the update signature check
or the trusted device token first ran. That call also chooses
libsodium's implementations: where a build has both, it moves Poly1305
from the default one to the SSE2 one, whose state is laid out
differently, so a secretbox or AEAD operation another thread was in
the middle of finished under the other implementation. In one thread,
a computation straddling the call gives a wrong tag. The call now runs
once at process start: first in global_init, which core_main begins
with, and at the top of the FFI initialize, which on mobile verifies a
signature before it reaches global_init.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8
2026-11-17 10:42:46 +08:00
214 changed files with 1826 additions and 7679 deletions

No files matched your search

@@ -1,30 +0,0 @@
name: Restore the vcpkg binary cache
description: >-
For CI runs that publish nothing. Restores the vcpkg binary packages a master push saved for
this job, and outputs the VCPKG_BINARY_SOURCES value that reads and extends them.
inputs:
name:
description: Tells this job's cache apart from the others, e.g. its Rust target.
required: true
outputs:
binary-sources:
description: The value to give VCPKG_BINARY_SOURCES.
value: ${{ steps.dir.outputs.binary-sources }}
runs:
using: composite
steps:
- id: dir
shell: bash
run: |
# vcpkg wants a native path; on Windows, cygpath turns RUNNER_TEMP into one with forward slashes.
dir="$(cygpath -m "$RUNNER_TEMP" 2>/dev/null || echo "$RUNNER_TEMP")/vcpkg-bincache"
mkdir -p "$dir"
echo "binary-sources=clear;files,$dir,readwrite" >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ runner.temp }}/vcpkg-bincache
key: vcpkg-bin-${{ runner.os }}-${{ runner.arch }}-${{ inputs.name }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: vcpkg-bin-${{ runner.os }}-${{ runner.arch }}-${{ inputs.name }}-
# vcpkg-cache-save compares against this to tell whether the run built any package.
- shell: bash
run: touch "$(cygpath -m "$RUNNER_TEMP" 2>/dev/null || echo "$RUNNER_TEMP")/vcpkg-bincache/.restored"
@@ -1,36 +0,0 @@
name: Save the vcpkg binary cache
description: >-
Saves what vcpkg-cache-restore set up, but only when this run built a package that was not in
the cache, so an unchanged run does not store another copy.
inputs:
name:
description: The same name that was given to vcpkg-cache-restore.
required: true
runs:
using: composite
steps:
- id: built
shell: bash
run: |
dir="$(cygpath -m "$RUNNER_TEMP" 2>/dev/null || echo "$RUNNER_TEMP")/vcpkg-bincache"
if [ -n "$(find "$dir" -name '*.zip' -newer "$dir/.restored" -print -quit)" ]; then
echo "any=true" >> "$GITHUB_OUTPUT"
# Drop the zips no installed package uses (an older compiler, vcpkg commit or port
# version), or every later entry carries them along and the entry only grows.
status="$VCPKG_ROOT/installed/vcpkg/status"
if [ -s "$status" ]; then
keep="$(sed -n 's/^Abi: //p' "$status" | tr -d '\r')"
removed=0
while read -r z; do
grep -qxF "$(basename "$z" .zip)" <<<"$keep" || { rm -f "$z"; removed=$((removed + 1)); }
done < <(find "$dir" -name '*.zip')
echo "Kept $(find "$dir" -name '*.zip' | wc -l | tr -d ' ') package zip(s), removed $removed."
else
echo "::warning::$status not found: saving every zip, so the entry keeps the old packages."
fi
fi
- if: steps.built.outputs.any == 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ runner.temp }}/vcpkg-bincache
key: vcpkg-bin-${{ runner.os }}-${{ runner.arch }}-${{ inputs.name }}-${{ github.run_id }}-${{ github.run_attempt }}
@@ -8,15 +8,9 @@
# 3.24.5, where the old names/versions are required, so these changes are kept OUT of the
# committed sources and applied here instead.
#
# 3.44 also makes desktop text fields select all their text each time they regain focus, which
# 3.24 did only on web. A dialog stacked on another (the 2FA code over the login dialog) bounces
# focus on every rebuild, so each typed digit replaced the last
# (https://github.com/rustdesk/rustdesk/issues/17143). DialogTextField keeps 3.24's desktop
# behavior; 3.24 has no selectAllOnFocus parameter, hence the patch.
#
# Used by the arm64 builds and the Linux riscv64 build (flutter-build.yml) and their shared bridge
# artifact (bridge.yml) so they share an identical 3.44 source state -- the generated
# *.freezed.dart must compile against the same Flutter/freezed version those builds resolve.
# Used by BOTH arm64 builds (flutter-build.yml) and their shared bridge artifact (bridge.yml) so
# they share an identical 3.44 source state -- the generated *.freezed.dart must compile against
# the same Flutter/freezed version the arm64 builds resolve.
#
# Remove this script (and commit the changes) once upstream bumps Flutter across the board.
#
@@ -24,15 +18,6 @@
# sources are CRLF on the windows-11-arm runner; the substitutions below are anchor-free and
# therefore CRLF-safe. The calls are GNU sed (`sed -i` without a suffix); the macOS arm64 job
# puts GNU sed first on PATH because BSD sed rejects them.
#
# flutter_3.44_pubspec.lock.diff is a diff against flutter/pubspec.lock holding the entries that
# resolve differently under Flutter 3.44 with the bumps below: mostly packages the Flutter SDK
# pins, plus the bumped ones. Every other package keeps following the committed lock, and a
# change there that the diff no longer fits fails here or at `flutter pub get --enforce-lockfile`
# instead of resolving live. Moving FLUTTER_WINDOWS_ARM_VERSION, FLUTTER_MACOS_ARM_VERSION,
# FLUTTER_RISCV64_VERSION or the 3.44 bridge to a release whose SDK pins differ needs a new diff.
# To regenerate it, with that Flutter on PATH: make the two pubspec.yaml bumps below by hand, run
# `flutter pub get` in flutter/, and save `git diff flutter/pubspec.lock` to that file.
set -euo pipefail
readonly NO_MATCHES=0
@@ -89,15 +74,6 @@ validate_patch_inputs() {
echo "Flutter 3.44 source patch input is missing or unreadable: flutter/pubspec.yaml" >&2
return 1
fi
if [[ ! -f flutter/lib/common/widgets/dialog.dart || ! -r flutter/lib/common/widgets/dialog.dart ]]; then
echo "Flutter 3.44 source patch input is missing or unreadable: flutter/lib/common/widgets/dialog.dart" >&2
return 1
fi
}
# The lock diff reverses only once applied, so a restored pubspec.lock is not taken as patched.
has_lock_patch() {
sed 's/\r$//' .github/patches/flutter_3.44_pubspec.lock.diff | git apply --reverse --check 2>/dev/null
}
is_complete_patch_state() {
@@ -116,9 +92,7 @@ is_complete_patch_state() {
flutter/lib/common.dart &&
has_dialog_background_in_theme_range 'static ThemeData darkTheme = ThemeData(' \
'scrollbarTheme: scrollbarThemeDark,' 'backgroundColor: Color(0xFF18191E),' \
flutter/lib/common.dart &&
has_exact_count "$SINGLE_MATCH" 'selectAllOnFocus: isDesktop ? false : null,' \
flutter/lib/common/widgets/dialog.dart
flutter/lib/common.dart
}
is_unpatched_state() {
@@ -131,20 +105,16 @@ is_unpatched_state() {
has_exact_count "$NO_MATCHES" 'backgroundColor: Colors.white,' flutter/lib/common.dart &&
has_exact_count "$NO_MATCHES" 'backgroundColor: Color(0xFF18191E),' flutter/lib/common.dart &&
has_exact_count "$NO_MATCHES" 'extended_text: 15.0.2' flutter/pubspec.yaml &&
has_exact_count "$NO_MATCHES" 'google_fonts: ^8.1.0' flutter/pubspec.yaml &&
has_exact_count "$SINGLE_MATCH" 'inputFormatters: inputFormatters,' \
flutter/lib/common/widgets/dialog.dart &&
has_exact_count "$NO_MATCHES" 'selectAllOnFocus' flutter/lib/common/widgets/dialog.dart
has_exact_count "$NO_MATCHES" 'google_fonts: ^8.1.0' flutter/pubspec.yaml
}
if ! validate_patch_inputs; then
exit 1
fi
if is_complete_patch_state && has_lock_patch; then
if is_complete_patch_state; then
echo "Flutter 3.44 source patches already applied."
git --no-pager diff -- flutter/lib/common.dart flutter/pubspec.yaml \
flutter/lib/common/widgets/dialog.dart
git --no-pager diff -- flutter/lib/common.dart flutter/pubspec.yaml
exit 0
fi
@@ -153,10 +123,6 @@ if ! is_unpatched_state; then
exit 1
fi
# The 3.44 lock entries (see the header), first so a diff that no longer fits stops the script
# before any source is touched. Both sides go in as LF, whatever the checkout made them.
sed -i 's/\r$//' flutter/pubspec.lock
sed 's/\r$//' .github/patches/flutter_3.44_pubspec.lock.diff | git apply
# ThemeData API renames (Flutter 3.27+):
sed -i 's/dialogTheme: DialogTheme(/dialogTheme: DialogThemeData(/g' flutter/lib/common.dart
sed -i 's/tabBarTheme: const TabBarTheme(/tabBarTheme: const TabBarThemeData(/g' flutter/lib/common.dart
@@ -167,9 +133,6 @@ sed -i '/static ThemeData darkTheme = ThemeData(/,/scrollbarTheme: scrollbarThem
# Dependency bumps required by the newer Dart/Flutter:
sed -i 's/extended_text: 14.0.0/extended_text: 15.0.2/' flutter/pubspec.yaml
sed -i 's/google_fonts: \^6.2.1/google_fonts: ^8.1.0/' flutter/pubspec.yaml
# DialogTextField keeps the caret when a desktop field regains focus (see the header):
sed -i 's/inputFormatters: inputFormatters,/inputFormatters: inputFormatters,\
selectAllOnFocus: isDesktop ? false : null,/' flutter/lib/common/widgets/dialog.dart
# Fail loudly if any expected substitution did not produce the complete state.
if ! is_complete_patch_state; then
@@ -177,5 +140,4 @@ if ! is_complete_patch_state; then
exit 1
fi
git --no-pager diff -- flutter/lib/common.dart flutter/pubspec.yaml \
flutter/lib/common/widgets/dialog.dart
git --no-pager diff -- flutter/lib/common.dart flutter/pubspec.yaml
@@ -11,8 +11,7 @@
# (cd flutter && flutter build web --release) # or ./web/js/flutter_build.py
#
# Idempotent. To undo the source changes locally:
# git checkout -- flutter/lib/common.dart flutter/lib/common/widgets/dialog.dart \
# flutter/pubspec.yaml flutter/pubspec.lock
# git checkout -- flutter/lib/common.dart flutter/pubspec.yaml flutter/pubspec.lock
set -euo pipefail
flutter --version | grep -q "Flutter 3\.44\." || {
@@ -25,7 +24,7 @@ flutter --version | grep -q "Flutter 3\.44\." || {
bash .github/patches/apply_flutter_3.44_source_patches.sh
# Populate the pub cache with the 3.44 dependency resolution.
(cd flutter && flutter pub get --enforce-lockfile)
(cd flutter && flutter pub get)
# qr_code_scanner 1.0.1 (unmaintained) reads platformViewRegistry from
# dart:ui, which Flutter 3.44 removed; point it at dart:ui_web instead. The
@@ -1,319 +0,0 @@
diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock
index 4130a49b5..981c8386c 100644
--- a/flutter/pubspec.lock
+++ b/flutter/pubspec.lock
@@ -5,15 +5,10 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
- sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
+ sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
url: "https://pub.dev"
source: hosted
- version: "72.0.0"
- _macros:
- dependency: transitive
- description: dart
- source: sdk
- version: "0.3.2"
+ version: "67.0.0"
after_layout:
dependency: transitive
description:
@@ -26,10 +21,10 @@ packages:
dependency: transitive
description:
name: analyzer
- sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
+ sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
url: "https://pub.dev"
source: hosted
- version: "6.7.0"
+ version: "6.4.1"
animations:
dependency: transitive
description:
@@ -146,18 +141,18 @@ packages:
dependency: "direct dev"
description:
name: build_runner
- sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d"
+ sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7"
url: "https://pub.dev"
source: hosted
- version: "2.4.13"
+ version: "2.4.11"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
- sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0
+ sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe
url: "https://pub.dev"
source: hosted
- version: "7.3.2"
+ version: "7.3.1"
built_collection:
dependency: transitive
description:
@@ -242,10 +237,10 @@ packages:
dependency: transitive
description:
name: code_builder
- sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e"
+ sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37
url: "https://pub.dev"
source: hosted
- version: "4.10.1"
+ version: "4.10.0"
collection:
dependency: transitive
description:
@@ -298,10 +293,10 @@ packages:
dependency: transitive
description:
name: dart_style
- sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
+ sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
url: "https://pub.dev"
source: hosted
- version: "2.3.7"
+ version: "2.3.6"
dash_chat_2:
dependency: "direct main"
description:
@@ -397,10 +392,10 @@ packages:
dependency: "direct main"
description:
name: extended_text
- sha256: "38c1cac571d6eaf406f4b80040c1f88561e7617ad90795aac6a1be0a8d0bb676"
+ sha256: "7f382de3af12992e34bd72ddd36becf90c4720900af126cb9859f0189af71ffe"
url: "https://pub.dev"
source: hosted
- version: "14.0.0"
+ version: "13.0.0"
extended_text_library:
dependency: transitive
description:
@@ -659,10 +654,10 @@ packages:
dependency: "direct dev"
description:
name: freezed
- sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e"
+ sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1
url: "https://pub.dev"
source: hosted
- version: "2.5.7"
+ version: "2.5.2"
freezed_annotation:
dependency: "direct main"
description:
@@ -771,10 +766,10 @@ packages:
dependency: transitive
description:
name: image_picker_android
- sha256: "82652a75e3dd667a91187769a6a2cc81bd8c111bbead698d8e938d2b63e5e89a"
+ sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56"
url: "https://pub.dev"
source: hosted
- version: "0.8.12+21"
+ version: "0.8.12+12"
image_picker_for_web:
dependency: transitive
description:
@@ -859,18 +854,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
- sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
+ sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
url: "https://pub.dev"
source: hosted
- version: "10.0.5"
+ version: "10.0.4"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
- sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
+ sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
url: "https://pub.dev"
source: hosted
- version: "3.0.5"
+ version: "3.0.3"
leak_tracker_testing:
dependency: transitive
description:
@@ -895,14 +890,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
- macros:
- dependency: transitive
- description:
- name: macros
- sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
- url: "https://pub.dev"
- source: hosted
- version: "0.1.2-main.4"
matcher:
dependency: transitive
description:
@@ -915,26 +902,26 @@ packages:
dependency: transitive
description:
name: material_color_utilities
- sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
+ sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
- version: "0.11.1"
+ version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
- sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
+ sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev"
source: hosted
- version: "1.15.0"
+ version: "1.12.0"
mime:
dependency: transitive
description:
name: mime
- sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
+ sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a"
url: "https://pub.dev"
source: hosted
- version: "2.0.0"
+ version: "1.0.6"
nested:
dependency: transitive
description:
@@ -1011,10 +998,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
- sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2"
+ sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7"
url: "https://pub.dev"
source: hosted
- version: "2.2.15"
+ version: "2.2.10"
path_provider_foundation:
dependency: transitive
description:
@@ -1264,10 +1251,10 @@ packages:
dependency: transitive
description:
name: sqflite_common
- sha256: "761b9740ecbd4d3e66b8916d784e581861fd3c3553eda85e167bc49fdb68f709"
+ sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4"
url: "https://pub.dev"
source: hosted
- version: "2.5.4+6"
+ version: "2.5.4"
stack_trace:
dependency: transitive
description:
@@ -1304,10 +1291,10 @@ packages:
dependency: transitive
description:
name: synchronized
- sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225"
+ sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558"
url: "https://pub.dev"
source: hosted
- version: "3.3.0+3"
+ version: "3.1.0+1"
term_glyph:
dependency: transitive
description:
@@ -1320,10 +1307,10 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
+ sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
url: "https://pub.dev"
source: hosted
- version: "0.7.2"
+ version: "0.7.0"
texture_rgba_renderer:
dependency: "direct main"
description:
@@ -1361,10 +1348,10 @@ packages:
dependency: transitive
description:
name: typed_data
- sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
+ sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
url: "https://pub.dev"
source: hosted
- version: "1.4.0"
+ version: "1.3.2"
uni_links:
dependency: "direct main"
description:
@@ -1418,10 +1405,10 @@ packages:
dependency: transitive
description:
name: url_launcher_android
- sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193"
+ sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79
url: "https://pub.dev"
source: hosted
- version: "6.3.14"
+ version: "6.3.9"
url_launcher_ios:
dependency: "direct main"
description:
@@ -1522,10 +1509,10 @@ packages:
dependency: transitive
description:
name: video_player_android
- sha256: "391e092ba4abe2f93b3e625bd6b6a6ec7d7414279462c1c0ee42b5ab8d0a0898"
+ sha256: e343701aa890b74a863fa460f5c0e628127ed06a975d7d9af6b697133fb25bdf
url: "https://pub.dev"
source: hosted
- version: "2.7.16"
+ version: "2.7.1"
video_player_avfoundation:
dependency: transitive
description:
@@ -1562,10 +1549,10 @@ packages:
dependency: transitive
description:
name: vm_service
- sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
+ sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
url: "https://pub.dev"
source: hosted
- version: "14.2.5"
+ version: "14.2.1"
wakelock_plus:
dependency: "direct main"
description:
@@ -1610,10 +1597,10 @@ packages:
dependency: "direct main"
description:
name: win32
- sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e
+ sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a"
url: "https://pub.dev"
source: hosted
- version: "5.10.1"
+ version: "5.5.4"
win32_registry:
dependency: transitive
description:
@@ -1697,5 +1684,5 @@ packages:
source: hosted
version: "0.2.4"
sdks:
- dart: ">=3.5.0 <4.0.0"
- flutter: ">=3.24.0"
+ dart: ">=3.4.0 <4.0.0"
+ flutter: ">=3.22.0"
@@ -1,296 +0,0 @@
diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock
index 4130a49b5..264f6bde5 100644
--- a/flutter/pubspec.lock
+++ b/flutter/pubspec.lock
@@ -5,15 +5,10 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
- sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
+ sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
url: "https://pub.dev"
source: hosted
- version: "72.0.0"
- _macros:
- dependency: transitive
- description: dart
- source: sdk
- version: "0.3.2"
+ version: "67.0.0"
after_layout:
dependency: transitive
description:
@@ -26,10 +21,10 @@ packages:
dependency: transitive
description:
name: analyzer
- sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
+ sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
url: "https://pub.dev"
source: hosted
- version: "6.7.0"
+ version: "6.4.1"
animations:
dependency: transitive
description:
@@ -202,10 +197,10 @@ packages:
dependency: transitive
description:
name: characters
- sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+ sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
url: "https://pub.dev"
source: hosted
- version: "1.3.0"
+ version: "1.4.1"
charcode:
dependency: transitive
description:
@@ -234,10 +229,10 @@ packages:
dependency: transitive
description:
name: clock
- sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
- version: "1.1.1"
+ version: "1.1.2"
code_builder:
dependency: transitive
description:
@@ -250,10 +245,10 @@ packages:
dependency: transitive
description:
name: collection
- sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
+ sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
- version: "1.18.0"
+ version: "1.19.1"
contextmenu:
dependency: "direct main"
description:
@@ -298,10 +293,10 @@ packages:
dependency: transitive
description:
name: dart_style
- sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
+ sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
url: "https://pub.dev"
source: hosted
- version: "2.3.7"
+ version: "2.3.6"
dash_chat_2:
dependency: "direct main"
description:
@@ -397,10 +392,10 @@ packages:
dependency: "direct main"
description:
name: extended_text
- sha256: "38c1cac571d6eaf406f4b80040c1f88561e7617ad90795aac6a1be0a8d0bb676"
+ sha256: d8f4a6e2676505b54dc0d5f5e8de9020667b402e9c1b3a8b030a83e568c99654
url: "https://pub.dev"
source: hosted
- version: "14.0.0"
+ version: "15.0.2"
extended_text_library:
dependency: transitive
description:
@@ -413,10 +408,10 @@ packages:
dependency: transitive
description:
name: fake_async
- sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
- version: "1.3.1"
+ version: "1.3.3"
ffi:
dependency: "direct main"
description:
@@ -659,10 +654,10 @@ packages:
dependency: "direct dev"
description:
name: freezed
- sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e"
+ sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1
url: "https://pub.dev"
source: hosted
- version: "2.5.7"
+ version: "2.5.2"
freezed_annotation:
dependency: "direct main"
description:
@@ -699,10 +694,10 @@ packages:
dependency: "direct main"
description:
name: google_fonts
- sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82
+ sha256: e3cb3ee6b47fd2472c23de6da5744796a4da195137759ddb3fbcc9467b7b3c7d
url: "https://pub.dev"
source: hosted
- version: "6.2.1"
+ version: "8.2.1"
graphs:
dependency: transitive
description:
@@ -859,26 +854,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
- sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
+ sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
- version: "10.0.5"
+ version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
- sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
+ sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
- version: "3.0.5"
+ version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
- sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
+ sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.2"
lints:
dependency: transitive
description:
@@ -895,38 +890,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
- macros:
- dependency: transitive
- description:
- name: macros
- sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
- url: "https://pub.dev"
- source: hosted
- version: "0.1.2-main.4"
matcher:
dependency: transitive
description:
name: matcher
- sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
+ sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
url: "https://pub.dev"
source: hosted
- version: "0.12.16+1"
+ version: "0.12.19"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
+ sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
url: "https://pub.dev"
source: hosted
- version: "0.11.1"
+ version: "0.13.0"
meta:
dependency: transitive
description:
name: meta
- sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
+ sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
url: "https://pub.dev"
source: hosted
- version: "1.15.0"
+ version: "1.18.0"
mime:
dependency: transitive
description:
@@ -987,10 +974,10 @@ packages:
dependency: "direct main"
description:
name: path
- sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
+ sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
- version: "1.9.0"
+ version: "1.9.1"
path_parsing:
dependency: transitive
description:
@@ -1235,7 +1222,7 @@ packages:
dependency: transitive
description: flutter
source: sdk
- version: "0.0.99"
+ version: "0.0.0"
source_gen:
dependency: transitive
description:
@@ -1272,18 +1259,18 @@ packages:
dependency: transitive
description:
name: stack_trace
- sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
+ sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
- version: "1.11.1"
+ version: "1.12.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
- sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
+ sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
- version: "2.1.2"
+ version: "2.1.4"
stream_transform:
dependency: transitive
description:
@@ -1320,10 +1307,10 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
+ sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
url: "https://pub.dev"
source: hosted
- version: "0.7.2"
+ version: "0.7.11"
texture_rgba_renderer:
dependency: "direct main"
description:
@@ -1506,10 +1493,10 @@ packages:
dependency: "direct main"
description:
name: vector_math
- sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
- version: "2.1.4"
+ version: "2.2.0"
video_player:
dependency: transitive
description:
@@ -1697,5 +1684,5 @@ packages:
source: hosted
version: "0.2.4"
sdks:
- dart: ">=3.5.0 <4.0.0"
- flutter: ">=3.24.0"
+ dart: ">=3.10.0 <4.0.0"
+ flutter: ">=3.38.0"
-99
View File
@@ -1,99 +0,0 @@
<!--
Read these before opening a PR. They apply whether the code is AI-generated or written by hand:
- Feature PRs need maintainer approval first: https://github.com/rustdesk/rustdesk/discussions/17223
- End-to-end testing on real devices is mandatory: https://github.com/rustdesk/rustdesk/discussions/17225
PRs that skip these requirements, leave the sections below empty, or have an
unjustifiably large regression surface may be closed without review.
Translation-only, docs-only, and CI-only PRs may skip the test, AI cross-review, and regression sections.
-->
## Type
- [ ] Bug fix
- [ ] Feature / enhancement
- [ ] Translation / documentation / CI
## Linked issue or approval
<!--
Bug fix: link the issue (Fixes #...).
Feature: link the discussion where a maintainer approved it. Feature PRs without
prior approval may be closed without review. Approval of the idea does not
guarantee that the implementation will be accepted.
-->
Fixes #
Feature approval ([required for features](https://github.com/rustdesk/rustdesk/discussions/17223)):
## What and why
<!-- The problem, the root cause (for bug fixes), and how this change addresses it. Keep it short. -->
## End-to-end test on real devices
<!--
Compiling, unit tests, CI, code reading, and AI analysis are not substitutes for this.
If you could not reproduce the issue or lack the environment, say so below.
Do not claim a fix based on reasoning alone.
-->
**Environment** (each device: OS and version, controlling or controlled side; direct or relay; public or self-hosted server):
-
**Reproduced on master** (bug fixes: how you triggered the original issue):
**Steps and actual results with this PR:**
1.
**Not tested / could not reproduce:**
## Screenshots / video
<!--
Required if this PR adds, changes, or affects any UI, including side effects on
existing UI. Upload a video or screenshots from the real devices above that prove
the change; for changes to existing UI, show before and after.
Write "No UI impact" if there is none.
-->
## AI cross-review
<!--
Have this diff reviewed by AI models other than the one that wrote it.
Reviewers can be wrong or hallucinate, so do not apply findings blindly: judge
each one yourself. Fix the real issues; a finding you leave unfixed is fine if
you can explain why.
As proof, paste each model's review output (or a share link to the conversation)
and, for each finding, what you decided and why. Put long output in a <details> block.
-->
**Models used:**
**Review output, and your decision on each finding:**
## Regression surface
<!--
List the existing files and runtime paths whose behavior changes, why each change
is unavoidable, and which existing functionality around them you re-tested.
Cover backward compatibility (older clients/servers) and other platforms.
New code that only runs when the new feature is used does not need to be listed.
-->
## Known limits
<!-- Optional: corner cases deliberately left unhandled. -->
## Checklist
- [ ] Features: a maintainer approved this in a discussion before I started, as required by [#17223](https://github.com/rustdesk/rustdesk/discussions/17223). Unapproved feature PRs may be closed without review.
- [ ] I tested this end to end on real devices on every platform it touches, as required by [#17225](https://github.com/rustdesk/rustdesk/discussions/17225), and the results above come from those runs.
- [ ] Bug fixes: I reproduced the original issue on master and confirmed this PR fixes it.
- [ ] UI added, changed, or affected: I uploaded a video or screenshots above that prove the change.
- [ ] I re-tested the existing functionality listed under "Regression surface".
- [ ] The diff contains only what this change needs: no unrelated refactoring, formatting, renames, or drive-by fixes.
- [ ] I had this diff cross-reviewed by different AI models, not only the one that wrote it, and included their review output above. I judged each finding myself instead of applying it blindly: I fixed the real issues and can explain why I left the others.
-13
View File
@@ -1,13 +0,0 @@
# Locked, hash-checked dependencies of res/job.py for the release-signing steps.
# Install with: pip3 install --only-binary=:all: --require-hashes -r .github/requirements/sign-files.txt
# argparse is part of the standard library and must not be installed from PyPI.
requests==2.32.5 \
--hash=sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6
urllib3==2.6.3 \
--hash=sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4
idna==3.20 \
--hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c
certifi==2026.10.23 \
--hash=sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1
charset-normalizer==3.5.2 \
--hash=sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685
+5 -24
View File
@@ -4,11 +4,6 @@ name: Build flutter-rust-bridge
on:
workflow_call:
inputs:
# false for builds that publish: see the note above `jobs:` in flutter-build.yml.
use-cache:
type: boolean
default: true
env:
CARGO_EXPAND_VERSION: "1.0.95"
@@ -23,8 +18,6 @@ jobs:
matrix:
job:
# Default bridge for every platform still on Flutter 3.24.5 (generated with 3.22.3).
# Changing its flutter-version needs .github/patches/flutter_3.22_bridge_pubspec.lock.diff
# regenerated (see "Install flutter rust bridge deps").
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-22.04,
@@ -32,21 +25,18 @@ jobs:
flutter-version: "3.22.3",
artifact-name: "bridge-artifact",
}
# Dedicated bridge for the Flutter 3.44 builds (Windows/macOS arm64, Linux riscv64); runs in parallel.
# Its lock comes from .github/patches/flutter_3.44_pubspec.lock.diff (see the header of
# apply_flutter_3.44_source_patches.sh before changing flutter-version).
# Dedicated bridge for the Windows and macOS arm64 builds (Flutter 3.44); runs in parallel.
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-22.04,
extra-build-args: "",
flutter-version: "3.44.9",
flutter-version: "3.44.8",
artifact-name: "bridge-artifact-flutter-3.44",
}
steps:
- name: Checkout source code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
submodules: recursive
- name: Install prerequisites
@@ -76,15 +66,11 @@ jobs:
components: "rustfmt"
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
if: ${{ inputs.use-cache }}
with:
prefix-key: bridge-${{ matrix.job.os }}
# As in ci.yml: PRs restore master's entry instead of each saving its own.
save-if: ${{ github.ref == 'refs/heads/master' }}
- name: Cache Bridge
id: cache-bridge
if: ${{ inputs.use-cache }}
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3
with:
path: /tmp/flutter_rust_bridge
@@ -95,7 +81,7 @@ jobs:
with:
channel: "stable"
flutter-version: ${{ matrix.job.flutter-version }}
cache: ${{ inputs.use-cache }}
cache: true
- name: Install flutter rust bridge deps
shell: bash
@@ -105,17 +91,12 @@ jobs:
if [[ "${{ matrix.job.flutter-version }}" == "3.22.3" ]]; then
# Default Flutter 3.22.3: extended_text 14 needs a newer Dart, so downgrade for resolution.
sed -i -e 's/extended_text: 14.0.0/extended_text: 13.0.0/g' flutter/pubspec.yaml
# The entries Flutter 3.22.3 with that downgrade resolves differently (mostly packages its
# SDK pins), as a diff against flutter/pubspec.lock so every other package keeps following
# it. To regenerate, with Flutter 3.22.3 on PATH: run the sed above and `flutter pub get`
# in flutter/, then save `git diff flutter/pubspec.lock` to it.
git apply .github/patches/flutter_3.22_bridge_pubspec.lock.diff
else
# Flutter 3.44 bridge (Windows/macOS arm64, Linux riscv64): match those builds' source/pubspec state so
# Flutter 3.44 bridge for Windows/macOS arm64: match those builds' source/pubspec state so
# the generated *.freezed.dart compiles against the same Flutter/freezed they resolve.
bash .github/patches/apply_flutter_3.44_source_patches.sh
fi
pushd flutter && flutter pub get --enforce-lockfile && popd
pushd flutter && flutter pub get && popd
- name: Run flutter rust bridge
run: |
-13
View File
@@ -109,7 +109,6 @@ jobs:
- name: Checkout source code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
submodules: recursive
- name: Install prerequisites
@@ -174,9 +173,6 @@ jobs:
rustc -V
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
# PRs restore master's entry; letting each PR save its own ~2 GB evicts the other caches.
save-if: ${{ github.ref == 'refs/heads/master' }}
- name: Build
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1
@@ -252,12 +248,3 @@ jobs:
use-cross: ${{ matrix.job.use-cross }}
command: test
args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
# drm and unix-file-copy-paste are off by default, so the run above compiles none of their tests.
- name: Run drm and unix-file-copy-paste tests
if: matrix.job.target == 'x86_64-unknown-linux-gnu'
shell: bash
run: |
cargo test --locked --target=${{ matrix.job.target }} --lib --features drm,drm-wake
cargo test --locked --target=${{ matrix.job.target }} -p scrap --features drm
cargo test --locked --target=${{ matrix.job.target }} -p clipboard --features unix-file-copy-paste
File diff suppressed because it is too large. Load diff
-3
View File
@@ -88,7 +88,6 @@ jobs:
- name: Checkout source code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
persist-credentials: false
ref: ${{ matrix.job.ref }}
submodules: recursive
@@ -121,7 +120,6 @@ jobs:
run: |
pushd /tmp
wget https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-macos-universal.tar.gz
echo "7031ee75ca2a55c558071701078517c05d959e012dd87833ac6b4a23c5ff52b9 apple-codesign-0.22.0-macos-universal.tar.gz" | shasum -a 256 -c -
tar -zxvf apple-codesign-0.22.0-macos-universal.tar.gz
mv apple-codesign-0.22.0-macos-universal/rcodesign /usr/local/bin
popd
@@ -251,7 +249,6 @@ jobs:
- name: Checkout source code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
persist-credentials: false
ref: ${{ matrix.job.ref }}
submodules: recursive
-156
View File
@@ -1,156 +0,0 @@
name: PR evidence check
# pull_request_target is needed to label and comment on PRs from forks.
# This workflow must never check out or run code from the PR: it only reads
# the PR description and file list through the API.
on:
pull_request_target:
types: [opened, edited, synchronize, reopened, ready_for_review]
permissions:
issues: write
pull-requests: write
concurrency:
group: pr-evidence-check-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check:
if: >-
github.event.pull_request.draft == false &&
github.event.pull_request.user.type != 'Bot' &&
!contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.pull_request.author_association)
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
script: |
const MARKER = '<!-- pr-evidence-check -->';
const LABEL = 'needs-evidence';
const APPROVAL_POLICY = 'https://github.com/rustdesk/rustdesk/discussions/17223';
const TESTING_POLICY = 'https://github.com/rustdesk/rustdesk/discussions/17225';
const TEMPLATE = 'https://github.com/rustdesk/rustdesk/blob/master/.github/pull_request_template.md';
const pr = context.payload.pull_request;
const { owner, repo } = context.repo;
const issue_number = pr.number;
// PRs opened before the template existed are left alone.
if (new Date(pr.created_at) < new Date('2026-11-24T15:46:22Z')) return;
// author_association can say CONTRIBUTOR for org members with private membership.
try {
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
owner, repo, username: pr.user.login,
});
if (['admin', 'write'].includes(data.permission)) return;
} catch (e) {
core.info(`permission lookup failed: ${e.status}`);
}
const files = (await github.paginate(github.rest.pulls.listFiles, {
owner, repo, pull_number: issue_number, per_page: 100,
})).map(f => f.filename);
const body = (pr.body || '').replace(/<!--[\s\S]*?-->/g, '');
const LABELS = {
env: /\*\*Environment\*\*(\s*\([^)]*\))?\s*:?/i,
repro: /\*\*Reproduced on master\*\*(\s*\([^)]*\))?\s*:?/i,
steps: /\*\*Steps and actual results with this PR:?\*\*:?/i,
untested: /\*\*Not tested \/ could not reproduce:?\*\*:?/i,
models: /\*\*Models used:?\*\*:?/i,
review: /\*\*Review output[^*\n]*:?\*\*:?/i,
};
// Only the template's own headings end a section, so pasted review output may contain "##".
const HEADINGS = /\n##\s*(Type|Linked issue|What and why|End-to-end test|Screenshots|AI cross-review|Regression surface|Known limits|Checklist)\b/i;
const until = (text, res) => {
const ends = res.map(re => text.search(re)).filter(i => i >= 0);
return text.slice(0, ends.length ? Math.min(...ends) : text.length);
};
function section(key) {
const m = LABELS[key].exec(body);
if (!m) return '';
return until(body.slice(m.index + m[0].length), [...Object.values(LABELS), HEADINGS]);
}
function heading(re) {
const m = re.exec(body);
return m ? until(body.slice(m.index + m[0].length), [HEADINGS]) : '';
}
const filled = text => text.replace(/^\s*(-|\d+\.)\s*$/gm, '').trim().length > 0;
const ticked = re => new RegExp(String.raw`^\s*-\s*\[[xX]\]\s*` + re.source, 'm').test(body);
const missing = [];
const docsOnly = files.length > 0 &&
files.every(f => /^(src\/lang\/|docs\/|\.github\/(?!patches\/))|\.md$/.test(f));
if (!docsOnly) {
if (!/^## End-to-end test on real devices/m.test(body)) {
missing.push(`The test sections of the [PR template](${TEMPLATE}) seem to be missing. Please add them back and fill them in.`);
} else {
if (!filled(section('env'))) {
missing.push('**Environment**: the real devices you tested on (OS and version, controlling or controlled side, and so on).');
}
if (ticked(/Bug fix\s*$/) && !filled(section('repro')) && !/reproduc/i.test(section('untested'))) {
missing.push('**Reproduced on master**: how you triggered the original issue on master, or under **Not tested / could not reproduce** why you could not.');
}
if (!filled(section('steps'))) {
missing.push('**Steps and actual results with this PR**: what you did on those devices and what happened.');
}
const review = section('review');
const proof = /https?:\/\/|<details/i.test(review) || review.replace(/\s+/g, ' ').trim().length >= 100;
if (!filled(section('models')) || !proof) {
missing.push('**AI cross-review**: the AI models, other than the one that wrote the code, that reviewed this diff, with their review output (pasted or a share link) and your decision on each finding. Findings can be wrong, so you do not have to fix all of them, but say why you left one.');
}
}
}
const touchesUi = files.some(f => /^(flutter\/lib\/|src\/ui\/)/.test(f));
const hasMedia = /github\.com\/user-attachments\/(assets|files)\/|user-images\.githubusercontent\.com\/|<img\s|<video\s|https?:\/\/\S+\.(png|jpe?g|gif|webp|mp4|mov|webm)\b/i.test(body) ||
/https?:\/\//.test(heading(/^##\s*Screenshots[^\n]*/m));
if (touchesUi && !hasMedia && !/no ui impact/i.test(body)) {
missing.push('**Screenshots / video**: this PR changes UI code, so please upload a video or screenshots that show the change (before and after for existing UI), or write "No UI impact" if there is none.');
}
if (ticked(/Feature \/ enhancement/)) {
const POLICIES = ['17223', '17225'];
const approval = heading(/^Feature approval/m).replace(/\[required for features\]\([^)]*\)/, '');
const refs = [
...approval.matchAll(/(?:#|rustdesk\/rustdesk\/discussions\/)(\d+)/g),
...body.matchAll(/rustdesk\/rustdesk\/discussions\/(\d+)/g),
].map(m => m[1]).filter(n => !POLICIES.includes(n));
if (refs.length === 0) {
missing.push(`**Feature approval**: a link to the discussion where a maintainer approved this feature ([why](${APPROVAL_POLICY})).`);
}
}
const comments = await github.paginate(github.rest.issues.listComments, {
owner, repo, issue_number, per_page: 100,
});
const previous = comments.find(c => c.user.type === 'Bot' && c.body.includes(MARKER));
const ignore = (...codes) => e => { if (!codes.includes(e.status)) throw e; };
if (missing.length === 0) {
await github.rest.issues.removeLabel({ owner, repo, issue_number, name: LABEL }).catch(ignore(404));
const done = `${MARKER}\nThanks for updating the description. The automated check has nothing more to ask for.`;
if (previous && previous.body !== done) {
await github.rest.issues.updateComment({ owner, repo, comment_id: previous.id, body: done });
}
return;
}
const text = [
MARKER,
'Thanks for the contribution! This is an automated reminder. Before a maintainer reviews this PR, please add the following to the PR description:',
'',
...missing.map(m => `- ${m}`),
'',
`We ask for these because of [feature approval](${APPROVAL_POLICY}) and [end-to-end testing on real devices](${TESTING_POLICY}). This check runs again when you edit the description.`,
].join('\n');
await github.rest.issues.createLabel({
owner, repo, name: LABEL, color: 'fbca04',
description: 'PR description is missing test evidence or approval',
}).catch(ignore(422));
await github.rest.issues.addLabels({ owner, repo, issue_number, labels: [LABEL] });
if (!previous) {
await github.rest.issues.createComment({ owner, repo, issue_number, body: text });
} else if (previous.body !== text) {
await github.rest.issues.updateComment({ owner, repo, comment_id: previous.id, body: text });
}
+2 -2
View File
@@ -193,8 +193,8 @@ A refactor added to cover a corner case rarely converges. Each new counter, time
* If the test diff is more than twice the fix, cut it back to the tests that pin the reported behavior. A state that needs long setup to reach is usually too rare to fix.
* When the number of tests needed to describe the behavior keeps growing, the implementation is too complex: simplify it instead of adding tests.
* Dart tests go in `flutter/test/*_test.dart`, nowhere else: CI runs `flutter test` over that directory and nothing outside it. It runs on the VM, so a `@TestOn('browser')` suite runs in no CI job.
* Rust unit tests go in a `#[cfg(test)]` module beside the code. CI runs `cargo test --workspace` with the default features on x86_64 Linux, `cargo test --lib` on the root package with the release feature set on macOS and Windows plus `-p clipboard` there, and on x86_64 Linux also the root package with `drm,drm-wake`, `scrap` with `drm` and `clipboard` with `unix-file-copy-paste`. On macOS and Windows, a platform-gated test in another workspace crate runs only if that platform's job names the crate with `-p`. Gate a test module on a feature or `target_os` only when the code under test is gated; a pure helper that only a gated path calls gets `#[cfg(any(feature = "...", test))]`, so its tests run everywhere.
* A test behind a feature that no CI build enables needs a `cargo test` line that names it in a CI workflow, such as the Linux one in `.github/workflows/ci.yml`.
* Rust unit tests go in a `#[cfg(test)]` module beside the code. CI runs `cargo test --workspace` with the default features on x86_64 Linux, `cargo test --lib` on the root package with the release feature set on macOS and Windows plus `-p clipboard` there, and on Linux the `drm` test modules by name plus the `clipboard` package with `unix-file-copy-paste`. On macOS and Windows, a platform-gated test in another workspace crate runs only if that platform's job names the crate with `-p`. Gate a test module on a feature or `target_os` only when the code under test is gated; a pure helper that only a gated path calls gets `#[cfg(any(feature = "...", test))]`, so its tests run everywhere.
* A test behind a feature that no CI build enables needs a `cargo test` line in `.github/workflows/flutter-build.yml` that names it. In the Linux drm job, wrap it in `run_drm_tests` so a filter that matches nothing fails instead of passing.
* Web core tests are `flutter/web/js/src/*.test.ts`, run by jest in that repository's own CI.
## Reviewing a PR
Generated
+13 -14
View File
@@ -1717,7 +1717,7 @@ dependencies = [
[[package]]
name = "cpal"
version = "0.15.3"
source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#3361bd6aa877e110f6df6cd98dc7c7f6427cb79b"
source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#96d4da121b7d949677ac5b6887413a9185fd7f39"
dependencies = [
"alsa",
"cidre",
@@ -2749,7 +2749,7 @@ dependencies = [
[[package]]
name = "filedescriptor"
version = "0.8.2"
source = "git+https://github.com/rustdesk-org/wezterm?branch=rustdesk/pty_based_0.8.1#a181db18cbd59fc797ad5f34a06569de3dfab927"
source = "git+https://github.com/rustdesk-org/wezterm?branch=rustdesk/pty_based_0.8.1#80174f8009f41565f0fa8c66dab90d4f9211ae16"
dependencies = [
"libc",
"thiserror 1.0.61",
@@ -5046,7 +5046,7 @@ dependencies = [
[[package]]
name = "nokhwa"
version = "0.10.7"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f149b074d081004920495f04444503a2379ca795"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#c2f74662b6ce117f7f94301693fdfadc0b1ec91a"
dependencies = [
"flume",
"image 0.25.1",
@@ -5061,7 +5061,7 @@ dependencies = [
[[package]]
name = "nokhwa-bindings-linux"
version = "0.1.1"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f149b074d081004920495f04444503a2379ca795"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#c2f74662b6ce117f7f94301693fdfadc0b1ec91a"
dependencies = [
"nokhwa-core",
"v4l",
@@ -5070,7 +5070,7 @@ dependencies = [
[[package]]
name = "nokhwa-bindings-macos"
version = "0.2.2"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f149b074d081004920495f04444503a2379ca795"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#c2f74662b6ce117f7f94301693fdfadc0b1ec91a"
dependencies = [
"block",
"cocoa-foundation",
@@ -5086,7 +5086,7 @@ dependencies = [
[[package]]
name = "nokhwa-bindings-windows"
version = "0.4.2"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f149b074d081004920495f04444503a2379ca795"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#c2f74662b6ce117f7f94301693fdfadc0b1ec91a"
dependencies = [
"dlopen",
"lazy_static",
@@ -5098,7 +5098,7 @@ dependencies = [
[[package]]
name = "nokhwa-core"
version = "0.1.5"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f149b074d081004920495f04444503a2379ca795"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#c2f74662b6ce117f7f94301693fdfadc0b1ec91a"
dependencies = [
"bytes",
"image 0.25.1",
@@ -6197,7 +6197,7 @@ checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
[[package]]
name = "portable-pty"
version = "0.8.1"
source = "git+https://github.com/rustdesk-org/wezterm?branch=rustdesk/pty_based_0.8.1#a181db18cbd59fc797ad5f34a06569de3dfab927"
source = "git+https://github.com/rustdesk-org/wezterm?branch=rustdesk/pty_based_0.8.1#80174f8009f41565f0fa8c66dab90d4f9211ae16"
dependencies = [
"anyhow",
"bitflags 1.3.2",
@@ -6748,7 +6748,7 @@ dependencies = [
[[package]]
name = "rdev"
version = "0.5.0-2"
source = "git+https://github.com/rustdesk-org/rdev#bfb285414f04be94a98063e645c334a9966758ea"
source = "git+https://github.com/rustdesk-org/rdev#0904f23ce496e255461a98848b85c11fa5a62eab"
dependencies = [
"cocoa 0.24.1",
"core-foundation 0.9.4",
@@ -7255,9 +7255,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.46"
version = "0.23.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643"
dependencies = [
"log",
"once_cell",
@@ -7413,7 +7413,6 @@ dependencies = [
"ndk-context",
"nokhwa",
"num_cpus",
"objc",
"pkg-config",
"quest",
"repng",
@@ -8209,7 +8208,7 @@ dependencies = [
[[package]]
name = "tao"
version = "0.25.0"
source = "git+https://github.com/rustdesk-org/tao?branch=dev#74684bd8b7f565a0edf9412f7403f6433f0d5efb"
source = "git+https://github.com/rustdesk-org/tao?branch=dev#288c219cb0527e509590c2b2d8e7072aa9feb2d3"
dependencies = [
"bitflags 1.3.2",
"cc",
@@ -8249,7 +8248,7 @@ dependencies = [
[[package]]
name = "tao-macros"
version = "0.1.2"
source = "git+https://github.com/rustdesk-org/tao?branch=dev#74684bd8b7f565a0edf9412f7403f6433f0d5efb"
source = "git+https://github.com/rustdesk-org/tao?branch=dev#288c219cb0527e509590c2b2d8e7072aa9feb2d3"
dependencies = [
"proc-macro2 1.0.93",
"quote 1.0.36",
-3
View File
@@ -283,9 +283,6 @@ name = "RustDesk"
identifier = "com.carriez.rustdesk"
icon = ["res/32x32.png", "res/128x128.png", "res/128x128@2x.png"]
osx_minimum_system_version = "10.14"
# View Camera needs NSCameraUsageDescription or macOS kills the process at the
# camera permission prompt; the Flutter bundle gets it via its own Info.plist.
osx_info_plist_exts = ["res/osx_camera_info.plist"]
#https://github.com/johnthagen/min-sized-rust
[profile.release]
+2 -2
View File
@@ -158,9 +158,9 @@ Please ensure that you run these commands from the root of the RustDesk reposito
## File Structure
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: config, tcp/udp wrapper, and some other utility functions shared with the server
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, and some other utility functions shared with the server
- **[libs/base](https://github.com/rustdesk/rustdesk/tree/master/libs/base)**: protobuf, fs functions for file transfer, keyboard and platform code used only by this app
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: screen capture and video codecs
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: screen capture
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platform specific keyboard/mouse control
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: file copy and paste implementation for Windows, Linux, macOS.
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: obsolete Sciter UI (deprecated)
+16 -17
View File
@@ -24,16 +24,18 @@ AppDir:
apt:
arch:
- arm64
allow_unauthenticated: true
sources:
# Ubuntu's 2012 and 2018 archive signing keys (both sign focal), exported from ubuntu-keyring:
# gpg --show-keys ubuntu-archive-keyring.asc. apt trusts them for every source below.
- sourceline: deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse
key_url: file:ubuntu-archive-keyring.asc
- sourceline: deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse
- sourceline: deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
universe multiverse
- sourceline: deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted
universe multiverse
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
include:
- libc6:arm64
- libgtk-3-0
@@ -77,16 +79,13 @@ AppDir:
# AppRun sets these to "$APPDIR/...:$XDG_DATA_DIRS", and setting them at all suppresses the XDG
# defaults, so a host that leaves them unset loses /usr/share and /etc/xdg. gdk-pixbuf 2.43+
# (Arch, Fedora) then finds no glycin loaders and every PNG decode fails, aborting on the first
# remote cursor. The host value goes last, after a "/": unset, AppRun expands it to nothing, and
# an empty element would make GLib search the CWD; "/" leaves the root instead, and a set
# value's first absolute path becomes the same "//path".
XDG_DATA_DIRS: $APPDIR/usr/local/share:$APPDIR/usr/share:/usr/local/share:/usr/share:/$XDG_DATA_DIRS
XDG_CONFIG_DIRS: $APPDIR/etc/xdg:/etc/xdg:/$XDG_CONFIG_DIRS
# Host paths come before $APPDIR so Wayland capture uses the host's GStreamer and PipeWire.
# Arch Linux ARM has neither /lib64 nor a multiarch dir on aarch64, only /usr/lib.
APPDIR_LIBRARY_PATH: /lib64:/usr/lib/aarch64-linux-gnu:/usr/lib:$APPDIR/lib/aarch64-linux-gnu:$APPDIR/lib/aarch64-linux-gnu/security:$APPDIR/lib/systemd:$APPDIR/usr/lib/aarch64-linux-gnu:$APPDIR/usr/lib/aarch64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/immodules:$APPDIR/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/printbackends:$APPDIR/usr/lib/aarch64-linux-gnu/krb5/plugins/preauth:$APPDIR/usr/lib/aarch64-linux-gnu/libcanberra-0.30:$APPDIR/usr/lib/aarch64-linux-gnu/pulseaudio:$APPDIR/usr/lib/aarch64-linux-gnu/sasl2:$APPDIR/usr/lib/aarch64-linux-gnu/vdpau:$APPDIR/usr/share/rustdesk/lib:$APPDIR/lib/aarch64
GST_PLUGIN_PATH: /lib64/gstreamer-1.0:/usr/lib/aarch64-linux-gnu/gstreamer-1.0:/usr/lib/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0
GST_PLUGIN_SYSTEM_PATH: /lib64/gstreamer-1.0:/usr/lib/aarch64-linux-gnu/gstreamer-1.0:/usr/lib/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0
# remote cursor. The host value goes last: unset it expands to an empty element, which GLib
# resolves against the CWD, and that must not outrank the defaults below.
XDG_DATA_DIRS: $APPDIR/usr/local/share:$APPDIR/usr/share:/usr/local/share:/usr/share:$XDG_DATA_DIRS
XDG_CONFIG_DIRS: $APPDIR/etc/xdg:/etc/xdg:$XDG_CONFIG_DIRS
APPDIR_LIBRARY_PATH: /lib64:/usr/lib/aarch64-linux-gnu:$APPDIR/lib/aarch64-linux-gnu:$APPDIR/lib/aarch64-linux-gnu/security:$APPDIR/lib/systemd:$APPDIR/usr/lib/aarch64-linux-gnu:$APPDIR/usr/lib/aarch64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/immodules:$APPDIR/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/printbackends:$APPDIR/usr/lib/aarch64-linux-gnu/krb5/plugins/preauth:$APPDIR/usr/lib/aarch64-linux-gnu/libcanberra-0.30:$APPDIR/usr/lib/aarch64-linux-gnu/pulseaudio:$APPDIR/usr/lib/aarch64-linux-gnu/sasl2:$APPDIR/usr/lib/aarch64-linux-gnu/vdpau:$APPDIR/usr/share/rustdesk/lib:$APPDIR/lib/aarch64
GST_PLUGIN_PATH: /lib64/gstreamer-1.0:/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0
GST_PLUGIN_SYSTEM_PATH: /lib64/gstreamer-1.0:/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0
test:
fedora-30:
image: appimagecrafters/tests-env:fedora-30
+13 -16
View File
@@ -24,19 +24,17 @@ AppDir:
apt:
arch:
- amd64
allow_unauthenticated: true
sources:
# Ubuntu's 2012 and 2018 archive signing keys (both sign focal), exported from ubuntu-keyring:
# gpg --show-keys ubuntu-archive-keyring.asc. apt trusts them for every source below.
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal main restricted
key_url: file:ubuntu-archive-keyring.asc
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal-updates main restricted
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal universe
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal-updates universe
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal multiverse
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal-updates multiverse
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal-backports main restricted
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal main restricted
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal multiverse
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted
universe multiverse
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal-security main restricted
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted
universe multiverse
include:
# https://github.com/rustdesk/rustdesk/issues/9103
@@ -84,11 +82,10 @@ AppDir:
# AppRun sets these to "$APPDIR/...:$XDG_DATA_DIRS", and setting them at all suppresses the XDG
# defaults, so a host that leaves them unset loses /usr/share and /etc/xdg. gdk-pixbuf 2.43+
# (Arch, Fedora) then finds no glycin loaders and every PNG decode fails, aborting on the first
# remote cursor. The host value goes last, after a "/": unset, AppRun expands it to nothing, and
# an empty element would make GLib search the CWD; "/" leaves the root instead, and a set
# value's first absolute path becomes the same "//path".
XDG_DATA_DIRS: $APPDIR/usr/local/share:$APPDIR/usr/share:/usr/local/share:/usr/share:/$XDG_DATA_DIRS
XDG_CONFIG_DIRS: $APPDIR/etc/xdg:/etc/xdg:/$XDG_CONFIG_DIRS
# remote cursor. The host value goes last: unset it expands to an empty element, which GLib
# resolves against the CWD, and that must not outrank the defaults below.
XDG_DATA_DIRS: $APPDIR/usr/local/share:$APPDIR/usr/share:/usr/local/share:/usr/share:$XDG_DATA_DIRS
XDG_CONFIG_DIRS: $APPDIR/etc/xdg:/etc/xdg:$XDG_CONFIG_DIRS
APPDIR_LIBRARY_PATH: /lib64:/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu/security:$APPDIR/lib/systemd:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules:$APPDIR/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/printbackends:$APPDIR/usr/lib/x86_64-linux-gnu/krb5/plugins/preauth:$APPDIR/usr/lib/x86_64-linux-gnu/libcanberra-0.30:$APPDIR/usr/lib/x86_64-linux-gnu/pulseaudio:$APPDIR/usr/lib/x86_64-linux-gnu/sasl2:$APPDIR/usr/lib/x86_64-linux-gnu/vdpau:$APPDIR/usr/share/rustdesk/lib:$APPDIR/lib/x86_64
GST_PLUGIN_PATH: /lib64/gstreamer-1.0:/usr/lib/x86_64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer-1.0
GST_PLUGIN_SYSTEM_PATH: /lib64/gstreamer-1.0:/usr/lib/x86_64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer-1.0
@@ -1,41 +0,0 @@
diff --git a/src/apprun/runtime_interpreter.c b/src/apprun/runtime_interpreter.c
index fe06502..33ddd8e 100644
--- a/src/apprun/runtime_interpreter.c
+++ b/src/apprun/runtime_interpreter.c
@@ -143,6 +143,20 @@ long compare_version_strings(const char *a, const char *b) {
return 0;
}
+/* An empty element, as appending an unset LD_LIBRARY_PATH leaves, makes the dynamic loader search
+ * the current directory. */
+static void apprun_drop_empty_path_elements(char *path) {
+ char *out = path;
+ for (const char *in = path; *in != '\0'; in++) {
+ if (*in == ':' && (out == path || out[-1] == ':'))
+ continue;
+ *out++ = *in;
+ }
+ if (out > path && out[-1] == ':')
+ out--;
+ *out = '\0';
+}
+
void configure_embed_libc() {
#ifdef DEBUG
fprintf(stderr, "APPRUN_DEBUG: using appdir libc\n");
@@ -150,6 +164,7 @@ void configure_embed_libc() {
char *ld_library_path = apprun_shell_expand_variables("$"APPDIR_LIBRARY_PATH_ENV":"
"$"APPDIR_LIBC_LIBRARY_PATH_ENV":"
"$"APPRUN_ENV_ORIG_PREFIX"LD_LIBRARY_PATH", NULL);
+ apprun_drop_empty_path_elements(ld_library_path);
apprun_env_set("LD_LIBRARY_PATH", ld_library_path, "", ld_library_path);
free(ld_library_path);
@@ -161,6 +176,7 @@ void configure_system_libc() {
#endif
char *ld_library_path = apprun_shell_expand_variables("$"APPDIR_LIBRARY_PATH_ENV":"
"$"APPRUN_ENV_ORIG_PREFIX"LD_LIBRARY_PATH", NULL);
+ apprun_drop_empty_path_elements(ld_library_path);
apprun_env_set("LD_LIBRARY_PATH", ld_library_path, "", ld_library_path);
free(ld_library_path);
+2 -6
View File
@@ -1,11 +1,8 @@
#!/usr/bin/env bash
# AppRun v2.0.0, which appimage-builder downloads, splits every argument into a 1 KiB stack
# buffer, so any argument of 1024 bytes or more aborts the AppImage before RustDesk starts.
# It also appends the host's LD_LIBRARY_PATH after a ":", so an unset one leaves an empty element
# that makes the loader search the current directory for libraries.
# Build it with apprun-split-arguments.patch and apprun-no-empty-library-path.patch into the path
# appimage-builder checks before downloading. ubuntu:16.04 is what upstream released from, so the
# host glibc floor is unchanged.
# Build it with apprun-split-arguments.patch into the path appimage-builder checks before
# downloading. ubuntu:16.04 is what upstream released from, so the host glibc floor is unchanged.
set -euo pipefail
arch=$1
@@ -28,7 +25,6 @@ echo "$sha256 $tmp/apprun.tar.gz" | sha256sum -c -
mkdir "$src"
tar -xzf "$tmp/apprun.tar.gz" -C "$src" --strip-components=1
patch -d "$src" -p1 < "$here/apprun-split-arguments.patch"
patch -d "$src" -p1 < "$here/apprun-no-empty-library-path.patch"
docker run --rm -v "$src:/src" -w /src -e DEBIAN_FRONTEND=noninteractive "$image" bash -c "
set -e
-53
View File
@@ -1,53 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBE+tgXgBEADfiL1KNFHT4H4Dw0OR9LemR8ebsFl+b9E44IpGhgWYDufj0gaM
/UJ1Ti3bHfRT39VVZ6cv1P4mQy0bnAKFbYz/wo+GhzjBWtn6dThYv7n+KL8bptSC
Xgg1a6en8dCCIA/pwtS2Ut/g4Eu6Z467dvYNlMgCqvg+prKIrXf5ibio48j3AFvd
1dDJl2cHfyuON35/83vXKXz0FPohQ7N7kPfI+qrlGBYGWFzC/QEGje360Q2Yo+rf
MoyDEXmPsoZVqf7EE8gjfnXiRqmz/Bg5YQb5bgnGbLGiHWtjS+ACIdLUq/h+jlSp
57jw8oQktMh2xVMX4utDM0UENeZnPllVJSlR0b+ZmZz7paeSar8Yxn4wsNlL7GZb
pW5A/WmcmWfuMYoPhBo5Fq1V2/siKNU3UKuf1KH+X0p1oZ4oOcZ2bS0Zh3YEG8IQ
ce9Bferq4QMKsekcG9IKS6WBIU7BwaElI2ILD0gSwu8KzvNSEeIJhYSsBIEzrWxI
BXoN2AC9PCqqXkWlI5Xr/86RWllB3CsoPwEfO8CLJW2LlXTen/Fkq4wT+apdhHei
WiSsq/J5OEff0rKHBQ3fK7fyVuVNrJFb2CopaBLyCxTupvxs162jjUNopt0c7OqN
BoPoUoVFAxUSpeEwAw6xrM5vROyLMSeh/YnTuRy8WviRapZCYo6naTCY5wARAQAB
tEJVYnVudHUgQXJjaGl2ZSBBdXRvbWF0aWMgU2lnbmluZyBLZXkgKDIwMTIpIDxm
dHBtYXN0ZXJAdWJ1bnR1LmNvbT6JAjgEEwECACIFAk+tgXgCGwMGCwkIBwMCBhUI
AgkKCwQWAgMBAh4BAheAAAoJEDtP5qzAsh8yXX4QAJHUdK6eYMyJcrFP3yKXtUYQ
MpaHRM/floqZtOFhlmcLVMgBNOr0eLvBU0JcZyZpHMvZciTDBMWX8ItCYVjRejf0
K0lPvHHRGaE7t6JHVUCeznNbDMnOPYVwlVJdZLOa6PmE5WXVXpk8uTA8vm6RO2rS
23vE7U0pQlV+1GVXMWH4ZLjaQs/Tm7wdvRxeqTbtfOEeHGLjmsoh0erHfzMV4wA/
9Zq86WzuJS1HxXR6OYDC3/aQX7CxYT1MQxEw/PObnHtkl3PRMWdTW7fSQtulEXzp
r2/JCev6Mfc8Uy0aD3jng9byVk9GpdNFEjGgaUqjqyZosvwAZ4/dmRjmMEibXeNU
GC8HeWC3WOVV8L/DiA+miJlwPvwPiA1ZuKBI5A8VF0rNHW7QVsG8kQ+PDHgRdsmh
pzSRgykN1PgK6UxScKX8LqNKCtKpuEPApka7FQ1u4BoZKjjpBhY1R4TpfFkMIe7q
W8XfqoaP99pED3xXch2zFRNHitNJr+yQJH4z/o+2UvnTA2niUTHlFSCBoU1MvSq1
N2J3qU6oR2cOYJ4ZxqWyCoeQR1x8aPnLlcn4le6HU7TocYbHaImcIt7qnG4Ni0OW
P4giEhjOpgxtrWgl36mdufvriwya+EHXzn36EvQ9O+bm3fyarsnhPe01rlsRxqBi
K1JOw/g4GnpX8iLGEX1VmQINBFufwdoBEADv/Gxytx/LcSXYuM0MwKojbBye81s0
G1nEx+lz6VAUpIUZnbkqdXBHC+dwrGS/CeeLuAjPRLU8AoxE/jjvZVp8xFGEWHYd
klqXGZ/gJfP5d3fIUBtZHZEJl8B8m9pMHf/AQQdsC+YzizSG5t5Mhnotw044LXtd
EEkx2t6Jz0OGrh+5IoxqX7pZiq6Cv19BohaUioKMdp7ES6RYfN7ol6HSLFlrMXtV
fh/ijpN9j3ZhVGVeRC8kKHQsJ5PkIbmvxBiUh7SJmfZUx0IQhNMaDHXfdZAGNtnh
zzNReb1FqNLSVkrS/PnsAQzMhG1BDm2VOSF64jebKXffFqM5LXRQTeqTLsjUbbrq
R6s/GCO8UF7jfUj6I7taLygmsHO/JD4jpKRC0gbpUBfaiJyLvuepx3kWoqL3sN0L
hlMI80+fA7GTvoOx4tpqVlzlE6TajYu+jfW3QpOFS5ewEMdL26hzxsZg/geZvTbA
rcP+OsJKRmhv4kNo6AydyHQ/3ZV/f3X9mT3/SPLbJaumkgp3Yzd6t5PeBu+ZQk/m
N5WNNuaihNEV7llb1ZhvY0Fxu9BVd/BNl0rzuxp3rIinB2TX2SCg7wE5xXkwXuQ/
2eTDE0v0HlGntkuZjGowDZkxHZQSxZVOzdZCRVaX/WEFLpKa2AQpw5RJrQ4oZ/Of
ifXyJzP27o03wQARAQABtEJVYnVudHUgQXJjaGl2ZSBBdXRvbWF0aWMgU2lnbmlu
ZyBLZXkgKDIwMTgpIDxmdHBtYXN0ZXJAdWJ1bnR1LmNvbT6JAjgEEwEKACIFAluf
wdoCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEIcZINGZG8k8LHMQAKS2
cnxz/5WaoCOWArf5g6UHbeOCgc5DBm0hCuFDZWWv427aGei3CPuLw0DGLCXZdyc5
dqE8mvjMlOmmAKKlj1uGg3TYCbQWjWPeMnBPZbkFgkZoXJ7/6CB7bWRht1sHzpt1
LTZ+SYDwOwJ68QRp7DRaZl9Y6QiUbeuhq2DUcTofVbBxbhrckN4ZteLvm+/nG9m/
ciopc66LwRdkxqfJ32Cyq+1TS5VaIJDG7DWziG+Kbu6qCDM4QNlg3LH7p14CrRxA
bc4lvohRgsV4eQqsIcdFkuVY5HPPj2K8TqpY6STe8Gh0aprG1RV8ZKay3KSMpnyV
1fAKn4fM9byiLzQAovC0LZ9MMMsrAS/45AvC3IEKSShjLFn1X1dRCiO6/7jmZEoZ
tAp53hkf8SMBsi78hVNrBumZwfIdBA1v22+LY4xQK8q4XCoRcA9G+pvzU9YVW7cR
nDZZGl0uwOw7z9PkQBF5KFKjWDz4fCk+K6+YtGpovGKekGBb8I7EA6UpvPgqA/Qd
I0t1IBP0N06RQcs1fUaAQEtz6DGy5zkRhR4pGSZn+dFET7PdAjEK84y7BdY4t+U1
jcSIvBj0F2B7LwRL7xGpSpIKi/ekAXLs117bvFHaCvmUYN7JVp1GMmVFxhIdx6CF
m3fxG8QjNb5tere/YqK+uOgcXny1UlwtCUzlrSaP
=GitC
-----END PGP PUBLIC KEY BLOCK-----
+157 -57
View File
@@ -46,9 +46,6 @@ def get_deb_extra_depends() -> str:
custom_arch = os.environ.get("DEB_ARCH")
if custom_arch == "armhf": # for arm32v7 libsciter-gtk.so
return ", libatomic1"
if custom_arch == "riscv64": # libvpx/libaom are static; these come from the distribution
# Cross-built on Ubuntu 24.04 (glibc 2.39, g++ 13): keep apt from installing it on older releases.
return ", libc6 (>= 2.39), libstdc++6 (>= 13), libopus0, libyuv0, libsodium23"
return ""
def system2(cmd):
@@ -143,10 +140,10 @@ def make_parser():
help='Build with unix file copy paste feature'
)
parser.add_argument(
'--no-drm',
'--drm',
action='store_true',
help='Linux only: build without the DRM/KMS capture backend (on by default for Flutter '
'builds; it bundles libdrmtap.so, dlopen-ed in-process by the root service)'
help='Linux only: build the DRM/KMS capture backend (bundles libdrmtap.so, '
'dlopen-ed in-process by the root service). Off by default.'
)
parser.add_argument(
'--print-features',
@@ -300,10 +297,11 @@ def external_resources(flutter, args, res_dir):
def linux_packaging_branch():
"""Which packaging path `main()` will take on THIS host.
MUST mirror the elif chain in main() (pacman / yum / zypper / else), and exists so the drm
backend is compiled in only where the package can carry libdrmtap: the `deb` branch
(`build_flutter_deb`) and the pacman Flutter branch (PKGBUILD). The yum and zypper branches
build Sciter rpms from res/rpm.spec and res/rpm-suse.spec, which do not.
MUST mirror the elif chain in main() (pacman / yum / zypper / else), and exists so `--drm` can
refuse a branch that is not drm-aware instead of silently producing a stock-named package with
the capture backend compiled in. Only the final `deb` branch reaches `build_flutter_deb`, which
is what bundles libdrmtap, renames the package, adds Conflicts/Provides and asserts the staged
binary really is a drm build.
"""
if os.path.isfile('/usr/bin/pacman'):
return 'pacman'
@@ -324,14 +322,29 @@ def get_features(args):
features.append('flutter')
if args.unix_file_copy_paste:
features.append('unix-file-copy-paste')
# The backend is off at runtime until the user turns on allow-drm-capture, so every Linux
# Flutter package carries it.
if (args.flutter and not (windows or osx) and not args.no_drm
and linux_packaging_branch() in ('deb', 'pacman')):
if args.drm:
# Say so rather than quietly handing back a stock build: the backend is Linux-only, so on
# any other host the flag cannot be honoured and the resulting binary would look like a
# DRM build without being one.
if windows or osx:
raise Exception('--drm is Linux only')
# And only on the deb branch. The other three Linux paths (pacman/yum/zypper) package
# straight from `target/release` without bundling libdrmtap, without the rename, without
# Conflicts/Provides and without assert_staged_binary_is_drm() -- so they would emit a
# package NAMED `rustdesk` carrying the consent-bypass backend and the root-side uinput
# injection. The separate package name is the informed consent this feature rests on, so
# refuse rather than ship a stock-named build of it.
branch = linux_packaging_branch()
if branch != 'deb':
raise Exception(
f'--drm is only supported on the deb packaging path; this host would package via '
f'{branch}, which cannot bundle libdrmtap or name the package distinctly')
features.append('drm')
# The display wake is its own compile gate on top of `drm`: it reaches a machine whose
# screen went dark, which is the unattended case DRM capture is for. It is also switchable
# at runtime; see OPTION_ENABLE_DRM_DISPLAY_WAKE.
# The display wake is its own compile gate on top of `drm`, and the unattended package is
# exactly where it belongs: that variant exists to reach a machine nobody is sitting at,
# and a machine whose screen went dark is the case it is for. Dropping `drm-wake` from
# this line builds the same capture backend with no wake code in the binary at all.
# It is ALSO switchable at runtime; see OPTION_ENABLE_DRM_DISPLAY_WAKE.
features.append('drm-wake')
if osx:
if args.screencapturekit:
@@ -352,9 +365,7 @@ Architecture: %s
Maintainer: rustdesk <info@rustdesk.com>
Homepage: https://rustdesk.com
Depends: libgtk-3-0t64 | libgtk-3-0, libxcb-randr0, libxdo3 | libxdo4, libxfixes3, libxcb-shape0, libxcb-xfixes0, libasound2t64 | libasound2, libsystemd0, curl, libva2, libva-drm2, libva-x11-2, libgstreamer-plugins-base1.0-0, gstreamer1.0-pipewire%s
Recommends: libayatana-appindicator3-1, libdrm2 (>= 2.4.101), libegl1, libgles2
Conflicts: rustdesk-unattended-wayland
Replaces: rustdesk-unattended-wayland
Recommends: libayatana-appindicator3-1
Description: A remote control software.
""" % (version, get_deb_arch(), get_deb_extra_depends())
@@ -379,9 +390,9 @@ def ffi_bindgen_function_refactor():
# The commit is fetched directly by sha, so no branch or tag name takes part in the build: see
# build_libdrmtap_so(). This is the SINGLE source of truth for the pin, deliberately not duplicated in
# any workflow, so a bump is one edit here (plus the informational version comment in
# libs/scrap/Cargo.toml). This commit is libdrmtap v0.6.1.
# libs/scrap/Cargo.toml). This commit is libdrmtap v0.5.12.
LIBDRMTAP_REPO_PINNED = 'https://github.com/rustdesk-org/libdrmtap'
LIBDRMTAP_SHA_PINNED = '12600215d37ae66417a8dcef1e56c01ccf2933ac'
LIBDRMTAP_SHA_PINNED = '5936a7a88b94aa43516a3dd0eb509d2383f31e2d'
LIBDRMTAP_REPO = os.environ.get('DRMTAP_REPO', LIBDRMTAP_REPO_PINNED)
LIBDRMTAP_SHA = os.environ.get('DRMTAP_SHA', LIBDRMTAP_SHA_PINNED)
# Every way of getting a different .so than the pin needs the same explicit opt-in. Otherwise the
@@ -412,7 +423,7 @@ def _prebuilt_dir_is_the_pinned_checkout(prebuilt_dir):
def _validate_libdrmtap_pin():
# Called from build_libdrmtap_so(), NOT at import: a build without drm (--no-drm) must stay
# Called from build_libdrmtap_so(), NOT at import: a stock (non --drm) build must stay
# byte-identical to upstream in behaviour too, and leftover DRMTAP_* variables in the
# environment (or a malformed sha) must not be able to fail a build that never touches
# libdrmtap.
@@ -593,6 +604,9 @@ def _assert_so_has_egl(so_path):
'libgles2-mesa-dev; Arch: mesa libglvnd).')
DRM_PACKAGE_NAME = 'rustdesk-unattended-wayland'
def assert_so_satisfies_the_runtime_abi_gate(so_path):
"""The .so we are about to ship must be one the RUNTIME will actually accept.
@@ -631,15 +645,15 @@ def assert_so_satisfies_the_runtime_abi_gate(so_path):
'could not parse the libdrmtap ABI gate out of drmtap_dl.rs (DRMTAP_ABI_MAJOR / '
'DRMTAP_ABI_MINOR / DRMTAP_MIN_MINOR_PATCH). The gate moved and this check did not; '
'fix the check rather than removing it, or the pin and the gate can drift silently.')
accepted = so_ver[0] == major and so_ver[1] <= minor and (so_ver[1], so_ver[2]) >= floor
accepted = so_ver[0] == major and so_ver[1] == minor and (so_ver[1], so_ver[2]) >= floor
if not accepted:
raise Exception(
f'the libdrmtap being packaged is {so_ver[0]}.{so_ver[1]}.{so_ver[2]}, which the '
f'runtime loader would REFUSE: drmtap_dl.rs accepts major {major}, from '
f'{floor[0]}.{floor[1]} up to minor {minor}. Shipping it produces a deb whose DRM capture can never '
f'runtime loader would REFUSE: drmtap_dl.rs accepts exactly major {major}, minor '
f'{minor}, patch >= {floor[1]}. Shipping it produces a deb whose DRM capture can never '
'start. Move the build pin and the gate together, or fix whichever one is wrong.')
print(f'[drm] libdrmtap {so_ver[0]}.{so_ver[1]}.{so_ver[2]} satisfies the runtime ABI gate '
f'(major {major}, {floor[0]}.{floor[1]} up to minor {minor})')
f'(major {major}, minor {minor}, patch >= {floor[1]})')
def stage_libdrmtap_into_deb(so_path):
@@ -658,6 +672,68 @@ def stage_libdrmtap_into_deb(so_path):
system2(f'ln -sf "{so_basename}" tmpdeb/usr/lib/rustdesk/libdrmtap.so.0')
def _max_glibc_minor(path):
# Read from .dynstr rather than via objdump so packaging needs no binutils; chunked because
# librustdesk.so is ~45 MB.
best = 0
with open(path, 'rb') as f:
tail = b''
while True:
chunk = f.read(1 << 20)
if not chunk:
return best
for m in re.finditer(rb'GLIBC_2\.(\d+)', tail + chunk):
best = max(best, int(m.group(1)))
tail = chunk[-16:]
def measured_glibc_floor():
# libdrmtap is built on a newer base than the rest of the deb, so the floor is whichever staged
# object is higher -- and it moves whenever either base does.
paths = [p for p in glob.glob('tmpdeb/usr/lib/rustdesk/libdrmtap.so.0.*')
+ glob.glob('tmpdeb/usr/share/rustdesk/lib/librustdesk.so')
+ glob.glob('tmpdeb/usr/share/rustdesk/rustdesk')
if os.path.isfile(p) and not os.path.islink(p)]
minor = max((_max_glibc_minor(p) for p in paths), default=0)
if not minor:
raise Exception(
f'could not measure a GLIBC_2.x floor from any staged object ({paths or "none found"}); '
'refusing to ship the unattended-wayland variant with an undeclared libc6 floor, which '
'is what lets it install on a host where libdrmtap can never load')
return f'2.{minor}'
def retarget_control_to_drm_variant():
# Rewrite the control file that generate_control_file just produced, instead of parameterizing that
# function: the stock packaging path stays exactly as upstream wrote it, and everything specific to
# this variant lives here. The variant installs the same files as the stock package, so it must
# conflict with and replace it: you install one or the other, never both. It also needs libdrmtap's
# own runtime deps, which the stock package has no reason to carry.
path = '../res/DEBIAN/control'
floor = measured_glibc_floor()
print(f'[drm] {DRM_PACKAGE_NAME} libc6 floor measured at {floor}')
with open(path) as f:
lines = f.readlines()
out = []
for line in lines:
if line.startswith('Package: rustdesk'):
out.append(f'Package: {DRM_PACKAGE_NAME}\n')
out.append('Conflicts: rustdesk\nReplaces: rustdesk\nProvides: rustdesk\n')
elif line.startswith('Depends:'):
# 2.4.101 is where drmModeGetFB2 landed; below it libdrmtap loads and can never capture.
out.append(line.rstrip('\n') + ', libdrm2 (>= 2.4.101), libegl1, libgles2, '
f'libc6 (>= {floor})\n')
else:
out.append(line)
body = ''.join(out)
# Fail loudly rather than silently shipping a package that says `rustdesk`: a stock control file
# that stopped matching either anchor would otherwise produce a variant deb wearing the stock name.
if f'Package: {DRM_PACKAGE_NAME}\n' not in body or 'libegl1' not in body:
raise Exception(f'could not retarget {path} to the drm variant; upstream control layout changed')
with open(path, 'w') as f:
f.write(body)
def build_flutter_deb(version, features):
if not skip_cargo:
system2(f'cargo build --locked --features {features} --lib --release')
@@ -686,10 +762,11 @@ def build_flutter_deb(version, features):
'cp ../res/rustdesk-link.desktop tmpdeb/usr/share/applications/rustdesk-link.desktop')
system2(
"echo \"#!/bin/sh\" >> tmpdeb/usr/share/rustdesk/files/polkit && chmod a+x tmpdeb/usr/share/rustdesk/files/polkit")
# Bundle libdrmtap.so only when this build actually enabled the `drm` feature (not with
# --no-drm). The root service dlopens it in-process by absolute path.
# Bundle libdrmtap.so only when this build actually enabled the `drm` feature, so stock packages
# stay exactly what they were. The root service dlopens it in-process by absolute path.
# `features` is the comma-joined string, so split it: a bare substring test would also match any
# future feature merely containing "drm" (drm-lease, vaapi-drm).
# future feature merely containing "drm" (drm-lease, vaapi-drm) and rename the deb to the
# consent-bypass variant without --drm ever being passed.
ships_so = 'drm' in features.split(',')
if ships_so:
# Same artifact assertion as the --package path. Under --skip-cargo nothing here rebuilt the
@@ -699,6 +776,8 @@ def build_flutter_deb(version, features):
system2('mkdir -p tmpdeb/DEBIAN')
generate_control_file(version)
if ships_so:
retarget_control_to_drm_variant()
system2('cp -a ../res/DEBIAN/* tmpdeb/DEBIAN/')
md5_file_folder("tmpdeb/")
system2('dpkg-deb -b tmpdeb rustdesk.deb;')
@@ -706,6 +785,9 @@ def build_flutter_deb(version, features):
system2('/bin/rm -rf tmpdeb/')
system2('/bin/rm -rf ../res/DEBIAN/control')
os.rename('rustdesk.deb', '../rustdesk-%s.deb' % version)
if ships_so:
# Named apart from the stock package so installing the consent-free variant is a deliberate act.
os.rename('../rustdesk-%s.deb' % version, f'../{DRM_PACKAGE_NAME}-{version}.deb')
os.chdir("..")
@@ -733,30 +815,38 @@ def _carries_drmtap_marker(path, marker=DRMTAP_DLOPEN_MARKER):
def assert_staged_binary_is_drm():
"""The staged BINARY must really be a drm build before libdrmtap is packaged with it. Under
`--skip-cargo` (how CI packages) nothing here rebuilt the binary, so `features` says what was
asked for while the staged bundle can be anything. The marker is the absolute dlopen path from
drmtap_dl.rs, present only when the feature is compiled in -- assert what was produced, not
what was asked for.
"""The staged BINARY must really be a drm build before it is named the unattended-wayland
variant. That package conflicts with and replaces the stock one, so shipping a stock binary
under that name produces something that can never capture and cannot be installed alongside
what it replaced. The marker is the absolute dlopen path from drmtap_dl.rs, present only when
the feature is compiled in -- assert what was produced, not what was asked for.
Called from BOTH packaging paths. It used to guard only one of them, and `--skip-cargo` (which
is how CI packages) reaches the other, where nothing had rebuilt the binary at all.
"""
binaries = [p for p in glob.glob('tmpdeb/usr/share/rustdesk/lib/librustdesk.so')
+ glob.glob('tmpdeb/usr/share/rustdesk/rustdesk') if os.path.isfile(p)]
if not any(_carries_drmtap_marker(p) for p in binaries):
raise Exception(
f'the build enabled drm but the staged bundle does not look like a drm build (no '
f'--drm was requested but the staged bundle does not look like a drm build (no '
f'{DRMTAP_DLOPEN_MARKER.decode()} dlopen path in {binaries or "any staged binary"}); '
'the cargo line that produced it is missing the feature: --features ...,drm,drm-wake '
'(or pass --no-drm)')
# And the WAKE half: get_features enables `drm-wake` with `drm`, and the dlopen marker above
# does not tell them apart -- `--features drm` alone carries it and has no wake code at all.
'refusing to package it as the unattended-wayland variant, which conflicts with and '
'replaces the stock package but could never capture')
# And the WAKE half. `--drm` enables `drm-wake` too (see get_features), and the deb is named and
# documented as the variant that can reach a machine whose screen has gone dark. The dlopen
# marker above does not distinguish them: `--features drm` alone carries it and has no wake code
# at all. Asserting only the first half is how a deb can be named for a feature it does not have.
if not any(_carries_drmtap_marker(p, DRMTAP_WAKE_MARKER) for p in binaries):
raise Exception(
f'the build enabled drm but the staged binary has no {DRMTAP_WAKE_MARKER.decode()} '
f'--drm was requested but the staged binary has no {DRMTAP_WAKE_MARKER.decode()} '
f'marker in {binaries or "any staged binary"}, so it was built without `drm-wake`; '
'the cargo line that produced it is missing the feature: --features ...,drm,drm-wake')
'refusing to package it as the unattended-wayland variant, which is named and '
'documented as the build that can wake an idle-disabled display. If this fired under '
'--skip-cargo, the cargo line that produced the bundle is missing the feature: '
'--features ...,drm,drm-wake')
def build_deb_from_folder(version, binary_folder):
def build_deb_from_folder(version, binary_folder, want_drm=False):
os.chdir('flutter')
system2('mkdir -p tmpdeb/usr/bin/')
system2('mkdir -p tmpdeb/usr/share/rustdesk')
@@ -780,26 +870,33 @@ def build_deb_from_folder(version, binary_folder):
'cp ../res/rustdesk-link.desktop tmpdeb/usr/share/applications/rustdesk-link.desktop')
system2(
"echo \"#!/bin/sh\" >> tmpdeb/usr/share/rustdesk/files/polkit && chmod a+x tmpdeb/usr/share/rustdesk/files/polkit")
# Where the capture library comes from for a `--package <folder>` drm build. Two shapes are
# Where the capture library comes from for a `--package <folder> --drm` build. Two shapes are
# supported, because two exist in practice: a bundle that already carries libdrmtap.so.0.*
# (someone staged it, e.g. a CI artifact), and a plain bundle, which is what every build path
# here actually produces -- the flutter deb builds the library straight into the staged deb, so
# nothing ever puts it inside the bundle folder.
# nothing ever puts it inside the bundle folder. Demanding it in the bundle made this flag
# combination impossible to satisfy.
bundled_glob = glob.glob('tmpdeb/usr/share/rustdesk/libdrmtap.so.0.*')
bundle_carries_so = any(os.path.isfile(p) and not os.path.islink(p) for p in bundled_glob)
# `--package` compiles nothing, so only the staged binary knows whether it is a drm build; a
# Sciter or --no-drm bundle must not get libdrmtap.
want_drm = any(_carries_drmtap_marker(p)
for p in glob.glob('tmpdeb/usr/share/rustdesk/lib/librustdesk.so')
+ glob.glob('tmpdeb/usr/share/rustdesk/rustdesk') if os.path.isfile(p))
# The variant must be decided by the EXPLICIT --drm request, not merely by what happens to be
# staged: a bundle that carries the .so must NOT be shipped as the consent-bypass variant when
# --drm was never passed.
if bundle_carries_so and not want_drm:
raise Exception(
'the staged bundle carries libdrmtap.so.0.* but the binary is not a drm build')
'the staged bundle carries libdrmtap.so.0.* but --drm was not passed; refusing '
'to silently ship the consent-bypass unattended-wayland variant (pass --drm to '
'build it deliberately)')
if want_drm:
# The dlopen marker decided want_drm; this also asserts the drm-wake half.
# Whichever shape we are in, the staged BINARY must really be a drm build. This is the
# property the old presence-of-the-.so test stood in for, badly: a stock binary packaged as
# the unattended-wayland variant would carry the consent-bypass name, conflict with and
# replace the stock package, and never be able to capture. The marker is the absolute
# dlopen path from drmtap_dl.rs, present only when the feature is compiled in -- the same
# kind of artifact assertion as _assert_so_has_egl, and for the same reason: assert what
# was produced, not what was asked for.
assert_staged_binary_is_drm()
if bundle_carries_so:
so = _single_real_so(bundled_glob, 'the staged drm bundle')
so = _single_real_so(bundled_glob, 'the staged --drm bundle')
# The THIRD artifact source, and the last one that was missing the check: --package
# takes the .so straight out of a bundle somebody else produced, so it has the same
# exposure as DRMTAP_PREBUILT_DIR (see the comment on that branch). A CPU-only stub
@@ -818,6 +915,10 @@ def build_deb_from_folder(version, binary_folder):
system2('mkdir -p tmpdeb/DEBIAN')
generate_control_file(version)
# Keyed on the EXPLICIT request, not on what happened to be staged: by here a --drm build has
# its library in tmpdeb whichever of the two shapes it came from.
if want_drm:
retarget_control_to_drm_variant()
system2('cp -a ../res/DEBIAN/* tmpdeb/DEBIAN/')
md5_file_folder("tmpdeb/")
system2('dpkg-deb -b tmpdeb rustdesk.deb;')
@@ -825,6 +926,8 @@ def build_deb_from_folder(version, binary_folder):
system2('/bin/rm -rf tmpdeb/')
system2('/bin/rm -rf ../res/DEBIAN/control')
os.rename('rustdesk.deb', '../rustdesk-%s.deb' % version)
if want_drm:
os.rename('../rustdesk-%s.deb' % version, f'../{DRM_PACKAGE_NAME}-{version}.deb')
os.chdir("..")
@@ -859,9 +962,6 @@ def build_flutter_arch_manjaro(version, features):
os.chdir('flutter')
system2('flutter build linux --release')
system2(f'strip {flutter_build_dir}/lib/librustdesk.so')
# PKGBUILD installs the library from third_party/libdrmtap/build-pkg.
if 'drm' in features.split(','):
build_libdrmtap_so()
os.chdir('../res')
system2('HBB=`pwd`/.. FLUTTER=1 makepkg -f')
@@ -930,7 +1030,7 @@ def main():
portable = args.portable
package = args.package
if package:
build_deb_from_folder(version, package)
build_deb_from_folder(version, package, args.drm)
return
res_dir = 'resources'
external_resources(flutter, args, res_dir)
+1 -1
View File
@@ -30,7 +30,7 @@ issue.
doit compiler et passer les tests).
- Les commits doivent être accompagnés d'une signature Developer Certificate of
Origin (https://developercertificate.org), indiquant que vous (et votre
Origin (http://developercertificate.org), indiquant que vous (et votre
employeur le cas échéant) acceptez d'être liés par les termes de la
[licence du projet](../LICENCE). Dans git, il s'agit de l'option `-s` de
`git commit`.
+1 -1
View File
@@ -14,7 +14,7 @@ Apabila kamu ingin mengatasi sebuah masalah yang sudah ada di daftar issue, hara
- Sebaiknya buatlah commit seminimal mungkin, sambil memastikan bahwa setiap commit yang dibuat sudah benar (contohnya, setiap commit harus bisa di kompilasi dan berhasil melewati tahap test).
- Setiap commit harus disertai dengan tanda tangan Sertifikat Asal Pengembang (Developer Certificate of Origin) (<https://developercertificate.org>), yang mengindikasikan bahwa kamu (and your employer if applicable) bersedia untuk patuh terhadap persyaratan dari [lisensi projek](../LICENCE). Di git bash, ini adalah opsi parameter `-s` pada `git commit`
- Setiap commit harus disertai dengan tanda tangan Sertifikat Asal Pengembang (Developer Certificate of Origin) (<http://developercertificate.org>), yang mengindikasikan bahwa kamu (and your employer if applicable) bersedia untuk patuh terhadap persyaratan dari [lisensi projek](../LICENCE). Di git bash, ini adalah opsi parameter `-s` pada `git commit`
- Jika perubahan yang kamu buat tidak mendapat tinjauan atau kamu membutuhkan orang tertentu untuk meninjaunya, kamu bisa @-reply seorang reviewer meminta peninjauan dalam permintaan pull request atau komentar, atau kamu bisa meminta tinjauan melalui [email](mailto:info@rustdesk.com).
+1 -1
View File
@@ -20,7 +20,7 @@ Questo per evitare duplicati sforzi dei contributori sullo stesso problema.
- Le modifiche dovrebbero essere le più piccole possibile, assicurando al tempo stesso che ogni modifica sia corretta in modo indipendente (ovvero, ogni modifica dovrebbe essere compilabile e superare i test).
- Le modifiche devono essere accompagnati da un certificato di origine per sviluppatori firmato (https://developercertificate.org), che indica che tu (e il tuo datore di lavoro se applicabile) accetti di essere vincolato dai termini della [licenza progetto](../LICENCE). In git, questa è l'opzione `-s` di `git commit`
- Le modifiche devono essere accompagnati da un certificato di origine per sviluppatori firmato (http://developercertificate.org), che indica che tu (e il tuo datore di lavoro se applicabile) accetti di essere vincolato dai termini della [licenza progetto](../LICENCE). In git, questa è l'opzione `-s` di `git commit`
- Se la tua patch non viene esaminata o hai bisogno che una persona specifica la esamini, puoi @-rispondere ad un revisore chiedendo una revisione nella richiesta pull o un commento, oppure puoi chiedere una revisione tramite [email](mailto:info@rustdesk.com).
+1 -1
View File
@@ -21,7 +21,7 @@ RustDesk またはその依存関係へのコントリビュートは、GitHub
- コミットは、各コミットが独立して正しい(すなわち、各コミットがコンパイルされ、テストに合格する)ことを保証しながら、
可能な限り小さくすべきです。
- コミットには、Developer Certificate of Origin (https://developercertificate.org) の sign-off を添えてください。
- コミットには、Developer Certificate of Origin (http://developercertificate.org) の sign-off を添えてください。
これは、あなた(および該当する場合はあなたの雇用主)が [プロジェクトのライセンス](../LICENCE) の条項に拘束されることに
同意していることを示すものです。git では、これは `git commit` の `-s` オプションを使います。
+1 -1
View File
@@ -24,7 +24,7 @@ RustDesk 또는 그 종속성에 대한 기여는 GitHub 풀 리퀘스트 형태
- 커밋은 가능한 한 작아야 하지만, 각 커밋이 독립적으로 올바른지 확인
해야 합니다 (즉, 각 커밋은 컴파일되어 테스트를 통과해야 함).
- 커밋에는 개발자 출처 증명서 (https://developercertificate.org)
- 커밋에는 개발자 출처 증명서 (http://developercertificate.org)
서명이 첨부되어야 하며, 이는 귀하 (및 해당되는 경우 고용주)가
[프로젝트 라이선스](../LICENCE). 조건에 구속되는 데 동의한다는 것을 나타냅니다.
git에서는 `git commit`에 `-s` 옵션입니다
+1 -1
View File
@@ -28,7 +28,7 @@ inspanningen van medewerkers aan hetzelfde issue te voorkomen.
toezegging moet compileren en testen doorstaan).
- Toezeggingen moeten vergezeld gaan van een Certificaat van Oorsprong
van de Ontwikkelaar (https://developercertificate.org) ondertekening, die aangeeft
van de Ontwikkelaar (http://developercertificate.org) ondertekening, die aangeeft
dat u (en uw werkgever indien van toepassing) akkoord gaat met de
voorwaarden van het [project licentie](../LICENCE).
In git is dit de `-s` optie van `git commit`
+1 -1
View File
@@ -25,7 +25,7 @@ Dette er for å hindre duplikat innsats på samme problem.
(hver commit burde kompilere og bestå tester).
- Commits burde være akkopaniert med en Developer Certificate of Origin
(https://developercertificate.org), som indikerer att du (og din arbeidsgiver
(http://developercertificate.org), som indikerer att du (og din arbeidsgiver
i det tilfellet) godkjenner å bli knyttet til vilkårene av [prosjekt lisensen](../LICENCE).
Ved bruk av git er dette `-s` opsjonen til `git commit`.
+1 -1
View File
@@ -24,7 +24,7 @@ efforts from contributors on the same issue.
correct independently (i.e., each commit should compile and pass tests).
- Commits should be accompanied by a Developer Certificate of Origin
(https://developercertificate.org) sign-off, which indicates that you (and
(http://developercertificate.org) sign-off, which indicates that you (and
your employer if applicable) agree to be bound by the terms of the
[project license](../LICENCE). In git, this is the `-s` option to `git commit`
+1 -1
View File
@@ -14,7 +14,7 @@ Dacă dorești să lucrezi la o problemă, te rugăm să o revendici mai întâi
- Commit-urile ar trebui să fie cât mai mici posibil, asigurând totodată că fiecare commit este corect independent (adică fiecare commit ar trebui să compileze și să treacă testele).
- Commit-urile trebuie să fie însoțite de un semnătura Developer Certificate of Origin (https://developercertificate.org), care indică faptul că tu (și angajatorul tău, dacă este cazul) ești de acord să respecți termenii [licenței proiectului](../LICENCE). În git, aceasta este opțiunea `-s` la `git commit`.
- Commit-urile trebuie să fie însoțite de un semnătura Developer Certificate of Origin (http://developercertificate.org), care indică faptul că tu (și angajatorul tău, dacă este cazul) ești de acord să respecți termenii [licenței proiectului](../LICENCE). În git, aceasta este opțiunea `-s` la `git commit`.
- Dacă patch-ul tău nu este revizuit sau ai nevoie ca o anumită persoană să-l revizuiască, poți @-reply unui reviewer cerând o revizuire în pull request sau într-un comentariu, sau poți solicita o revizuire prin [email](mailto:info@rustdesk.com).
+1 -1
View File
@@ -24,7 +24,7 @@ RustDesk приветствует вклад каждого.
коммит является независимо правильным (т.е., каждый коммит должен компилироваться и проходить тесты).
- Коммиты должны сопровождаться подписью `Developer Certificate of Origin`
(https://developercertificate.org), которая укажет на то, что вы (и ваш работодатель,
(http://developercertificate.org), которая укажет на то, что вы (и ваш работодатель,
если это применимо) согласны соблюдать условия [лицензии проекта](../LICENCE).
В `git` это флаг `-s` при использовании `git commit`
+1 -1
View File
@@ -14,7 +14,7 @@ Eğer bir konu üzerinde çalışmak isterseniz, önce üzerinde çalışmak ist
- Her bir commit mümkün olduğunca küçük olmalıdır, ancak her commit'in bağımsız olarak doğru olduğundan emin olun (örneğin, her commit derlenebilir ve testleri geçmelidir).
- Commit'ler, bir Geliştirici Sertifikası ile desteklenmelidir (https://developercertificate.org). Bu, [proje lisansının](../LICENCE) koşullarına uymayı kabul ettiğinizi gösteren bir onaydır. Git'te bunu `git commit` seçeneği olarak `-s` seçeneği ile yapabilirsiniz.
- Commit'ler, bir Geliştirici Sertifikası ile desteklenmelidir (http://developercertificate.org). Bu, [proje lisansının](../LICENCE) koşullarına uymayı kabul ettiğinizi gösteren bir onaydır. Git'te bunu `git commit` seçeneği olarak `-s` seçeneği ile yapabilirsiniz.
- Yamalarınız gözden geçirilmiyorsa veya belirli bir kişinin gözden geçirmesine ihtiyacınız varsa, çekme isteği veya yorum içinde bir gözden geçirmeyi istemek için bir inceleyiciyi @etiketleyebilir veya inceleme için [e-posta](mailto:info@rustdesk.com) ile talep edebilirsiniz.
+1 -1
View File
@@ -14,7 +14,7 @@ Rust欢迎每一位贡献者,如果您有意向为我们做出贡献,请遵
- 每次提交的改动应该尽可能少,并且要保证每次提交的代码都是正确的(即每个 commit 都应能成功编译并通过测试)。
- 每个提交都应附有开发者证书签名(https://developercertificate.org), 表明您(以及您的雇主,若适用)同意遵守项目[许可证条款](../LICENCE)。在使用 git 提交代码时,可以通过在 `git commit` 时使用 `-s` 选项加入签名
- 每个提交都应附有开发者证书签名(http://developercertificate.org), 表明您(以及您的雇主,若适用)同意遵守项目[许可证条款](../LICENCE)。在使用 git 提交代码时,可以通过在 `git commit` 时使用 `-s` 选项加入签名
- 如果您的 PR 未被及时审核,或需要指定的人员进行审核,您可以通过在 PR 或评论中 @ 提到相关审核者,以及发送[电子邮件](mailto:info@rustdesk.com)的方式请求审核。
+1 -1
View File
@@ -25,7 +25,7 @@ efforts from contributors on the same issue.
correct independently (i.e., each commit should compile and pass tests).
- Commits should be accompanied by a Developer Certificate of Origin
(https://developercertificate.org) sign-off, which indicates that you (and
(http://developercertificate.org) sign-off, which indicates that you (and
your employer if applicable) agree to be bound by the terms of the
[project license](../LICENCE). In git, this is the `-s` option to `git commit`
+71 -83
View File
@@ -1,86 +1,69 @@
<p align="center">
<img src="../res/logo-header.svg" alt="RustDesk - سطح مكتبك عن بُعد"><br>
<a href="#خطوات-البناء-الأساسية">البناء</a> •
<a href="#كيفية-البناء-باستخدام-docker">Docker</a> •
<a href="#هيكل-الملفات">هيكل الملفات</a> •
<a href="#لقطات-الشاشة">لقطات الشاشة</a><br>
[<a href="../README.md">English</a>] | [<a href="README-UA.md">Українська</a>] | [<a href="README-CS.md">česky</a>] | [<a href="README-ZH.md">中文</a>] | [<a href="README-HU.md">Magyar</a>] | [<a href="README-ES.md">Español</a>] | [<a href="README-FA.md">فارسی</a>] | [<a href="README-FR.md">Français</a>] | [<a href="README-DE.md">Deutsch</a>] | [<a href="README-PL.md">Polski</a>] | [<a href="README-ID.md">Indonesian</a>] | [<a href="README-FI.md">Suomi</a>] | [<a href="README-ML.md">മലയാളം</a>] | [<a href="README-JP.md">日本語</a>] | [<a href="README-NL.md">Nederlands</a>] | [<a href="README-IT.md">Italiano</a>] | [<a href="README-RU.md">Русский</a>] | [<a href="README-PTPT.md">Português (Portugal)</a>] | [<a href="README-PTBR.md">Português (Brasil)</a>] | [<a href="README-EO.md">Esperanto</a>] | [<a href="README-KR.md">한국어</a>] | [<a href="README-AR.md">العربية</a>] | [<a href="README-VN.md">Tiếng Việt</a>] | [<a href="README-DA.md">Dansk</a>] | [<a href="README-GR.md">Ελληνικά</a>] | [<a href="README-TR.md">Türkçe</a>] | [<a href="README-NO.md">Norsk</a>] | [<a href="README-RO.md">Română</a>] | [<a href="README-KA.md">ქართული</a>]<br>
<b dir="rtl">نحتاج إلى مساعدتك لترجمة هذا الملف، <a href="https://github.com/rustdesk/rustdesk/tree/master/src/lang">وواجهة RustDesk</a>، <a href="https://github.com/rustdesk/doc.rustdesk.com">ووثائق RustDesk</a> إلى لغتك الأم.</b>
> [!Caution]
> **إخلاء مسؤولية بشأن إساءة الاستخدام:**
>
> لا يقرّ مطوّرو RustDesk أي استخدام غير أخلاقي أو غير قانوني لهذا البرنامج ولا يدعمونه. وتُعدّ إساءة الاستخدام، مثل الوصول أو التحكم دون تصريح أو انتهاك الخصوصية، مخالفة صريحة لإرشاداتنا. ولا يتحمل مؤلفو البرنامج مسؤولية أي إساءة لاستخدامه.
<img src="../res/logo-header.svg" alt="RustDesk - Your remote desktop"><br>
<a href="#free-public-servers">Servers</a> •
<a href="#raw-steps-to-build">Build</a> •
<a href="#how-to-build-with-docker">Docker</a> •
<a href="#file-structure">Structure</a> •
<a href="#snapshot">Snapshot</a><br>
[<a href="../README.md">English</a>] | [<a href="README-UA.md">Українська</a>] | [<a href="README-CS.md">česky</a>] | [<a href="README-ZH.md">中文</a>] | [<a href="README-HU.md">Magyar</a>] | [<a href="README-ES.md">Español</a>] | [<a href="README-FA.md">فارسی</a>] | [<a href="README-FR.md">Français</a>] | [<a href="README-DE.md">Deutsch</a>] | [<a href="README-PL.md">Polski</a>] | [<a href="README-ID.md">Indonesian</a>] | [<a href="README-FI.md">Suomi</a>] | [<a href="README-ML.md">മലയാളം</a>] | [<a href="README-JP.md">日本語</a>] | [<a href="README-NL.md">Nederlands</a>] | [<a href="README-IT.md">Italiano</a>] | [<a href="README-RU.md">Русский</a>] | [<a href="README-PTBR.md">Português (Brasil)</a>] | [<a href="README-EO.md">Esperanto</a>] | [<a href="README-KR.md">한국어</a>] | [<a href="README-VN.md">Tiếng Việt</a>] | [<a href="README-GR.md">Ελληνικά</a>]<br>
<b> لغتك الأم, <a href="https://github.com/rustdesk/doc.rustdesk.com">Doc</a> و <a href="https://github.com/rustdesk/rustdesk/tree/master/src/lang">RustDesk UI</a>, README نحن بحاجة إلى مساعدتك لترجمة هذا </b>
</p>
[Discord](https://discord.gg/nDceKgxnkV) | [Twitter](https://twitter.com/rustdesk) | [Reddit](https://www.reddit.com/r/rustdesk) | [YouTube](https://www.youtube.com/@rustdesk) :تواصل معنا عبر
[![RustDesk Server Pro — الميزات المتقدمة](../res/rustdesk-server-pro-ar.svg)](https://rustdesk.com/pricing.html)
[![RustDesk Server Pro](https://img.shields.io/badge/RustDesk%20Server%20Pro-%D8%A7%D9%84%D9%85%D9%8A%D8%B2%D8%A7%D8%AA%20%D8%A7%D9%84%D9%85%D8%AA%D9%82%D8%AF%D9%85%D8%A9-blue)](https://rustdesk.com/pricing.html)
حلّ آخر للتحكم بسطح المكتب عن بُعد، مكتوب بلغة Rust. يعمل مباشرةً دون الحاجة إلى أي إعدادات. يمنحك تحكمًا كاملًا في بياناتك دون القلق بشأن الأمان. يمكنك استخدام خادمنا لتنسيق الاتصالات وترحيلها (rendezvous/relay)، أو [إعداد خادمك الخاص](https://rustdesk.com/server)، أو [برمجة خادمك الخاص لتنسيق الاتصالات وترحيلها](https://github.com/rustdesk/rustdesk-server-demo).
.Rustبرنامج آخر لسطح المكتب عن بعد، مكتوب بـ
يعمل خارج الصندوق، لا حاجة إلى إعدادات. لديك سيطرة كاملة على بياناتك، دون مخاوف بشأن الأمن. يمكنك استخدام خادم
الخاص بنا rendezvous/relay
[جهز لنفسك واحدا](https://rustdesk.com/server), أو
[خاص بك rendezvous/relay أكتب خادم](https://github.com/rustdesk/rustdesk-server-demo).
![image](https://user-images.githubusercontent.com/71636191/171661982-430285f0-2e12-4b1d-9957-4a58e375304d.png)
يرحّب RustDesk بمساهمات الجميع. راجع [دليل المساهمة](CONTRIBUTING.md) لمساعدتك على البدء.
لمساعدتك على ذلك [`docs/CONTRIBUTING.md`](CONTRIBUTING.md) يرحب بمساهمة الجميع. اطلع على RustDesk.
[**الأسئلة الشائعة**](https://github.com/rustdesk/rustdesk/wiki/FAQ)
[**؟ RustDesk كيفية يعمل**](https://github.com/rustdesk/rustdesk/wiki/How-does-RustDesk-work%3F)
[**تنزيل البرنامج**](https://github.com/rustdesk/rustdesk/releases)
[**الإصدار التجريبي الليلي**](https://github.com/rustdesk/rustdesk/releases/tag/nightly)
[<img src="https://f-droid.org/badge/get-it-on.png"
alt="احصل عليه من F-Droid"
height="80">](https://f-droid.org/en/packages/com.carriez.flutter_hbb)
[<img src="https://flathub.org/api/badge?svg&locale=en"
alt="احصل عليه من Flathub"
height="80">](https://flathub.org/apps/com.rustdesk.RustDesk)
[**BINARY تنزيل**](https://github.com/rustdesk/rustdesk/releases)
## التبعيات
تستخدم إصدارات سطح المكتب Flutter أو Sciter (الذي لم يعد ينصح التوصية باستخدامه) لواجهة المستخدم الرسومية. يقتصر هذا الدليل على Sciter، لأنه أسهل وأنسب للبدء. لبناء إصدار Flutter، راجع [ملف إعداد التكامل المستمر (CI)](https://github.com/rustdesk/rustdesk/blob/master/.github/workflows/flutter-build.yml).
لواجهة المستخدم الرسومية [sciter](https://sciter.com/) نسخة سطح المكتب تستخدم
بنفسك sciter dynamic library عليك تحميل
يرجى تنزيل المكتبة الديناميكية الخاصة بـ Sciter يدويًا.
[Windows](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll) |
[Linux](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so) |
[MacOS](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.osx/libsciter.dylib)
[Windows](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll) | [Linux](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so) | [macOS](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.osx/libsciter.dylib)
Sciter إلى Flutter سنقوم بترحيل نسخة سطح المكتب من .Flutter تستخدم إصدارات الهاتف المحمول.
## خطوات البناء الأساسية
## خطوات البناء
- جهّز بيئة تطوير Rust وبيئة بناء &#x200E;C++&#x200E;.
- ثبّت [vcpkg](https://github.com/microsoft/vcpkg)، واضبط متغير البيئة `VCPKG_ROOT` بشكل صحيح.
- على Windows:
```sh
vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-static
```
- على Linux وmacOS:
```sh
vcpkg install libvpx libyuv opus aom
```
- شغّل الأمر `cargo run`.
- C++ build env و Rust development env قم بإعداد
## [دليل البناء](https://rustdesk.com/docs/en/dev/build/)
- بطريقة صحيحة `VCPKG_ROOT` env variable وأعد [vcpkg](https://github.com/microsoft/vcpkg) ثبت
## كيفية البناء على Linux
- Windows: `vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-static`
- Linux/MacOS: `vcpkg install libvpx libyuv opus aom`
- run `cargo run`
## [البناء](https://rustdesk.com/docs/en/dev/build/)
## Linux
### Ubuntu 18 (Debian 10)
```sh
sudo apt install -y zip g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev \
libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake make \
libclang-dev ninja-build libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
```
### openSUSE Tumbleweed
```sh
sudo zypper install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-devel libXfixes-devel cmake alsa-lib-devel gstreamer-devel gstreamer-plugins-base-devel xdotool-devel
sudo apt install -y g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake
```
### Fedora 28 (CentOS 8)
```sh
sudo yum -y install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-devel libxdo-devel libXfixes-devel pulseaudio-libs-devel cmake alsa-lib-devel gstreamer1-devel gstreamer1-plugins-base-devel
sudo yum -y install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-devel libxdo-devel libXfixes-devel pulseaudio-libs-devel cmake alsa-lib-devel
```
### Arch (Manjaro)
@@ -89,7 +72,8 @@ sudo yum -y install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-
sudo pacman -Syu --needed unzip git cmake gcc curl wget yasm nasm zip make pkg-config clang gtk3 xdotool libxcb libxfixes alsa-lib pipewire
```
### تثبيت vcpkg
### vcpkg تثبيت
```sh
git clone https://github.com/microsoft/vcpkg
@@ -101,7 +85,7 @@ export VCPKG_ROOT=$HOME/vcpkg
vcpkg/vcpkg install libvpx libyuv opus aom
```
### إصلاح libvpx على Fedora
### Fix libvpx (For Fedora)
```sh
cd vcpkg/buildtrees/libvpx/src
@@ -119,66 +103,70 @@ cd
```sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
git clone https://github.com/rustdesk/rustdesk
cd rustdesk
mkdir -p target/debug
wget https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so
mv libsciter-gtk.so target/debug
VCPKG_ROOT=$HOME/vcpkg cargo run
```
## كيفية البناء باستخدام Docker
ابدأ باستنساخ المستودع وبناء صورة Docker:
## Docker طريقة البناء باستخدام
ابدأ باستنساخ المستودع وبناء الكونتاينر:
```sh
git clone https://github.com/rustdesk/rustdesk
cd rustdesk
git submodule update --init --recursive
docker build -t "rustdesk-builder" .
```
بعد ذلك، شغّل الأمر التالي كلما احتجت إلى بناء التطبيق:
ثم، في كل مرة تحتاج إلى بناء التطبيق، قم بتشغيل الأمر التالي:
```sh
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
```
قد يستغرق البناء الأول وقتًا أطول حتى تُخزَّن التبعيات مؤقتًا، بينما تكون عمليات البناء اللاحقة أسرع. ويمكنك تمرير خيارات إضافية لأمر البناء بإضافتها في نهاية الأمر، في الموضع المخصّص لـ `<OPTIONAL-ARGS>`. على سبيل المثال، لبناء إصدار محسّن للأداء، أضف &#x200E;<code>--release</code>&#x200E; إلى نهاية الأمر السابق. سيتوفر الملف التنفيذي الناتج داخل مجلد `target` على جهازك، ويمكن تشغيله بالأمر:
لاحظ أن البناء الأول قد يستغرق وقتًا أطول قبل تخزين التبعيات، وسيكون البناء اللاحق أسرع. بالإضافة إلى ذلك، إذا كنت بحاجة إلى تحديد وسائط مختلفة لأمر البناء، فيمكنك القيام بذلك في نهاية الأمر بوضع
`<OPTIONAL-ARGS>`
على سبيل المثال، إذا كنت ترغب في بناء إصدار محسن، فستقوم بتشغيل الأمر أعلاه متبوعًا بـ
`--release`
:سيكون الملف القابل للتنفيذ الناتج متاحًا في مجلد تارغت، ويمكن تشغيله باستخدام
```sh
target/debug/rustdesk
```
أما إذا بنيت إصدارًا باستخدام &#x200E;<code>--release</code>&#x200E;، فيمكنك تشغيله بالأمر:
:أو في حال قمت ببناء إصدار محسن
```sh
target/release/rustdesk
```
تأكد من تشغيل هذه الأوامر من المجلد الجذري لمستودع RustDesk، وإلا فقد يتعذر على التطبيق العثور على الموارد المطلوبة. كذلك، لا تدعم هذه الطريقة حاليًا أوامر cargo الفرعية الأخرى، مثل `install` أو`run`، لأنها ستثبّت البرنامج أو تشغّله داخل الحاوية بدلًا من الجهاز المضيف.
RustDesk يرجى التأكد من أنك تنفذ هذه الأوامر من جذر مستودع
وإلا فقد لا يتمكن التطبيق من العثور على الموارد المطلوبة. لاحظ أيضًا أن الأوامر الفرعية الأخرى مثل
`install` أو `run`
لا يتم دعمها حاليًا عبر هذه الطريقة لأنها ستقوم بتثبيت أو تشغيل البرنامج داخل الكونتاينر بدلاً من الهوست.
<h2 id="هيكل-الملفات" dir="rtl">هيكل الملفات</h2>
## هيكل الملف
<ul dir="rtl">
<li><strong><a href="https://github.com/rustdesk/hbb_common"><bdi dir="ltr">libs/hbb_common</bdi></a></strong>: الإعدادات، وطبقة تغليف لبروتوكولَي TCP وUDP، وبعض الدوال المساعدة المشتركة مع الخادم.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/libs/base"><bdi dir="ltr">libs/base</bdi></a></strong>: ملفات protobuf، ودوال نظام الملفات لنقل الملفات، وشيفرة لوحة المفاتيح والمنصات الخاصة بهذا التطبيق.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/libs/scrap"><bdi dir="ltr">libs/scrap</bdi></a></strong>: التقاط الشاشة وترميز الفيديو وفك ترميزه.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/libs/enigo"><bdi dir="ltr">libs/enigo</bdi></a></strong>: التحكم بلوحة المفاتيح والفأرة حسب نظام التشغيل.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard"><bdi dir="ltr">libs/clipboard</bdi></a></strong>: تنفيذ نسخ الملفات ولصقها على Windows وLinux وmacOS.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/src/ui"><bdi dir="ltr">src/ui</bdi></a></strong>: واجهة Sciter القديمة التي لم يعد يُنصح باستخدامها.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/src/server"><bdi dir="ltr">src/server</bdi></a></strong>: خدمات الصوت والحافظة والإدخال والفيديو، واتصالات الشبكة.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/src/client.rs"><bdi dir="ltr">src/client.rs</bdi></a></strong>: بدء اتصال بين طرفين.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/src/rendezvous_mediator.rs"><bdi dir="ltr">src/rendezvous_mediator.rs</bdi></a></strong>: التواصل مع <a href="https://github.com/rustdesk/rustdesk-server"><bdi dir="ltr">rustdesk-server</bdi></a>، وانتظار اتصال مباشر بالطرف البعيد باستخدام تقنية اجتياز NAT عبر TCP ‏(TCP hole punching)، أو اتصال عبر خادم ترحيل.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/src/platform"><bdi dir="ltr">src/platform</bdi></a></strong>: الشيفرة الخاصة بكل نظام تشغيل.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/flutter"><bdi dir="ltr">flutter</bdi></a></strong>: شيفرة Flutter لإصدارات سطح المكتب والأجهزة المحمولة.</li>
</ul>
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: وظائف لنقل الملفات، وبعض وظائف المرافق الأخرى tcp/udp، protobuf ترميز الفيديو، إعدادات
## لقطات الشاشة
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: التقاط الشاشة
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: التحكم في لوحة المفاتيح/الماوس الخاصة بكل منصة
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: واجهة المستخدم الرسومية
- **[src/server](https://github.com/rustdesk/rustdesk/tree/master/src/server)**: خدمات الصوت/الحافظة/المدخلات/الفيديو، ووصلات الشبكة
- **[src/client.rs](https://github.com/rustdesk/rustdesk/tree/master/src/client.rs)**: بدء اتصال متقارن
- **[src/rendezvous_mediator.rs](https://github.com/rustdesk/rustdesk/tree/master/src/rendezvous_mediator.rs)**: أو المنقول عن بُعد (TCP hole punching) انتظر الاتصال المباشر [rustdesk-server](https://github.com/rustdesk/rustdesk-server) الإتصال ب
- **[src/platform](https://github.com/rustdesk/rustdesk/tree/master/src/platform)**: رمز خاص بكل منصة
- **[flutter](https://github.com/rustdesk/rustdesk/tree/master/flutter)**: رمز الهاتف المحمول
![مدير الاتصالات](https://github.com/rustdesk/rustdesk/assets/28412477/db82d4e7-c4bc-4823-8e6f-6af7eadf7651)
## لقطات
![الاتصال بجهاز يعمل بنظام Windows](https://github.com/rustdesk/rustdesk/assets/28412477/9baa91e9-3362-4d06-aa1a-7518edcbd7ea)
![image](https://user-images.githubusercontent.com/71636191/113112362-ae4deb80-923b-11eb-957d-ff88daad4f06.png)
![نقل الملفات](https://github.com/rustdesk/rustdesk/assets/28412477/39511ad3-aa9a-4f8c-8947-1cce286a46ad)
![image](https://user-images.githubusercontent.com/71636191/113112619-f705a480-923b-11eb-911d-97e984ef52b6.png)
![إنشاء نفق TCP](https://github.com/rustdesk/rustdesk/assets/28412477/78e8708f-e87e-4570-8373-1360033ea6c5)
![image](https://user-images.githubusercontent.com/71636191/113112857-3fbd5d80-923c-11eb-9836-768325faf906.png)
![image](https://user-images.githubusercontent.com/71636191/135385039-38fdbd72-379a-422d-b97f-33df71fb1cec.png)
+1 -1
View File
@@ -135,7 +135,7 @@ Ujistěte se, že tyto příkazy spouštíte z kořenového adresáře RustDesk,
## Struktura souborů
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: kodek videa, nastavení, obalovaní tcp/udp, vyrovnávací paměť protokolu, funkce souborového systému pro přenos souborů a pár dalších podpůrných funkcí
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: kodek videa, nastavení, obalovaní tcp/udp, vyrovnávací paměť protokolu, funkce souborového systému pro přenos souborů a pár dalších podpůrných funkcí
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: zachytávání obsahu obrazovky
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: ovládání klávesnice/myši pro jednotlivé platformy
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: grafické uživatelské rozhraní
+2 -2
View File
@@ -13,7 +13,7 @@ Chat med os: [Discord](https://discord.gg/nDceKgxnkV) | [Twitter](https://twitte
[![RustDesk Server Pro](https://img.shields.io/badge/RustDesk%20Server%20Pro-Avancerede%20Funktioner-blue)](https://rustdesk.com/pricing.html)
Endnu en fjernskrivebordssoftware, skrevet i Rust. Fungerer ud af æsken, ingen konfiguration påkrævet. Du har fuld kontrol over dine data uden bekymringer om sikkerhed. Du kan bruge vores rendezvous/relay-server, [opsætte din egen](https://rustdesk.com/server), eller [skrive din egen rendezvous/relay-server](https://github.com/rustdesk/rustdesk-server-demo).
Endnu en fjernskrivebordssoftware, skrevet i Rust. Fungerer ud af æsken, ingen konfiguration påkrævet. Du har fuld kontrol over dine data uden bekymringer om sikkerhed. Du kan bruge vores rendezvous/relay-server, [opsætte din egen](https://rustdesk.com/server), eller [skrive din egen rendezvous/relay-server](https://github.com/rustdesk/rustdesk- server-demo).
RustDesk hilser bidrag fra alle velkommen. Se [`docs/CONTRIBUTING.md`](CONTRIBUTING.md) for at få hjælp til at komme i gang.
@@ -129,7 +129,7 @@ Sørg for, at du kører disse kommandoer fra roden af RustDesk-lageret, ellers k
## Filstruktur
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs funktioner til filoverførsel og nogle andre hjælpefunktioner
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs funktioner til filoverførsel og nogle andre hjælpefunktioner
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: Skærmbillede
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platform specifik tastatur/mus kontrol
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: GUI
+1 -1
View File
@@ -158,7 +158,7 @@ Bitte stellen Sie sicher, dass Sie diese Befehle im Stammverzeichnis des RustDes
## Dateistruktur
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: Video-Codec, Konfiguration, TCP/UDP-Wrapper, Protokoll-Puffer, fs-Funktionen für Dateitransfer und ein paar andere nützliche Funktionen
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: Video-Codec, Konfiguration, TCP/UDP-Wrapper, Protokoll-Puffer, fs-Funktionen für Dateitransfer und ein paar andere nützliche Funktionen
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: Bildschirmaufnahme
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: Plattformspezifische Maus- und Tastatursteuerung
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: Datei kopieren und einfügen Implementierung für Windows, Linux, macOS.
+1 -1
View File
@@ -128,7 +128,7 @@ Bonvolu certigi, ke vi plenumas tiujn komandojn el la radiko de la deponejo Rust
## Dosierstrukturo
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: videa kodeko, agordado, kovrilo tcp/udp, protobuf, funkcioj fs por dosiertransigo, kaj aliaj utilaĵaj funkcioj
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: videa kodeko, agordado, kovrilo tcp/udp, protobuf, funkcioj fs por dosiertransigo, kaj aliaj utilaĵaj funkcioj
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: ekrankaptado
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: operaciumspecifa kontrolo de klavaro/muso
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: interfaco
+1 -1
View File
@@ -154,7 +154,7 @@ Por favor, asegurate de que estás ejecutando estos comandos desde la raíz del
## Estructura de archivos
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: codec de video, configuración, tcp/udp wrapper, protobuf, funciones para transferencia de archivos, y otras funciones de utilidad.
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: codec de video, configuración, tcp/udp wrapper, protobuf, funciones para transferencia de archivos, y otras funciones de utilidad.
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: captura de pantalla
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: control del teclado/mouse especificos de cada plataforma
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: GUI
+1 -1
View File
@@ -137,7 +137,7 @@ target/release/rustdesk
## ساختار پوشه ها
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions for file transfer, and some other utility functions
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions for file transfer, and some other utility functions
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: screen capture
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platform specific keyboard/mouse control
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: GUI
+1 -1
View File
@@ -128,7 +128,7 @@ Varmista, että suoritat näitä komentoja RustDesktop-tietovaraston juurihakemi
## Tiedostorakenne
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs-funktiot tiedostosiirtoon, ja jotkut muut apuohjelmafunktiot
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs-funktiot tiedostosiirtoon, ja jotkut muut apuohjelmafunktiot
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: näyttökaappaukset
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platform specific keyboard/mouse control
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: Graafinen käyttöliittymä
+1 -1
View File
@@ -158,7 +158,7 @@ Veillez à exécuter ces commandes depuis la racine du dépôt RustDesk, sinon l
## Structure du projet
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)** : codec vidéo, configuration, surcouche TCP/UDP et autres fonctions utilitaires partagées avec le serveur
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)** : codec vidéo, configuration, surcouche TCP/UDP et autres fonctions utilitaires partagées avec le serveur
- **[libs/base](https://github.com/rustdesk/rustdesk/tree/master/libs/base)** : protobuf, fonctions de système de fichiers pour le transfert de fichiers, code clavier et code de plateforme utilisés uniquement par cette application
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)** : capture d'écran
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)** : contrôle du clavier et de la souris, spécifique à chaque plateforme
+1 -1
View File
@@ -149,7 +149,7 @@ target/release/rustdesk
## Δομή φακέλων
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions for file transfer, and some other utility functions
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions for file transfer, and some other utility functions
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: screen capture
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platform specific keyboard/mouse control
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: GUI
+1 -1
View File
@@ -141,7 +141,7 @@ Kérlek mindenképpen nézd meg hogy ezeket a parancsokat a root RustDesk mappá
## Fájl Struktúra
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions for file transfer, and some other utility functions
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions for file transfer, and some other utility functions
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: screen capture
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platform specific keyboard/mouse control
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: GUI
+1 -1
View File
@@ -153,7 +153,7 @@ Harap pastikan bahwa kamu menjalankan perintah ini dari repositori root RustDesk
## Struktur File
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions untuk transfer file, dan beberapa fungsi utilitas lainnya
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions untuk transfer file, dan beberapa fungsi utilitas lainnya
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: screen capture
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: spesifikasi platform keyboard/mouse control
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: GUI
+1 -1
View File
@@ -152,7 +152,7 @@ Assicurati di eseguire questi comandi dalla radice del repository RustDesk, altr
## Struttura dei file
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: codec video, config, wrapper tcp/udp, protobuf, funzioni per il trasferimento file, e altre funzioni utili.
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: codec video, config, wrapper tcp/udp, protobuf, funzioni per il trasferimento file, e altre funzioni utili.
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: cattura dello schermo
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: controllo tastiera/mouse specifico della piattaforma
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: implementazione del copia e incolla dei file per Windows, Linux, macOS.
+1 -1
View File
@@ -155,7 +155,7 @@ target/release/rustdesk
## ファイル構造
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: ビデオコーデック、設定、tcp/udpラッパー、protobuf、ファイル転送に利用されるfs関数やその他のユーティリティ関数
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: ビデオコーデック、設定、tcp/udpラッパー、protobuf、ファイル転送に利用されるfs関数やその他のユーティリティ関数
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: スクリーンキャプチャ
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: プラットフォーム固有のキーボード/マウス操作
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: Windows、Linux、macOS向けのファイルのコピーと貼り付けの実装
+1 -1
View File
@@ -158,7 +158,7 @@ target/release/rustdesk
## ფაილების სტრუქტურა
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: ვიდეოკოდეკი, კონფიგურაცია, tcp/udp-ის ვრაპერი და სერვერთან გაზიარებული ზოგიერთი სხვა დამხმარე ფუნქცია
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: ვიდეოკოდეკი, კონფიგურაცია, tcp/udp-ის ვრაპერი და სერვერთან გაზიარებული ზოგიერთი სხვა დამხმარე ფუნქცია
- **[libs/base](https://github.com/rustdesk/rustdesk/tree/master/libs/base)**: protobuf, ფაილური სისტემის ფუნქციები ფაილების გადასაცემად, კლავიატურისა და პლატფორმის კოდი, რომელსაც მხოლოდ ეს აპლიკაცია იყენებს
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: ეკრანის გადაღება
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: კლავიატურის/მაუსის მართვა კონკრეტული პლატფორმისთვის
+1 -1
View File
@@ -158,7 +158,7 @@ RustDesk 리포지토리의 루트에서 이러한 명령을 실행하고 있는
## 파일_구조
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: 비디오 코덱, 구성, tcp/udp wrapper, protobuf, 파일 전송을 위한 fs 함수 및 기타 유틸리티 함수
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: 비디오 코덱, 구성, tcp/udp wrapper, protobuf, 파일 전송을 위한 fs 함수 및 기타 유틸리티 함수
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: 화면 캡쳐
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: 플랫폼별 키보드/마우스 제어
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: Windows, Linux, macOS용 파일 복사 및 붙여넣기 구현
+1 -1
View File
@@ -128,7 +128,7 @@ RustDesk റിപ്പോസിറ്ററിയുടെ റൂട്ടി
## ഫയൽ ഘടന
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions for file transfer, and some other utility functions
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions for file transfer, and some other utility functions
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: screen capture
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platform specific keyboard/mouse control
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: GUI
+2 -2
View File
@@ -13,7 +13,7 @@ Chat met ons: [Discord](https://discord.gg/nDceKgxnkV) | [Twitter](https://twitt
[![RustDesk Server Pro](https://img.shields.io/badge/RustDesk%20Server%20Pro-Geavanceerde%20Functies-blue)](https://rustdesk.com/pricing.html)
Alweer een andere programma voor -bureaublad op afstand-, geschreven in Rust. Werkt -out of the box-, geen configuratie nodig. U heeft volledige controle over uw gegevens, en hoeft zich geen zorgen te maken over de beveiliging. U kunt onze rendez-vous/relay server gebruiken, [je eigen server opzetten](https://rustdesk.com/server), of [je eigen rendez-vous/relay-server schrijven](https://github.com/rustdesk/rustdesk-server-demo).
Alweer een andere programma voor -bureaublad op afstand-, geschreven in Rust. Werkt -out of the box-, geen configuratie nodig. U heeft volledige controle over uw gegevens, en hoeft zich geen zorgen te maken over de beveiliging. U kunt onze rendez-vous/relay server gebruiken, [je eigen server opzetten](https://rustdesk.com/blog/id-relay-set), of [je eigen rendez-vous/relay-server schrijven](https://github.com/rustdesk/rustdesk-server-demo).
RustDesk verwelkomt bijdragen van iedereen. Zie [`docs/CONTRIBUTING.md`](CONTRIBUTING.md) voor hulp om aan de slag te gaan.
@@ -148,7 +148,7 @@ Zorg ervoor dat je deze commando's van de root van de RustDesk-repository uitvoe
## Bestandsstructuur
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: videocodec, configuratie, TCP/UDP-wrapper, protobuf, bestandssysteemfuncties voor bestandsoverdracht en nog wat andere nuttige functies
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: videocodec, configuratie, TCP/UDP-wrapper, protobuf, bestandssysteemfuncties voor bestandsoverdracht en nog wat andere nuttige functies
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: schermopname
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platformspecifieke muis- en toetsenbordbeheer
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: GUI
+1 -1
View File
@@ -153,7 +153,7 @@ Venligst pass på att du kjører disse kommandoene fra roten av RustDesk reposit
## Fil Struktur
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video kodek, configurasjon, tcp/udp innpakning, protobuf, fs funksjon for fil overføring, og noen andre verktøy funksjoner
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video kodek, configurasjon, tcp/udp innpakning, protobuf, fs funksjon for fil overføring, og noen andre verktøy funksjoner
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: skjermfangst
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platform spesefik keyboard/mus kontroll
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: fil kopi og innliming implementasjon for Windows, Linux, macOS.
+1 -1
View File
@@ -146,7 +146,7 @@ Upewnij się, że uruchamiasz te polecenia z katalogu głównego repozytorium Ru
## Struktura plików
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: kodek wideo, konfiguracja, obsługa tcp/udp, protobuf, funkcje systemu plików do transferu plików i kilka innych funkcji użytkowych
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: kodek wideo, konfiguracja, obsługa tcp/udp, protobuf, funkcje systemu plików do transferu plików i kilka innych funkcji użytkowych
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: przechwytywanie ekranu
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: specyficzne dla danej platformy sterowanie klawiaturą/myszą
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: GUI
+2 -2
View File
@@ -21,7 +21,7 @@ Mais uma solução de desktop remoto, escrita em Rust. Funciona imediatamente, s
![image](https://user-images.githubusercontent.com/71636191/171661982-430285f0-2e12-4b1d-9957-4a58e375304d.png)
O RustDesk acolhe a contribuição de todos. Veja [CONTRIBUTING.md](CONTRIBUTING.md) para ajuda em como começar.
O RustDesk acolhe a contribuição de todos. Veja [CONTRIBUTING.md](docs/CONTRIBUTING.md) para ajuda em como começar.
[**Perguntas Frequentes (FAQ)**](https://github.com/rustdesk/rustdesk/wiki/FAQ)
@@ -156,7 +156,7 @@ Certifique-se de executar esses comandos a partir da raiz do repositório do Rus
## Estrutura de Arquivos
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: codec de vídeo, configuração, encapsulador (wrapper) tcp/udp, protobuf, funções de sistema de arquivos para transferência de arquivos e algumas outras funções utilitárias.
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: codec de vídeo, configuração, encapsulador (wrapper) tcp/udp, protobuf, funções de sistema de arquivos para transferência de arquivos e algumas outras funções utilitárias.
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: captura de tela.
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: controle de teclado/mouse específico de cada plataforma.
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: implementação de copiar e colar arquivos para Windows, Linux e macOS.
+1 -1
View File
@@ -156,7 +156,7 @@ Certifique-se de que executa estes comandos a partir da raiz do repositório do
## Estrutura de Ficheiros
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: codec de vídeo, configuração, wrapper TCP/UDP e algumas outras funções utilitárias partilhadas com o servidor
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: codec de vídeo, configuração, wrapper TCP/UDP e algumas outras funções utilitárias partilhadas com o servidor
- **[libs/base](https://github.com/rustdesk/rustdesk/tree/master/libs/base)**: protobuf, funções fs para transferência de ficheiros, código relacionado com o teclado e com a plataforma utilizado exclusivamente por esta aplicação
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: captura de ecrã
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: controlo de teclado/rato específico da plataforma.
+1 -1
View File
@@ -158,7 +158,7 @@ Asigură-te că rulezi aceste comenzi din rădăcina repository-ului RustDesk, a
## Structura fișierelor
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: codec video, config, wrapper tcp/udp, protobuf, funcții fs pentru transfer de fișiere și alte funcții utilitare
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: codec video, config, wrapper tcp/udp, protobuf, funcții fs pentru transfer de fișiere și alte funcții utilitare
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: capturare ecran
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: control tastatură/mouse specific platformei
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: implementare copy/paste pentru fișiere pentru Windows, Linux, macOS.
+1 -1
View File
@@ -160,7 +160,7 @@ target/release/rustdesk
## Структура файлов
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: видеокодек, конфигурация, враппер TCP/UDP и некоторые другие служебные функции, общие с сервером
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: видеокодек, конфигурация, враппер TCP/UDP и некоторые другие служебные функции, общие с сервером
- **[libs/base](https://github.com/rustdesk/rustdesk/tree/master/libs/base)**: protobuf, функции файловой системы для передачи файлов, код для клавиатуры и платформ, который используется только этим приложением
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: захват экрана
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: специфичное для платформы управление клавиатурой/мышью
+1 -1
View File
@@ -156,7 +156,7 @@ Lütfen bu komutları RustDesk reposunun root klasöründe çalıştırdığın
## Dosya Yapısı
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, dosya transferi için fs fonksiyonları ve diğer bazı yardımcı işlevler
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, dosya transferi için fs fonksiyonları ve diğer bazı yardımcı işlevler
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: ekran yakalama
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platforma özgü klavye/fare kontrolü
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: platforma özgü kopyala/yapıştır implementasyonları.
+1 -1
View File
@@ -157,7 +157,7 @@ target/release/rustdesk
## Структура файлів
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: відеокодек, конфігурація, обгортка tcp/udp та інші допоміжні функції, спільні із сервером
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: відеокодек, конфігурація, обгортка tcp/udp та інші допоміжні функції, спільні із сервером
- **[libs/base](https://github.com/rustdesk/rustdesk/tree/master/libs/base)**: protobuf, функції файлової системи для передавання файлів, код клавіатури та платформоспецифічний код, що використовуються лише цим застосунком
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: захоплення екрана
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: платформоспецифічне керування клавіатурою та мишею
+2 -2
View File
@@ -23,7 +23,7 @@ RustDesk là một phần mềm điểu khiển máy tính từ xa mã nguồn m
[**FAQ**](https://github.com/rustdesk/rustdesk/wiki/FAQ)
[**BINARY DOWNLOAD**](https://github.com/rustdesk/rustdesk/releases)
[**NIGHTLY BUILD**](https://github.com/rustdesk/rustdesk/releases/tag/nightly)
[**NIGHTLY BUILD**](https://github.com/rustdesk/rustdesk/FAQreleases/tag/nightly)
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid"
@@ -139,7 +139,7 @@ Hãy đảm bảo rằng bạn đang chạy các lệnh này từ gốc của th
## Cấu trúc tệp tin
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video codec, cấu hình, tcp/udp wrapper, protobuf, fs functions để truyền file, và một số hàm tiện ích khác
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, cấu hình, tcp/udp wrapper, protobuf, fs functions để truyền file, và một số hàm tiện ích khác
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: ghi lại màn hình
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: điều khiển máy tính/chuột trên các nền tảng khác nhau
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: giao diện người dùng
+1 -2
View File
@@ -210,8 +210,7 @@ target/release/rustdesk
## 文件结构
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: 视频编解码, 配置, tcp/udp 封装, 以及其他与服务端共享的实用函数
- **[libs/base](https://github.com/rustdesk/rustdesk/tree/master/libs/base)**: 仅供本应用使用的 protobuf, 文件传输相关文件系统操作函数, 键盘及平台相关代码
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: 视频编解码, 配置, tcp/udp 封装, protobuf, 文件传输相关文件系统操作函数, 以及一些其他实用函数
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: 屏幕截取
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: 平台相关的鼠标键盘输入
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: Windows、Linux、macOS 的文件复制和粘贴实现
+3 -3
View File
@@ -8,7 +8,6 @@ import 'package:flutter_hbb/common/formatter/id_formatter.dart';
import 'package:flutter_hbb/common/hbbs/hbbs.dart';
import 'package:flutter_hbb/common/widgets/peer_card.dart';
import 'package:flutter_hbb/common/widgets/peers_view.dart';
import 'package:flutter_hbb/common/widgets/resizable_side_panel.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/desktop/widgets/popup_menu.dart';
import 'package:flutter_hbb/models/ab_model.dart';
@@ -74,7 +73,7 @@ class _AddressBookState extends State<AddressBook> {
});
Widget _buildAddressBookLandscape() {
return ResizablePanelRow(
return Row(
children: [
Offstage(
offstage: hideAbTagsPanel.value,
@@ -84,6 +83,7 @@ class _AddressBookState extends State<AddressBook> {
border: Border.all(
color: Theme.of(context).colorScheme.background)),
child: Container(
width: 200,
height: double.infinity,
child: Column(
children: [
@@ -103,7 +103,7 @@ class _AddressBookState extends State<AddressBook> {
],
),
),
).resizable(kOptionAbTagsPanelWidth, defaultWidth: 200)),
).marginOnly(right: 12.0)),
_buildPeersViews()
],
);
+2 -4
View File
@@ -123,14 +123,12 @@ class ChatPage extends StatelessWidget implements PageShape {
),
),
),
sendButtonBuilder: (send) => defaultSendButton(
sendButtonBuilder: defaultSendButton(
padding:
EdgeInsets.symmetric(horizontal: 6, vertical: 0),
color: MyTheme.accent,
icon: Icons.send_rounded,
)(chatModel.isConnManager
? () => chatModel.checkSend(send)
: send),
),
),
messageOptions: MessageOptions(
showOtherUsersAvatar: false,
+19 -35
View File
@@ -11,7 +11,6 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../common.dart';
import '../../consts.dart';
import './dialog.dart';
import './oidc_auth_status.dart';
@@ -721,16 +720,11 @@ Future<bool?> _openLoginDialogOnce() async {
}
Future<bool?> _openLoginDialog() async {
final hideAccountPasswordLogin =
bind.mainGetBuildinOption(key: kOptionHideAccountPasswordLogin) == 'Y';
var username =
TextEditingController(text: UserModel.getLocalUserInfo()?['name'] ?? '');
var password = TextEditingController();
final userFocusNode = FocusNode();
if (!hideAccountPasswordLogin) {
userFocusNode.requestFocus();
Timer(Duration(milliseconds: 100), () => userFocusNode..requestFocus());
}
final userFocusNode = FocusNode()..requestFocus();
Timer(Duration(milliseconds: 100), () => userFocusNode..requestFocus());
String? usernameMsg;
String? passwordMsg;
@@ -742,7 +736,7 @@ Future<bool?> _openLoginDialog() async {
final loginOptions = [].obs;
final loginOptionsError = Rxn<Object>();
final loginOptionsInProgress = hideAccountPasswordLogin.obs;
final loginOptionsInProgress = false.obs;
fetchLoginOptions() async {
loginOptionsInProgress.value = true;
try {
@@ -893,14 +887,6 @@ Future<bool?> _openLoginDialog() async {
],
);
}
if (hideAccountPasswordLogin && loginOptions.isEmpty) {
return Column(children: [
if (inProgress)
const LinearProgressIndicator()
else
Text(translate('username-login-disabled-oidc-unavailable')),
]);
}
return Offstage(
offstage: loginOptions.isEmpty,
child: Column(
@@ -908,12 +894,11 @@ Future<bool?> _openLoginDialog() async {
const SizedBox(
height: 8.0,
),
if (!hideAccountPasswordLogin)
Center(
child: Text(
translate('or'),
style: TextStyle(fontSize: 16),
)),
Center(
child: Text(
translate('or'),
style: TextStyle(fontSize: 16),
)),
const SizedBox(
height: 8.0,
),
@@ -990,22 +975,21 @@ Future<bool?> _openLoginDialog() async {
const SizedBox(
height: 8.0,
),
if (!hideAccountPasswordLogin)
LoginWidgetUserPass(
username: username,
pass: password,
usernameMsg: usernameMsg,
passMsg: passwordMsg,
isInProgress: isInProgress,
curOP: curOP,
onLogin: onLogin,
userFocusNode: userFocusNode,
),
LoginWidgetUserPass(
username: username,
pass: password,
usernameMsg: usernameMsg,
passMsg: passwordMsg,
isInProgress: isInProgress,
curOP: curOP,
onLogin: onLogin,
userFocusNode: userFocusNode,
),
thirdAuthWidget(),
],
),
onCancel: onDialogCancel,
onSubmit: hideAccountPasswordLogin ? null : onLogin,
onSubmit: onLogin,
);
}).whenComplete(oidcAuth.close);
+3 -4
View File
@@ -4,8 +4,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_hbb/common/hbbs/hbbs.dart';
import 'package:flutter_hbb/common/widgets/login.dart';
import 'package:flutter_hbb/common/widgets/peers_view.dart';
import 'package:flutter_hbb/common/widgets/resizable_side_panel.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/models/state_model.dart';
import 'package:get/get.dart';
@@ -60,7 +58,7 @@ class _MyGroupState extends State<MyGroup> {
}
Widget _buildLandscape() {
return ResizablePanelRow(
return Row(
children: [
Container(
decoration: BoxDecoration(
@@ -68,6 +66,7 @@ class _MyGroupState extends State<MyGroup> {
border:
Border.all(color: Theme.of(context).colorScheme.background)),
child: Container(
width: 150,
height: double.infinity,
child: Column(
children: [
@@ -82,7 +81,7 @@ class _MyGroupState extends State<MyGroup> {
],
),
),
).resizable(kOptionAccessibleDevicesPanelWidth, defaultWidth: 150),
).marginOnly(right: 12.0),
Expanded(
child: Align(
alignment: Alignment.topLeft,
@@ -1,111 +0,0 @@
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/models/platform_model.dart';
const double _kDividerWidth = 12;
const double _kMinContentWidth = 120;
// One 220 px peer card (see peers_view.dart) plus the 12 px spacing.
const double _kPeerCardWidth = 232;
/// A [Row] that lets a [ResizableSidePanel] inside it cap its width to the space the row actually has.
class ResizablePanelRow extends StatelessWidget {
final List<Widget> children;
const ResizablePanelRow({Key? key, required this.children})
: super(key: key);
@override
Widget build(BuildContext context) => LayoutBuilder(
builder: (context, constraints) => _AvailableWidth(
width: constraints.maxWidth, child: Row(children: children)));
}
class _AvailableWidth extends InheritedWidget {
final double width;
const _AvailableWidth({required this.width, required Widget child})
: super(child: child);
@override
bool updateShouldNotify(_AvailableWidth oldWidget) =>
width != oldWidget.width;
}
class ResizableSidePanel extends StatefulWidget {
static const double minWidth = 150;
static const double maxWidth = 300;
final String optionKey;
final double defaultWidth;
final Widget child;
const ResizableSidePanel({
Key? key,
required this.optionKey,
required this.defaultWidth,
required this.child,
}) : super(key: key);
@override
State<ResizableSidePanel> createState() => _ResizableSidePanelState();
}
class _ResizableSidePanelState extends State<ResizableSidePanel> {
late double _width;
double _cap = double.infinity;
@override
void initState() {
super.initState();
final saved =
double.tryParse(bind.mainGetLocalOption(key: widget.optionKey));
_width = _clamp(saved ?? widget.defaultWidth);
}
double _clamp(double w) =>
w.clamp(ResizableSidePanel.minWidth, ResizableSidePanel.maxWidth)
.toDouble();
void _persist() => bind.mainSetLocalOption(
key: widget.optionKey, value: _width.toStringAsFixed(0));
@override
Widget build(BuildContext context) {
final available = context
.dependOnInheritedWidgetOfExactType<_AvailableWidth>()
?.width;
final room = (available ?? double.infinity) - _kDividerWidth;
_cap = room.isFinite
? max(
0.0,
max(room - _kPeerCardWidth,
min(ResizableSidePanel.minWidth, room - _kMinContentWidth)))
: double.infinity;
final sign = Directionality.of(context) == TextDirection.rtl ? -1.0 : 1.0;
return Row(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(width: min(_width, _cap), child: widget.child),
MouseRegion(
cursor: SystemMouseCursors.resizeLeftRight,
child: GestureDetector(
behavior: HitTestBehavior.translucent,
onHorizontalDragUpdate: (details) => setState(() => _width =
_clamp(min(_width, _cap) + sign * details.delta.dx)),
onHorizontalDragEnd: (_) => _persist(),
onHorizontalDragCancel: _persist,
child:
const SizedBox(width: _kDividerWidth, height: double.infinity),
),
),
],
);
}
}
extension ResizableSidePanelExt on Widget {
Widget resizable(String optionKey, {required double defaultWidth}) =>
ResizableSidePanel(
optionKey: optionKey, defaultWidth: defaultWidth, child: this);
}
+20 -37
View File
@@ -476,9 +476,7 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
);
}
// osPassword
if (isDefaultConn &&
perms['keyboard'] != false &&
bind.mainGetBuildinOption(key: kOptionHideToolbarOsPassword) != 'Y') {
if (isDefaultConn && perms['keyboard'] != false) {
v.add(
TTextMenu(
child: Row(children: [
@@ -503,9 +501,7 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
// paste
if (isDefaultConn &&
pi.platform != kPeerPlatformAndroid &&
perms['keyboard'] != false &&
bind.mainGetBuildinOption(key: kOptionHideToolbarSendClipboardKeystrokes) !=
'Y') {
perms['keyboard'] != false) {
v.add(TTextMenu(
child: Text(translate('Send clipboard keystrokes')),
onPressed: () async {
@@ -599,27 +595,21 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
child: Text(translate('Transfer file')),
onPressed: () => connectWithToken(isFileTransfer: true)),
);
if (bind.mainGetBuildinOption(key: kOptionHideToolbarViewCamera) != 'Y') {
v.add(
TTextMenu(
child: Text(translate('View camera')),
onPressed: () => connectWithToken(isViewCamera: true)),
);
}
if (bind.mainGetBuildinOption(key: kOptionHideToolbarTerminal) != 'Y') {
v.add(
TTextMenu(
child: Text('${translate('Terminal')} (beta)'),
onPressed: () => connectWithToken(isTerminal: true)),
);
}
if (bind.mainGetBuildinOption(key: kOptionHideToolbarTcpTunneling) != 'Y') {
v.add(
TTextMenu(
child: Text(translate('TCP tunneling')),
onPressed: () => connectWithToken(isTcpTunneling: true)),
);
}
v.add(
TTextMenu(
child: Text(translate('View camera')),
onPressed: () => connectWithToken(isViewCamera: true)),
);
v.add(
TTextMenu(
child: Text('${translate('Terminal')} (beta)'),
onPressed: () => connectWithToken(isTerminal: true)),
);
v.add(
TTextMenu(
child: Text(translate('TCP tunneling')),
onPressed: () => connectWithToken(isTcpTunneling: true)),
);
}
// note
if (isDefaultConn && !bind.isDisableAccount()) {
@@ -707,7 +697,6 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
ffiModel.keyboard &&
pi.platform != kPeerPlatformAndroid &&
versionCmp(pi.version, '1.2.0') >= 0 &&
bind.mainGetBuildinOption(key: kOptionHideToolbarSwitchSides) != 'Y' &&
bind.peerGetSessionsCount(id: id, connType: ffi.connType.index) == 1) {
v.add(TTextMenu(
child: Text(translate('Switch Sides')),
@@ -750,9 +739,7 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
// to-do:
// 1. Web desktop
// 2. Mobile, copy the image to the clipboard
if ((isDefaultConn || ffi.connType == ConnType.viewCamera) &&
isDesktop &&
bind.mainGetBuildinOption(key: kOptionHideToolbarScreenshot) != 'Y') {
if ((isDefaultConn || ffi.connType == ConnType.viewCamera) && isDesktop) {
final isScreenshotSupported = bind.sessionGetCommonSync(
sessionId: sessionId, key: 'is_screenshot_supported', param: '');
if ('true' == isScreenshotSupported) {
@@ -1215,16 +1202,12 @@ Future<List<TToggleMenu>> toolbarDisplayToggle(
child: Text(translate('True color (4:4:4)'))));
}
final showMobileKeyboardSettings = isDefaultConn &&
isMobile &&
bind.mainGetBuildinOption(key: kOptionHideToolbarKeyboardSettings) !=
'Y';
if (showMobileKeyboardSettings) {
if (isDefaultConn && isMobile) {
v.addAll(toolbarKeyboardToggles(ffi));
}
// view mode (mobile only, desktop is in keyboard menu)
if (showMobileKeyboardSettings && versionCmp(pi.version, '1.2.0') >= 0) {
if (isDefaultConn && isMobile && versionCmp(pi.version, '1.2.0') >= 0) {
v.add(TToggleMenu(
value: ffiModel.viewOnly,
onChanged: (value) async {
-20
View File
@@ -83,14 +83,12 @@ const String kWindowEventGetCachedSessionData = "get_cached_session_data";
const String kWindowEventOpenMonitorSession = "open_monitor_session";
const String kOptionViewStyle = "view_style";
const String kOptionKeyboardMode = "keyboard_mode";
const String kOptionScrollStyle = "scroll_style";
const String kOptionEdgeScrollEdgeThickness = "edge-scroll-edge-thickness";
const String kOptionImageQuality = "image_quality";
const String kOptionOpenNewConnInTabs = "enable-open-new-connections-in-tabs";
const String kOptionTextureRender = "use-texture-render";
const String kOptionD3DRender = "allow-d3d-render";
const String kOptionAllowUnicodeInput = "allow-unicode-input";
const String kOptionOpenInTabs = "allow-open-in-tabs";
const String kOptionOpenInWindows = "allow-open-in-windows";
const String kOptionForceAlwaysRelay = "force-always-relay";
@@ -107,7 +105,6 @@ const String kOptionAutoDisconnectTimeout = "auto-disconnect-timeout";
const String kOptionEnableHwcodec = "enable-hwcodec";
const String kOptionAllowAutoRecordIncoming = "allow-auto-record-incoming";
const String kOptionAllowAutoRecordOutgoing = "allow-auto-record-outgoing";
const String kOptionAllowDrmCapture = "allow-drm-capture";
const String kOptionHideRecordingButton = "hide-recording-button";
const String kOptionVideoSaveDirectory = "video-save-directory";
const String kOptionAccessMode = "access-mode";
@@ -163,9 +160,6 @@ const String kOptionRemoteMenubarFraction = "remote-menubar-frac";
const String kOptionAllowMultiEdgeToolbarDock =
"allow-multi-edge-toolbar-dock";
const String kOptionHideAbTagsPanel = "hideAbTagsPanel";
const String kOptionAbTagsPanelWidth = "ab-tags-panel-width";
const String kOptionAccessibleDevicesPanelWidth =
"accessible-devices-panel-width";
const String kOptionRemoteMenubarState = "remoteMenubarState";
const String kOptionPeerSorting = "peer-sorting";
const String kOptionPeerTabIndex = "peer-tab-index";
@@ -211,20 +205,6 @@ const String kOptionHideServerSetting = "hide-server-settings";
const String kOptionHideProxySetting = "hide-proxy-settings";
const String kOptionHideWebSocketSetting = "hide-websocket-settings";
const String kOptionHideStopService = "hide-stop-service";
const String kOptionHideAccountPasswordLogin = "hide-account-password-login";
const String kOptionHideToolbarOsPassword = "hide-toolbar-os-password";
const String kOptionHideToolbarSendClipboardKeystrokes =
"hide-toolbar-send-clipboard-keystrokes";
const String kOptionHideToolbarViewCamera = "hide-toolbar-view-camera";
const String kOptionHideToolbarTerminal = "hide-toolbar-terminal";
const String kOptionHideToolbarTcpTunneling = "hide-toolbar-tcp-tunneling";
const String kOptionHideToolbarSwitchSides = "hide-toolbar-switch-sides";
const String kOptionHideToolbarScreenshot = "hide-toolbar-screenshot";
const String kOptionHideToolbarVoiceCall = "hide-toolbar-voice-call";
const String kOptionHideToolbarDisplaySettings =
"hide-toolbar-display-settings";
const String kOptionHideToolbarKeyboardSettings =
"hide-toolbar-keyboard-settings";
const String kOptionQuitButtonText = "quit-button-text";
const String kOptionHideRemotePrinterSetting = "hide-remote-printer-settings";
const String kOptionHideGeneralSetting = "hide-general-settings";
@@ -428,17 +428,6 @@ class _DesktopHomePageState extends State<DesktopHomePage>
}
Widget buildHelpCards(String updateUrl) {
if (isWindows &&
!bind.isDisableInstallation() &&
bind.mainIsInstalled() &&
!bind.isOutgoingOnly() &&
!mainGetBoolOptionSync(kOptionStopService) &&
!bind.mainIsInstalledDaemon(prompt: false)) {
return buildInstallCard("", "install_daemon_tip", "Install", () async {
await rustDeskWinManager.closeAllSubWindows();
await start_service(true);
});
}
if (!bind.isCustomClient() &&
updateUrl.isNotEmpty &&
!isCardClosed &&
@@ -531,29 +520,25 @@ class _DesktopHomePageState extends State<DesktopHomePage>
return Container();
}
final LinuxCards = <Widget>[];
final drmSupported = bind.mainIsInstalled() &&
bind.mainGetCommonSync(key: 'is-drm-capture-supported') == 'true';
if (drmSupported && mainGetBoolOptionSync(kOptionAllowDrmCapture)) {
// DRM capture reaches the session and the login screen: no warning.
} else if (drmSupported &&
!isOptionFixed(kOptionAllowDrmCapture) &&
!bind.isDisableSettings()) {
final currentIsWayland = bind.mainCurrentIsWayland();
if (currentIsWayland || bind.mainIsLoginWayland()) {
if (bind.isSelinuxEnforcing()) {
// Check is SELinux enforcing, but show user a tip of is SELinux enabled for simple.
final keyShowSelinuxHelpTip = "show-selinux-help-tip";
if (bind.mainGetLocalOption(key: keyShowSelinuxHelpTip) != 'N') {
LinuxCards.add(buildInstallCard(
"Warning",
currentIsWayland ? "wayland-drm-tip" : "login-wayland-drm-tip",
"Enable", () async {
await mainSetBoolOption(kOptionAllowDrmCapture, true);
setState(() {});
},
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
help: 'Help',
link: currentIsWayland
? 'https://rustdesk.com/docs/en/client/linux/#x11-required'
: 'https://rustdesk.com/docs/en/client/linux/#login-screen'));
"Warning",
"selinux_tip",
"",
() async {},
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
help: 'Help',
link:
'https://rustdesk.com/docs/en/client/linux/#permissions-issue',
closeButton: true,
closeOption: keyShowSelinuxHelpTip,
));
}
} else if (bind.mainCurrentIsWayland()) {
}
if (bind.mainCurrentIsWayland()) {
LinuxCards.add(buildInstallCard(
"Warning", "wayland_experiment_tip", "", () async {},
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
@@ -527,14 +527,6 @@ class _GeneralState extends State<_General> {
final showAutoUpdate = (isWindows && bind.mainIsInstalled()) ||
(isMacOS && bind.mainIsInstalled() && bind.mainIsInstalledDaemon(prompt: false) && !bind.isCustomClient());
final children = <Widget>[
if (!isWeb && isWindows && !incomingOnly)
_OptionCheckBox(
context,
'Enable Unicode input',
kOptionAllowUnicodeInput,
isServer: false,
trailing: const InfoTooltipIcon(tipKey: 'unicode-input-tip'),
),
if (!isWeb && !incomingOnly)
_OptionCheckBox(context, 'Confirm before closing multiple tabs',
kOptionEnableConfirmClosingTabs,
@@ -2005,23 +1997,6 @@ class _NetworkState extends State<_Network> with AutomaticKeepAliveClientMixin {
}
}
bool shouldShowKeyboardModeSetting() {
if (isWeb) return true;
final supportedInputSources = bind.mainSupportedInputSource();
if (supportedInputSources.isEmpty) return false;
try {
final sources = jsonDecode(supportedInputSources);
return sources is List &&
sources.any((source) =>
source is List &&
source.isNotEmpty &&
source.first != 'Input source 2');
} on FormatException catch (e) {
debugPrint('Failed to decode supported input sources: $e');
return false;
}
}
class _Display extends StatefulWidget {
const _Display({Key? key}) : super(key: key);
@@ -2039,7 +2014,6 @@ class _DisplayState extends State<_Display> {
imageQuality(context),
codec(context),
if (isDesktop) trackpadSpeed(context),
if (shouldShowKeyboardModeSetting()) keyboardMode(),
if (!isWeb) privacyModeImpl(context),
other(context),
]).marginOnly(bottom: _kListViewBottomMargin);
@@ -2171,26 +2145,6 @@ class _DisplayState extends State<_Display> {
]);
}
Widget keyboardMode() {
return _Card(title: 'Keyboard mode', children: [
ComboBox(
keys: [kKeyMapMode, kKeyTranslateMode, kKeyLegacyMode],
values: [
translate('Map mode'),
translate('Translate mode'),
translate('Legacy mode'),
],
initialKey: bind.mainGetUserDefaultOption(key: kOptionKeyboardMode),
enabled: !isOptionFixed(kOptionKeyboardMode),
onChanged: (mode) async {
await bind.mainSetUserDefaultOption(
key: kOptionKeyboardMode, value: mode);
if (mounted) setState(() {});
},
).marginOnly(left: _kContentHMargin),
]);
}
Widget codec(BuildContext context) {
onChanged(String value) async {
await bind.mainSetUserDefaultOption(
@@ -2936,19 +2890,6 @@ class _WaylandCardState extends State<WaylandCard> {
"true";
final children = [
if (isLinux &&
bind.mainIsInstalled() &&
!bind.isOutgoingOnly() &&
!bind.isDisableSettings() &&
bind.mainGetCommonSync(key: 'is-drm-capture-supported') ==
'true') ...[
_OptionCheckBox(
context, 'Use DRM screen capture', kOptionAllowDrmCapture),
Align(
alignment: Alignment.topLeft,
child: Text(translate('drm-capture-tip')),
).marginOnly(left: _kCardLeftMargin),
],
if (restoreToken.isNotEmpty)
_buildClearScreenSelection(context, restoreToken),
if (hasShortcutsPermission)
@@ -836,19 +836,14 @@ class _RemoteToolbarState extends State<RemoteToolbar> {
toolbarItems
.add(_ControlMenu(id: widget.id, ffi: widget.ffi, state: widget.state));
if (bind.mainGetBuildinOption(key: kOptionHideToolbarDisplaySettings) !=
'Y') {
toolbarItems.add(_DisplayMenu(
id: widget.id,
ffi: widget.ffi,
state: widget.state,
setFullscreen: _setFullscreen,
));
}
toolbarItems.add(_DisplayMenu(
id: widget.id,
ffi: widget.ffi,
state: widget.state,
setFullscreen: _setFullscreen,
));
// Do not show keyboard for camera connection type.
if (widget.ffi.connType == ConnType.defaultConn &&
bind.mainGetBuildinOption(key: kOptionHideToolbarKeyboardSettings) !=
'Y') {
if (widget.ffi.connType == ConnType.defaultConn) {
toolbarItems.add(_KeyboardMenu(id: widget.id, ffi: widget.ffi));
}
toolbarItems.add(_ChatMenu(id: widget.id, ffi: widget.ffi));
@@ -2841,8 +2836,7 @@ class _ChatMenuState extends State<_ChatMenu> {
@override
Widget build(BuildContext context) {
if (isWeb ||
bind.mainGetBuildinOption(key: kOptionHideToolbarVoiceCall) == 'Y') {
if (isWeb) {
return buildTextChatButton();
} else {
return _IconSubmenuButton(
+28 -52
View File
@@ -1015,64 +1015,40 @@ class BottomSheetBody extends StatelessWidget {
final _actions = actions ?? [];
return BottomSheet(
builder: (BuildContext context) {
final mediaQuery = MediaQuery.of(context);
final view = View.maybeOf(context);
final viewBottomPadding = view != null && view.devicePixelRatio > 0
? view.padding.bottom / view.devicePixelRatio
: 0.0;
final bottomInset = mediaQuery.padding.bottom > viewBottomPadding
? mediaQuery.padding.bottom
: viewBottomPadding;
return Container(
height: 65,
alignment: Alignment.centerLeft,
decoration: BoxDecoration(
color: MyTheme.accent50,
borderRadius: BorderRadius.vertical(top: Radius.circular(10))),
child: SafeArea(
top: false,
minimum: EdgeInsets.only(bottom: bottomInset),
child: Container(
height: 65,
alignment: Alignment.centerLeft,
padding: EdgeInsets.symmetric(horizontal: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Row(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
leading,
SizedBox(width: 16),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
leading,
SizedBox(width: 16),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 18)),
Text(text,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 14)) // TODO color
],
),
)
Text(title, style: TextStyle(fontSize: 18)),
Text(text,
style: TextStyle(fontSize: 14)) // TODO color
],
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: [
..._actions,
IconButton(
icon: Icon(Icons.cancel_outlined),
onPressed: onCanceled,
),
],
)
],
),
)
],
),
Row(children: () {
_actions.add(IconButton(
icon: Icon(Icons.cancel_outlined),
onPressed: onCanceled,
));
return _actions;
}())
],
),
));
},
+38 -58
View File
@@ -566,13 +566,12 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
}
return Container(
color: MyTheme.canvasColor,
child: withKeyHelpTools(
inputModel.isPhysicalMouse.value
? getBodyForMobile()
: RawTouchGestureDetectorRegion(
child: getBodyForMobile(),
ffi: gFFI,
)),
child: inputModel.isPhysicalMouse.value
? getBodyForMobile()
: RawTouchGestureDetectorRegion(
child: getBodyForMobile(),
ffi: gFFI,
),
);
}),
),
@@ -621,17 +620,14 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
clientClose(sessionId, gFFI);
},
),
if (bind.mainGetBuildinOption(
key: kOptionHideToolbarDisplaySettings) !=
'Y')
IconButton(
color: Colors.white,
icon: Icon(Icons.tv),
onPressed: () {
setState(() => _showEdit = false);
showOptions(context, widget.id, gFFI.dialogManager);
},
)
IconButton(
color: Colors.white,
icon: Icon(Icons.tv),
onPressed: () {
setState(() => _showEdit = false);
showOptions(context, widget.id, gFFI.dialogManager);
},
)
] +
(isWebDesktop || ffiModel.viewOnly || !ffiModel.keyboard
? []
@@ -653,17 +649,14 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
color: Colors.white,
icon: Icon(Icons.keyboard),
onPressed: openKeyboard),
if (bind.mainGetBuildinOption(
key: kOptionHideToolbarKeyboardSettings) !=
'Y')
IconButton(
color: Colors.white,
icon: Icon(gFFI.ffiModel.touchMode
? Icons.touch_app
: Icons.mouse),
onPressed: () => setState(
() => _showGestureHelp = !_showGestureHelp),
),
IconButton(
color: Colors.white,
icon: Icon(gFFI.ffiModel.touchMode
? Icons.touch_app
: Icons.mouse),
onPressed: () => setState(
() => _showGestureHelp = !_showGestureHelp),
),
]) +
(isWeb
? []
@@ -713,27 +706,6 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
!gFFI.canvasModel.cursorEmbedded &&
!gFFI.inputModel.relativeMouseMode.value;
// The key bar sits above the canvas, outside its gesture region: a touch on the bar must not
// also reach the canvas recognizers, which would send it to the remote as a mouse event.
// The cursor and the touch-mode virtual mouse stay above the bar, as they were inside the canvas
// stack. The mouse-mode virtual mouse stays inside the region: see getBodyForMobile.
Widget withKeyHelpTools(Widget body) => Stack(children: [
Positioned.fill(child: body),
Obx(() {
final chatKeyboardRequested =
gFFI.chatModel.softKeyboardRequested.value;
return KeyHelpTools(
keyboardIsVisible: keyboardVisibilityController.isVisible &&
(_showEdit || chatKeyboardRequested),
showGestureHelp: _showGestureHelp);
}),
if (showCursorPaint) CursorPaint(widget.id),
if (gFFI.ffiModel.touchMode)
FloatingMouse(
ffi: gFFI,
),
]);
Widget getBodyForMobile() {
return Container(
color: MyTheme.canvasColor,
@@ -745,6 +717,14 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
right: 10,
child: QualityMonitor(gFFI.qualityMonitorModel),
),
Obx(() {
final chatKeyboardRequested =
gFFI.chatModel.softKeyboardRequested.value;
return KeyHelpTools(
keyboardIsVisible: keyboardVisibilityController.isVisible &&
(_showEdit || chatKeyboardRequested),
showGestureHelp: _showGestureHelp);
}),
SizedBox(
width: 0,
height: 0,
@@ -776,9 +756,14 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
).workaroundFreezeLinuxMint(),
),
];
// Holding a virtual button while another finger drags needs both pointers in the canvas
// recognizers (isSpecialHoldDragActive), so these stay inside the gesture region.
if (!gFFI.ffiModel.touchMode) {
if (showCursorPaint) {
paints.add(CursorPaint(widget.id));
}
if (gFFI.ffiModel.touchMode) {
paints.add(FloatingMouse(
ffi: gFFI,
));
} else {
paints.add(FloatingMouseWidgets(
ffi: gFFI,
));
@@ -914,11 +899,6 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
VoiceCallStatus.waitingForResponse,
VoiceCallStatus.connected
].contains(gFFI.chatModel.voiceCallStatus.value);
if (!isInVoice &&
bind.mainGetBuildinOption(key: kOptionHideToolbarVoiceCall) == 'Y') {
onPressedTextChat(id);
return;
}
final menus = [
makeTextMenu('Text chat', Icon(Icons.message, color: MyTheme.accent),
() => onPressedTextChat(widget.id)),
+8 -16
View File
@@ -311,17 +311,14 @@ class _ViewCameraPageState extends State<ViewCameraPage>
clientClose(sessionId, gFFI);
},
),
if (bind.mainGetBuildinOption(
key: kOptionHideToolbarDisplaySettings) !=
'Y')
IconButton(
color: Colors.white,
icon: Icon(Icons.tv),
onPressed: () {
setState(() => _showEdit = false);
showOptions(context, widget.id, gFFI.dialogManager);
},
)
IconButton(
color: Colors.white,
icon: Icon(Icons.tv),
onPressed: () {
setState(() => _showEdit = false);
showOptions(context, widget.id, gFFI.dialogManager);
},
)
] +
(isWeb
? []
@@ -522,11 +519,6 @@ class _ViewCameraPageState extends State<ViewCameraPage>
VoiceCallStatus.waitingForResponse,
VoiceCallStatus.connected
].contains(gFFI.chatModel.voiceCallStatus.value);
if (!isInVoice &&
bind.mainGetBuildinOption(key: kOptionHideToolbarVoiceCall) == 'Y') {
onPressedTextChat(id);
return;
}
final menus = [
makeTextMenu('Text chat', Icon(Icons.message, color: MyTheme.accent),
() => onPressedTextChat(widget.id)),
@@ -317,15 +317,7 @@ class _FloatingMouseState extends State<FloatingMouse> {
final RenderBox? renderBox =
_cursorPaintKey.currentContext?.findRenderObject() as RenderBox?;
if (renderBox != null) {
// The handle lives in window coordinates, but the mouse mapping expects
// the visible canvas area, see InputModel._pointerPositionForRemoteCanvas.
final mediaData = MediaQueryData.fromView(
WidgetsBinding.instance.platformDispatcher.views.first);
final position = renderBox.localToGlobal(Offset.zero);
return Offset(
position.dx - mediaData.padding.left,
position.dy - mediaData.padding.top - _canvasModel.getAdjustY(),
);
return renderBox.localToGlobal(Offset.zero);
} else {
return _position;
}
+2 -24
View File
@@ -19,7 +19,6 @@ import 'package:flutter_svg/flutter_svg.dart';
import '../consts.dart';
import '../common.dart';
import '../common/widgets/overlay.dart';
import '../desktop/pages/server_page.dart' show checkClickTime;
import '../main.dart';
import 'model.dart';
@@ -143,15 +142,8 @@ class ChatModel with ChangeNotifier {
user: me,
createdAt: DateTime.now(),
);
if (isConnManager) {
checkSend(() {
send(message);
textController.clear();
});
} else {
send(message);
textController.clear();
}
send(message);
textController.clear();
return KeyEventResult.handled;
}
@@ -477,20 +469,6 @@ class ChatModel with ChangeNotifier {
notifyListeners();
}
void checkSend(VoidCallback callback) {
final id = _currentKey.connId;
final text = textController.text;
checkClickTime(id, () {
if (_currentKey.connId == id &&
textController.text == text &&
parent.target?.serverModel.clients
.any((client) => client.id == id && !client.disconnected) ==
true) {
callback();
}
});
}
send(ChatMessage message) {
String trimmedText = message.text.trim();
if (trimmedText.isEmpty) {
-10
View File
@@ -1188,8 +1188,6 @@ class FfiModel with ChangeNotifier {
}
if (waitForFirstImage.isFalse) return;
// A second show under the same tag would orphan the first overlay: no dismiss can reach it.
clearWaitingForImage(dialogManager, sessionId);
dialogManager.show(
(setState, close, context) => CustomAlertDialog(
title: null,
@@ -1506,14 +1504,6 @@ class FfiModel with ChangeNotifier {
checkDesktopKeyboardMode() async {
if (isInputSourceFlutter) {
if (isWeb && !pi.isWayland) {
final mode = await bind.sessionGetKeyboardMode(sessionId: sessionId);
if (mode != null &&
bind.sessionIsKeyboardModeSupported(
sessionId: sessionId, mode: mode)) {
return;
}
}
// Local side, flutter keyboard input source
// Currently only map mode is supported, legacy mode is used for compatibility.
for (final mode in [kKeyMapMode, kKeyLegacyMode]) {
+1 -18
View File
@@ -21,18 +21,6 @@ import '../models/state_model.dart';
typedef ShortcutCallback = FutureOr<void> Function();
Iterable<String> _actionsInGroup(String titleKey) {
final groups = kKeyboardShortcutActionGroups.where((g) => g.titleKey == titleKey);
return allActionEntries(groups).map((entry) => entry.id);
}
final _toolbarOptionForShortcut = {
for (final id in _actionsInGroup('Display'))
id: kOptionHideToolbarDisplaySettings,
for (final id in _actionsInGroup('Keyboard'))
id: kOptionHideToolbarKeyboardSettings,
};
/// Per-session shortcut dispatcher. Attached to FFI when a session is created.
///
/// The Rust matcher (src/keyboard/shortcuts.rs) emits `shortcut_triggered`
@@ -94,10 +82,6 @@ class ShortcutModel {
/// belongs to RustDesk and is never forwarded to the remote.
void onTriggered(String actionId) {
if (parent.target?.closed != false) return;
final option = _toolbarOptionForShortcut[actionId];
if (option != null && bind.mainGetBuildinOption(key: option) == 'Y') {
return;
}
unawaited(Future.sync(() async {
final refresh = _refreshers[actionId];
if (refresh != null) {
@@ -483,8 +467,7 @@ void registerSessionShortcutActions(
if (status == VoiceCallStatus.connected ||
status == VoiceCallStatus.waitingForResponse) {
bind.sessionCloseVoiceCall(sessionId: sessionId);
} else if (bind.mainGetBuildinOption(key: kOptionHideToolbarVoiceCall) !=
'Y') {
} else {
bind.sessionRequestVoiceCall(sessionId: sessionId);
}
});
+4
View File
@@ -1749,6 +1749,10 @@ class RustdeskImpl {
return versionToNumber(v: version) > versionToNumber(v: '1.2.4');
}
bool isSelinuxEnforcing({dynamic hint}) {
return false;
}
String mainDefaultPrivacyModeImpl({dynamic hint}) {
throw UnimplementedError("mainDefaultPrivacyModeImpl");
}
-14
View File
@@ -27,12 +27,6 @@ void host_channel_call_handler(FlMethodChannel* channel, FlMethodCall* method_ca
GtkWidget *find_gl_area(GtkWidget *widget);
void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view);
// Added in Flutter 3.27. Declared weak so that this builds with Flutter 3.24,
// where it is NULL.
extern "C" void fl_view_set_background_color(FlView* view,
const GdkRGBA* color)
__attribute__((weak));
extern bool gIsConnectionManager;
// --- Side mouse button support (back/forward) ---
@@ -336,14 +330,6 @@ void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view)
gtk_gl_area_set_has_alpha(GTK_GL_AREA(gl_area), TRUE);
}
// Flutter >= 3.27 sets up its GtkGLArea for transparency itself (newer
// versions do not use one), but fills the view with an opaque black
// background unless a transparent background color is set.
if (fl_view_set_background_color != NULL) {
const GdkRGBA transparent = {0.0, 0.0, 0.0, 0.0};
fl_view_set_background_color(view, &transparent);
}
if (screen != NULL) {
GdkVisual *visual = NULL;
gtk_widget_set_app_paintable(GTK_WIDGET(window), TRUE);
@@ -6,8 +6,6 @@
<false/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.network.server</key>
-2
View File
@@ -41,8 +41,6 @@
<string>$(PRODUCT_COPYRIGHT)</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSCameraUsageDescription</key>
<string>Capture video from the camera for the purpose of remote camera viewing.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Record the sound from microphone for the purpose of the remote desktop.</string>
<key>NSPrincipalClass</key>
@@ -6,8 +6,6 @@
<false/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.network.client</key>
+2 -2
View File
@@ -339,8 +339,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: 27d0a46fcff13153b46e0777fe92ff03a5834286
resolved-ref: 27d0a46fcff13153b46e0777fe92ff03a5834286
ref: cddc2e64f8fefce4f80db87b20bcda2dd019bed6
resolved-ref: cddc2e64f8fefce4f80db87b20bcda2dd019bed6
url: "https://github.com/rustdesk-org/rustdesk_desktop_multi_window"
source: git
version: "0.1.0"
+1 -1
View File
@@ -58,7 +58,7 @@ dependencies:
desktop_multi_window:
git:
url: https://github.com/rustdesk-org/rustdesk_desktop_multi_window
ref: 27d0a46fcff13153b46e0777fe92ff03a5834286
ref: cddc2e64f8fefce4f80db87b20bcda2dd019bed6
freezed_annotation: ^2.0.3
flutter_custom_cursor:
git:
@@ -1,150 +0,0 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/common/widgets/login.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/generated_bridge.dart';
import 'package:flutter_hbb/models/platform_model.dart';
import 'package:flutter_test/flutter_test.dart';
class _Binding extends Fake implements RustdeskImpl {
String hidePasswordLogin = '';
String? authenticatedProvider;
Future<String?>? loginOptionsResponse;
@override
String translate(
{required String name, required String locale, dynamic hint}) =>
name.replaceAll('{', '').replaceAll('}', '');
@override
String mainGetBuildinOption({required String key, dynamic hint}) =>
key == kOptionHideAccountPasswordLogin ? hidePasswordLogin : '';
@override
String mainGetLocalOption({required String key, dynamic hint}) =>
key == kOptionEnableFlutterHttpOnRust ? 'Y' : '';
@override
String getLocalFlutterOption({required String k, dynamic hint}) => '';
@override
bool isDisableAb({dynamic hint}) => false;
@override
bool isDisableAccount({dynamic hint}) => false;
@override
bool isDisableGroupPanel({dynamic hint}) => false;
@override
Future<String> mainGetApiServer({dynamic hint}) async =>
'https://example.com';
@override
Future<void> mainHttpRequest(
{required String url,
required String method,
String? body,
required String header,
dynamic hint}) async {
expectSync(Uri.parse(url).path, '/api/login-options');
}
@override
Future<String?> mainGetHttpStatus(
{required String url, dynamic hint}) async =>
await loginOptionsResponse ??
jsonEncode({'body': '["oidc/azure"]', 'headers': {}, 'status_code': 200});
@override
Future<void> mainAccountAuth(
{required String op, required bool rememberMe, dynamic hint}) async {
authenticatedProvider = op;
}
@override
Future<void> mainAccountAuthCancel({dynamic hint}) async {}
@override
Future<String> mainAccountAuthResult({dynamic hint}) async => '';
}
void main() {
final binding = _Binding();
setUpAll(() async {
isTest = true;
platformFFI.setBindingForTesting(binding);
await initGlobalFFI();
});
Future<void> openLogin(WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(
navigatorKey: globalKey,
home: const Scaffold(),
));
loginDialog();
addTearDown(gFFI.dialogManager.dismissAll);
await tester.pumpAndSettle();
}
for (final option in ['', 'N', 'Y']) {
testWidgets('account password visibility with option "$option"',
(tester) async {
binding.hidePasswordLogin = option;
binding.authenticatedProvider = null;
await openLogin(tester);
final hidden = option == 'Y';
expect(find.byType(TextField), hidden ? findsNothing : findsNWidgets(2));
expect(find.widgetWithText(ElevatedButton, 'Login'),
hidden ? findsNothing : findsOneWidget);
expect(find.text('or'), hidden ? findsNothing : findsOneWidget);
expect(find.text('Continue with Microsoft'), findsOneWidget);
final dialog =
tester.widget<CustomAlertDialog>(find.byType(CustomAlertDialog));
expect(dialog.onSubmit, hidden ? isNull : isNotNull);
await tester.tap(find.text('Continue with Microsoft'));
await tester.pump();
expect(binding.authenticatedProvider, 'azure');
gFFI.dialogManager.dismissAll();
await tester.pumpAndSettle();
});
}
testWidgets('OIDC-only login shows loading before an empty provider response',
(tester) async {
binding.hidePasswordLogin = 'Y';
final response = Completer<String?>();
binding.loginOptionsResponse = response.future;
addTearDown(() async {
binding.loginOptionsResponse = null;
gFFI.dialogManager.dismissAll();
await tester.pumpAndSettle();
});
await tester.pumpWidget(MaterialApp(
navigatorKey: globalKey,
home: const Scaffold(),
));
loginDialog();
final unavailable = find.text('username-login-disabled-oidc-unavailable');
// Render the first frame before the zero-delay fetch timer runs.
await tester.pump();
expect(find.byType(LinearProgressIndicator), findsOneWidget);
expect(unavailable, findsNothing);
await tester.pump(const Duration(milliseconds: 100));
expect(find.byType(LinearProgressIndicator), findsOneWidget);
expect(unavailable, findsNothing);
response.complete(
jsonEncode({'body': '[]', 'headers': {}, 'status_code': 200}));
await tester.pumpAndSettle();
expect(find.byType(LinearProgressIndicator), findsNothing);
expect(unavailable, findsOneWidget);
expect(find.text('Retry'), findsNothing);
});
}
@@ -1,32 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_hbb/common/widgets/dialog.dart';
void main() {
// Passes trivially on Flutter 3.24; the macOS arm64 CI job runs it against
// the 3.44-patched sources, where desktop fields select all on focus (#17143).
testWidgets('dialog text field keeps the caret when it regains focus',
(tester) async {
final controller = TextEditingController();
final focusNode = FocusNode();
addTearDown(controller.dispose);
addTearDown(focusNode.dispose);
await tester.pumpWidget(MaterialApp(
home: Scaffold(
body: DialogTextField(
title: '2FA code',
controller: controller,
focusNode: focusNode,
),
),
));
await tester.enterText(find.byType(TextField), '1');
focusNode.unfocus();
await tester.pump();
focusNode.requestFocus();
await tester.pump();
expect(controller.selection, const TextSelection.collapsed(offset: 1));
}, variant: TargetPlatformVariant.desktop());
}
@@ -1,69 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_hbb/mobile/pages/file_manager_page.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
Widget buildSubject({
VoidCallback? onCanceled,
List<IconButton>? actions,
}) {
return MaterialApp(
home: Scaffold(
bottomSheet: BottomSheetBody(
leading: const Icon(Icons.check),
title: 'Wybrano',
text: '1 elementów [Lokalny]',
onCanceled: onCanceled,
actions: actions,
),
),
);
}
testWidgets('keeps action buttons above bottom system navigation bar',
(tester) async {
tester.view.physicalSize = const Size(360, 800);
tester.view.devicePixelRatio = 1.0;
tester.view.padding = const FakeViewPadding(bottom: 48);
tester.view.viewPadding = const FakeViewPadding(bottom: 48);
addTearDown(tester.view.reset);
var canceled = false;
await tester.pumpWidget(buildSubject(
onCanceled: () => canceled = true,
actions: [
IconButton(icon: const Icon(Icons.save_alt), onPressed: () {}),
IconButton(icon: const Icon(Icons.compare_arrows), onPressed: () {}),
IconButton(icon: const Icon(Icons.delete_forever), onPressed: () {}),
],
));
expect(tester.takeException(), isNull);
expect(tester.getSize(find.byType(BottomSheetBody)).height, 113.0);
for (final icon in const [
Icons.save_alt,
Icons.compare_arrows,
Icons.delete_forever,
Icons.cancel_outlined,
]) {
expect(tester.getBottomRight(find.byIcon(icon)).dy,
lessThanOrEqualTo(752.0));
}
await tester.tap(find.byIcon(Icons.cancel_outlined));
await tester.pump();
expect(canceled, isTrue);
});
testWidgets('preserves default height when bottom inset is zero',
(tester) async {
tester.view.physicalSize = const Size(360, 800);
tester.view.devicePixelRatio = 1.0;
addTearDown(tester.view.reset);
await tester.pumpWidget(buildSubject());
expect(tester.takeException(), isNull);
expect(tester.getSize(find.byType(BottomSheetBody)).height, 65.0);
});
}
@@ -1,128 +0,0 @@
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter_hbb/mobile/widgets/floating_mouse.dart';
import 'package:flutter_hbb/models/input_model.dart';
import 'package:flutter_hbb/models/model.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:provider/provider.dart';
class _FfiModel extends Fake implements FfiModel {
@override
late VirtualMouseMode virtualMouseMode = VirtualMouseMode(this);
@override
bool get isPeerAndroid => false;
@override
Rect? displaysRect() => null;
}
class _Canvas extends Fake implements CanvasModel {
@override
double get scale => 1.0;
@override
double getAdjustY() => 0;
}
class _Input extends Fake implements InputModel {
final mouseOffsets = <Offset>[];
@override
Map<String, dynamic>? handleMouse(
Map<String, dynamic> evt,
Offset offset, {
bool onExit = false,
bool moveCanvas = true,
bool edgeScroll = false,
}) {
mouseOffsets.add(offset);
return null;
}
}
class _Cursor extends Fake implements CursorModel {
@override
set blockEvents(bool v) {}
@override
addBlockedRect(Rect rect) {}
@override
removeBlockedRect(Rect rect) {}
@override
double get hotx => 0;
@override
double get hoty => 0;
@override
ui.Image? get image => null;
}
class _Ffi extends Fake implements FFI {
@override
final ffiModel = _FfiModel();
@override
final canvasModel = _Canvas();
@override
InputModel get inputModel => input;
final input = _Input();
@override
final cursorModel = _Cursor();
}
void main() {
// The cursor model is a ChangeNotifier in production, but a fake here, so the
// provider check that asks for ChangeNotifierProvider would reject it.
Provider.debugCheckInvalidValueType = null;
// The handle draws its own arrow, and the canvas draws the peer cursor from
// the offsets this widget reports. The two only line up while the reported
// point is the handle position inside the canvas instead of the window.
testWidgets('virtual mouse reports the handle in canvas coordinates',
(tester) async {
const safeArea = Offset(20, 40);
tester.view.physicalSize = const Size(400, 800);
tester.view.devicePixelRatio = 1;
tester.view.padding = const FakeViewPadding(left: 20, top: 40);
addTearDown(tester.view.reset);
final ffi = _Ffi();
ffi.ffiModel.virtualMouseMode.setShowVirtualMouse(true);
await tester.pumpWidget(MaterialApp(
home: Provider<CursorModel>.value(
value: ffi.cursorModel,
child: Padding(
padding: EdgeInsets.only(left: safeArea.dx, top: safeArea.dy),
child: Stack(children: [FloatingMouse(ffi: ffi)]),
),
),
));
await tester.pump();
final handle = find.byType(CursorPaint);
expect(handle, findsOneWidget);
final handleTopLeft = tester.getTopLeft(handle);
final gesture = await tester.startGesture(
tester.getCenter(find.byIcon(Icons.drag_indicator)));
await tester.pump();
await gesture.moveBy(const Offset(0, -20));
await tester.pump();
final reported = ffi.input.mouseOffsets.single;
expect(reported.dx, moreOrLessEquals(handleTopLeft.dx - safeArea.dx));
expect(reported.dy, moreOrLessEquals(handleTopLeft.dy - safeArea.dy));
await gesture.up();
await tester.pumpWidget(const SizedBox());
await tester.pump();
});
}
@@ -1,27 +0,0 @@
import 'package:flutter_hbb/desktop/pages/desktop_setting_page.dart';
import 'package:flutter_hbb/generated_bridge.dart';
import 'package:flutter_hbb/models/platform_model.dart';
import 'package:flutter_test/flutter_test.dart';
class _Binding extends Fake implements RustdeskImpl {
final String sources;
_Binding(this.sources);
@override
String mainSupportedInputSource({dynamic hint}) => sources;
}
void main() {
test('Keyboard mode is hidden when only Input source 2 is available', () {
const source1 = '["Input source 1","input_source_1_tip"]';
const source2 = '["Input source 2","input_source_2_tip"]';
platformFFI.setBindingForTesting(_Binding('[$source2]'));
expect(shouldShowKeyboardModeSetting(), isFalse);
platformFFI.setBindingForTesting(_Binding('[$source1]'));
expect(shouldShowKeyboardModeSetting(), isTrue);
platformFFI.setBindingForTesting(_Binding('[$source1,$source2]'));
expect(shouldShowKeyboardModeSetting(), isTrue);
});
}
+1 -123
View File
@@ -2,12 +2,10 @@ import 'dart:async';
import 'dart:convert';
import 'package:dash_chat_2/dash_chat_2.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_hbb/common.dart' show SessionID;
import 'package:flutter_hbb/common/widgets/keyboard_shortcuts/shortcut_constants.dart';
import 'package:flutter_hbb/common/widgets/toolbar.dart';
import 'package:flutter_hbb/generated_bridge.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/models/chat_model.dart';
@@ -42,35 +40,6 @@ class _ChatBinding extends Fake implements RustdeskImpl {
}
}
class _ToolbarBinding extends _ChatBinding {
String option = '';
int voiceCallRequests = 0;
@override
Future<void> sessionRequestVoiceCall(
{required SessionID sessionId, dynamic hint}) async {
voiceCallRequests++;
}
@override
String mainGetBuildinOption({required String key, dynamic hint}) =>
key == option ? 'Y' : '';
@override
bool isDisableAccount({dynamic hint}) => false;
@override
int versionToNumber({required String v, dynamic hint}) => 1;
@override
int peerGetSessionsCount(
{required String id, required int connType, dynamic hint}) =>
1;
@override
String? sessionGetCommonSync(
{required SessionID sessionId,
required String key,
required String param,
dynamic hint}) =>
key == 'is_screenshot_supported' ? 'true' : null;
}
class _Chat extends ChatModel {
_Chat(FFI session) : super(WeakReference(session));
@@ -84,9 +53,6 @@ class _Chat extends ChatModel {
}
class _LegacyBinding extends _ChatBinding {
@override
String mainGetBuildinOption({required String key, dynamic hint}) => '';
final keys = <(String, bool, bool)>[];
@override
@@ -154,11 +120,9 @@ class _Session extends Fake implements FFI {
@override
late final _Chat chatModel = _Chat(this);
@override
late final ElevationModel elevationModel = ElevationModel(WeakReference(this));
@override
late ShortcutModel shortcutModel;
@override
ConnType connType = ConnType.defaultConn;
ConnType get connType => ConnType.defaultConn;
}
void main() {
@@ -225,92 +189,6 @@ void main() {
}
}
for (final (option, label) in [
(kOptionHideToolbarOsPassword, 'OS Password'),
(kOptionHideToolbarSendClipboardKeystrokes, 'Send clipboard keystrokes'),
(kOptionHideToolbarViewCamera, 'View camera'),
(kOptionHideToolbarTerminal, 'Terminal (beta)'),
(kOptionHideToolbarTcpTunneling, 'TCP tunneling'),
]) {
testWidgets('hiding $label leaves file transfer available', (tester) async {
final binding = _ToolbarBinding();
platformFFI.setBindingForTesting(binding);
Future<void> showControls() => tester.pumpWidget(MaterialApp(
home: Builder(builder: (context) {
return Column(children: [
for (final item in toolbarControls(context, session.id, session))
item.getChild(),
]);
}),
));
await showControls();
expect(find.text(label), findsOneWidget);
binding.option = option;
await showControls();
expect(find.text(label), findsNothing);
expect(find.text('Transfer file'), findsOneWidget);
});
}
for (final (option, action) in [
(kOptionHideToolbarSwitchSides, kShortcutActionSwitchSides),
(kOptionHideToolbarScreenshot, kShortcutActionScreenshot),
]) {
testWidgets('hiding $action removes its menu entry', (tester) async {
final binding = _ToolbarBinding();
platformFFI.setBindingForTesting(binding);
await tester.pumpWidget(const SizedBox());
final context = tester.element(find.byType(SizedBox));
bool hasEntry() => toolbarControls(context, session.id, session)
.any((item) => item.actionId == action);
expect(hasEntry(), isTrue);
binding.option = option;
expect(hasEntry(), isFalse);
if (action == kShortcutActionScreenshot) {
session.connType = ConnType.viewCamera;
expect(hasEntry(), isFalse);
binding.option = '';
expect(hasEntry(), isTrue);
}
});
}
for (final (option, action) in [
(kOptionHideToolbarDisplaySettings, kShortcutActionToggleMute),
(kOptionHideToolbarKeyboardSettings, kShortcutActionKeyboardModeMap),
]) {
test('$option blocks $action but allows text chat',
() async {
final binding = _ToolbarBinding();
platformFFI.setBindingForTesting(binding);
final calls = <String>[];
model.register(action, () => calls.add(action));
model.register(kShortcutActionToggleChat, () => calls.add('chat'));
model.onTriggered(action);
await pumpEventQueue();
binding.option = option;
model.onTriggered(action);
model.onTriggered(kShortcutActionToggleChat);
await pumpEventQueue();
expect(calls, [action, 'chat']);
});
}
test('the voice call shortcut respects the toolbar option', () async {
final binding = _ToolbarBinding();
platformFFI.setBindingForTesting(binding);
registerSessionShortcutActions(session);
model.onTriggered(kShortcutActionToggleVoiceCall);
await pumpEventQueue();
expect(binding.voiceCallRequests, 1);
binding.option = kOptionHideToolbarVoiceCall;
model.onTriggered(kShortcutActionToggleVoiceCall);
await pumpEventQueue();
expect(binding.voiceCallRequests, 1);
});
test('fresh Chat shortcut sends through its outgoing session', () async {
final binding = _ChatBinding();
platformFFI.setBindingForTesting(binding);
@@ -1,68 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/generated_bridge.dart';
import 'package:flutter_hbb/models/platform_model.dart';
import 'package:flutter_test/flutter_test.dart';
class _Binding extends Fake implements RustdeskImpl {
@override
String translate(
{required String name, required String locale, dynamic hint}) =>
name;
@override
String mainGetLocalOption({required String key, dynamic hint}) => '';
@override
String getLocalFlutterOption({required String k, dynamic hint}) => '';
@override
bool isDisableAb({dynamic hint}) => false;
@override
bool isDisableAccount({dynamic hint}) => false;
@override
bool isDisableGroupPanel({dynamic hint}) => false;
@override
Future<void> sessionOnWaitingForImageDialogShow(
{required SessionID sessionId, dynamic hint}) async {}
@override
Future<void> sessionInputOsPassword(
{required SessionID sessionId,
required String value,
dynamic hint}) async {}
}
void main() {
setUpAll(() async {
isTest = true;
platformFFI.setBindingForTesting(_Binding());
await initGlobalFFI();
});
// A reconnect to an already selected Windows session reports the wait twice.
testWidgets('no waiting dialog is left after a repeated wait is dismissed',
(tester) async {
await tester.pumpWidget(MaterialApp(
navigatorKey: globalKey,
home: const Scaffold(),
));
final model = gFFI.ffiModel;
model.waitForFirstImage.value = true;
for (var i = 0; i < 2; i++) {
model.showConnectedWaitingForImage(gFFI.dialogManager, gFFI.sessionId,
'success', 'Successful', kMsgboxTextWaitingForImage);
}
await tester.pump();
expect(find.text(kMsgboxTextWaitingForImage), findsWidgets);
// Both the first frame and leaving the remote page end in dismissAll().
gFFI.dialogManager.dismissAll();
await tester.pump(const Duration(seconds: 2));
expect(find.text(kMsgboxTextWaitingForImage), findsNothing);
});
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

-32
View File
@@ -16,7 +16,6 @@ pub const OPTION_ENABLE_REMOTE_PRINTER: &str = "enable-remote-printer";
pub const OPTION_DISABLE_CLIPBOARD: &str = "disable_clipboard";
pub const OPTION_LOCK_AFTER_SESSION_END: &str = "lock_after_session_end";
pub const OPTION_PRIVACY_MODE: &str = "privacy_mode";
pub const OPTION_REG_RECOVERY: &str = "reg_recovery";
pub const OPTION_TOUCH_MODE: &str = "touch-mode";
pub const OPTION_SYNC_INIT_CLIPBOARD: &str = "sync-init-clipboard";
pub const OPTION_THEME: &str = "theme";
@@ -76,7 +75,6 @@ pub const OPTION_VERIFICATION_METHOD: &str = "verification-method";
pub const OPTION_TEMPORARY_PASSWORD_LENGTH: &str = "temporary-password-length";
pub const OPTION_CUSTOM_RENDEZVOUS_SERVER: &str = "custom-rendezvous-server";
pub const OPTION_API_SERVER: &str = "api-server";
pub const OPTION_API_IDLE_HEARTBEAT_INTERVAL_SECONDS: &str = "api-idle-heartbeat-interval-seconds";
pub const OPTION_KEY: &str = "key";
pub const OPTION_PRESET_ADDRESS_BOOK_NAME: &str = "preset-address-book-name";
pub const OPTION_PRESET_ADDRESS_BOOK_TAG: &str = "preset-address-book-tag";
@@ -91,7 +89,6 @@ pub const OPTION_ENABLE_ANDROID_SOFTWARE_ENCODING_HALF_SCALE: &str =
"enable-android-software-encoding-half-scale";
pub const OPTION_ENABLE_TRUSTED_DEVICES: &str = "enable-trusted-devices";
pub const OPTION_TRUSTED_DEVICE_EXPIRATION: &str = "trusted-device-expiration-days";
pub const OPTION_ALLOW_DRM_CAPTURE: &str = "allow-drm-capture";
pub const OPTION_AV1_TEST: &str = "av1-test";
/// Maximum number of files allowed during a single file transfer request.
///
@@ -126,18 +123,6 @@ pub const OPTION_HIDE_PROXY_SETTINGS: &str = "hide-proxy-settings";
pub const OPTION_HIDE_REMOTE_PRINTER_SETTINGS: &str = "hide-remote-printer-settings";
pub const OPTION_HIDE_WEBSOCKET_SETTINGS: &str = "hide-websocket-settings";
pub const OPTION_HIDE_STOP_SERVICE: &str = "hide-stop-service";
pub const OPTION_HIDE_ACCOUNT_PASSWORD_LOGIN: &str = "hide-account-password-login";
pub const OPTION_HIDE_TOOLBAR_OS_PASSWORD: &str = "hide-toolbar-os-password";
pub const OPTION_HIDE_TOOLBAR_SEND_CLIPBOARD_KEYSTROKES: &str =
"hide-toolbar-send-clipboard-keystrokes";
pub const OPTION_HIDE_TOOLBAR_VIEW_CAMERA: &str = "hide-toolbar-view-camera";
pub const OPTION_HIDE_TOOLBAR_TERMINAL: &str = "hide-toolbar-terminal";
pub const OPTION_HIDE_TOOLBAR_TCP_TUNNELING: &str = "hide-toolbar-tcp-tunneling";
pub const OPTION_HIDE_TOOLBAR_SWITCH_SIDES: &str = "hide-toolbar-switch-sides";
pub const OPTION_HIDE_TOOLBAR_SCREENSHOT: &str = "hide-toolbar-screenshot";
pub const OPTION_HIDE_TOOLBAR_VOICE_CALL: &str = "hide-toolbar-voice-call";
pub const OPTION_HIDE_TOOLBAR_DISPLAY_SETTINGS: &str = "hide-toolbar-display-settings";
pub const OPTION_HIDE_TOOLBAR_KEYBOARD_SETTINGS: &str = "hide-toolbar-keyboard-settings";
pub const OPTION_QUIT_BUTTON_TEXT: &str = "quit-button-text";
pub const OPTION_ALLOW_COMMAND_LINE_SETTINGS_WHEN_SETTINGS_DISABLED: &str =
"allow-command-line-settings-when-settings-disabled";
@@ -175,7 +160,6 @@ pub const OPTION_FLUTTER_CURRENT_AB_NAME: &str = "current-ab-name";
pub const OPTION_ALLOW_REMOTE_CM_MODIFICATION: &str = "allow-remote-cm-modification";
pub const OPTION_ALLOW_SYNC_CLIPBOARD_BETWEEN_SESSIONS: &str =
"allow-sync-clipboard-between-sessions";
pub const OPTION_ALLOW_UNICODE_INPUT: &str = "allow-unicode-input";
pub const OPTION_PRINTER_INCOMING_JOB_ACTION: &str = "printer-incomming-job-action";
pub const OPTION_PRINTER_ALLOW_AUTO_PRINT: &str = "allow-printer-auto-print";
@@ -201,8 +185,6 @@ pub const OPTION_DISABLE_GROUP_PANEL: &str = "disable-group-panel";
pub const OPTION_DISABLE_DISCOVERY_PANEL: &str = "disable-discovery-panel";
pub const OPTION_PRE_ELEVATE_SERVICE: &str = "pre-elevate-service";
pub const IPC_PRESERVED_KEYS: &[&str] = &[OPTION_REG_RECOVERY];
// DEFAULT_DISPLAY_SETTINGS, OVERWRITE_DISPLAY_SETTINGS
pub const KEYS_DISPLAY_SETTINGS: &[&str] = &[
OPTION_VIEW_ONLY,
@@ -226,7 +208,6 @@ pub const KEYS_DISPLAY_SETTINGS: &[&str] = &[
OPTION_USE_ALL_MY_DISPLAYS_FOR_THE_REMOTE_SESSION,
OPTION_VIEW_STYLE,
OPTION_TERMINAL_PERSISTENT,
OPTION_KEYBOARD_MODE,
OPTION_SCROLL_STYLE,
OPTION_EDGE_SCROLL_EDGE_THICKNESS,
OPTION_IMAGE_QUALITY,
@@ -330,7 +311,6 @@ pub const KEYS_SETTINGS: &[&str] = &[
OPTION_PROXY_PASSWORD,
OPTION_CUSTOM_RENDEZVOUS_SERVER,
OPTION_API_SERVER,
OPTION_API_IDLE_HEARTBEAT_INTERVAL_SECONDS,
OPTION_KEY,
OPTION_ALLOW_WEBSOCKET,
OPTION_WEBSOCKET_PORT,
@@ -354,7 +334,6 @@ pub const KEYS_SETTINGS: &[&str] = &[
OPTION_ALLOW_AUTO_UPDATE,
OPTION_ALLOW_KCP_CC,
OPTION_ALLOW_WEBRTC_CC,
OPTION_ALLOW_DRM_CAPTURE,
];
// BUILDIN_SETTINGS
@@ -373,17 +352,6 @@ pub const KEYS_BUILDIN_SETTINGS: &[&str] = &[
OPTION_HIDE_REMOTE_PRINTER_SETTINGS,
OPTION_HIDE_WEBSOCKET_SETTINGS,
OPTION_HIDE_STOP_SERVICE,
OPTION_HIDE_ACCOUNT_PASSWORD_LOGIN,
OPTION_HIDE_TOOLBAR_OS_PASSWORD,
OPTION_HIDE_TOOLBAR_SEND_CLIPBOARD_KEYSTROKES,
OPTION_HIDE_TOOLBAR_VIEW_CAMERA,
OPTION_HIDE_TOOLBAR_TERMINAL,
OPTION_HIDE_TOOLBAR_TCP_TUNNELING,
OPTION_HIDE_TOOLBAR_SWITCH_SIDES,
OPTION_HIDE_TOOLBAR_SCREENSHOT,
OPTION_HIDE_TOOLBAR_VOICE_CALL,
OPTION_HIDE_TOOLBAR_DISPLAY_SETTINGS,
OPTION_HIDE_TOOLBAR_KEYBOARD_SETTINGS,
OPTION_HIDE_USERNAME_ON_CARD,
OPTION_HIDE_HELP_CARDS,
OPTION_DEFAULT_CONNECT_PASSWORD,
+1 -21
View File
@@ -1667,8 +1667,7 @@ pub fn is_write_need_confirmation(
// We decide to give the decision whether to override the existing file to users,
// which obey the behavior of the file manager in our system.
let mut is_identical = false;
// The peer's digest only carries whole seconds (see `get_current_digest()`).
if remote_mt.as_secs() == local_mt.as_secs() && digest.file_size == metadata.len() {
if remote_mt == local_mt && digest.file_size == metadata.len() {
is_identical = true;
}
Ok(DigestCheckResult::NeedConfirm(FileTransferDigest {
@@ -1919,25 +1918,6 @@ mod tests {
assert!(dst.exists());
}
#[test]
fn write_confirmation_compares_modified_time_in_seconds() {
let tmp_root = TestTempDir::new("rustdesk_digest_secs");
std::fs::create_dir_all(&tmp_root.path).expect("create temp dir");
let file = tmp_root.join("same.txt");
std::fs::write(&file, b"content").expect("create file");
let mtime = filetime::FileTime::from_unix_time(1_700_000_000, 500_000_000);
filetime::set_file_mtime(&file, mtime).expect("set mtime");
let digest = FileTransferDigest {
last_modified: 1_700_000_000,
file_size: 7,
..Default::default()
};
assert!(matches!(
is_write_need_confirmation(false, &file.to_string_lossy(), &digest).unwrap(),
DigestCheckResult::NeedConfirm(d) if d.is_identical
));
}
#[test]
fn compressed_file_extensions_ignore_case() {
// Cameras and phones name their photos IMG_0001.JPG.
@@ -3,8 +3,6 @@ mod paste_observer;
mod paste_task;
pub mod pasteboard_context;
pub use pasteboard_context::has_rustdesk_file_url_owner;
pub fn should_handle_msg(msg: &crate::ClipboardFile) -> bool {
matches!(
msg,
@@ -29,7 +29,6 @@ lazy_static::lazy_static! {
}
pub const TEMP_FILE_PREFIX: &str = ".rustdesk_";
const RUSTDESK_FILE_URL_OWNER_TYPE: &str = "com.rustdesk.file-url-owner";
#[derive(Default, Debug, Clone, PartialEq)]
pub(super) struct PasteObserverInfo {
@@ -294,10 +293,6 @@ impl PasteboardContext {
)]);
let item = objc2_app_kit::NSPasteboardItem::new();
item.setDataProvider_forTypes(&ProtocolObject::from_id(provider), &types);
item.setString_forType(
&NSString::from_str(""),
&NSString::from_str(RUSTDESK_FILE_URL_OWNER_TYPE),
);
self.pasteboard.clearContents();
if !self
.pasteboard
@@ -435,82 +430,3 @@ pub fn create_pasteboard_context() -> ResultType<Box<PasteboardContext>> {
context.init();
Ok(context)
}
pub fn has_rustdesk_file_url_owner() -> bool {
autoreleasepool(|_| unsafe {
let Some(pasteboard): Option<Id<NSPasteboard>> =
msg_send_id![NSPasteboard::class(), generalPasteboard]
else {
return false;
};
let Some(items) = pasteboard.pasteboardItems() else {
return false;
};
items.iter().any(|item| {
item.types()
.iter()
.any(|ty| ty.to_string() == RUSTDESK_FILE_URL_OWNER_TYPE)
})
})
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn ownership_check_skips_lazy_provider_until_external_read() {
struct TempFileGuard(String);
impl Drop for TempFileGuard {
fn drop(&mut self) {
if let Err(e) = std::fs::remove_file(&self.0) {
eprintln!("failed to remove temp file {}: {e}", self.0);
}
}
}
let pasteboard: Option<Id<NSPasteboard>> =
unsafe { msg_send_id![NSPasteboard::class(), generalPasteboard] };
let pasteboard = pasteboard.expect("failed to get general pasteboard");
let (tx, rx) = channel();
let (tx_paste_task, rx_paste_task) = channel();
let context = PasteboardContext {
pasteboard: pasteboard.clone(),
observer: Arc::new(Mutex::new(PasteObserver::new())),
tx_handle: Some(ContextInfo {
tx,
handle: thread::spawn(|| {}),
}),
tx_remove_file: None,
remove_file_handle: None,
tx_paste_task,
paste_task: Arc::new(Mutex::new(PasteTask::new(rx_paste_task))),
};
let before_count = PasteboardContext::temp_files_count();
autoreleasepool(|_| {
context
.set_clipboard_item(context.tx_handle.as_ref().unwrap(), 9, 7)
.unwrap();
});
assert!(has_rustdesk_file_url_owner());
assert!(
rx.try_recv().is_err(),
"ownership check must not invoke lazy file-url provider"
);
assert_eq!(PasteboardContext::temp_files_count(), before_count);
let url = unsafe { pasteboard.stringForType(NSPasteboardTypeFileURL) }
.expect("external read should resolve lazy file URL")
.to_string();
let task_info = rx
.try_recv()
.expect("external read should notify provider channel")
.expect("provider should create placeholder file");
let _guard = TempFileGuard(task_info.source_path.clone());
assert!(url.ends_with(&task_info.source_path));
assert!(Path::new(&task_info.source_path).exists());
}
}
Loaded 100 of 214 files, more files were not shown because too many files have changed in this diff. Show more