From a5b0c523fc8ee067735abcd03ec43e0a20d677d8 Mon Sep 17 00:00:00 2001 From: xuwenwei Date: Mon, 8 Jun 2026 23:12:09 +0800 Subject: [PATCH] Default 'enable-audio' to off via custom.txt (read by Rust load_custom_client) - Added flutter/macos/Runner/custom.txt with default-settings.enable-audio=N - Added custom.txt to Xcode Copy Bundle Resources (PBXResourcesBuildPhase) - RustDesk's load_custom_client() reads this file and injects into DEFAULT_SETTINGS - Users can still toggle 'Enable audio' in Settings; this just flips the default This addresses the user's request to disable all 4 audio behaviors by default (play remote sound, hear remote mic, voice call, capture host audio), all of which share the single 'enable-audio' option. --- flutter/macos/Runner.xcodeproj/project.pbxproj | 4 ++++ flutter/macos/Runner/custom.txt | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 flutter/macos/Runner/custom.txt diff --git a/flutter/macos/Runner.xcodeproj/project.pbxproj b/flutter/macos/Runner.xcodeproj/project.pbxproj index 8314c16..cc06861 100644 --- a/flutter/macos/Runner.xcodeproj/project.pbxproj +++ b/flutter/macos/Runner.xcodeproj/project.pbxproj @@ -26,6 +26,7 @@ 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; 7ED2B35F2BB007420099885C /* AppIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 7ED2B35E2BB007420099885C /* AppIcon.icns */; }; + AABBCC000100000000000001 /* custom.txt in Resources */ = {isa = PBXBuildFile; fileRef = AABBCC000200000000000002 /* custom.txt */; }; 84010BA8292CF66600152837 /* liblibrustdesk.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84010BA7292CF66600152837 /* liblibrustdesk.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; 84010BA9292CF68300152837 /* liblibrustdesk.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 84010BA7292CF66600152837 /* liblibrustdesk.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; C5E54335B73C89F72DB1B606 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26C84465887F29AE938039CB /* Pods_Runner.framework */; }; @@ -75,6 +76,7 @@ 7436B85D94E8F7B5A9324869 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; 7ED2B35E2BB007420099885C /* AppIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = AppIcon.icns; path = Runner/AppIcon.icns; sourceTree = ""; }; + AABBCC000200000000000002 /* custom.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = custom.txt; path = Runner/custom.txt; sourceTree = ""; }; 84010BA7292CF66600152837 /* liblibrustdesk.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = liblibrustdesk.dylib; path = ../../target/release/liblibrustdesk.dylib; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; C3BB669FF6190AE1B11BCAEA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; @@ -133,6 +135,7 @@ 7ED2B35E2BB007420099885C /* AppIcon.icns */, 33CC10F42044A3C60003C045 /* MainMenu.xib */, 33CC10F72044A3C60003C045 /* Info.plist */, + AABBCC000200000000000002 /* custom.txt */, ); name = Resources; path = ..; @@ -265,6 +268,7 @@ files = ( 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, 7ED2B35F2BB007420099885C /* AppIcon.icns in Resources */, + AABBCC000100000000000001 /* custom.txt in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/flutter/macos/Runner/custom.txt b/flutter/macos/Runner/custom.txt new file mode 100644 index 0000000..9fac560 --- /dev/null +++ b/flutter/macos/Runner/custom.txt @@ -0,0 +1,6 @@ +{ + "app-name": "RustDesk", + "default-settings": { + "enable-audio": "N" + } +}