Compare commits

..

7 Commits
1.3.4 ... 1.3.5

Author SHA1 Message Date
rustdesk
588103c6dc 1.3.5 2024-12-05 18:38:39 +08:00
fufesou
2ce9b108ed fix: linux, transparent window (#10192)
Signed-off-by: fufesou <linlong1266@gmail.com>
2024-12-05 17:26:34 +08:00
RustDesk
93e3107881 Revert "Revert "fix: workaround, linux window, transparent rounded corner (#1…" (#10191)
This reverts commit 468bdd6cc6.
2024-12-05 17:07:23 +08:00
RustDesk
468bdd6cc6 Revert "fix: workaround, linux window, transparent rounded corner (#10128)" (#10186)
This reverts commit 8d4c86fe7f.
2024-12-05 11:08:58 +08:00
Dmytro Zozulia
d5c5825ffd Update uk.rs (#10174) 2024-12-05 11:04:10 +08:00
RustDesk
fe4094777f Revert "fix: linux, window, workaround, mint, mate (#10146)" (#10184)
This reverts commit bd0a33e467.
2024-12-05 10:44:37 +08:00
fufesou
f13ef48cec fix: macos, aarch64, try fix running on 12.3 (#10183)
Signed-off-by: fufesou <linlong1266@gmail.com>
2024-12-05 10:38:22 +08:00
19 changed files with 25 additions and 156 deletions

View File

@@ -33,7 +33,7 @@ env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# vcpkg version: 2024.07.12 # vcpkg version: 2024.07.12
VCPKG_COMMIT_ID: "1de2026f28ead93ff1773e6e680387643e914ea1" VCPKG_COMMIT_ID: "1de2026f28ead93ff1773e6e680387643e914ea1"
VERSION: "1.3.4" VERSION: "1.3.5"
NDK_VERSION: "r27c" NDK_VERSION: "r27c"
#signing keys env variable checks #signing keys env variable checks
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}" ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
@@ -719,7 +719,7 @@ jobs:
shell: bash shell: bash
run: | run: |
cd "$(dirname "$(which flutter)")" cd "$(dirname "$(which flutter)")"
# https://github.com/flutter/flutter/issues/1.3.43 # https://github.com/flutter/flutter/issues/1.3.53
sed -i -e 's/_setFramesEnabledState(false);/\/\/_setFramesEnabledState(false);/g' ../packages/flutter/lib/src/scheduler/binding.dart sed -i -e 's/_setFramesEnabledState(false);/\/\/_setFramesEnabledState(false);/g' ../packages/flutter/lib/src/scheduler/binding.dart
grep -n '_setFramesEnabledState(false);' ../packages/flutter/lib/src/scheduler/binding.dart grep -n '_setFramesEnabledState(false);' ../packages/flutter/lib/src/scheduler/binding.dart

View File

@@ -18,7 +18,7 @@ env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# vcpkg version: 2024.06.15 # vcpkg version: 2024.06.15
VCPKG_COMMIT_ID: "f7423ee180c4b7f40d43402c2feb3859161ef625" VCPKG_COMMIT_ID: "f7423ee180c4b7f40d43402c2feb3859161ef625"
VERSION: "1.3.4" VERSION: "1.3.5"
NDK_VERSION: "r26d" NDK_VERSION: "r26d"
#signing keys env variable checks #signing keys env variable checks
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}" ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"

6
Cargo.lock generated
View File

@@ -1290,7 +1290,7 @@ dependencies = [
[[package]] [[package]]
name = "cpal" name = "cpal"
version = "0.15.3" version = "0.15.3"
source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#4d318ff778063ce14669fd4bd67a1673653fc6e5" source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#7cb4ed0bd5546bf209edde0d0e9da5194753f2c0"
dependencies = [ dependencies = [
"alsa", "alsa",
"cidre", "cidre",
@@ -5494,7 +5494,7 @@ dependencies = [
[[package]] [[package]]
name = "rustdesk" name = "rustdesk"
version = "1.3.4" version = "1.3.5"
dependencies = [ dependencies = [
"android-wakelock", "android-wakelock",
"android_logger", "android_logger",
@@ -5594,7 +5594,7 @@ dependencies = [
[[package]] [[package]]
name = "rustdesk-portable-packer" name = "rustdesk-portable-packer"
version = "1.3.4" version = "1.3.5"
dependencies = [ dependencies = [
"brotli", "brotli",
"dirs 5.0.1", "dirs 5.0.1",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "rustdesk" name = "rustdesk"
version = "1.3.4" version = "1.3.5"
authors = ["rustdesk <info@rustdesk.com>"] authors = ["rustdesk <info@rustdesk.com>"]
edition = "2021" edition = "2021"
build= "build.rs" build= "build.rs"

View File

@@ -18,7 +18,7 @@ AppDir:
id: rustdesk id: rustdesk
name: rustdesk name: rustdesk
icon: rustdesk icon: rustdesk
version: 1.3.4 version: 1.3.5
exec: usr/lib/rustdesk/rustdesk exec: usr/lib/rustdesk/rustdesk
exec_args: $@ exec_args: $@
apt: apt:

View File

@@ -18,7 +18,7 @@ AppDir:
id: rustdesk id: rustdesk
name: rustdesk name: rustdesk
icon: rustdesk icon: rustdesk
version: 1.3.4 version: 1.3.5
exec: usr/lib/rustdesk/rustdesk exec: usr/lib/rustdesk/rustdesk
exec_args: $@ exec_args: $@
apt: apt:

View File

@@ -1,7 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:math'; import 'dart:math';
import 'dart:io';
import 'package:back_button_interceptor/back_button_interceptor.dart'; import 'package:back_button_interceptor/back_button_interceptor.dart';
import 'package:desktop_multi_window/desktop_multi_window.dart'; import 'package:desktop_multi_window/desktop_multi_window.dart';
@@ -3460,35 +3459,6 @@ Widget buildPresetPasswordWarning() {
); );
} }
bool get isLinuxMateDesktop =>
isLinux &&
(Platform.environment['XDG_CURRENT_DESKTOP']?.toLowerCase() == 'mate' ||
Platform.environment['XDG_SESSION_DESKTOP']?.toLowerCase() == 'mate' ||
Platform.environment['DESKTOP_SESSION']?.toLowerCase() == 'mate');
Map<String, dynamic>? _linuxOsDistro;
String getLinuxOsDistroId() {
if (_linuxOsDistro == null) {
String osInfo = bind.getOsDistroInfo();
if (osInfo.isEmpty) {
_linuxOsDistro = {};
} else {
try {
_linuxOsDistro = jsonDecode(osInfo);
} catch (e) {
debugPrint('Failed to parse os info: $e');
// Don't call `bind.getOsDistroInfo()` again if failed to parse osInfo.
_linuxOsDistro = {};
}
}
}
return (_linuxOsDistro?['id'] ?? '') as String;
}
bool get isLinuxMint =>
getLinuxOsDistroId().toLowerCase().contains('linuxmint');
// https://github.com/leanflutter/window_manager/blob/87dd7a50b4cb47a375b9fc697f05e56eea0a2ab3/lib/src/widgets/virtual_window_frame.dart#L44 // https://github.com/leanflutter/window_manager/blob/87dd7a50b4cb47a375b9fc697f05e56eea0a2ab3/lib/src/widgets/virtual_window_frame.dart#L44
Widget buildVirtualWindowFrame(BuildContext context, Widget child) { Widget buildVirtualWindowFrame(BuildContext context, Widget child) {
boxShadow() => isMainDesktopWindow boxShadow() => isMainDesktopWindow

View File

@@ -485,16 +485,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
child = keyListenerBuilder(context, child); child = keyListenerBuilder(context, child);
} }
if (isLinux) { if (isLinux) {
// `(!(isLinuxMateDesktop || isLinuxMint))` is not used here for clarity. child = buildVirtualWindowFrame(context, child);
// `isLinuxMint` will call ffi function.
if (!isLinuxMateDesktop) {
if (!isLinuxMint) {
debugPrint(
'Linux distro is not linuxmint, and desktop is not mate, '
'so we build virtual window frame.');
child = buildVirtualWindowFrame(context, child);
}
}
} }
return child; return child;
}, },

View File

@@ -1848,9 +1848,5 @@ class RustdeskImpl {
throw UnimplementedError("sessionGetConnToken"); throw UnimplementedError("sessionGetConnToken");
} }
String getOsDistroInfo({dynamic hint}) {
return '';
}
void dispose() {} void dispose() {}
} }

View File

@@ -14,10 +14,12 @@ struct _MyApplication {
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
GtkWidget *find_gl_area(GtkWidget *widget);
void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view);
extern bool gIsConnectionManager; extern bool gIsConnectionManager;
GtkWidget *find_gl_area(GtkWidget *widget); GtkWidget *find_gl_area(GtkWidget *widget);
void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view);
// Implements GApplication::activate. // Implements GApplication::activate.
static void my_application_activate(GApplication* application) { static void my_application_activate(GApplication* application) {
@@ -70,17 +72,18 @@ static void my_application_activate(GApplication* application) {
height = 490; height = 490;
} }
gtk_window_set_default_size(window, width, height); // <-- comment this line gtk_window_set_default_size(window, width, height); // <-- comment this line
gtk_widget_show(GTK_WIDGET(window)); // gtk_widget_show(GTK_WIDGET(window));
gtk_widget_set_opacity(GTK_WIDGET(window), 0); gtk_widget_set_opacity(GTK_WIDGET(window), 0);
g_autoptr(FlDartProject) project = fl_dart_project_new(); g_autoptr(FlDartProject) project = fl_dart_project_new();
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
FlView* view = fl_view_new(project); FlView* view = fl_view_new(project);
gtk_widget_show(GTK_WIDGET(view));
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
try_set_transparent(window, screen, view); try_set_transparent(window, gtk_window_get_screen(window), view);
gtk_widget_show(GTK_WIDGET(window));
gtk_widget_show(GTK_WIDGET(view));
fl_register_plugins(FL_PLUGIN_REGISTRY(view)); fl_register_plugins(FL_PLUGIN_REGISTRY(view));
@@ -150,70 +153,12 @@ GtkWidget *find_gl_area(GtkWidget *widget)
return NULL; return NULL;
} }
bool is_linux_mint()
{
bool is_mint = false;
char line[256];
FILE *fp = fopen("/etc/os-release", "r");
if (fp == NULL) {
return false;
}
while (fgets(line, sizeof(line), fp)) {
if (strstr(line, "ID=linuxmint") != NULL) {
is_mint = true;
break;
}
}
fclose(fp);
return is_mint;
}
bool is_desktop_mate()
{
const char* desktop = NULL;
desktop = getenv("XDG_CURRENT_DESKTOP");
printf("Linux desktop, XDG_CURRENT_DESKTOP: %s\n", desktop == NULL ? "" : desktop);
if (desktop == NULL) {
desktop = getenv("XDG_SESSION_DESKTOP");
printf("Linux desktop, XDG_SESSION_DESKTOP: %s\n", desktop == NULL ? "" : desktop);
}
if (desktop == NULL) {
desktop = getenv("DESKTOP_SESSION");
printf("Linux desktop, DESKTOP_SESSION: %s\n", desktop == NULL ? "" : desktop);
}
if (desktop != NULL && strcasecmp(desktop, "mate") == 0) {
return true;
}
return false;
}
bool skip_setting_transparent()
{
if (is_desktop_mate()) {
printf("Linux desktop, MATE\n");
return true;
}
if (is_linux_mint()) {
printf("Linux desktop, Linux Mint\n");
return true;
}
return false;
}
// https://github.com/flutter/flutter/issues/152154 // https://github.com/flutter/flutter/issues/152154
// Remove this workaround when flutter version is updated. // Remove this workaround when flutter version is updated.
void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view) void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view)
{ {
GtkWidget *gl_area = NULL; GtkWidget *gl_area = NULL;
if (skip_setting_transparent()) {
printf("Skip setting transparent\n");
return;
}
printf("Try setting transparent\n"); printf("Try setting transparent\n");
gl_area = find_gl_area(GTK_WIDGET(view)); gl_area = find_gl_area(GTK_WIDGET(view));

View File

@@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# 1.1.9-1 works for android, but for ios it becomes 1.1.91, need to set it to 1.1.9-a.1 for iOS, will get 1.1.9.1, but iOS store not allow 4 numbers # 1.1.9-1 works for android, but for ios it becomes 1.1.91, need to set it to 1.1.9-a.1 for iOS, will get 1.1.9.1, but iOS store not allow 4 numbers
version: 1.3.4+53 version: 1.3.5+54
environment: environment:
sdk: '^3.1.0' sdk: '^3.1.0'

View File

@@ -13,35 +13,22 @@ pub const XDG_CURRENT_DESKTOP: &str = "XDG_CURRENT_DESKTOP";
pub struct Distro { pub struct Distro {
pub name: String, pub name: String,
pub id: String,
pub version_id: String, pub version_id: String,
} }
impl Distro { impl Distro {
fn new() -> Self { fn new() -> Self {
// to-do:
// 1. Remove `run_cmds`, read file once
// 2. Add more distro infos
let name = run_cmds("awk -F'=' '/^NAME=/ {print $2}' /etc/os-release") let name = run_cmds("awk -F'=' '/^NAME=/ {print $2}' /etc/os-release")
.unwrap_or_default() .unwrap_or_default()
.trim() .trim()
.trim_matches('"') .trim_matches('"')
.to_string(); .to_string();
let id = run_cmds("awk -F'=' '/^ID=/ {print $2}' /etc/os-release")
.unwrap_or_default()
.trim()
.trim_matches('"')
.to_string();
let version_id = run_cmds("awk -F'=' '/^VERSION_ID=/ {print $2}' /etc/os-release") let version_id = run_cmds("awk -F'=' '/^VERSION_ID=/ {print $2}' /etc/os-release")
.unwrap_or_default() .unwrap_or_default()
.trim() .trim()
.trim_matches('"') .trim_matches('"')
.to_string(); .to_string();
Self { Self { name, version_id }
name,
id,
version_id,
}
} }
} }

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "rustdesk-portable-packer" name = "rustdesk-portable-packer"
version = "1.3.4" version = "1.3.5"
edition = "2021" edition = "2021"
description = "RustDesk Remote Desktop" description = "RustDesk Remote Desktop"

View File

@@ -1,5 +1,5 @@
pkgname=rustdesk pkgname=rustdesk
pkgver=1.3.4 pkgver=1.3.5
pkgrel=0 pkgrel=0
epoch= epoch=
pkgdesc="" pkgdesc=""

View File

@@ -1,5 +1,5 @@
Name: rustdesk Name: rustdesk
Version: 1.3.4 Version: 1.3.5
Release: 0 Release: 0
Summary: RPM package Summary: RPM package
License: GPL-3.0 License: GPL-3.0

View File

@@ -1,5 +1,5 @@
Name: rustdesk Name: rustdesk
Version: 1.3.4 Version: 1.3.5
Release: 0 Release: 0
Summary: RPM package Summary: RPM package
License: GPL-3.0 License: GPL-3.0

View File

@@ -1,5 +1,5 @@
Name: rustdesk Name: rustdesk
Version: 1.3.4 Version: 1.3.5
Release: 0 Release: 0
Summary: RPM package Summary: RPM package
License: GPL-3.0 License: GPL-3.0

View File

@@ -19,7 +19,6 @@ use hbb_common::allow_err;
use hbb_common::{ use hbb_common::{
config::{self, LocalConfig, PeerConfig, PeerInfoSerde}, config::{self, LocalConfig, PeerConfig, PeerInfoSerde},
fs, lazy_static, log, fs, lazy_static, log,
message_proto::Hash,
rendezvous_proto::ConnType, rendezvous_proto::ConnType,
ResultType, ResultType,
}; };
@@ -2343,25 +2342,6 @@ pub fn main_audio_support_loopback() -> SyncReturn<bool> {
SyncReturn(is_surpport) SyncReturn(is_surpport)
} }
pub fn get_os_distro_info() -> SyncReturn<String> {
#[cfg(target_os = "linux")]
{
let distro = &hbb_common::platform::linux::DISTRO;
SyncReturn(
serde_json::to_string(&HashMap::from([
("name", distro.name.clone()),
("id", distro.id.clone()),
("version_id", distro.version_id.clone()),
]))
.unwrap_or_default(),
)
}
#[cfg(not(target_os = "linux"))]
{
SyncReturn("".to_owned())
}
}
#[cfg(target_os = "android")] #[cfg(target_os = "android")]
pub mod server_side { pub mod server_side {
use hbb_common::{config, log}; use hbb_common::{config, log};

View File

@@ -246,7 +246,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Paste", "Вставити"), ("Paste", "Вставити"),
("Paste here?", "Вставити сюди?"), ("Paste here?", "Вставити сюди?"),
("Are you sure to close the connection?", "Ви впевнені, що хочете завершити підключення?"), ("Are you sure to close the connection?", "Ви впевнені, що хочете завершити підключення?"),
("Download new version", "Отримайте нову версію"), ("Download new version", "Завантажити нову версію"),
("Touch mode", "Сенсорний режим"), ("Touch mode", "Сенсорний режим"),
("Mouse mode", "Режим миші"), ("Mouse mode", "Режим миші"),
("One-Finger Tap", "Дотик одним пальцем"), ("One-Finger Tap", "Дотик одним пальцем"),