From aba1124192e08bc872e64f3a50c3ff3b6987752a Mon Sep 17 00:00:00 2001 From: Canop Date: Sat, 27 Feb 2021 10:39:14 +0100 Subject: add clipboard support to Android/Termux (needs the termux API to be installed on the user's device) --- .gitignore | 1 + CHANGELOG.md | 4 +++- Cargo.lock | 13 ++++++++++--- Cargo.toml | 6 +++--- compile-all-targets.sh | 9 ++++----- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 6696666..0456ea1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ bench.sh compile.sh +termux-deploy.sh dev.log deploy.sh fix-win-toolchain.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 72503a5..28495bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -### next + +### v1.2.6 - 2021-02-27 +- clipboard features (copy and paste verbs) now work on Android/Termux (needs the Termux API to be installed) - fix a compilation problem on non gnu windows - Thanks @Stargateur - obey '--color no' even in standard application mode. In that case, automatically enable selection marks or you wouldn't know what line is selected diff --git a/Cargo.lock b/Cargo.lock index 257b28d..29e9e14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "broot" -version = "1.2.6-dev" +version = "1.2.6" dependencies = [ "ahash", "ansi_colours", @@ -1622,14 +1622,21 @@ dependencies = [ [[package]] name = "terminal-clipboard" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7d0bd72c5576dacccc02c15f7aa568e8ef46286b489eebe09de7c4451d493a4" +checksum = "17a6b9bf0e5a40b6955cf6f384df9b7ed54106ff57b721f88614f30013d5ef5a" dependencies = [ "clipboard-win", + "termux-clipboard", "x11-clipboard", ] +[[package]] +name = "termux-clipboard" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f6aff13ca3293315b94f6dbd9c69e1c958fe421c294681e2ffda80c9858e36f" + [[package]] name = "textwrap" version = "0.11.0" diff --git a/Cargo.toml b/Cargo.toml index a75f113..d8fb298 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "broot" -version = "1.2.6-dev" +version = "1.2.6" authors = ["dystroy "] repository = "https://github.com/Canop/broot" documentation = "https://dystroy.org/broot" @@ -17,7 +17,6 @@ exclude = ["website", "broot*.zip"] default = [] client-server = [] clipboard = ["terminal-clipboard"] -# termux = ["terminal-clipboard/termux"] [dependencies] ahash = { version = "0.7", features = ["serde"] } @@ -57,7 +56,7 @@ strict = "0.1.4" syntect = "4.5" tempfile = "3.1" termimad = { version = "0.10.0" } -terminal-clipboard = { version = "0.1.1", optional = true } +terminal-clipboard = { version = "0.2.1", optional = true } toml = "0.5" umask = "1.0" unicode-width = "0.1.8" @@ -104,3 +103,4 @@ harness = false # secular = { path = "../secular" } # strict = { path = "../strict" } # lfs-core = { path = "../lfs-core" } +# terminal-clipboard = { path = "../terminal-clipboard" } diff --git a/compile-all-targets.sh b/compile-all-targets.sh index 9dfbcc9..0705648 100755 --- a/compile-all-targets.sh +++ b/compile-all-targets.sh @@ -32,14 +32,13 @@ mkdir build/completion cp "$(broot -c ":gi;release;:focus;broot.bash;:parent;:pp" target)/"* build/completion echo " Done" -# find and copy the default conf -# (it's built as part of the normal compilation so must come after the linux version) +# copy the default conf echo -e "${H2}copying default configuration${EH}" -cp "$(broot -c ":gi;release;:focus;deault-conf.hjson;:pp" target)" build +cp resources/default-conf.hjson build echo " Done" # add the resource (the icons font) -echo -e "${H2}copying resources${EH}" +echo -e "${H2}copying vscode-icon font${EH}" mkdir build/resources cp resources/icons/vscode/vscode.ttf build/resources echo "the font file comes from https://github.com/vscode-icons/vscode-icons/ and is licensed as MIT" > build/resources/README.md @@ -62,7 +61,7 @@ cp target/armv7-unknown-linux-gnueabihf/release/broot build/armv7-unknown-linux- # build the Android version # use cargo cross echo -e "${H2}Compiling the Android version${EH}" -cross build --target aarch64-linux-android --release +cross build ---features "clipboard" --target aarch64-linux-android --release mkdir build/aarch64-linux-android cp target/aarch64-linux-android/release/broot build/aarch64-linux-android/ -- cgit v1.2.3