refactor linux install/uninstall service as windows

This commit is contained in:
rustdesk 2023-06-07 23:08:50 +08:00
parent 209e460f3f
commit 7f51f8d976
8 changed files with 309 additions and 195 deletions

View File

@ -78,6 +78,9 @@ fn install_oboe() {
#[cfg(feature = "flutter")]
fn gen_flutter_rust_bridge() {
if std::env::var("IGNORE_FFIGEN").is_ok() {
return;
}
use lib_flutter_rust_bridge_codegen::{
config_parse, frb_codegen, get_symbols_if_no_duplicates, RawOpts,
};

View File

@ -5,10 +5,10 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "0c80aeab9bc807ab10022cd3b2f4cf2ecdf231949dc1ddd9442406a003f19201"
sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a
url: "https://pub.dev"
source: hosted
version: "52.0.0"
version: "61.0.0"
after_layout:
dependency: transitive
description:
@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: analyzer
sha256: cd8ee83568a77f3ae6b913a36093a1c9b1264e7cb7f834d9ddd2311dade9c1f4
sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562
url: "https://pub.dev"
source: hosted
version: "5.4.0"
version: "5.13.0"
animations:
dependency: transitive
description:
@ -37,26 +37,26 @@ packages:
dependency: transitive
description:
name: archive
sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d
sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a"
url: "https://pub.dev"
source: hosted
version: "3.3.6"
version: "3.3.7"
args:
dependency: transitive
description:
name: args
sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
url: "https://pub.dev"
source: hosted
version: "2.4.1"
version: "2.4.2"
async:
dependency: transitive
description:
name: async
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.10.0"
version: "2.11.0"
auto_size_text:
dependency: "direct main"
description:
@ -73,22 +73,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.0.2"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
bot_toast:
dependency: "direct main"
description:
name: bot_toast
sha256: "19306147033316a7873c5d261b874fca3f341c05e4e1c12be56153ad11187edd"
sha256: db6950851aab00ef04b386eb3c76c83739eaffcb6b80d0dc42a675ef7584623b
url: "https://pub.dev"
source: hosted
version: "4.0.3"
version: "4.0.4"
build:
dependency: transitive
description:
name: build
sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777"
sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc"
url: "https://pub.dev"
source: hosted
version: "2.3.1"
version: "2.4.0"
build_cli_annotations:
dependency: transitive
description:
@ -109,34 +117,34 @@ packages:
dependency: transitive
description:
name: build_daemon
sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf"
sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "4.0.0"
build_resolvers:
dependency: transitive
description:
name: build_resolvers
sha256: "7c35a3a7868626257d8aee47b51c26b9dba11eaddf3431117ed2744951416aab"
sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.2.0"
build_runner:
dependency: "direct dev"
description:
name: build_runner
sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727
sha256: "5e1929ad37d48bd382b124266cb8e521de5548d406a45a5ae6656c13dab73e37"
url: "https://pub.dev"
source: hosted
version: "2.3.3"
version: "2.4.5"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292"
sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41"
url: "https://pub.dev"
source: hosted
version: "7.2.7"
version: "7.2.10"
built_collection:
dependency: transitive
description:
@ -149,10 +157,10 @@ packages:
dependency: transitive
description:
name: built_value
sha256: "169565c8ad06adb760c3645bf71f00bff161b00002cace266cad42c5d22a7725"
sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166"
url: "https://pub.dev"
source: hosted
version: "8.4.3"
version: "8.6.1"
cached_network_image:
dependency: transitive
description:
@ -197,10 +205,10 @@ packages:
dependency: transitive
description:
name: checked_yaml
sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311"
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
url: "https://pub.dev"
source: hosted
version: "2.0.2"
version: "2.0.3"
cli_util:
dependency: transitive
description:
@ -221,10 +229,10 @@ packages:
dependency: transitive
description:
name: code_builder
sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe"
sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189"
url: "https://pub.dev"
source: hosted
version: "4.4.0"
version: "4.5.0"
collection:
dependency: transitive
description:
@ -261,34 +269,34 @@ packages:
dependency: transitive
description:
name: cross_file
sha256: f71079978789bc2fe78d79227f1f8cfe195b31bbd8db2399b0d15a4b96fb843b
sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9"
url: "https://pub.dev"
source: hosted
version: "0.3.3+2"
version: "0.3.3+4"
crypto:
dependency: transitive
description:
name: crypto
sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "3.0.3"
csslib:
dependency: transitive
description:
name: csslib
sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745
sha256: "831883fb353c8bdc1d71979e5b342c7d88acfbc643113c14ae51e2442ea0f20f"
url: "https://pub.dev"
source: hosted
version: "0.17.2"
version: "0.17.3"
dart_style:
dependency: transitive
description:
name: dart_style
sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4"
sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad
url: "https://pub.dev"
source: hosted
version: "2.2.4"
version: "2.3.1"
dash_chat_2:
dependency: "direct main"
description:
@ -383,10 +391,10 @@ packages:
dependency: "direct main"
description:
name: dropdown_button2
sha256: "4458d81bfd24207f3d58f66f78097064e02f810f94cf1bc80bf20fe7685ebc80"
sha256: "374f2390161bf782b4896f0b1b24cbb2b5daaa1cfb11047c3307461dcdf44e07"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
version: "2.1.3"
event_bus:
dependency: transitive
description:
@ -407,10 +415,10 @@ packages:
dependency: "direct main"
description:
name: ffi
sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "2.0.2"
ffigen:
dependency: "direct dev"
description:
@ -431,18 +439,18 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: d090ae03df98b0247b82e5928f44d1b959867049d18d73635e2e0bc3f49542b9
sha256: b85eb92b175767fdaa0c543bf3b0d1f610fe966412ea72845fe5ba7801e763ff
url: "https://pub.dev"
source: hosted
version: "5.2.5"
version: "5.2.10"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: "04be3e934c52e082558cc9ee21f42f5c1cd7a1262f4c63cd0357c08d5bba81ec"
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
version: "1.1.0"
flutter:
dependency: "direct main"
description: flutter
@ -493,10 +501,10 @@ packages:
dependency: "direct main"
description:
name: flutter_keyboard_visibility
sha256: "86b71bbaffa38e885f5c21b1182408b9be6951fd125432cf6652c636254cef2d"
sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb"
url: "https://pub.dev"
source: hosted
version: "5.4.0"
version: "5.4.1"
flutter_keyboard_visibility_linux:
dependency: transitive
description:
@ -570,10 +578,10 @@ packages:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "60fc7b78455b94e6de2333d2f95196d32cf5c22f4b0b0520a628804cb463503b"
sha256: "950e77c2bbe1692bc0874fc7fb491b96a4dc340457f4ea1641443d0a6c1ea360"
url: "https://pub.dev"
source: hosted
version: "2.0.7"
version: "2.0.15"
flutter_rust_bridge:
dependency: "direct main"
description:
@ -586,10 +594,10 @@ packages:
dependency: "direct main"
description:
name: flutter_svg
sha256: f991fdb1533c3caeee0cdc14b04f50f0c3916f0dbcbc05237ccbe4e3c6b93f3f
sha256: "6ff8c902c8056af9736de2689f63f81c42e2d642b9f4c79dbf8790ae48b63012"
url: "https://pub.dev"
source: hosted
version: "2.0.5"
version: "2.0.6"
flutter_web_plugins:
dependency: transitive
description: flutter
@ -599,10 +607,10 @@ packages:
dependency: "direct dev"
description:
name: freezed
sha256: e819441678f1679b719008ff2ff0ef045d66eed9f9ec81166ca0d9b02a187454
sha256: a9520490532087cf38bf3f7de478ab6ebeb5f68bb1eb2641546d92719b224445
url: "https://pub.dev"
source: hosted
version: "2.3.2"
version: "2.3.5"
freezed_annotation:
dependency: "direct main"
description:
@ -631,34 +639,34 @@ packages:
dependency: transitive
description:
name: glob
sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c"
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
graphs:
dependency: transitive
description:
name: graphs
sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2
sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.3.1"
html:
dependency: transitive
description:
name: html
sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269
sha256: "58e3491f7bf0b6a4ea5110c0c688877460d1a6366731155c4a4580e7ded773e8"
url: "https://pub.dev"
source: hosted
version: "0.15.1"
version: "0.15.3"
http:
dependency: "direct main"
description:
name: http
sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482"
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
url: "https://pub.dev"
source: hosted
version: "0.13.5"
version: "0.13.6"
http_multi_server:
dependency: transitive
description:
@ -695,42 +703,42 @@ packages:
dependency: "direct main"
description:
name: image_picker
sha256: f98d76672d309c8b7030c323b3394669e122d52b307d2bbd8d06bd70f5b2aabe
sha256: "9978d3510af4e6a902e545ce19229b926e6de6a1828d6134d3aab2e129a4d270"
url: "https://pub.dev"
source: hosted
version: "0.8.6+1"
version: "0.8.7+5"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
sha256: b1cbfec0f5aef427a18eb573f5445af8c9c568626bf3388553e40c263d3f7368
sha256: "3083c3a3245adf9f3eb7bacf0eaa6a1f087dd538fab73a13a2f7907602601692"
url: "https://pub.dev"
source: hosted
version: "0.8.5+5"
version: "0.8.6+19"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
sha256: "7d319fb74955ca46d9bf7011497860e3923bb67feebcf068f489311065863899"
sha256: "98f50d6b9f294c8ba35e25cc0d13b04bfddd25dbc8d32fa9d566a6572f2c081c"
url: "https://pub.dev"
source: hosted
version: "2.1.10"
version: "2.1.12"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
sha256: "39c013200046d14c58b71dc4fa3d00e425fc9c699d589136cd3ca018727c0493"
sha256: d779210bda268a03b57e923fb1e410f32f5c5e708ad256348bcbf1f44f558fd0
url: "https://pub.dev"
source: hosted
version: "0.8.6+6"
version: "0.8.7+4"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
sha256: "7cef2f28f4f2fef99180f636c3d446b4ccbafd6ba0fad2adc9a80c4040f656b8"
sha256: "1991219d9dbc42a99aff77e663af8ca51ced592cd6685c9485e3458302d3d4f8"
url: "https://pub.dev"
source: hosted
version: "2.6.2"
version: "2.6.3"
intl:
dependency: transitive
description:
@ -759,34 +767,34 @@ packages:
dependency: transitive
description:
name: json_annotation
sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317
sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
url: "https://pub.dev"
source: hosted
version: "4.8.0"
version: "4.8.1"
lints:
dependency: transitive
description:
name: lints
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "2.1.1"
logging:
dependency: transitive
description:
name: logging
sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d"
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.2.0"
matcher:
dependency: transitive
description:
name: matcher
sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.14"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
@ -879,50 +887,50 @@ packages:
dependency: "direct main"
description:
name: path_provider
sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95
sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2"
url: "https://pub.dev"
source: hosted
version: "2.0.12"
version: "2.0.15"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e
sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86"
url: "https://pub.dev"
source: hosted
version: "2.0.22"
version: "2.0.27"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "62a68e7e1c6c459f9289859e2fae58290c981ce21d1697faf54910fe1faa4c74"
sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.2.3"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379
sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57
url: "https://pub.dev"
source: hosted
version: "2.1.7"
version: "2.1.11"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76
sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec"
url: "https://pub.dev"
source: hosted
version: "2.0.5"
version: "2.0.6"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c
sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
version: "2.1.7"
pedantic:
dependency: transitive
description:
@ -935,18 +943,18 @@ packages:
dependency: "direct main"
description:
name: percent_indicator
sha256: cec41f67181fbd5322aa68b355621d1a4eea827426b8eeb613f6cbe195ff7b4a
sha256: c37099ad833a883c9d71782321cb65c3a848c21b6939b6185f0ff6640d05814c
url: "https://pub.dev"
source: hosted
version: "4.2.2"
version: "4.2.3"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4"
sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
url: "https://pub.dev"
source: hosted
version: "5.1.0"
version: "5.4.0"
platform:
dependency: transitive
description:
@ -959,18 +967,18 @@ packages:
dependency: transitive
description:
name: plugin_platform_interface
sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a
sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
version: "2.1.4"
pointycastle:
dependency: transitive
description:
name: pointycastle
sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
url: "https://pub.dev"
source: hosted
version: "3.6.2"
version: "3.7.3"
pool:
dependency: transitive
description:
@ -999,26 +1007,26 @@ packages:
dependency: transitive
description:
name: pub_semver
sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17"
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
version: "2.1.4"
pubspec_parse:
dependency: transitive
description:
name: pubspec_parse
sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a"
sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.2.3"
puppeteer:
dependency: transitive
description:
name: puppeteer
sha256: "4e235aaf9a338a45c9eb1ee38956e0ba369867bf144d7a27fdaf245409b2b87b"
sha256: dd49117259867d0ce0de33ddd95628fb70cff94581a6432c08272447b8dd1d27
url: "https://pub.dev"
source: hosted
version: "2.21.0"
version: "2.24.0"
qr_code_scanner:
dependency: "direct main"
description:
@ -1072,26 +1080,26 @@ packages:
dependency: transitive
description:
name: shelf
sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
url: "https://pub.dev"
source: hosted
version: "1.4.0"
version: "1.4.1"
shelf_static:
dependency: transitive
description:
name: shelf_static
sha256: e792b76b96a36d4a41b819da593aff4bdd413576b3ba6150df5d8d9996d2e74c
sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.1.2"
shelf_web_socket:
dependency: transitive
description:
name: shelf_web_socket
sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
url: "https://pub.dev"
source: hosted
version: "1.0.3"
version: "1.0.4"
simple_observable:
dependency: transitive
description:
@ -1109,34 +1117,34 @@ packages:
dependency: transitive
description:
name: source_gen
sha256: "2d79738b6bbf38a43920e2b8d189e9a3ce6cc201f4b8fc76be5e4fe377b1c38d"
sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33"
url: "https://pub.dev"
source: hosted
version: "1.2.6"
version: "1.3.2"
source_span:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
sqflite:
dependency: transitive
description:
name: sqflite
sha256: "78324387dc81df14f78df06019175a86a2ee0437624166c382e145d0a7fd9a4f"
sha256: b4d6710e1200e96845747e37338ea8a819a12b51689a3bcf31eff0003b37a0b9
url: "https://pub.dev"
source: hosted
version: "2.2.4+1"
version: "2.2.8+4"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: bfd6973aaeeb93475bc0d875ac9aefddf7965ef22ce09790eb963992ffc5183f
sha256: e77abf6ff961d69dfef41daccbb66b51e9983cdd5cb35bf30733598057401555
url: "https://pub.dev"
source: hosted
version: "2.4.2+2"
version: "2.4.5"
stack_trace:
dependency: transitive
description:
@ -1173,10 +1181,10 @@ packages:
dependency: transitive
description:
name: synchronized
sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b"
sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.1.0"
term_glyph:
dependency: transitive
description:
@ -1185,6 +1193,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
texture_rgba_renderer:
dependency: "direct main"
description:
@ -1221,10 +1237,10 @@ packages:
dependency: transitive
description:
name: typed_data
sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
url: "https://pub.dev"
source: hosted
version: "1.3.1"
version: "1.3.2"
uni_links:
dependency: "direct main"
description:
@ -1262,74 +1278,74 @@ packages:
dependency: transitive
description:
name: universal_io
sha256: "79f78ddad839ee3aae3ec7c01eb4575faf0d5c860f8e5223bc9f9c17f7f03cef"
sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad"
url: "https://pub.dev"
source: hosted
version: "2.0.4"
version: "2.2.2"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: "698fa0b4392effdc73e9e184403b627362eb5fbf904483ac9defbb1c2191d809"
sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3
url: "https://pub.dev"
source: hosted
version: "6.1.8"
version: "6.1.11"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "3e2f6dfd2c7d9cd123296cab8ef66cfc2c1a13f5845f42c7a0f365690a8a7dd1"
sha256: eed4e6a1164aa9794409325c3b707ff424d4d1c2a785e7db67f8bbda00e36e51
url: "https://pub.dev"
source: hosted
version: "6.0.23"
version: "6.0.35"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: bb328b24d3bccc20bdf1024a0990ac4f869d57663660de9c936fb8c043edefe3
sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2"
url: "https://pub.dev"
source: hosted
version: "6.0.18"
version: "6.1.4"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: "318c42cba924e18180c029be69caf0a1a710191b9ec49bb42b5998fdcccee3cc"
sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "3.0.5"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: "41988b55570df53b3dd2a7fc90c76756a963de6a8c5f8e113330cb35992e2094"
sha256: "91ee3e75ea9dadf38036200c5d3743518f4a5eb77a8d13fda1ee5764373f185e"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "3.0.5"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "4eae912628763eb48fc214522e58e942fd16ce195407dbf45638239523c759a6"
sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "44d79408ce9f07052095ef1f9a693c258d6373dc3944249374e30eff7219ccb0"
sha256: "6bb1e5d7fe53daf02a8fee85352432a40b1f868a81880e99ec7440113d5cfcab"
url: "https://pub.dev"
source: hosted
version: "2.0.14"
version: "2.0.17"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: b6217370f8eb1fd85c8890c539f5a639a01ab209a36db82c921ebeacefc7a615
sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771"
url: "https://pub.dev"
source: hosted
version: "3.0.3"
version: "3.0.6"
uuid:
dependency: transitive
description:
@ -1342,26 +1358,26 @@ packages:
dependency: transitive
description:
name: vector_graphics
sha256: ea8d3fc7b2e0f35de38a7465063ecfcf03d8217f7962aa2a6717132cb5d43a79
sha256: b96f10cbdfcbd03a65758633a43e7d04574438f059b1043104b5d61b23d38a4f
url: "https://pub.dev"
source: hosted
version: "1.1.5"
version: "1.1.6"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: a5eaa5d19e123ad4f61c3718ca1ed921c4e6254238d9145f82aa214955d9aced
sha256: "57a8e6e24662a3bdfe3b3d61257db91768700c0b8f844e235877b56480f31c69"
url: "https://pub.dev"
source: hosted
version: "1.1.5"
version: "1.1.6"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "15edc42f7eaa478ce854eaf1fbb9062a899c0e4e56e775dd73b7f4709c97c4ca"
sha256: "7430f5d834d0db4560d7b19863362cd892f1e52b43838553a3c5cdfc9ab28e5b"
url: "https://pub.dev"
source: hosted
version: "1.1.5"
version: "1.1.6"
vector_math:
dependency: transitive
description:
@ -1374,42 +1390,42 @@ packages:
dependency: transitive
description:
name: video_player
sha256: "59f7f31c919c59cbedd37c617317045f5f650dc0eeb568b0b0de9a36472bdb28"
sha256: de95f0e9405f29b5582573d4166132e71f83b3158aac14e8ee5767a54f4f1fbd
url: "https://pub.dev"
source: hosted
version: "2.5.1"
version: "2.6.1"
video_player_android:
dependency: transitive
description:
name: video_player_android
sha256: "984388511230bac63feb53b2911a70e829fe0976b6b2213f5c579c4e0a882db3"
sha256: f338a5a396c845f4632959511cad3542cdf3167e1b2a1a948ef07f7123c03608
url: "https://pub.dev"
source: hosted
version: "2.3.10"
version: "2.4.9"
video_player_avfoundation:
dependency: transitive
description:
name: video_player_avfoundation
sha256: d9f7a46d6a77680adb03ec05a381025d6e890ebe636637c6c3014cc3926b97e9
sha256: "4c274e439f349a0ee5cb3c42978393ede173a443b98f50de6ffe6900eaa19216"
url: "https://pub.dev"
source: hosted
version: "2.3.8"
version: "2.4.6"
video_player_platform_interface:
dependency: transitive
description:
name: video_player_platform_interface
sha256: "42bb75de5e9b79e1f20f1d95f688fac0f95beac4d89c6eb2cd421724d4432dae"
sha256: a8c4dcae2a7a6e7cc1d7f9808294d968eca1993af34a98e95b9bdfa959bec684
url: "https://pub.dev"
source: hosted
version: "6.0.1"
version: "6.1.0"
video_player_web:
dependency: transitive
description:
name: video_player_web
sha256: b649b07b8f8f553bee4a97a0a53d0fe78a70b115eafaf0105b612b32b05ddb99
sha256: "44ce41424d104dfb7cf6982cc6b84af2b007a24d126406025bf40de5d481c74c"
url: "https://pub.dev"
source: hosted
version: "2.0.13"
version: "2.0.16"
visibility_detector:
dependency: "direct main"
description:
@ -1462,26 +1478,26 @@ packages:
dependency: transitive
description:
name: watcher
sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0"
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
version: "1.1.0"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
url: "https://pub.dev"
source: hosted
version: "2.3.0"
version: "2.4.0"
win32:
dependency: "direct main"
description:
name: win32
sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46
sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4
url: "https://pub.dev"
source: hosted
version: "3.1.3"
version: "3.1.4"
win32_registry:
dependency: transitive
description:
@ -1512,34 +1528,34 @@ packages:
dependency: transitive
description:
name: xdg_directories
sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86
sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1
url: "https://pub.dev"
source: hosted
version: "0.2.0+3"
version: "1.0.0"
xml:
dependency: transitive
description:
name: xml
sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
url: "https://pub.dev"
source: hosted
version: "6.2.2"
version: "6.3.0"
yaml:
dependency: transitive
description:
name: yaml
sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370"
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
url: "https://pub.dev"
source: hosted
version: "3.1.1"
version: "3.1.2"
yaml_edit:
dependency: transitive
description:
name: yaml_edit
sha256: "4240d1b19841b8af5786121e4e357735cc2a8ffb19176bff5769d73c34e2a8a5"
sha256: "1579d4a0340a83cf9e4d580ea51a16329c916973bffd5bd4b45e911b25d46bfd"
url: "https://pub.dev"
source: hosted
version: "2.0.3"
version: "2.1.1"
zxing2:
dependency: "direct main"
description:
@ -1549,5 +1565,5 @@ packages:
source: hosted
version: "0.2.0"
sdks:
dart: ">=3.0.0-0 <4.0.0"
dart: ">=3.0.0 <4.0.0"
flutter: ">=3.7.0-0"

View File

@ -179,6 +179,12 @@ pub fn core_main() -> Option<Vec<String>> {
log::info!("start --server with user {}", crate::username());
#[cfg(any(target_os = "linux", target_os = "windows"))]
{
#[cfg(target_os = "linux")]
if crate::platform::is_root() {
hbb_common::allow_err!(crate::platform::run_as_user(vec!["--tray"], None));
} else {
hbb_common::allow_err!(crate::run_me(vec!["--tray"]));
}
crate::start_server(true);
return None;
}

View File

@ -3,6 +3,7 @@ use desktop::Desktop;
pub use hbb_common::platform::linux::*;
use hbb_common::{
allow_err, bail,
config::Config,
libc::{c_char, c_int, c_long, c_void},
log,
message_proto::Resolution,
@ -306,10 +307,15 @@ fn force_stop_server() {
}
pub fn start_os_service() {
check_if_stop_service();
stop_rustdesk_servers();
stop_subprocess();
start_uinput_service();
std::thread::spawn(|| {
allow_err!(crate::ipc::start(crate::POSTFIX_SERVICE));
});
let running = Arc::new(AtomicBool::new(true));
let r = running.clone();
let mut desktop = Desktop::default();
@ -1075,3 +1081,86 @@ impl WakeLock {
)
}
}
fn has_cmd(cmd: &str) -> bool {
std::process::Command::new("which")
.arg(cmd)
.status()
.map(|x| x.success())
.unwrap_or_default()
}
pub fn run_cmds_pkexec(cmds: &str) -> bool {
const DONE: &str = "RUN_CMDS_PKEXEC_DONE";
if let Ok(output) = std::process::Command::new("pkexec")
.arg("sh")
.arg("-c")
.arg(&format!("{cmds};echo {DONE}"))
.output()
{
let out = String::from_utf8_lossy(&output.stdout);
log::debug!("cmds: {cmds}");
log::debug!("output: {out}");
out.contains(DONE)
} else {
false
}
}
pub fn run_me_with(secs: u32) {
let exe = std::env::current_exe()
.unwrap_or("".into())
.to_string_lossy()
.to_string();
std::process::Command::new("sh")
.arg("-c")
.arg(&format!("sleep {secs}; {exe}"))
.spawn()
.ok();
}
pub fn uninstall_service(show_new_window: bool) -> bool {
if !has_cmd("systemctl") {
return false;
}
log::info!("Uninstalling service...");
Config::set_option("stop-service".into(), "Y".into());
if !run_cmds_pkexec("systemctl disable rustdesk; systemctl stop rustdesk") {
Config::set_option("stop-service".into(), "".into());
return true;
}
if show_new_window {
run_me_with(2);
}
std::process::exit(0);
}
pub fn install_service() -> bool {
if !has_cmd("systemctl") {
return false;
}
log::info!("Installing service...");
let home = std::env::var("HOME").unwrap_or_default();
let cp = if home != "/root" {
format!("cp -f {home}/.config/rustdesk/RustDesk.toml /root/.config/rustdesk/; cp -f {home}/.config/rustdesk/RustDesk2.toml /root/.config/rustdesk/;")
} else {
"".to_owned()
};
Config::set_option("stop-service".into(), "".into());
if !run_cmds_pkexec(&format!(
"{cp}systemctl enable rustdesk; systemctl start rustdesk"
)) {
Config::set_option("stop-service".into(), "Y".into());
return true;
}
run_me_with(2);
std::process::exit(0);
}
fn check_if_stop_service() {
if Config::get_option("stop-service".into()) == "Y" {
allow_err!(run_cmds(
"systemctl disable rustdesk; systemctl stop rustdesk"
));
}
}

View File

@ -2151,7 +2151,7 @@ impl Drop for WakeLock {
}
}
pub fn uninstall_service(show_new_window: bool) -> ResultType<()> {
pub fn uninstall_service(show_new_window: bool) -> bool {
log::info!("Uninstalling service...");
let filter = format!(" /FI \"PID ne {}\"", get_current_pid());
Config::set_option("stop-service".into(), "Y".into());
@ -2167,13 +2167,14 @@ pub fn uninstall_service(show_new_window: bool) -> ResultType<()> {
);
if let Err(err) = run_cmds(cmds, false, "uninstall") {
Config::set_option("stop-service".into(), "".into());
bail!(err);
log::debug!("{err}");
return true;
}
run_after_run_cmds(!show_new_window);
std::process::exit(0);
}
pub fn install_service() -> ResultType<()> {
pub fn install_service() -> bool {
log::info!("Installing service...");
let (_, _, _, exe) = get_install_info();
let tmp_path = std::env::temp_dir().to_string_lossy().to_string();
@ -2198,7 +2199,8 @@ if exist \"{tray_shortcut}\" del /f /q \"{tray_shortcut}\"
if let Err(err) = run_cmds(cmds, false, "install") {
Config::set_option("stop-service".into(), "Y".into());
crate::ipc::EXIT_RECV_CLOSE.store(true, Ordering::Relaxed);
bail!(err);
log::debug!("{err}");
return true;
}
run_after_run_cmds(false);
std::process::exit(0);

View File

@ -388,7 +388,7 @@ pub async fn start_server(is_server: bool) {
if crate::platform::current_is_wayland() {
allow_err!(input_service::setup_uinput(0, 1920, 0, 1080).await);
}
#[cfg(target_os = "macos")]
#[cfg(any(target_os = "macos", target_os = "linux"))]
tokio::spawn(async { sync_and_watch_config_dir().await });
crate::RendezvousMediator::start_all().await;
} else {
@ -460,7 +460,7 @@ pub async fn start_ipc_url_server() {
}
}
#[cfg(target_os = "macos")]
#[cfg(any(target_os = "macos", target_os = "linux"))]
async fn sync_and_watch_config_dir() {
if crate::platform::is_root() {
return;

View File

@ -1,24 +1,15 @@
/// Start a tray icon in Linux
///
/// [Block]
/// This function will block current execution, show the tray icon and handle events.
#[cfg(target_os = "linux")]
pub fn start_tray() {}
#[cfg(any(target_os = "macos", target_os = "windows"))]
pub fn start_tray() {
use hbb_common::{allow_err, log};
allow_err!(make_tray());
}
#[cfg(any(target_os = "macos", target_os = "windows"))]
pub fn make_tray() -> hbb_common::ResultType<()> {
// https://github.com/tauri-apps/tray-icon/blob/dev/examples/tao.rs
use hbb_common::anyhow::Context;
use tao::event_loop::{ControlFlow, EventLoopBuilder};
use tray_icon::{
menu::{Menu, MenuEvent, MenuItem},
ClickEvent, TrayEvent, TrayIconBuilder,
TrayEvent, TrayIconBuilder,
};
let icon;
#[cfg(target_os = "macos")]
@ -31,7 +22,7 @@ pub fn make_tray() -> hbb_common::ResultType<()> {
_ => DARK,
};
}
#[cfg(target_os = "windows")]
#[cfg(not(target_os = "macos"))]
{
icon = include_bytes!("../res/tray-icon.ico");
}
@ -83,6 +74,9 @@ pub fn make_tray() -> hbb_common::ResultType<()> {
.spawn()
.ok();
}
// xdg-open?
#[cfg(target_os = "linux")]
crate::run_me::<&str>(vec![]).ok();
};
event_loop.run(move |_event, _, control_flow| {
@ -99,16 +93,16 @@ pub fn make_tray() -> hbb_common::ResultType<()> {
if event.id == quit_i.id() {
#[cfg(target_os = "macos")]
crate::platform::macos::uninstall(false);
#[cfg(any(target_os = "linux", target_os = "windows"))]
crate::platform::uninstall_service(false).ok();
#[cfg(not(target_os = "macos"))]
crate::platform::uninstall_service(false);
} else if event.id == open_i.id() {
open_func();
}
}
if let Ok(event) = tray_channel.try_recv() {
if let Ok(_event) = tray_channel.try_recv() {
#[cfg(target_os = "windows")]
if event.event == ClickEvent::Left {
if _event.event == tray_icon::ClickEvent::Left {
open_func();
}
}

View File

@ -278,13 +278,17 @@ pub fn set_option(key: String, value: String) {
return;
}
}
#[cfg(any(target_os = "windows"))]
#[cfg(any(target_os = "windows", target_os = "linux"))]
{
if crate::platform::is_installed() {
if value == "Y" {
allow_err!(crate::platform::uninstall_service(true));
if crate::platform::uninstall_service(true) {
return;
}
} else {
allow_err!(crate::platform::install_service());
if crate::platform::install_service() {
return;
}
}
return;
}