mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-12-04 15:46:07 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fca07adfae | ||
|
|
624cd23a07 |
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"
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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: |
|
||||
|
||||
@@ -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
|
||||
+324
-581
File diff suppressed because it is too large.
Load diff
@@ -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
|
||||
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
@@ -80,12 +80,6 @@ workspace member. `base::config::keys` re-exports the handful of keys
|
||||
* Web bridge (committed): edit `flutter/lib/web/bridge.dart` directly. Follow the existing patterns there for `SyncReturn<T>` / `Future<T>` and the `dart:js` glue.
|
||||
* Native bridge (`flutter/lib/generated_bridge.dart`, `src/bridge_generated.rs`, `src/bridge_generated.io.rs`): these are gitignored and regenerated by the project's CI codegen. Manually editing them locally is fine for development testing, but those edits do not persist into commits.
|
||||
|
||||
## Android JNI
|
||||
|
||||
* Custom clients move the Kotlin classes out of `com.carriez.flutter_hbb` into their own package; only the `ffi` package keeps its name. A `Java_com_carriez_flutter_1hbb_*` export therefore does not link there and the app crashes with `UnsatisfiedLinkError`.
|
||||
* Declare every `external fun` in `ffi.FFI` (`flutter/android/app/src/main/kotlin/ffi.kt`) and export it from Rust as `Java_ffi_FFI_*`. A class elsewhere that needs one calls it through `FFI`.
|
||||
* From Rust, reach app classes only through objects Kotlin passed in (`call_method` on a `GlobalRef`), never by a class name such as `find_class("com/carriez/...")`. Mark each Kotlin method Rust calls this way `@Keep`, or R8 renames it in release builds and the call fails with `NoSuchMethodError`.
|
||||
|
||||
## Web (Flutter Web) Architecture
|
||||
|
||||
Flutter Web in this repo is **not** "Dart compiled to JS via Flutter alone". The runtime is split:
|
||||
@@ -193,8 +187,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
+19
-20
@@ -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",
|
||||
@@ -3724,7 +3724,7 @@ dependencies = [
|
||||
"url",
|
||||
"users",
|
||||
"uuid",
|
||||
"webpki-roots 1.0.12",
|
||||
"webpki-roots 1.0.11",
|
||||
"webrtc",
|
||||
"whoami",
|
||||
"x11 2.21.0",
|
||||
@@ -3922,7 +3922,7 @@ dependencies = [
|
||||
"tokio",
|
||||
"tokio-rustls",
|
||||
"tower-service",
|
||||
"webpki-roots 1.0.12",
|
||||
"webpki-roots 1.0.11",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -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",
|
||||
@@ -6916,7 +6916,7 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
"webpki-roots 1.0.12",
|
||||
"webpki-roots 1.0.11",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -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",
|
||||
@@ -9540,14 +9539,14 @@ version = "0.26.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
|
||||
dependencies = [
|
||||
"webpki-roots 1.0.12",
|
||||
"webpki-roots 1.0.11",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "1.0.12"
|
||||
version = "1.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7265c9301c16a8711c992c2d8da90ee77ef54b1ed51482d6dfeb00dc756b1297"
|
||||
checksum = "f5f280bbb2b287bc8e7de7e3852945a0ff50d1bbcb5ed42b6c7a568c546df171"
|
||||
dependencies = [
|
||||
"rustls-pki-types",
|
||||
]
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<a href="#how-to-build-with-docker">Docker</a> •
|
||||
<a href="#file-structure">Structure</a> •
|
||||
<a href="#screenshots">Screenshots</a><br>
|
||||
[<a href="docs/README-UA.md">Українська</a>] | [<a href="docs/README-CS.md">česky</a>] | [<a href="docs/README-ZH.md">中文</a>] | [<a href="docs/README-HU.md">Magyar</a>] | [<a href="docs/README-ES.md">Español</a>] | [<a href="docs/README-FA.md">فارسی</a>] | [<a href="docs/README-FR.md">Français</a>] | [<a href="docs/README-DE.md">Deutsch</a>] | [<a href="docs/README-PL.md">Polski</a>] | [<a href="docs/README-ID.md">Indonesian</a>] | [<a href="docs/README-FI.md">Suomi</a>] | [<a href="docs/README-ML.md">മലയാളം</a>] | [<a href="docs/README-JP.md">日本語</a>] | [<a href="docs/README-NL.md">Nederlands</a>] | [<a href="docs/README-IT.md">Italiano</a>] | [<a href="docs/README-RU.md">Русский</a>] | [<a href="docs/README-PTPT.md">Português (Portugal)</a>] | [<a href="docs/README-PTBR.md">Português (Brasil)</a>] | [<a href="docs/README-EO.md">Esperanto</a>] | [<a href="docs/README-KR.md">한국어</a>] | [<a href="docs/README-AR.md">العربي</a>] | [<a href="docs/README-VN.md">Tiếng Việt</a>] | [<a href="docs/README-DA.md">Dansk</a>] | [<a href="docs/README-GR.md">Ελληνικά</a>] | [<a href="docs/README-TR.md">Türkçe</a>] | [<a href="docs/README-NO.md">Norsk</a>] | [<a href="docs/README-RO.md">Română</a>] | [<a href="docs/README-KA.md">ქართული</a>]<br>
|
||||
[<a href="docs/README-UA.md">Українська</a>] | [<a href="docs/README-CS.md">česky</a>] | [<a href="docs/README-ZH.md">中文</a>] | [<a href="docs/README-HU.md">Magyar</a>] | [<a href="docs/README-ES.md">Español</a>] | [<a href="docs/README-FA.md">فارسی</a>] | [<a href="docs/README-FR.md">Français</a>] | [<a href="docs/README-DE.md">Deutsch</a>] | [<a href="docs/README-PL.md">Polski</a>] | [<a href="docs/README-ID.md">Indonesian</a>] | [<a href="docs/README-FI.md">Suomi</a>] | [<a href="docs/README-ML.md">മലയാളം</a>] | [<a href="docs/README-JP.md">日本語</a>] | [<a href="docs/README-NL.md">Nederlands</a>] | [<a href="docs/README-IT.md">Italiano</a>] | [<a href="docs/README-RU.md">Русский</a>] | [<a href="docs/README-PTPT.md">Português (Portugal)</a>] | [<a href="docs/README-PTBR.md">Português (Brasil)</a>] | [<a href="docs/README-EO.md">Esperanto</a>] | [<a href="docs/README-KR.md">한국어</a>] | [<a href="docs/README-AR.md">العربي</a>] | [<a href="docs/README-VN.md">Tiếng Việt</a>] | [<a href="docs/README-DA.md">Dansk</a>] | [<a href="docs/README-GR.md">Ελληνικά</a>] | [<a href="docs/README-TR.md">Türkçe</a>] | [<a href="docs/README-NO.md">Norsk</a>] | [<a href="docs/README-RO.md">Română</a>]<br>
|
||||
<b>We need your help to translate this README, <a href="https://github.com/rustdesk/rustdesk/tree/master/src/lang">RustDesk UI</a> and <a href="https://github.com/rustdesk/doc.rustdesk.com">RustDesk Doc</a> to your native language</b>
|
||||
</p>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
@@ -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
|
||||
|
||||
@@ -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-----
|
||||
@@ -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)
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
@@ -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` オプションを使います。
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ RustDesk 또는 그 종속성에 대한 기여는 GitHub 풀 리퀘스트 형태
|
||||
- 커밋은 가능한 한 작아야 하지만, 각 커밋이 독립적으로 올바른지 확인
|
||||
해야 합니다 (즉, 각 커밋은 컴파일되어 테스트를 통과해야 함).
|
||||
|
||||
- 커밋에는 개발자 출처 증명서 (https://developercertificate.org)
|
||||
- 커밋에는 개발자 출처 증명서 (http://developercertificate.org)
|
||||
서명이 첨부되어야 하며, 이는 귀하 (및 해당되는 경우 고용주)가
|
||||
[프로젝트 라이선스](../LICENCE). 조건에 구속되는 데 동의한다는 것을 나타냅니다.
|
||||
git에서는 `git commit`에 `-s` 옵션입니다
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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`.
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ RustDesk приветствует вклад каждого.
|
||||
коммит является независимо правильным (т.е., каждый коммит должен компилироваться и проходить тесты).
|
||||
|
||||
- Коммиты должны сопровождаться подписью `Developer Certificate of Origin`
|
||||
(https://developercertificate.org), которая укажет на то, что вы (и ваш работодатель,
|
||||
(http://developercertificate.org), которая укажет на то, что вы (и ваш работодатель,
|
||||
если это применимо) согласны соблюдать условия [лицензии проекта](../LICENCE).
|
||||
В `git` это флаг `-s` при использовании `git commit`
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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)的方式请求审核。
|
||||
|
||||
|
||||
@@ -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
@@ -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) :تواصل معنا عبر
|
||||
|
||||
[](https://rustdesk.com/pricing.html)
|
||||
[](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).
|
||||
|
||||

|
||||
|
||||
يرحّب 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 وبيئة بناء ‎C++‎.
|
||||
- ثبّت [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>`. على سبيل المثال، لبناء إصدار محسّن للأداء، أضف ‎<code>--release</code>‎ إلى نهاية الأمر السابق. سيتوفر الملف التنفيذي الناتج داخل مجلد `target` على جهازك، ويمكن تشغيله بالأمر:
|
||||
لاحظ أن البناء الأول قد يستغرق وقتًا أطول قبل تخزين التبعيات، وسيكون البناء اللاحق أسرع. بالإضافة إلى ذلك، إذا كنت بحاجة إلى تحديد وسائط مختلفة لأمر البناء، فيمكنك القيام بذلك في نهاية الأمر بوضع
|
||||
`<OPTIONAL-ARGS>`
|
||||
على سبيل المثال، إذا كنت ترغب في بناء إصدار محسن، فستقوم بتشغيل الأمر أعلاه متبوعًا بـ
|
||||
`--release`
|
||||
:سيكون الملف القابل للتنفيذ الناتج متاحًا في مجلد تارغت، ويمكن تشغيله باستخدام
|
||||
|
||||
```sh
|
||||
target/debug/rustdesk
|
||||
```
|
||||
|
||||
أما إذا بنيت إصدارًا باستخدام ‎<code>--release</code>‎، فيمكنك تشغيله بالأمر:
|
||||
:أو في حال قمت ببناء إصدار محسن
|
||||
|
||||
```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)**: رمز الهاتف المحمول
|
||||
|
||||

|
||||
## لقطات
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
+1
-1
@@ -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
@@ -13,7 +13,7 @@ Chat med os: [Discord](https://discord.gg/nDceKgxnkV) | [Twitter](https://twitte
|
||||
|
||||
[](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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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ä
|
||||
|
||||
+47
-76
@@ -1,84 +1,55 @@
|
||||
<p align="center">
|
||||
<img src="../res/logo-header.svg" alt="RustDesk - Votre bureau à distance"><br>
|
||||
<a href="#étapes-de-compilation-de-base">Compilation</a> •
|
||||
<a href="#comment-compiler-avec-docker">Docker</a> •
|
||||
<a href="#structure-du-projet">Structure</a> •
|
||||
<a href="#captures-décran">Captures d'écran</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-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>Nous avons besoin de votre aide pour traduire ce README, l'<a href="https://github.com/rustdesk/rustdesk/tree/master/src/lang">interface de RustDesk</a> et la <a href="https://github.com/rustdesk/doc.rustdesk.com">documentation de RustDesk</a> dans votre langue maternelle</b>
|
||||
<img src="../res/logo-header.svg" alt="RustDesk - Your remote desktop"><br>
|
||||
<a href="#serveurs-publics-libres">Serveurs</a> -
|
||||
<a href="#étapes-brutes-de-la-compilationbuild">Build</a> -
|
||||
<a href="#comment-construire-avec-docker">Docker</a> -
|
||||
<a href="#structure-du-projet">Structure</a> -
|
||||
<a href="#images">Images</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-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-AR.md">العربي</a>] | [<a href="README-VN.md">Tiếng Việt</a>] | [<a href="README-GR.md">Ελληνικά</a>]<br>
|
||||
<b>Nous avons besoin de votre aide pour traduire ce README dans votre langue maternelle</b>.
|
||||
</p>
|
||||
|
||||
> [!Caution]
|
||||
> **Avertissement contre l'utilisation abusive :** <br>
|
||||
> Les développeurs de RustDesk ne cautionnent ni ne soutiennent aucune utilisation contraire à l'éthique ou illégale de ce logiciel. Toute utilisation abusive, telle que l'accès ou le contrôle non autorisé, ou l'atteinte à la vie privée, est strictement contraire à nos règles. Les auteurs ne sont pas responsables de l'utilisation abusive de l'application.
|
||||
Chattez avec nous : [Discord](https://discord.gg/nDceKgxnkV) | [Twitter](https://twitter.com/rustdesk) | [Reddit](https://www.reddit.com/r/rustdesk) | [YouTube](https://www.youtube.com/@rustdesk)
|
||||
|
||||
[](https://rustdesk.com/pricing.html)
|
||||
|
||||
Discutez avec nous : [Discord](https://discord.gg/nDceKgxnkV) | [Twitter](https://twitter.com/rustdesk) | [Reddit](https://www.reddit.com/r/rustdesk) | [YouTube](https://www.youtube.com/@rustdesk)
|
||||
Encore un autre logiciel de bureau à distance, écrit en Rust. Fonctionne directement, aucune configuration n'est nécessaire. Vous avez le contrôle total de vos données, sans aucun souci de sécurité. Vous pouvez utiliser notre serveur de rendez-vous/relais, [configurer le vôtre](https://rustdesk.com/server), ou [écrire votre propre serveur de rendez-vous/relais](https://github.com/rustdesk/rustdesk-server-demo).
|
||||
|
||||
[](https://rustdesk.com/pricing.html)
|
||||
RustDesk accueille les contributions de tout le monde. Voir [`docs/CONTRIBUTING.md`](CONTRIBUTING.md) pour plus d'informations.
|
||||
|
||||
Encore une solution de bureau à distance, écrite en Rust. Elle fonctionne immédiatement, sans aucune configuration. Vous gardez le contrôle total de vos données, sans souci de sécurité. Vous pouvez utiliser notre serveur de rendez-vous/relais, [installer le vôtre](https://rustdesk.com/server) ou [écrire votre propre serveur de rendez-vous/relais](https://github.com/rustdesk/rustdesk-server-demo).
|
||||
|
||||

|
||||
|
||||
RustDesk accueille les contributions de tout le monde. Consultez [CONTRIBUTING-FR.md](CONTRIBUTING-FR.md) pour bien démarrer.
|
||||
|
||||
[**FAQ**](https://github.com/rustdesk/rustdesk/wiki/FAQ)
|
||||
|
||||
[**TÉLÉCHARGER LES BINAIRES**](https://github.com/rustdesk/rustdesk/releases)
|
||||
|
||||
[**VERSION NIGHTLY**](https://github.com/rustdesk/rustdesk/releases/tag/nightly)
|
||||
|
||||
[<img src="https://f-droid.org/badge/get-it-on-fr.png"
|
||||
alt="Disponible sur F-Droid"
|
||||
height="80">](https://f-droid.org/fr/packages/com.carriez.flutter_hbb)
|
||||
[<img src="https://flathub.org/api/badge?svg&locale=fr"
|
||||
alt="Disponible sur Flathub"
|
||||
height="80">](https://flathub.org/apps/com.rustdesk.RustDesk)
|
||||
[**TÉLÉCHARGEMENT BINAIRE**](https://github.com/rustdesk/rustdesk/releases)
|
||||
|
||||
## Dépendances
|
||||
|
||||
Les versions de bureau utilisent Flutter ou Sciter (obsolète) pour l'interface graphique. Ce tutoriel ne concerne que Sciter, plus simple et plus accessible pour débuter. Consultez notre [CI](https://github.com/rustdesk/rustdesk/blob/master/.github/workflows/flutter-build.yml) pour compiler la version Flutter.
|
||||
|
||||
Veuillez télécharger vous-même la bibliothèque dynamique Sciter.
|
||||
Les versions de bureau utilisent [sciter](https://sciter.com/) pour l'interface graphique, veuillez télécharger la bibliothèque dynamique sciter vous-même.
|
||||
|
||||
[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) |
|
||||
[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)
|
||||
|
||||
## Étapes de compilation de base
|
||||
## Étapes brutes de la compilation/build
|
||||
|
||||
- Préparez votre environnement de développement Rust et votre environnement de compilation C++
|
||||
- Préparez votre environnement de développement Rust et votre environnement de compilation C++.
|
||||
|
||||
- Installez [vcpkg](https://github.com/microsoft/vcpkg) et définissez correctement la variable d'environnement `VCPKG_ROOT`
|
||||
- Installez [vcpkg](https://github.com/microsoft/vcpkg), et définissez correctement la variable d'environnement `VCPKG_ROOT`.
|
||||
|
||||
- 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
|
||||
|
||||
- Lancez `cargo run`
|
||||
- Exécutez `cargo run`
|
||||
|
||||
## [Compilation](https://rustdesk.com/docs/fr/dev/build/)
|
||||
|
||||
## Comment compiler sous Linux
|
||||
## Comment compiler/build sous 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)
|
||||
@@ -99,7 +70,7 @@ export VCPKG_ROOT=$HOME/vcpkg
|
||||
vcpkg/vcpkg install libvpx libyuv opus aom
|
||||
```
|
||||
|
||||
### Corriger libvpx (pour Fedora)
|
||||
### Corriger libvpx (Pour Fedora)
|
||||
|
||||
```sh
|
||||
cd vcpkg/buildtrees/libvpx/src
|
||||
@@ -112,70 +83,70 @@ cp libvpx.a $HOME/vcpkg/installed/x64-linux/lib/
|
||||
cd
|
||||
```
|
||||
|
||||
### Compiler
|
||||
### Construire
|
||||
|
||||
```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
|
||||
cargo run
|
||||
```
|
||||
|
||||
## Comment compiler avec Docker
|
||||
## Comment construire avec Docker
|
||||
|
||||
Commencez par cloner le dépôt et construire le conteneur Docker :
|
||||
|
||||
```sh
|
||||
git clone https://github.com/rustdesk/rustdesk
|
||||
cd rustdesk
|
||||
git submodule update --init --recursive
|
||||
docker build -t "rustdesk-builder" .
|
||||
```
|
||||
|
||||
Ensuite, chaque fois que vous devez compiler l'application, exécutez la commande suivante :
|
||||
Ensuite, chaque fois que vous devez compiler le logiciel, exécutez la commande suivante :
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
Notez que la première compilation peut être plus longue, le temps de mettre les dépendances en cache ; les compilations suivantes seront plus rapides. Si vous devez passer d'autres arguments à la commande de compilation, ajoutez-les à la fin de la commande, à la position `<OPTIONAL-ARGS>`. Par exemple, pour compiler une version release optimisée, exécutez la commande ci-dessus suivie de `--release`. L'exécutable produit se trouve dans le dossier `target` de votre système et peut être lancé avec :
|
||||
Notez que la première compilation peut prendre plus de temps avant que les dépendances ne soient mises en cache, les compilations suivantes seront plus rapides. De plus, si vous devez spécifier différents arguments à la commande de compilation, vous pouvez le faire à la fin de la commande à la position `<OPTIONAL-ARGS>`. Par exemple, si vous voulez compiler une version de release optimisée, vous devez exécuter la commande ci-dessus suivie de `--release`. L'exécutable résultant sera disponible dans le dossier cible sur votre système, et peut être lancé avec :
|
||||
|
||||
```sh
|
||||
target/debug/rustdesk
|
||||
```
|
||||
|
||||
Ou, s'il s'agit d'un exécutable release :
|
||||
Ou, si vous exécutez un exécutable provenant d'une release :
|
||||
|
||||
```sh
|
||||
target/release/rustdesk
|
||||
```
|
||||
|
||||
Veillez à exécuter ces commandes depuis la racine du dépôt RustDesk, sinon l'application risque de ne pas trouver les ressources nécessaires. Notez également que les autres sous-commandes de cargo, comme `install` ou `run`, ne sont pas prises en charge par cette méthode : elles installeraient ou lanceraient le programme dans le conteneur et non sur l'hôte.
|
||||
Veuillez vous assurer que vous exécutez ces commandes à partir de la racine du dépôt RustDesk, sinon l'application ne pourra pas trouver les ressources requises. Notez également que les autres sous-commandes de cargo telles que `install` ou `run` ne sont pas actuellement supportées par cette méthode car elles installeraient ou exécuteraient le programme à l'intérieur du conteneur au lieu de l'hôte.
|
||||
|
||||
## 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/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/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)** : codec vidéo, config, wrapper tcp/udp, protobuf, fonctions fs pour le transfert de fichiers, et quelques autres fonctions utilitaires.
|
||||
- **[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
|
||||
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)** : copier-coller de fichiers pour Windows, Linux et macOS
|
||||
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)** : ancienne interface Sciter (obsolète)
|
||||
- **[src/server](https://github.com/rustdesk/rustdesk/tree/master/src/server)** : services audio, presse-papiers, entrées et vidéo, et connexions réseau
|
||||
- **[src/client.rs](https://github.com/rustdesk/rustdesk/tree/master/src/client.rs)** : établir une connexion avec un pair
|
||||
- **[src/rendezvous_mediator.rs](https://github.com/rustdesk/rustdesk/tree/master/src/rendezvous_mediator.rs)** : communiquer avec [rustdesk-server](https://github.com/rustdesk/rustdesk-server), attendre une connexion distante directe (TCP hole punching) ou relayée
|
||||
- **[src/platform](https://github.com/rustdesk/rustdesk/tree/master/src/platform)** : code spécifique à chaque plateforme
|
||||
- **[flutter](https://github.com/rustdesk/rustdesk/tree/master/flutter)** : code Flutter pour les versions de bureau et mobile
|
||||
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)** : contrôle clavier/souris spécifique à la plate-forme
|
||||
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)** : interface graphique
|
||||
- **[src/server](https://github.com/rustdesk/rustdesk/tree/master/src/server)** : services audio/clipboard/input/vidéo, et connexions réseau
|
||||
- **[src/client.rs](https://github.com/rustdesk/rustdesk/tree/master/src/client.rs)** : démarrer une connexion entre pairs
|
||||
- **[src/rendezvous_mediator.rs](https://github.com/rustdesk/rustdesk/tree/master/src/rendezvous_mediator.rs)** : Communiquer avec [rustdesk-server](https://github.com/rustdesk/rustdesk-server), attendre une connexion distante directe (TCP hole punching) ou relayée.
|
||||
- **[src/platform](https://github.com/rustdesk/rustdesk/tree/master/src/platform)** : code spécifique à la plateforme
|
||||
|
||||
## Captures d'écran
|
||||
> [!Attention]
|
||||
> **Avertissement contre l'utilisation abusive:** <br>
|
||||
> Les développeurs de RustDesk ne cautionnent ni ne soutiennent aucune utilisation non éthique ou illégale de ce logiciel. Toute utilisation abusive, telle que l'accès non autorisé, le contrôle ou l'invasion de la vie privée, est strictement contraire à nos directives. Les auteurs ne sont pas responsables de toute utilisation abusive de l'application.
|
||||
|
||||

|
||||
## Images
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
+1
-1
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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,182 +0,0 @@
|
||||
<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>]<br>
|
||||
<b>გვჭირდება თქვენი დახმარება ამ README-ის, <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>
|
||||
</p>
|
||||
|
||||
> [!Caution]
|
||||
> **პასუხისმგებლობის უარყოფა არასათანადო გამოყენებაზე:** <br>
|
||||
> RustDesk-ის შემქმნელები არ იწონებენ და არ უჭერენ მხარს ამ პროგრამის რაიმე არაეთიკურ ან უკანონო გამოყენებას. არასათანადო გამოყენება, როგორიცაა უნებართვო წვდომა, კონტროლი ან პირად ცხოვრებაში ჩარევა, მკაცრად ეწინააღმდეგება ჩვენს წესებს. ავტორები არ აგებენ პასუხს აპლიკაციის რაიმე არასათანადო გამოყენებაზე.
|
||||
|
||||
|
||||
მოგვწერეთ: [Discord](https://discord.gg/nDceKgxnkV) | [Twitter](https://twitter.com/rustdesk) | [Reddit](https://www.reddit.com/r/rustdesk) | [YouTube](https://www.youtube.com/@rustdesk)
|
||||
|
||||
[](https://rustdesk.com/pricing.html)
|
||||
|
||||
კიდევ ერთი დისტანციური სამუშაო მაგიდის პროგრამა, დაწერილი Rust-ზე. მუშაობს დაუყოვნებლივ, კონფიგურაციის გარეშე. თქვენ სრულად აკონტროლებთ თქვენს მონაცემებს და უსაფრთხოებაზე ფიქრი არ გიწევთ. შეგიძლიათ გამოიყენოთ ჩვენი rendezvous/relay სერვერი, [გამართოთ საკუთარი](https://rustdesk.com/server) ან [დაწეროთ საკუთარი rendezvous/relay სერვერი](https://github.com/rustdesk/rustdesk-server-demo).
|
||||
|
||||

|
||||
|
||||
RustDesk მიესალმება ყველას წვლილს. დასაწყებად იხილეთ [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
[**ხშირად დასმული კითხვები**](https://github.com/rustdesk/rustdesk/wiki/FAQ)
|
||||
|
||||
[**პროგრამის ჩამოტვირთვა**](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="Get it on 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="Get it on Flathub"
|
||||
height="80">](https://flathub.org/apps/com.rustdesk.RustDesk)
|
||||
|
||||
## დამოკიდებულებები
|
||||
|
||||
დესკტოპ ვერსიები გრაფიკული ინტერფეისისთვის იყენებს Flutter-ს ან Sciter-ს (მოძველებული). ეს სახელმძღვანელო მხოლოდ Sciter-ს ეხება, რადგან მასთან მუშაობის დაწყება უფრო მარტივი და მოსახერხებელია. Flutter ვერსიის ასაწყობად იხილეთ ჩვენი [CI](https://github.com/rustdesk/rustdesk/blob/master/.github/workflows/flutter-build.yml).
|
||||
|
||||
გთხოვთ, 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)
|
||||
|
||||
## აწყობის ძირითადი ნაბიჯები
|
||||
|
||||
- მოამზადეთ Rust-ის დეველოპმენტის გარემო და C++-ის აწყობის გარემო
|
||||
|
||||
- დააინსტალირეთ [vcpkg](https://github.com/microsoft/vcpkg) და სწორად მიუთითეთ გარემოს ცვლადი `VCPKG_ROOT`
|
||||
|
||||
- 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
|
||||
|
||||
- გაუშვით `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
|
||||
```
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
### Arch (Manjaro)
|
||||
|
||||
```sh
|
||||
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-ის ინსტალაცია
|
||||
|
||||
```sh
|
||||
git clone https://github.com/microsoft/vcpkg
|
||||
cd vcpkg
|
||||
git checkout 2023.04.15
|
||||
cd ..
|
||||
vcpkg/bootstrap-vcpkg.sh
|
||||
export VCPKG_ROOT=$HOME/vcpkg
|
||||
vcpkg/vcpkg install libvpx libyuv opus aom
|
||||
```
|
||||
|
||||
### libvpx-ის გასწორება (Fedora-სთვის)
|
||||
|
||||
```sh
|
||||
cd vcpkg/buildtrees/libvpx/src
|
||||
cd *
|
||||
./configure
|
||||
sed -i 's/CFLAGS+=-I/CFLAGS+=-fPIC -I/g' Makefile
|
||||
sed -i 's/CXXFLAGS+=-I/CXXFLAGS+=-fPIC -I/g' Makefile
|
||||
make
|
||||
cp libvpx.a $HOME/vcpkg/installed/x64-linux/lib/
|
||||
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
|
||||
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-კონტეინერის აწყობით:
|
||||
|
||||
```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>` პოზიციაზე. მაგალითად, თუ ოპტიმიზებული რელიზ-ვერსიის აწყობა გსურთ, გაუშვით ზემოთ მოცემული ბრძანება და ბოლოში მიუწერეთ `--release`. მიღებული შესრულებადი ფაილი თქვენს სისტემაში target საქაღალდეში იქნება ხელმისაწვდომი და მისი გაშვება ასე შეიძლება:
|
||||
|
||||
```sh
|
||||
target/debug/rustdesk
|
||||
```
|
||||
|
||||
ან, თუ რელიზის შესრულებად ფაილს უშვებთ:
|
||||
|
||||
```sh
|
||||
target/release/rustdesk
|
||||
```
|
||||
|
||||
გთხოვთ, დარწმუნდეთ, რომ ამ ბრძანებებს RustDesk-ის რეპოზიტორიის ძირეული საქაღალდიდან უშვებთ, წინააღმდეგ შემთხვევაში აპლიკაციამ შეიძლება ვერ იპოვოს საჭირო რესურსები. ასევე გაითვალისწინეთ, რომ cargo-ს სხვა ქვებრძანებები, როგორიცაა `install` ან `run`, ამ მეთოდით ამჟამად არ არის მხარდაჭერილი, რადგან ისინი პროგრამას დააინსტალირებდნენ ან გაუშვებდნენ კონტეინერის შიგნით და არა ჰოსტზე.
|
||||
|
||||
## ფაილების სტრუქტურა
|
||||
|
||||
- **[libs/hbb_common](https://github.com/rustdesk/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)**: კლავიატურის/მაუსის მართვა კონკრეტული პლატფორმისთვის
|
||||
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: ფაილების კოპირებისა და ჩასმის რეალიზაცია Windows-ის, Linux-ისა და macOS-ისთვის.
|
||||
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: ძველი Sciter 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)**: peer-კავშირის დაწყება
|
||||
- **[src/rendezvous_mediator.rs](https://github.com/rustdesk/rustdesk/tree/master/src/rendezvous_mediator.rs)**: კავშირი [rustdesk-server](https://github.com/rustdesk/rustdesk-server)-თან, ელოდება დისტანციურ პირდაპირ (TCP hole punching) ან რელეით გადაცემულ კავშირს
|
||||
- **[src/platform](https://github.com/rustdesk/rustdesk/tree/master/src/platform)**: პლატფორმაზე დამოკიდებული კოდი
|
||||
- **[flutter](https://github.com/rustdesk/rustdesk/tree/master/flutter)**: Flutter-ის კოდი დესკტოპისა და მობილურისთვის
|
||||
|
||||
## ეკრანის სურათები
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
+1
-1
@@ -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
@@ -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
@@ -13,7 +13,7 @@ Chat met ons: [Discord](https://discord.gg/nDceKgxnkV) | [Twitter](https://twitt
|
||||
|
||||
[](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
@@ -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
@@ -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
@@ -21,7 +21,7 @@ Mais uma solução de desktop remoto, escrita em Rust. Funciona imediatamente, s
|
||||
|
||||

|
||||
|
||||
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
@@ -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
@@ -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.
|
||||
|
||||
+5
-6
@@ -1,10 +1,10 @@
|
||||
<p align="center">
|
||||
<img src="../res/logo-header.svg" alt="RustDesk - Ваш удалённый рабочий стол"><br>
|
||||
<img src="../res/logo-header.svg" alt="RustDesk - Ваш удаленый рабочий стол"><br>
|
||||
<a href="#первичные-шаги-для-сборки">Первичные шаги для сборки</a> •
|
||||
<a href="#как-собрать-с-помощью-docker">Как собрать с помощью Docker</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-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>]<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-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-GR.md">Ελληνικά</a>]<br>
|
||||
<b>Нам нужна ваша помощь в переводе этого README, <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>
|
||||
</p>
|
||||
@@ -42,7 +42,7 @@ RustDesk приветствует вклад каждого. Ознакомьт
|
||||
|
||||
Для ПК-версии используются библиотеки Flutter или Sciter (устаревшее) для графического интерфейса. Данное руководство подразумевает работу с Sciter, так как он более простой в использовании и с ним легче начать работу. Вы можете также посмотреть на механизм нашего [CI](https://github.com/rustdesk/rustdesk/blob/master/.github/workflows/flutter-build.yml) для сборок на Flutter.
|
||||
|
||||
Загрузите динамическую библиотеку Sciter самостоятельно.
|
||||
Загрузите динамическую библиотеку Flutter самостоятельно.
|
||||
|
||||
[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) |
|
||||
@@ -160,8 +160,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
|
||||
|
||||
+1
-1
@@ -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
@@ -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
@@ -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
@@ -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 的文件复制和粘贴实现
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# Политика безопасности
|
||||
|
||||
## Сообщение об уязвимости
|
||||
|
||||
Мы очень серьёзно относимся к безопасности проекта и призываем всех пользователей сообщать нам о найденных уязвимостях.
|
||||
Если вы обнаружили уязвимость в проекте RustDesk, пожалуйста, сообщите о ней ответственно, отправив письмо на info@rustdesk.com.
|
||||
|
||||
На данный момент у нас нет программы вознаграждений за найденные уязвимости (bug bounty). Мы — небольшая команда, которая пытается решить большую задачу. Убедительно просим вас сообщать обо всех уязвимостях ответственно,
|
||||
чтобы мы могли и дальше создавать безопасное приложение для всего сообщества.
|
||||
@@ -7,7 +7,6 @@ import android.os.ParcelFileDescriptor
|
||||
import android.provider.DocumentsContract
|
||||
import android.provider.DocumentsContract.Document
|
||||
import android.util.Log
|
||||
import ffi.FFI
|
||||
import java.io.FileNotFoundException
|
||||
import java.io.IOException
|
||||
import java.util.UUID
|
||||
@@ -32,7 +31,8 @@ internal class DocumentLogs(private val context: Context) {
|
||||
setEnabled(grant() != null)
|
||||
}
|
||||
|
||||
private fun setEnabled(enabled: Boolean) = FFI.setDocumentLogsEnabled(enabled)
|
||||
@androidx.annotation.Keep
|
||||
private external fun setEnabled(enabled: Boolean)
|
||||
|
||||
private fun grant(): Uri? = prefs.getString(LOG_GRANT, null)?.let(Uri::parse)
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ import kotlin.math.max
|
||||
import hbb.MessageOuterClass.KeyEvent
|
||||
import hbb.MessageOuterClass.KeyboardMode
|
||||
import hbb.KeyEventConverter
|
||||
import ffi.FFI
|
||||
|
||||
// const val BUTTON_UP = 2
|
||||
// const val BUTTON_BACK = 0x08
|
||||
@@ -80,8 +79,6 @@ class InputService : AccessibilityService() {
|
||||
}
|
||||
|
||||
private fun notifyInputState() {
|
||||
// The Flutter UI may not be running to forward this, e.g. when enabled from system settings.
|
||||
FFI.setInputServiceOpen(isOpen)
|
||||
val inputState = isOpen.toString()
|
||||
Handler(Looper.getMainLooper()).post {
|
||||
MainActivity.flutterMethodChannel?.invokeMethod(
|
||||
|
||||
@@ -254,7 +254,6 @@ class MainService : Service() {
|
||||
val homePath = applicationContext.getExternalFilesDir(null)?.absolutePath
|
||||
?: applicationContext.filesDir.absolutePath
|
||||
FFI.startServer(configPath, homePath, "")
|
||||
FFI.setInputServiceOpen(InputService.isOpen)
|
||||
|
||||
createForegroundNotification()
|
||||
}
|
||||
|
||||
@@ -28,6 +28,4 @@ object FFI {
|
||||
external fun getBuildinOption(key: String): String
|
||||
external fun onClipboardUpdate(clips: ByteBuffer)
|
||||
external fun isServiceClipboardEnabled(): Boolean
|
||||
external fun setDocumentLogsEnabled(enabled: Boolean)
|
||||
external fun setInputServiceOpen(open: Boolean)
|
||||
}
|
||||
@@ -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()
|
||||
],
|
||||
);
|
||||
@@ -486,7 +486,7 @@ class _AddressBookState extends State<AddressBook> {
|
||||
if (gFFI.abModel.idContainByCurrent(id)) {
|
||||
setState(() {
|
||||
isInProgress = false;
|
||||
errorMsg = translate('Already exists');
|
||||
errorMsg = translate('ID already exists');
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
+2
-20
@@ -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";
|
||||
@@ -198,6 +192,8 @@ const String kOptionAllowAskForNoteAtEndOfConnection = "allow-ask-for-note";
|
||||
const String kOptionAllowMonitorSwitchMainToolbar = "allow-monitor-switch-main-toolbar";
|
||||
const String kOptionAllowMonitorSwitchMinToolbar = "allow-monitor-switch-min-toolbar";
|
||||
const String kOptionEnableShowTerminalExtraKeys = "enable-show-terminal-extra-keys";
|
||||
// On only when it is "Y". `option2bool()` would read an unset value as true.
|
||||
const String kOptionMobileImeInput = "mobile-ime-input";
|
||||
const String kOptionShowTerminalCtrlKeys = "show-terminal-extra-ctrl-keys";
|
||||
|
||||
// network options
|
||||
@@ -211,20 +207,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)
|
||||
|
||||
@@ -212,7 +212,7 @@ class _TerminalPageState extends State<TerminalPage>
|
||||
focusNode: _terminalFocusNode,
|
||||
// Note: autofocus is not used here because focus is managed manually
|
||||
// via _onTabStateChanged() to handle tab switching properly.
|
||||
backgroundOpacity: 1.0,
|
||||
backgroundOpacity: 0.7,
|
||||
padding: _calculatePadding(heightPx),
|
||||
onSecondaryTapDown: (details, offset) async {
|
||||
final selection = _terminalModel.terminalController.selection;
|
||||
|
||||
@@ -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(
|
||||
@@ -2938,7 +2932,7 @@ class _VoiceCallMenu extends StatelessWidget {
|
||||
audioInput,
|
||||
Divider(),
|
||||
MenuButton(
|
||||
child: Text(translate('Stop voice call')),
|
||||
child: Text(translate('End call')),
|
||||
onPressed: () => bind.sessionCloseVoiceCall(sessionId: ffi.sessionId),
|
||||
ffi: ffi,
|
||||
),
|
||||
|
||||
@@ -387,10 +387,7 @@ class _DesktopTabState extends State<DesktopTab>
|
||||
@override
|
||||
void onWindowMinimize() {
|
||||
stateGlobal.setMinimized(true);
|
||||
// GTK preserves maximization and may restore without a maximize event.
|
||||
if (!isLinux) {
|
||||
stateGlobal.setMaximized(false);
|
||||
}
|
||||
stateGlobal.setMaximized(false);
|
||||
super.onWindowMinimize();
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}())
|
||||
],
|
||||
),
|
||||
));
|
||||
},
|
||||
|
||||
@@ -23,10 +23,11 @@ import '../../models/model.dart';
|
||||
import '../../models/platform_model.dart';
|
||||
import '../../models/shortcut_model.dart';
|
||||
import '../../utils/image.dart';
|
||||
import '../soft_keyboard/soft_keyboard.dart';
|
||||
import '../widgets/dialog.dart';
|
||||
import '../widgets/custom_scale_widget.dart';
|
||||
|
||||
final initText = '1' * 1024;
|
||||
final initText = kSoftKeyboardSentinelChar * 1024;
|
||||
|
||||
// Workaround for Android (default input method, Microsoft SwiftKey keyboard) when using physical keyboard.
|
||||
// When connecting a physical keyboard, `KeyEvent.physicalKey.usbHidUsage` are wrong is using Microsoft SwiftKey keyboard.
|
||||
@@ -91,7 +92,6 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
Timer? _timer;
|
||||
bool _showBar = !isWebDesktop;
|
||||
bool _showGestureHelp = false;
|
||||
String _value = '';
|
||||
Orientation? _currentOrientation;
|
||||
final _uniqueKey = UniqueKey();
|
||||
Timer? _iosKeyboardWorkaroundTimer;
|
||||
@@ -113,6 +113,26 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
final TextEditingController _textController =
|
||||
TextEditingController(text: initText);
|
||||
|
||||
// Soft keyboard input: the hidden field's editing values go through an
|
||||
// interpreter, and what it derives from them is sent in order.
|
||||
late final _softKeyboardInput = SoftKeyboardInput(
|
||||
controller: _textController,
|
||||
focusNode: _mobileFocusNode,
|
||||
sentinel: initText,
|
||||
createInterpreter: (initial) => createSoftKeyboardInterpreter(
|
||||
isIOS: isIOS,
|
||||
useReducer: bind.mainGetLocalOption(key: kOptionMobileImeInput) == 'Y',
|
||||
initial: initial,
|
||||
),
|
||||
dispatcher: SoftKeyboardDispatcher(
|
||||
sendBackspace: () => inputModel.inputKey('VK_BACK'),
|
||||
sendText: _sendSoftKeyboardText,
|
||||
),
|
||||
isAllowed: () => inputModel.keyboardInputAllowed,
|
||||
reopenKeyboard: _openKeyboardUnlocked,
|
||||
platform: isIOS ? 'ios' : (isAndroid ? 'android' : 'other'),
|
||||
);
|
||||
|
||||
_RemotePageState(String id) {
|
||||
initSharedStates(id);
|
||||
gFFI.chatModel.voiceCallStatus.value = VoiceCallStatus.notStarted;
|
||||
@@ -138,6 +158,7 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
WakelockManager.enable(_uniqueKey);
|
||||
_physicalFocusNode.requestFocus();
|
||||
HardwareKeyboard.instance.addHandler(_handleLocalKeyEvent);
|
||||
_softKeyboardInput.attach();
|
||||
gFFI.inputModel.listenToMouse(true);
|
||||
gFFI.qualityMonitorModel.checkShowQualityMonitor(sessionId);
|
||||
keyboardSubscription =
|
||||
@@ -187,6 +208,7 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
@override
|
||||
Future<void> dispose() async {
|
||||
HardwareKeyboard.instance.removeHandler(_handleLocalKeyEvent);
|
||||
_softKeyboardInput.detach();
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
// Close the session up-front. `gFFI.close()` below only calls `sessionClose`
|
||||
// after several awaits (canvas save, image update, the `enable_soft_keyboard`
|
||||
@@ -320,114 +342,16 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void _handleIOSSoftKeyboardInput(String newValue) {
|
||||
var oldValue = _value;
|
||||
_value = newValue;
|
||||
var i = newValue.length - 1;
|
||||
for (; i >= 0 && newValue[i] != '1'; --i) {}
|
||||
var j = oldValue.length - 1;
|
||||
for (; j >= 0 && oldValue[j] != '1'; --j) {}
|
||||
if (i < j) j = i;
|
||||
var subNewValue = newValue.substring(j + 1);
|
||||
var subOldValue = oldValue.substring(j + 1);
|
||||
|
||||
// get common prefix of subNewValue and subOldValue
|
||||
var common = 0;
|
||||
for (;
|
||||
common < subOldValue.length &&
|
||||
common < subNewValue.length &&
|
||||
subNewValue[common] == subOldValue[common];
|
||||
++common) {}
|
||||
|
||||
// get newStr from subNewValue
|
||||
var newStr = "";
|
||||
if (subNewValue.length > common) {
|
||||
newStr = subNewValue.substring(common);
|
||||
}
|
||||
|
||||
// Set the value to the old value and early return if is still composing. (1 && 2)
|
||||
// 1. The composing range is valid
|
||||
// 2. The new string is shorter than the composing range.
|
||||
if (_textController.value.isComposingRangeValid) {
|
||||
final composingLength = _textController.value.composing.end -
|
||||
_textController.value.composing.start;
|
||||
if (composingLength > newStr.length) {
|
||||
_value = oldValue;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the different part in the old value.
|
||||
for (i = 0; i < subOldValue.length - common; ++i) {
|
||||
inputModel.inputKey('VK_BACK');
|
||||
}
|
||||
|
||||
// Input the new string.
|
||||
if (newStr.length > 1) {
|
||||
bind.sessionInputString(sessionId: sessionId, value: newStr);
|
||||
} else {
|
||||
inputChar(newStr);
|
||||
// Text from the mobile virtual keyboard: a single character goes out as a
|
||||
// key, anything longer as a string.
|
||||
Future<void> _sendSoftKeyboardText(String text) {
|
||||
if (text.length > 1) {
|
||||
return bind.sessionInputString(sessionId: sessionId, value: text);
|
||||
}
|
||||
return inputChar(text);
|
||||
}
|
||||
|
||||
void _handleNonIOSSoftKeyboardInput(String newValue) {
|
||||
var oldValue = _value;
|
||||
_value = newValue;
|
||||
if (oldValue.isNotEmpty &&
|
||||
newValue.isNotEmpty &&
|
||||
oldValue[0] == '1' &&
|
||||
newValue[0] != '1') {
|
||||
// clipboard
|
||||
oldValue = '';
|
||||
}
|
||||
// This length-only diff assumes the IME appends at the end. If an IME
|
||||
// leaves the caret inside paired punctuation, later insertions can replay
|
||||
// the closing symbol: "()" -> "(a)" sends ")" instead of "a". This is a
|
||||
// client text-diff issue, independent of the host keyboard layout.
|
||||
if (newValue.length == oldValue.length) {
|
||||
// ?
|
||||
} else if (newValue.length < oldValue.length) {
|
||||
final char = 'VK_BACK';
|
||||
inputModel.inputKey(char);
|
||||
} else {
|
||||
final content = newValue.substring(oldValue.length);
|
||||
if (content.length > 1) {
|
||||
if (oldValue != '' &&
|
||||
content.length == 2 &&
|
||||
(content == '""' ||
|
||||
content == '()' ||
|
||||
content == '[]' ||
|
||||
content == '<>' ||
|
||||
content == "{}" ||
|
||||
content == '”“' ||
|
||||
content == '《》' ||
|
||||
content == '()' ||
|
||||
content == '【】')) {
|
||||
// can not only input content[0], because when input ], [ are also auo insert, which cause ] never be input
|
||||
bind.sessionInputString(sessionId: sessionId, value: content);
|
||||
_openKeyboardUnlocked();
|
||||
return;
|
||||
}
|
||||
bind.sessionInputString(sessionId: sessionId, value: content);
|
||||
} else {
|
||||
inputChar(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// handle mobile virtual keyboard
|
||||
void handleSoftKeyboardInput(String newValue) {
|
||||
if (!inputModel.keyboardInputAllowed) {
|
||||
return;
|
||||
}
|
||||
if (isIOS) {
|
||||
_handleIOSSoftKeyboardInput(newValue);
|
||||
} else {
|
||||
_handleNonIOSSoftKeyboardInput(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
void inputChar(String char) {
|
||||
Future<void> inputChar(String char) async {
|
||||
if (!inputModel.keyboardInputAllowed) {
|
||||
return;
|
||||
}
|
||||
@@ -436,7 +360,7 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
} else if (char == ' ') {
|
||||
char = 'VK_SPACE';
|
||||
}
|
||||
inputModel.inputKey(char);
|
||||
await inputModel.inputKey(char);
|
||||
}
|
||||
|
||||
void openKeyboard() {
|
||||
@@ -464,9 +388,8 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
void _openKeyboardUnlocked() {
|
||||
inputModel.keyboardInputAllowed = true;
|
||||
gFFI.invokeMethod("enable_soft_keyboard", true);
|
||||
// destroy first, so that our _value trick can work
|
||||
_value = initText;
|
||||
_textController.text = _value;
|
||||
// refill first, so that the sentinel trick can work
|
||||
_softKeyboardInput.refill();
|
||||
setState(() => _showEdit = false);
|
||||
_timer?.cancel();
|
||||
_timer = Timer(kMobileDelaySoftKeyboard, () {
|
||||
@@ -566,13 +489,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 +543,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 +572,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 +629,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 +640,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,
|
||||
@@ -772,13 +675,20 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
// 2. The button will trigger `onKeyEvent` if the text field is empty.
|
||||
// ko/zh/ja input method: the button will trigger `onKeyEvent`
|
||||
// and the event will not popup if `KeyEventResult.handled` is returned.
|
||||
onChanged: handleSoftKeyboardInput,
|
||||
//
|
||||
// The input is taken from `_textController`, see
|
||||
// `_softKeyboardInput`.
|
||||
).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 +824,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)),
|
||||
|
||||
@@ -75,6 +75,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
var _enableStartOnBoot = false;
|
||||
var _checkUpdateOnStartup = false;
|
||||
var _showTerminalExtraKeys = false;
|
||||
var _mobileImeInput = false;
|
||||
var _floatingWindowDisabled = false;
|
||||
var _keepScreenOn = KeepScreenOn.duringControlled; // relay on floating window
|
||||
var _enableAbr = false;
|
||||
@@ -155,6 +156,8 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
mainGetLocalBoolOptionSync(kOptionKeepAwakeDuringOutgoingSessions);
|
||||
_showTerminalExtraKeys =
|
||||
mainGetLocalBoolOptionSync(kOptionEnableShowTerminalExtraKeys);
|
||||
_mobileImeInput =
|
||||
bind.mainGetLocalOption(key: kOptionMobileImeInput) == 'Y';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -933,6 +936,22 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
});
|
||||
},
|
||||
),
|
||||
if (!incomingOnly)
|
||||
SettingsTile.switchTile(
|
||||
title: Text(translate('Improved input method (IME) handling')),
|
||||
initialValue: _mobileImeInput,
|
||||
onToggle: isOptionFixed(kOptionMobileImeInput)
|
||||
? null
|
||||
: (v) async {
|
||||
await mainSetLocalBoolOption(kOptionMobileImeInput, v);
|
||||
final newValue =
|
||||
bind.mainGetLocalOption(key: kOptionMobileImeInput) ==
|
||||
'Y';
|
||||
setState(() {
|
||||
_mobileImeInput = newValue;
|
||||
});
|
||||
},
|
||||
),
|
||||
if (!bind.isDisableAccount())
|
||||
SettingsTile.switchTile(
|
||||
title: Text(translate('note-at-conn-end-tip')),
|
||||
@@ -1063,7 +1082,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
onPressed: (context) async {
|
||||
await launchUrl(Uri.parse(url));
|
||||
},
|
||||
title: Text('${translate('Version')}: $version'),
|
||||
title: Text(translate("Version: ") + version),
|
||||
value: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 8),
|
||||
child: Text('rustdesk.com',
|
||||
|
||||
@@ -20,7 +20,7 @@ import 'package:xterm/xterm.dart';
|
||||
import '../../desktop/pages/terminal_connection_manager.dart';
|
||||
import '../../consts.dart';
|
||||
|
||||
const _terminalBackgroundOpacity = 1.0;
|
||||
const _terminalBackgroundOpacity = 0.7;
|
||||
|
||||
Widget _buildTerminalViewForPlatform({
|
||||
required bool reportMouseInput,
|
||||
|
||||
@@ -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)),
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'soft_keyboard_actions.dart';
|
||||
|
||||
/// The result of [legacyTailDiff].
|
||||
class LegacyTailDiff {
|
||||
const LegacyTailDiff(this.backspaces, this.inserted);
|
||||
|
||||
/// How many UTF-16 code units of the old tail have to be deleted.
|
||||
final int backspaces;
|
||||
|
||||
/// What has to be typed after the deletion. May be empty.
|
||||
final String inserted;
|
||||
}
|
||||
|
||||
/// The tail diff the iOS handler has always used.
|
||||
///
|
||||
/// Both values are cut after their last sentinel character, then compared by
|
||||
/// common prefix. Lengths are UTF-16 code units.
|
||||
LegacyTailDiff legacyTailDiff(String oldValue, String newValue) {
|
||||
var i = newValue.length - 1;
|
||||
for (; i >= 0 && newValue[i] != kSoftKeyboardSentinelChar; --i) {}
|
||||
var j = oldValue.length - 1;
|
||||
for (; j >= 0 && oldValue[j] != kSoftKeyboardSentinelChar; --j) {}
|
||||
if (i < j) j = i;
|
||||
final subNewValue = newValue.substring(j + 1);
|
||||
final subOldValue = oldValue.substring(j + 1);
|
||||
|
||||
// get common prefix of subNewValue and subOldValue
|
||||
var common = 0;
|
||||
for (;
|
||||
common < subOldValue.length &&
|
||||
common < subNewValue.length &&
|
||||
subNewValue[common] == subOldValue[common];
|
||||
++common) {}
|
||||
|
||||
return LegacyTailDiff(
|
||||
subOldValue.length - common,
|
||||
subNewValue.length > common ? subNewValue.substring(common) : '',
|
||||
);
|
||||
}
|
||||
|
||||
/// `_handleIOSSoftKeyboardInput` as it was in `remote_page.dart`, returning
|
||||
/// actions instead of sending them.
|
||||
///
|
||||
/// Kept as the fallback and as the reference the new interpreter is compared
|
||||
/// against in tests. Do not fix bugs here.
|
||||
class LegacyIosSoftKeyboard implements SoftKeyboardInterpreter {
|
||||
LegacyIosSoftKeyboard(TextEditingValue initial)
|
||||
: _value = initial.text,
|
||||
_lastText = initial.text;
|
||||
|
||||
String _value;
|
||||
String _lastText;
|
||||
|
||||
@override
|
||||
String get name => 'legacy-ios';
|
||||
|
||||
@override
|
||||
String? get lastNote => null;
|
||||
|
||||
@override
|
||||
List<SoftKeyboardAction> update(TextEditingValue value) {
|
||||
final newValue = value.text;
|
||||
// This used to be driven by `onChanged`, which is only called when the
|
||||
// text changes.
|
||||
if (newValue == _lastText) return const [];
|
||||
_lastText = newValue;
|
||||
|
||||
final oldValue = _value;
|
||||
_value = newValue;
|
||||
final diff = legacyTailDiff(oldValue, newValue);
|
||||
|
||||
// Set the value to the old value and early return if is still composing. (1 && 2)
|
||||
// 1. The composing range is valid
|
||||
// 2. The new string is shorter than the composing range.
|
||||
if (value.isComposingRangeValid) {
|
||||
final composingLength = value.composing.end - value.composing.start;
|
||||
if (composingLength > diff.inserted.length) {
|
||||
_value = oldValue;
|
||||
return const [];
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
// Delete the different part in the old value.
|
||||
if (diff.backspaces > 0) SoftKeyboardBackspace(diff.backspaces),
|
||||
// Input the new string.
|
||||
if (diff.inserted.isNotEmpty) SoftKeyboardText(diff.inserted),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
/// `_handleNonIOSSoftKeyboardInput` as it was in `remote_page.dart`, returning
|
||||
/// actions instead of sending them.
|
||||
///
|
||||
/// Kept as the default on Android and as the reference the new interpreter is
|
||||
/// compared against in tests. Do not fix bugs here.
|
||||
class LegacyAndroidSoftKeyboard implements SoftKeyboardInterpreter {
|
||||
LegacyAndroidSoftKeyboard(TextEditingValue initial) : _value = initial.text;
|
||||
|
||||
String _value;
|
||||
|
||||
@override
|
||||
String get name => 'legacy-android';
|
||||
|
||||
@override
|
||||
String? get lastNote => null;
|
||||
|
||||
@override
|
||||
List<SoftKeyboardAction> update(TextEditingValue value) {
|
||||
final newValue = value.text;
|
||||
// This used to be driven by `onChanged`, which is only called when the
|
||||
// text changes.
|
||||
if (newValue == _value) return const [];
|
||||
|
||||
var oldValue = _value;
|
||||
_value = newValue;
|
||||
if (oldValue.isNotEmpty &&
|
||||
newValue.isNotEmpty &&
|
||||
oldValue[0] == kSoftKeyboardSentinelChar &&
|
||||
newValue[0] != kSoftKeyboardSentinelChar) {
|
||||
// clipboard
|
||||
oldValue = '';
|
||||
}
|
||||
// This length-only diff assumes the IME appends at the end. If an IME
|
||||
// leaves the caret inside paired punctuation, later insertions can replay
|
||||
// the closing symbol: "()" -> "(a)" sends ")" instead of "a". This is a
|
||||
// client text-diff issue, independent of the host keyboard layout.
|
||||
if (newValue.length == oldValue.length) {
|
||||
// ?
|
||||
return const [];
|
||||
} else if (newValue.length < oldValue.length) {
|
||||
return const [SoftKeyboardBackspace(1)];
|
||||
} else {
|
||||
final content = newValue.substring(oldValue.length);
|
||||
if (content.length > 1) {
|
||||
if (oldValue != '' &&
|
||||
content.length == 2 &&
|
||||
(content == '""' ||
|
||||
content == '()' ||
|
||||
content == '[]' ||
|
||||
content == '<>' ||
|
||||
content == "{}" ||
|
||||
content == '”“' ||
|
||||
content == '《》' ||
|
||||
content == '()' ||
|
||||
content == '【】')) {
|
||||
// can not only input content[0], because when input ], [ are also auo insert, which cause ] never be input
|
||||
return [SoftKeyboardText(content), const SoftKeyboardResetField()];
|
||||
}
|
||||
}
|
||||
return [SoftKeyboardText(content)];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/// Interpretation of mobile soft keyboard input.
|
||||
///
|
||||
/// The remote page owns a hidden text field. Whatever the keyboard does to it
|
||||
/// arrives as editing values, an interpreter turns those into actions, and the
|
||||
/// dispatcher sends the actions in order. Nothing in here touches FFI or
|
||||
/// widgets, so all of it runs in unit tests.
|
||||
library;
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'legacy_soft_keyboard.dart';
|
||||
import 'soft_keyboard_actions.dart';
|
||||
import 'soft_keyboard_reducer.dart';
|
||||
|
||||
export 'legacy_soft_keyboard.dart';
|
||||
export 'soft_keyboard_actions.dart';
|
||||
export 'soft_keyboard_dispatcher.dart';
|
||||
export 'soft_keyboard_input.dart';
|
||||
export 'soft_keyboard_reducer.dart';
|
||||
export 'soft_keyboard_trace.dart';
|
||||
|
||||
/// The interpreter for a platform: the old handler, or, when [useReducer] is
|
||||
/// set, the one that knows about composing text.
|
||||
///
|
||||
/// The old handlers are the default on both platforms. The new ones have not
|
||||
/// been run on a device.
|
||||
SoftKeyboardInterpreter createSoftKeyboardInterpreter({
|
||||
required bool isIOS,
|
||||
required bool useReducer,
|
||||
required TextEditingValue initial,
|
||||
}) {
|
||||
if (isIOS) {
|
||||
return useReducer
|
||||
? SoftKeyboardReducer.ios(initial)
|
||||
: LegacyIosSoftKeyboard(initial);
|
||||
}
|
||||
return useReducer
|
||||
? SoftKeyboardReducer.android(initial)
|
||||
: LegacyAndroidSoftKeyboard(initial);
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
/// The character the hidden soft keyboard field is pre-filled with.
|
||||
///
|
||||
/// An empty editable field cannot report a Backspace, so the field always
|
||||
/// holds a run of these for the keyboard to delete.
|
||||
const String kSoftKeyboardSentinelChar = '1';
|
||||
|
||||
/// What has to happen in response to a local editing change.
|
||||
///
|
||||
/// Interpreters only describe it. Sending is done by the dispatcher and the
|
||||
/// field is written by its owner, so the interpretation logic stays free of
|
||||
/// FFI and can be executed in unit tests.
|
||||
sealed class SoftKeyboardAction {
|
||||
const SoftKeyboardAction();
|
||||
|
||||
/// Whether this is sent to the remote side. The others act on the local
|
||||
/// field only.
|
||||
bool get isRemote;
|
||||
}
|
||||
|
||||
/// Press Backspace [count] times.
|
||||
class SoftKeyboardBackspace extends SoftKeyboardAction {
|
||||
const SoftKeyboardBackspace(this.count) : assert(count > 0);
|
||||
|
||||
final int count;
|
||||
|
||||
@override
|
||||
bool get isRemote => true;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
other is SoftKeyboardBackspace && other.count == count;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(SoftKeyboardBackspace, count);
|
||||
|
||||
@override
|
||||
String toString() => 'Backspace($count)';
|
||||
}
|
||||
|
||||
/// Send [text] to the remote side.
|
||||
///
|
||||
/// Whether it goes out as a single key or as a text sequence is decided by the
|
||||
/// dispatcher from the text length, the same way it always was.
|
||||
class SoftKeyboardText extends SoftKeyboardAction {
|
||||
const SoftKeyboardText(this.text) : assert(text != '');
|
||||
|
||||
final String text;
|
||||
|
||||
@override
|
||||
bool get isRemote => true;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
other is SoftKeyboardText && other.text == text;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(SoftKeyboardText, text);
|
||||
|
||||
@override
|
||||
String toString() => 'Text(${_escape(text)})';
|
||||
}
|
||||
|
||||
/// Re-create the hidden field. Only the legacy Android handler asks for this,
|
||||
/// after it has sent a pair of brackets or quotes.
|
||||
class SoftKeyboardResetField extends SoftKeyboardAction {
|
||||
const SoftKeyboardResetField();
|
||||
|
||||
@override
|
||||
bool get isRemote => false;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => other is SoftKeyboardResetField;
|
||||
|
||||
@override
|
||||
int get hashCode => (SoftKeyboardResetField).hashCode;
|
||||
|
||||
@override
|
||||
String toString() => 'ResetField';
|
||||
}
|
||||
|
||||
/// Write [value] to the hidden field. Nothing is sent.
|
||||
///
|
||||
/// For an interpreter that has to correct the field itself, for instance to
|
||||
/// put back padding the keyboard used up, or to move the caret to the end.
|
||||
/// The interpreter is given the corrected value like any other and must not
|
||||
/// answer it with remote operations.
|
||||
class SoftKeyboardSetField extends SoftKeyboardAction {
|
||||
const SoftKeyboardSetField(this.value);
|
||||
|
||||
final TextEditingValue value;
|
||||
|
||||
@override
|
||||
bool get isRemote => false;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
other is SoftKeyboardSetField && other.value == value;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(SoftKeyboardSetField, value);
|
||||
|
||||
// Without the value: it holds what was typed.
|
||||
@override
|
||||
String toString() => 'SetField';
|
||||
}
|
||||
|
||||
/// Turns the editing values of the hidden field into remote operations.
|
||||
///
|
||||
/// An interpreter starts from the value the field has when it is created.
|
||||
/// When the app changes the field, a new one is created.
|
||||
abstract class SoftKeyboardInterpreter {
|
||||
/// Short identifier, recorded in traces.
|
||||
String get name;
|
||||
|
||||
/// Consumes one editing value and returns what has to be sent for it.
|
||||
///
|
||||
/// Must be called for every value the controller reports, including the
|
||||
/// ones where only the selection or the composing range changed.
|
||||
List<SoftKeyboardAction> update(TextEditingValue value);
|
||||
|
||||
/// Why the last [update] did not mirror the local edit, if it did not.
|
||||
///
|
||||
/// Diagnostic only; recorded in traces.
|
||||
String? get lastNote;
|
||||
}
|
||||
|
||||
String _escape(String s) => s.replaceAll('\n', r'\n');
|
||||
@@ -0,0 +1,81 @@
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import 'soft_keyboard_actions.dart';
|
||||
|
||||
/// Sends the remote operations among soft keyboard actions one at a time, in
|
||||
/// order.
|
||||
///
|
||||
/// Each send is an asynchronous call that the bridge runs on a pool of worker
|
||||
/// threads, so two calls made back to back are not guaranteed to reach the
|
||||
/// connection in the order they were made. Text that follows a Backspace has
|
||||
/// to arrive after it. Waiting for one call to return before making the next
|
||||
/// is what guarantees that.
|
||||
class SoftKeyboardDispatcher {
|
||||
SoftKeyboardDispatcher({
|
||||
required this.sendBackspace,
|
||||
required this.sendText,
|
||||
});
|
||||
|
||||
/// Presses Backspace once.
|
||||
final Future<void> Function() sendBackspace;
|
||||
|
||||
/// Sends committed text.
|
||||
final Future<void> Function(String text) sendText;
|
||||
|
||||
final Queue<SoftKeyboardAction> _pending = Queue();
|
||||
bool _draining = false;
|
||||
|
||||
/// Queues [actions]. If nothing is in flight the first one is sent before
|
||||
/// this returns.
|
||||
///
|
||||
/// Actions that are not remote operations are skipped. The owner of the
|
||||
/// field acts on those.
|
||||
void dispatch(List<SoftKeyboardAction> actions) {
|
||||
_pending.addAll(actions.where((action) => action.isRemote));
|
||||
if (_pending.isEmpty) return;
|
||||
if (!_draining) unawaited(_drain());
|
||||
}
|
||||
|
||||
/// Drops everything that has not been sent yet.
|
||||
///
|
||||
/// For when the session goes away. Input typed for one session must not be
|
||||
/// delivered to whatever comes next.
|
||||
void cancel() {
|
||||
_pending.clear();
|
||||
}
|
||||
|
||||
Future<void> _drain() async {
|
||||
_draining = true;
|
||||
try {
|
||||
while (_pending.isNotEmpty) {
|
||||
final action = _pending.removeFirst();
|
||||
try {
|
||||
await _send(action);
|
||||
} catch (e) {
|
||||
// Keep going. One failed send must not hold back later input. The
|
||||
// action is not logged: it may hold what was typed.
|
||||
debugPrint('soft keyboard: a send failed (${e.runtimeType})');
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
_draining = false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _send(SoftKeyboardAction action) async {
|
||||
switch (action) {
|
||||
case SoftKeyboardBackspace(:final count):
|
||||
// Backspaces cannot overtake each other in any way that matters, so
|
||||
// they go out together. Only what follows has to wait for them.
|
||||
await Future.wait([for (var i = 0; i < count; i++) sendBackspace()]);
|
||||
case SoftKeyboardText(:final text):
|
||||
await sendText(text);
|
||||
case SoftKeyboardResetField():
|
||||
case SoftKeyboardSetField():
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'soft_keyboard_actions.dart';
|
||||
import 'soft_keyboard_dispatcher.dart';
|
||||
import 'soft_keyboard_trace.dart';
|
||||
|
||||
/// Connects the hidden text field to an interpreter and a dispatcher.
|
||||
///
|
||||
/// This is the one place that decides whether a change of the field is input
|
||||
/// at all. It is not input when the app refills the field, and it is not
|
||||
/// input when the field has no focus.
|
||||
class SoftKeyboardInput {
|
||||
SoftKeyboardInput({
|
||||
required this.controller,
|
||||
required this.focusNode,
|
||||
required this.sentinel,
|
||||
required this.createInterpreter,
|
||||
required this.dispatcher,
|
||||
required this.isAllowed,
|
||||
required this.reopenKeyboard,
|
||||
this.platform = 'other',
|
||||
SoftKeyboardTrace? trace,
|
||||
}) : _trace = trace ?? SoftKeyboardTrace();
|
||||
|
||||
final TextEditingController controller;
|
||||
final FocusNode focusNode;
|
||||
|
||||
/// What the field holds when nothing has been typed.
|
||||
final String sentinel;
|
||||
|
||||
/// Creates the interpreter to use from now on. Called on every [refill], so
|
||||
/// a change of the setting never takes effect in the middle of typing.
|
||||
final SoftKeyboardInterpreter Function(TextEditingValue initial)
|
||||
createInterpreter;
|
||||
|
||||
final SoftKeyboardDispatcher dispatcher;
|
||||
|
||||
/// Whether soft keyboard input may be sent at the moment.
|
||||
final bool Function() isAllowed;
|
||||
|
||||
/// Closes and opens the keyboard again. Only the legacy Android handler
|
||||
/// asks for it.
|
||||
final VoidCallback reopenKeyboard;
|
||||
|
||||
/// Recorded in traces.
|
||||
final String platform;
|
||||
|
||||
final SoftKeyboardTrace _trace;
|
||||
late SoftKeyboardInterpreter _interpreter;
|
||||
|
||||
/// Whether the field still is as the last [refill] left it.
|
||||
bool _untouched = false;
|
||||
|
||||
/// Set while a correction asked for by the interpreter is being written.
|
||||
bool _correcting = false;
|
||||
|
||||
void attach() {
|
||||
refill();
|
||||
controller.addListener(_handleValue);
|
||||
focusNode.addListener(_handleFocus);
|
||||
}
|
||||
|
||||
/// Stops listening and drops what has not been sent yet. Input typed for
|
||||
/// one session must not be delivered to whatever comes next.
|
||||
void detach() {
|
||||
controller.removeListener(_handleValue);
|
||||
focusNode.removeListener(_handleFocus);
|
||||
dispatcher.cancel();
|
||||
}
|
||||
|
||||
/// Fills the field with the sentinel again and starts interpreting from
|
||||
/// scratch. Text that was still being composed is dropped.
|
||||
void refill() {
|
||||
// The interpreter starts from the refilled field, so that the refill is
|
||||
// not taken for input.
|
||||
final initial = TextEditingValue(text: sentinel);
|
||||
_interpreter = createInterpreter(initial);
|
||||
_trace.start(_interpreter, initial, platform: platform);
|
||||
controller.value = initial;
|
||||
_untouched = true;
|
||||
}
|
||||
|
||||
// This listens to the controller instead of `onChanged`, because `onChanged`
|
||||
// is only called when the text changes. An input method can finish a
|
||||
// composition without changing the text, and that has to be seen too.
|
||||
void _handleValue() {
|
||||
// Without focus the field is not connected to a keyboard. What changes it
|
||||
// then is the framework, which clears the composing range of a field
|
||||
// that loses focus. That is not the keyboard committing the text.
|
||||
if (!focusNode.hasFocus) return;
|
||||
_untouched = false;
|
||||
if (!isAllowed()) return;
|
||||
final value = controller.value;
|
||||
final actions = _interpreter.update(value);
|
||||
_trace.record(value, actions, note: _interpreter.lastNote);
|
||||
dispatcher.dispatch(actions);
|
||||
for (final action in actions) {
|
||||
switch (action) {
|
||||
case SoftKeyboardSetField(:final value):
|
||||
_correct(value);
|
||||
case SoftKeyboardResetField():
|
||||
reopenKeyboard();
|
||||
case SoftKeyboardBackspace():
|
||||
case SoftKeyboardText():
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Writing the field comes straight back here, so that the interpreter sees
|
||||
// the value it asked for. A correction asked for in answer to a correction
|
||||
// is not written. That would never end.
|
||||
void _correct(TextEditingValue value) {
|
||||
if (_correcting) return;
|
||||
_correcting = true;
|
||||
try {
|
||||
controller.value = value;
|
||||
} finally {
|
||||
_correcting = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Leaving the field ends the input. However the keyboard is closed, a
|
||||
// composition that was not committed is cancelled, and what was typed
|
||||
// before can no longer be edited from here.
|
||||
void _handleFocus() {
|
||||
if (!focusNode.hasFocus && !_untouched) refill();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,350 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart' show CharacterRange, StringCharacters;
|
||||
|
||||
import 'legacy_soft_keyboard.dart';
|
||||
import 'soft_keyboard_actions.dart';
|
||||
|
||||
/// What to do with text the keyboard still marks as composing.
|
||||
enum ComposingPolicy {
|
||||
/// Keep composing text local and send only what has been committed.
|
||||
///
|
||||
/// Nothing provisional reaches the remote side. Right when the composing
|
||||
/// range is only used for real compositions, as on iOS.
|
||||
hold,
|
||||
|
||||
/// Ignore the composing range and mirror the field as it is typed.
|
||||
///
|
||||
/// Provisional text is sent and corrected afterwards. Needed where the
|
||||
/// keyboard also marks ordinary words as composing, as Gboard does for
|
||||
/// English.
|
||||
forward,
|
||||
}
|
||||
|
||||
/// Turns one change of the mirrored text into remote operations.
|
||||
abstract class SoftKeyboardDiff {
|
||||
/// Diagnostic identifier.
|
||||
String get name;
|
||||
|
||||
/// Called once, with the text the interpretation starts from.
|
||||
void start(String text);
|
||||
|
||||
List<SoftKeyboardAction> apply(String oldText, String newText);
|
||||
|
||||
/// Why the last [apply] did not mirror the edit, if it did not.
|
||||
String? get lastNote;
|
||||
}
|
||||
|
||||
/// The mobile soft keyboard interpreter.
|
||||
///
|
||||
/// It keeps a baseline, the text the remote side has been told about, and
|
||||
/// derives a target from each editing value. The difference between the two
|
||||
/// is handed to a [SoftKeyboardDiff]. With [ComposingPolicy.hold] the target
|
||||
/// excludes the composing range, so a composition produces nothing until it is
|
||||
/// committed, and a partial commit produces exactly the committed part.
|
||||
class SoftKeyboardReducer implements SoftKeyboardInterpreter {
|
||||
SoftKeyboardReducer({
|
||||
required this.policy,
|
||||
required SoftKeyboardDiff diff,
|
||||
required TextEditingValue initial,
|
||||
}) : _diff = diff,
|
||||
_last = initial,
|
||||
_baseline = initial.text {
|
||||
_diff.start(initial.text);
|
||||
}
|
||||
|
||||
/// iOS: hold composing text, and keep the tail diff the iOS handler has
|
||||
/// always used so that everything typed without a composing range is
|
||||
/// handled exactly as before.
|
||||
factory SoftKeyboardReducer.ios(TextEditingValue initial) =>
|
||||
SoftKeyboardReducer(
|
||||
policy: ComposingPolicy.hold,
|
||||
diff: LegacyTailSoftKeyboardDiff(),
|
||||
initial: initial,
|
||||
);
|
||||
|
||||
/// Android: mirror the field as it is typed, with a diff that also handles
|
||||
/// replacements and edits that are not at the end.
|
||||
factory SoftKeyboardReducer.android(TextEditingValue initial) =>
|
||||
SoftKeyboardReducer(
|
||||
policy: ComposingPolicy.forward,
|
||||
diff: MirrorSoftKeyboardDiff(),
|
||||
initial: initial,
|
||||
);
|
||||
|
||||
final ComposingPolicy policy;
|
||||
final SoftKeyboardDiff _diff;
|
||||
|
||||
String _baseline;
|
||||
TextEditingValue _last;
|
||||
String? _note;
|
||||
|
||||
@override
|
||||
String get name => '${policy.name}+${_diff.name}';
|
||||
|
||||
@override
|
||||
String? get lastNote => _note;
|
||||
|
||||
@override
|
||||
List<SoftKeyboardAction> update(TextEditingValue value) {
|
||||
_note = null;
|
||||
if (value == _last) return const [];
|
||||
_last = value;
|
||||
|
||||
var target = value.text;
|
||||
String? note;
|
||||
final composing = _activeComposing(value);
|
||||
if (policy == ComposingPolicy.hold && composing != null) {
|
||||
final committed =
|
||||
value.text.replaceRange(composing.start, composing.end, '');
|
||||
if (_composingCoversSentText(committed, composing.start)) {
|
||||
// The keyboard marked text that is already on the remote side as
|
||||
// composing. It cannot be held back any more, and deleting it now
|
||||
// would only be undone by the commit, so follow it as it changes.
|
||||
note = 'composing covers sent text';
|
||||
} else {
|
||||
target = committed;
|
||||
}
|
||||
}
|
||||
_note = note;
|
||||
if (target == _baseline) return const [];
|
||||
|
||||
final actions = _diff.apply(_baseline, target);
|
||||
_baseline = target;
|
||||
_note = _diff.lastNote ?? note;
|
||||
return actions;
|
||||
}
|
||||
|
||||
/// The composing range, if the keyboard is in the middle of a composition.
|
||||
static TextRange? _activeComposing(TextEditingValue value) {
|
||||
if (!value.isComposingRangeValid || value.composing.isCollapsed) {
|
||||
return null;
|
||||
}
|
||||
return value.composing;
|
||||
}
|
||||
|
||||
/// Whether [committed], the text without its composing range, is the
|
||||
/// baseline with a piece cut out exactly where the composing range starts.
|
||||
bool _composingCoversSentText(String committed, int composingStart) {
|
||||
if (committed.length >= _baseline.length) return false;
|
||||
return _baseline.startsWith(committed.substring(0, composingStart)) &&
|
||||
_baseline.endsWith(committed.substring(composingStart));
|
||||
}
|
||||
}
|
||||
|
||||
/// [legacyTailDiff] as a [SoftKeyboardDiff].
|
||||
class LegacyTailSoftKeyboardDiff implements SoftKeyboardDiff {
|
||||
@override
|
||||
String get name => 'tail';
|
||||
|
||||
@override
|
||||
String? get lastNote => null;
|
||||
|
||||
@override
|
||||
void start(String text) {}
|
||||
|
||||
@override
|
||||
List<SoftKeyboardAction> apply(String oldText, String newText) {
|
||||
final diff = legacyTailDiff(oldText, newText);
|
||||
return [
|
||||
if (diff.backspaces > 0) SoftKeyboardBackspace(diff.backspaces),
|
||||
if (diff.inserted.isNotEmpty) SoftKeyboardText(diff.inserted),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
/// A diff that keeps the remote text equal to what was typed since the
|
||||
/// keyboard was opened.
|
||||
///
|
||||
/// The only thing the client can do to remote text is press Backspace at the
|
||||
/// remote caret and type. So a local edit can be reproduced only if it lies in
|
||||
/// text this client typed, which is assumed to still end at the remote caret:
|
||||
/// delete back to where the edit starts, then type the rest again.
|
||||
///
|
||||
/// That replay is limited to [maxReplay] characters, to text in which one
|
||||
/// Backspace is known to delete one character, and it never crosses a line
|
||||
/// break. An edit outside those limits is not guessed: typing and Backspace
|
||||
/// are applied at the caret, a replacement is dropped, and a deletion is cut
|
||||
/// off at the limit. [lastNote] says which, and the text up to that point is
|
||||
/// never replayed afterwards.
|
||||
class MirrorSoftKeyboardDiff implements SoftKeyboardDiff {
|
||||
MirrorSoftKeyboardDiff({this.maxReplay = 64});
|
||||
|
||||
/// The most Backspaces a single edit may produce.
|
||||
final int maxReplay;
|
||||
|
||||
/// Number of leading sentinel characters. They were never sent, and
|
||||
/// deleting any number of them at once is a single Backspace.
|
||||
int _sentinel = 0;
|
||||
|
||||
/// Text before this index is not known to be on the remote side, so it is
|
||||
/// never replayed. Starts at the end of the sentinel.
|
||||
int _floor = 0;
|
||||
|
||||
String? _note;
|
||||
|
||||
@override
|
||||
String get name => 'mirror';
|
||||
|
||||
@override
|
||||
String? get lastNote => _note;
|
||||
|
||||
@override
|
||||
void start(String text) {
|
||||
var n = 0;
|
||||
while (n < text.length && text[n] == kSoftKeyboardSentinelChar) {
|
||||
n++;
|
||||
}
|
||||
_sentinel = n;
|
||||
_floor = n;
|
||||
}
|
||||
|
||||
@override
|
||||
List<SoftKeyboardAction> apply(String oldText, String newText) {
|
||||
_note = null;
|
||||
if (oldText == newText) return const [];
|
||||
|
||||
final prefix = _commonPrefix(oldText, newText);
|
||||
final suffix = _commonSuffix(oldText, newText, prefix);
|
||||
final removedEnd = oldText.length - suffix;
|
||||
final removed = oldText.substring(prefix, removedEnd);
|
||||
final inserted = newText.substring(prefix, newText.length - suffix);
|
||||
|
||||
if (prefix >= _floor) {
|
||||
if (suffix == 0 && removed.isEmpty) {
|
||||
return _type(inserted);
|
||||
}
|
||||
if (suffix == 0 && inserted.isEmpty) {
|
||||
// The end of the text was deleted: Backspace was pressed.
|
||||
return [_backspace(removed.characters.length, newText.length)];
|
||||
}
|
||||
// A replacement, or an edit with text after it. Reproduce it by
|
||||
// deleting back to where it starts and typing everything after that
|
||||
// again.
|
||||
final count = _replayCount(oldText, prefix);
|
||||
if (count != null) {
|
||||
return [
|
||||
if (count > 0) SoftKeyboardBackspace(count),
|
||||
..._type(inserted, oldText.substring(removedEnd)),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
// From here on the edit touches text that cannot be replayed.
|
||||
final inSentinel = prefix < _sentinel;
|
||||
var backspaces = 0;
|
||||
if (inSentinel) {
|
||||
backspaces = 1;
|
||||
if (removedEnd > _sentinel) {
|
||||
backspaces +=
|
||||
oldText.substring(_sentinel, removedEnd).characters.length;
|
||||
}
|
||||
} else if (removed.isNotEmpty) {
|
||||
backspaces = removed.characters.length;
|
||||
}
|
||||
_sentinel = math.min(_sentinel, prefix);
|
||||
|
||||
if (suffix == 0 && inserted.isEmpty) {
|
||||
// Backspace reached past what is mirrored. It is still just Backspace.
|
||||
_floor = math.min(_floor, prefix);
|
||||
return [_backspace(backspaces, newText.length)];
|
||||
}
|
||||
|
||||
_floor = newText.length;
|
||||
if (inSentinel && inserted.isNotEmpty) {
|
||||
// The sentinel was replaced or typed into. Nothing on the remote side
|
||||
// corresponds to it, so the new text is all that can be sent.
|
||||
_note = 'at caret: edit inside the sentinel';
|
||||
return _type(inserted);
|
||||
}
|
||||
if (removed.isNotEmpty && inserted.isNotEmpty) {
|
||||
// Backspace cannot be trusted to remove exactly the replaced text, and
|
||||
// typing the replacement next to it would only add to the damage.
|
||||
_note = 'dropped: replacement cannot be replayed';
|
||||
return const [];
|
||||
}
|
||||
// Typing or Backspace with text after the caret. They mean what they
|
||||
// always mean, at the remote caret.
|
||||
_note = 'at caret: text after the edit cannot be replayed';
|
||||
return inserted.isEmpty
|
||||
? [_backspace(backspaces, newText.length)]
|
||||
: _type(inserted);
|
||||
}
|
||||
|
||||
/// [inserted] and then [after], the text that follows it, as text to type.
|
||||
///
|
||||
/// A line break at the end of what was inserted is Return being pressed,
|
||||
/// possibly in the same edit as a correction of the word before it. It is
|
||||
/// sent on its own, so that it goes out as the key and not as a character
|
||||
/// in a string.
|
||||
static List<SoftKeyboardAction> _type(String inserted, [String after = '']) {
|
||||
if (!inserted.endsWith('\n') || inserted.length + after.length == 1) {
|
||||
return [SoftKeyboardText(inserted + after)];
|
||||
}
|
||||
final before = inserted.substring(0, inserted.length - 1);
|
||||
return [
|
||||
if (before.isNotEmpty) SoftKeyboardText(before),
|
||||
const SoftKeyboardText('\n'),
|
||||
if (after.isNotEmpty) SoftKeyboardText(after),
|
||||
];
|
||||
}
|
||||
|
||||
/// [count] Backspaces, or as many as are allowed.
|
||||
///
|
||||
/// When that is fewer, the remote text is left longer than the local text,
|
||||
/// which has [newLength] characters now. Nothing up to there is replayed
|
||||
/// afterwards.
|
||||
SoftKeyboardBackspace _backspace(int count, int newLength) {
|
||||
if (count <= maxReplay) return SoftKeyboardBackspace(count);
|
||||
_floor = newLength;
|
||||
_note = 'clamped: more Backspaces than the limit';
|
||||
return SoftKeyboardBackspace(maxReplay);
|
||||
}
|
||||
|
||||
/// How many Backspaces delete [text] from [from] to its end, or null if
|
||||
/// that is not known well enough to replay.
|
||||
int? _replayCount(String text, int from) {
|
||||
// Every character has to be a single code point. For longer clusters,
|
||||
// such as emoji sequences, applications disagree on what one Backspace
|
||||
// deletes.
|
||||
var count = 0;
|
||||
for (final char in text.substring(from).characters) {
|
||||
if (char.runes.length != 1) return null;
|
||||
// Return is a key press, not text. Deleting a line break does not undo
|
||||
// it, and typing it again would press Return again.
|
||||
if (char.codeUnitAt(0) < 0x20) return null;
|
||||
if (++count > maxReplay) return null;
|
||||
}
|
||||
// And the edit must not start inside a cluster.
|
||||
if (CharacterRange.at(text, from).stringBeforeLength != from) return null;
|
||||
return count;
|
||||
}
|
||||
|
||||
static int _commonPrefix(String a, String b) {
|
||||
final max = math.min(a.length, b.length);
|
||||
var n = 0;
|
||||
while (n < max && a.codeUnitAt(n) == b.codeUnitAt(n)) {
|
||||
n++;
|
||||
}
|
||||
// Do not split a surrogate pair.
|
||||
if (n > 0 && _isHighSurrogate(a.codeUnitAt(n - 1))) n--;
|
||||
return n;
|
||||
}
|
||||
|
||||
static int _commonSuffix(String a, String b, int prefix) {
|
||||
final max = math.min(a.length, b.length) - prefix;
|
||||
var n = 0;
|
||||
while (n < max &&
|
||||
a.codeUnitAt(a.length - 1 - n) == b.codeUnitAt(b.length - 1 - n)) {
|
||||
n++;
|
||||
}
|
||||
// Do not split a surrogate pair.
|
||||
if (n > 0 && _isLowSurrogate(a.codeUnitAt(a.length - n))) n--;
|
||||
return n;
|
||||
}
|
||||
|
||||
static bool _isHighSurrogate(int unit) => (unit & 0xFC00) == 0xD800;
|
||||
|
||||
static bool _isLowSurrogate(int unit) => (unit & 0xFC00) == 0xDC00;
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'soft_keyboard_actions.dart';
|
||||
|
||||
/// How much of the soft keyboard input is written to the log.
|
||||
enum SoftKeyboardTraceLevel {
|
||||
/// Nothing. The default.
|
||||
off,
|
||||
|
||||
/// Structure only: lengths, ranges and action types. Never any text. It
|
||||
/// can show where an input sequence went wrong but cannot be replayed.
|
||||
meta,
|
||||
|
||||
/// Everything, including the text that was typed. For development with
|
||||
/// made-up input only. A trace at this level can be replayed in a test.
|
||||
full,
|
||||
}
|
||||
|
||||
/// Build with `--dart-define=SOFT_KEYBOARD_TRACE=meta` (or `full`) to turn
|
||||
/// tracing on. There is deliberately no runtime switch for it.
|
||||
const String _traceFromEnvironment =
|
||||
String.fromEnvironment('SOFT_KEYBOARD_TRACE');
|
||||
|
||||
SoftKeyboardTraceLevel parseSoftKeyboardTraceLevel(String value) {
|
||||
for (final level in SoftKeyboardTraceLevel.values) {
|
||||
if (level.name == value) return level;
|
||||
}
|
||||
return SoftKeyboardTraceLevel.off;
|
||||
}
|
||||
|
||||
/// Writes one JSON object per line: a header whenever an interpreter starts,
|
||||
/// then one line per editing value with the actions derived from it.
|
||||
///
|
||||
/// The log lines of a [SoftKeyboardTraceLevel.full] trace can be saved as a
|
||||
/// fixture as they are. The replay test ignores whatever the log puts in
|
||||
/// front of the JSON, and starts over at every header.
|
||||
class SoftKeyboardTrace {
|
||||
SoftKeyboardTrace(
|
||||
{SoftKeyboardTraceLevel? level, void Function(String)? sink})
|
||||
: level = level ?? parseSoftKeyboardTraceLevel(_traceFromEnvironment),
|
||||
_sink = sink ?? _printLine;
|
||||
|
||||
static const String tag = '[soft-keyboard]';
|
||||
|
||||
final SoftKeyboardTraceLevel level;
|
||||
final void Function(String line) _sink;
|
||||
int _seq = 0;
|
||||
|
||||
bool get enabled => level != SoftKeyboardTraceLevel.off;
|
||||
|
||||
bool get _withText => level == SoftKeyboardTraceLevel.full;
|
||||
|
||||
/// Records that [interpreter] starts from [initial].
|
||||
void start(SoftKeyboardInterpreter interpreter, TextEditingValue initial,
|
||||
{required String platform}) {
|
||||
if (!enabled) return;
|
||||
_seq = 0;
|
||||
_sink(jsonEncode({
|
||||
'trace': 'soft-keyboard',
|
||||
'v': 1,
|
||||
'level': level.name,
|
||||
'platform': platform,
|
||||
'interpreter': interpreter.name,
|
||||
'synthetic': false,
|
||||
'initial': encodeSoftKeyboardValue(initial, withText: _withText),
|
||||
}));
|
||||
}
|
||||
|
||||
/// Records one editing value and what was derived from it.
|
||||
void record(TextEditingValue value, List<SoftKeyboardAction> actions,
|
||||
{String? note}) {
|
||||
if (!enabled) return;
|
||||
_sink(jsonEncode({
|
||||
'n': ++_seq,
|
||||
...encodeSoftKeyboardValue(value, withText: _withText),
|
||||
'act': encodeSoftKeyboardActions(actions, withText: _withText),
|
||||
if (note != null) 'note': note,
|
||||
}));
|
||||
}
|
||||
|
||||
static void _printLine(String line) => debugPrint('$tag $line');
|
||||
}
|
||||
|
||||
/// Encodes an editing value.
|
||||
///
|
||||
/// With text, the sentinel is not spelled out: `lead` is the number of leading
|
||||
/// sentinel characters and `rest` whatever follows them. Without text there
|
||||
/// is only the length, because a typed sentinel character cannot be told from
|
||||
/// the sentinel and splitting the two would give it away.
|
||||
Map<String, Object?> encodeSoftKeyboardValue(TextEditingValue value,
|
||||
{required bool withText}) {
|
||||
final text = value.text;
|
||||
var lead = 0;
|
||||
while (lead < text.length && text[lead] == kSoftKeyboardSentinelChar) {
|
||||
lead++;
|
||||
}
|
||||
return {
|
||||
if (withText) ...{'lead': lead, 'rest': text.substring(lead)} else
|
||||
'len': text.length,
|
||||
'sel': [value.selection.baseOffset, value.selection.extentOffset],
|
||||
'comp': [value.composing.start, value.composing.end],
|
||||
};
|
||||
}
|
||||
|
||||
/// Encodes actions as `["bs", count]`, `["text", text]`, `["reset"]` and
|
||||
/// `["set", value]`. Without text, text is replaced by its length.
|
||||
List<Object?> encodeSoftKeyboardActions(List<SoftKeyboardAction> actions,
|
||||
{required bool withText}) {
|
||||
return [
|
||||
for (final action in actions)
|
||||
switch (action) {
|
||||
SoftKeyboardBackspace(:final count) => ['bs', count],
|
||||
SoftKeyboardText(:final text) => [
|
||||
'text',
|
||||
withText ? text : text.length
|
||||
],
|
||||
SoftKeyboardResetField() => ['reset'],
|
||||
SoftKeyboardSetField(:final value) => [
|
||||
'set',
|
||||
encodeSoftKeyboardValue(value, withText: withText)
|
||||
],
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -2116,9 +2116,7 @@ List<Entry> _sortList(List<Entry> list, SortBy sortType, bool ascending) {
|
||||
return ascending ? list : list.reversed.toList();
|
||||
} else if (sortType == SortBy.type) {
|
||||
// making list of only folders.
|
||||
final dirs = list
|
||||
.where((element) => element.isDirectory || element.isDrive)
|
||||
.toList();
|
||||
final dirs = list.where((element) => element.isDirectory).toList();
|
||||
|
||||
// sorting folders by name.
|
||||
dirs.sort((a, b) => a.name.toLowerCase().compareTo(b.name.toLowerCase()));
|
||||
@@ -2143,9 +2141,7 @@ List<Entry> _sortList(List<Entry> list, SortBy sortType, bool ascending) {
|
||||
}
|
||||
|
||||
// making list of only folders.
|
||||
final dirs = list
|
||||
.where((element) => element.isDirectory || element.isDrive)
|
||||
.toList();
|
||||
final dirs = list.where((element) => element.isDirectory).toList();
|
||||
// sorting folder list by name.
|
||||
dirs.sort((a, b) => a.name.toLowerCase().compareTo(b.name.toLowerCase()));
|
||||
|
||||
|
||||
@@ -1339,10 +1339,13 @@ class InputModel {
|
||||
/// Send key stroke event.
|
||||
/// [down] indicates the key's state(down or up).
|
||||
/// [press] indicates a click event(down and up).
|
||||
void inputKey(String name, {bool? down, bool? press}) {
|
||||
///
|
||||
/// The returned future completes when the event has been handed to the
|
||||
/// session. Await it when the next event must not overtake this one.
|
||||
Future<void> inputKey(String name, {bool? down, bool? press}) async {
|
||||
if (!keyboardPerm) return;
|
||||
if (isViewCamera) return;
|
||||
bind.sessionInputKey(
|
||||
await bind.sessionInputKey(
|
||||
sessionId: sessionId,
|
||||
name: name,
|
||||
down: down ?? false,
|
||||
|
||||
@@ -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]) {
|
||||
|
||||
@@ -191,8 +191,8 @@ class ServerModel with ChangeNotifier {
|
||||
});
|
||||
}
|
||||
|
||||
// Initial keyboard status is off on iOS; Android syncs it from InputService natively.
|
||||
if (isIOS) {
|
||||
// Initial keyboard status is off on mobile
|
||||
if (isMobile) {
|
||||
bind.mainSetOption(key: kOptionEnableKeyboard, value: 'N');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Loaded 100 of 255 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user