Skip to content

Commit

Permalink
rustdesk-flutter: 1.3.2 ->1.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot-wxt1221 committed Feb 9, 2025
1 parent 96b88c6 commit e4966f6
Show file tree
Hide file tree
Showing 8 changed files with 818 additions and 119 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From c1149b728724bbef55e2d570cc874e7287c6a549 Mon Sep 17 00:00:00 2001
From: wxt <[email protected]>
Date: Sat, 8 Feb 2025 21:06:12 +0800
Subject: [PATCH] tt

---
frb_codegen/src/commands.rs | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/frb_codegen/src/commands.rs b/frb_codegen/src/commands.rs
index 91b05ca..41aba36 100644
--- a/frb_codegen/src/commands.rs
+++ b/frb_codegen/src/commands.rs
@@ -174,8 +174,6 @@ fn ffigen(
let repo = DartRepository::from_str(dart_root).unwrap();
let res = command_run!(
call_shell[Some(dart_root)],
- *repo.toolchain.as_run_command(),
- "run",
"ffigen",
"--config",
config_file.path()
@@ -204,7 +202,7 @@ pub fn format_rust(path: &[PathBuf]) -> Result {
}

pub fn format_dart(path: &[PathBuf], line_length: u32) -> Result {
- debug!(
+ info!(
"execute format_dart path={:?} line_length={}",
path, line_length
);
@@ -229,8 +227,6 @@ pub fn build_runner(dart_root: &str) -> Result {
let repo = DartRepository::from_str(dart_root).unwrap();
let out = command_run!(
call_shell[Some(dart_root)],
- *repo.toolchain.as_run_command(),
- "run",
"build_runner",
"build",
"--delete-conflicting-outputs",
--
2.47.1

98 changes: 62 additions & 36 deletions pkgs/by-name/ru/rustdesk-flutter/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions pkgs/by-name/ru/rustdesk-flutter/build-runner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!@bash@
packagePath() {
jq --raw-output --arg name "$1" '.packages.[] | select(.name == $name) .rootUri | sub("file://"; "")' .dart_tool/package_config.json
}

# Runs a Dart executable from a package with a custom path.
#
# Usage:
# packageRunCustom <package> [executable] [bin_dir]
#
# By default, [bin_dir] is "bin", and [executable] is <package>.
# i.e. `packageRunCustom build_runner` is equivalent to `packageRunCustom build_runner build_runner bin`, which runs `bin/build_runner.dart` from the build_runner package.
packageRunCustom() {
local args=()
local passthrough=()

while [ $# -gt 0 ]; do
if [ "$1" != "--" ]; then
args+=("$1")
shift
else
shift
passthrough=("$@")
break
fi
done

local name="${args[0]}"
local path="${args[1]:-$name}"
local prefix="${args[2]:-bin}"

dart --packages=.dart_tool/package_config.json "$(packagePath "$name")/$prefix/$path.dart" "${passthrough[@]}"
}

# Runs a Dart executable from a package.
#
# Usage:
# packageRun <package> [-e executable] [...]
#
# To run an executable from an unconventional location, use packageRunCustom.
packageRun() {
local name="build_runner"
shift

local executableName="$name"
if [ "build_runner" = "-e" ]; then
shift
executableName="build_runner"
shift
fi

fileName="$(yq --raw-output --arg name "$executableName" '.executables.[$name] // $name' "$(packagePath "$name")/pubspec.yaml")"
packageRunCustom "$name" "$fileName" -- "$@"
}

packageRun build_runner "$@"
Loading

0 comments on commit e4966f6

Please sign in to comment.