From 76fca36763f2aea1434618cd41159d24f3665281 Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 29 May 2023 17:04:28 -0700 Subject: [PATCH] fixes for windows --- Cargo.lock | 13 --------- Cargo.toml | 2 +- external/cursive | 2 +- setup_windows.bat | 8 +++--- veilid-cli/Cargo-macos.toml | 54 +++++++++++++++++++++++++++++++++++++ veilid-cli/Cargo.toml | 7 +---- 6 files changed, 61 insertions(+), 25 deletions(-) create mode 100644 veilid-cli/Cargo-macos.toml diff --git a/Cargo.lock b/Cargo.lock index 047c015a..8c855857 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1428,8 +1428,6 @@ dependencies = [ "lazy_static", "libc", "log", - "maplit", - "ncurses", "signal-hook", "tokio 1.28.2", "unicode-segmentation", @@ -3231,17 +3229,6 @@ dependencies = [ "socket2 0.4.9", ] -[[package]] -name = "ncurses" -version = "5.101.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2c5d34d72657dc4b638a1c25d40aae81e4f1c699062f72f467237920752032" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "ndk" version = "0.7.0" diff --git a/Cargo.toml b/Cargo.toml index e95b3f66..3a8c644d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ members = [ "veilid-wasm", ] -exclude = [ "./external/keyring-manager", "./external/cursive", "./external/hashlink" ] +exclude = [ "./external/keyring-manager", "./external/cursive", "./veilid-cli/cursive-crossterm", "./veilid-cli/cursive-ncurses", "./external/hashlink" ] [patch.crates-io] cursive = { path = "./external/cursive/cursive" } diff --git a/external/cursive b/external/cursive index 250d35f3..7df15342 160000 --- a/external/cursive +++ b/external/cursive @@ -1 +1 @@ -Subproject commit 250d35f37f526221539c8d59d7a2056803bf0010 +Subproject commit 7df15342b1f08b6b7a5cdc7aa8f97342d2e4ad7b diff --git a/setup_windows.bat b/setup_windows.bat index c502034b..6f0f3916 100644 --- a/setup_windows.bat +++ b/setup_windows.bat @@ -14,15 +14,15 @@ IF NOT DEFINED ProgramFiles(x86) ( FOR %%X IN (protoc.exe) DO (SET PROTOC_FOUND=%%~$PATH:X) IF NOT DEFINED PROTOC_FOUND ( - echo protobuf compiler ^(protoc^) is required but it's not installed. Install protoc 21.10 or higher. Ensure it is in your path. Aborting. - echo protoc is available here: https://github.com/protocolbuffers/protobuf/releases/download/v21.10/protoc-21.10-win64.zip + echo protobuf compiler ^(protoc^) is required but it's not installed. Install protoc 23.2 or higher. Ensure it is in your path. Aborting. + echo protoc is available here: https://github.com/protocolbuffers/protobuf/releases/download/v23.2/protoc-23.2-win64.zip goto end ) FOR %%X IN (capnp.exe) DO (SET CAPNP_FOUND=%%~$PATH:X) IF NOT DEFINED CAPNP_FOUND ( - echo capnproto compiler ^(capnp^) is required but it's not installed. Install capnp 0.10.3 or higher. Ensure it is in your path. Aborting. - echo capnp is available here: https://capnproto.org/capnproto-c++-win32-0.10.3.zip + echo capnproto compiler ^(capnp^) is required but it's not installed. Install capnp 0.10.4 or higher. Ensure it is in your path. Aborting. + echo capnp is available here: https://capnproto.org/capnproto-c++-win32-0.10.4.zip goto end ) diff --git a/veilid-cli/Cargo-macos.toml b/veilid-cli/Cargo-macos.toml new file mode 100644 index 00000000..a88b7c65 --- /dev/null +++ b/veilid-cli/Cargo-macos.toml @@ -0,0 +1,54 @@ +[package] +name = "veilid-cli" +version = "0.1.0" +authors = ["John Smith "] +edition = "2021" +build = "build.rs" +license = "LGPL-2.0-or-later OR MPL-2.0 OR (MIT AND BSD-3-Clause)" + +[[bin]] +name = "veilid-cli" +path = "src/main.rs" + +[features] +default = [ "rt-tokio" ] +rt-async-std = [ "async-std", "veilid-core/rt-async-std", "cursive-ncurses/rt-async-std", "cursive-crossterm/rt-async-std" ] +rt-tokio = [ "tokio", "tokio-util", "veilid-core/rt-tokio", "cursive-ncurses/rt-tokio", "cursive-crossterm/rt-tokio" ] + +[dependencies] +async-std = { version = "^1.9", features = ["unstable", "attributes"], optional = true } +tokio = { version = "^1", features = ["full"], optional = true } +tokio-util = { version = "^0", features = ["compat"], optional = true} +async-tungstenite = { version = "^0.8" } +cursive-flexi-logger-view = { path = "../external/cursive-flexi-logger-view" } +cursive_buffered_backend = { path = "../external/cursive_buffered_backend" } +cursive = { path = "../external/cursive/cursive", default-features = false, features = [ "ncurses-backend", "toml", "ansi" ]} +# cursive-multiplex = "0.6.0" +# cursive_tree_view = "0.6.0" +cursive_table_view = "0.14.0" +# cursive-tabs = "0.5.0" +clap = "^3" +directories = "^4" +log = "^0" +futures = "^0" +serde = "^1" +serde_derive = "^1" +parking_lot = "^0" +cfg-if = "^1" +capnp = "^0" +capnp-rpc = "^0" +config = { version = "^0", features = ["yaml"] } +bugsalot = { git = "https://github.com/crioux/bugsalot.git" } +flexi_logger = { version = "^0", features = ["use_chrono_for_offset"] } +thiserror = "^1" +crossbeam-channel = "^0" +hex = "^0" +veilid-core = { path = "../veilid-core" } +json = "^0" + + +[dev-dependencies] +serial_test = "^0" + +[build-dependencies] +capnpc = "^0" diff --git a/veilid-cli/Cargo.toml b/veilid-cli/Cargo.toml index 9bbd9784..db13cee5 100644 --- a/veilid-cli/Cargo.toml +++ b/veilid-cli/Cargo.toml @@ -20,6 +20,7 @@ async-std = { version = "^1.9", features = ["unstable", "attributes"], optional tokio = { version = "^1", features = ["full"], optional = true } tokio-util = { version = "^0", features = ["compat"], optional = true} async-tungstenite = { version = "^0.8" } +cursive = { path = "../external/cursive/cursive", default-features = false, features = [ "crossterm", "toml", "ansi" ]} cursive-flexi-logger-view = { path = "../external/cursive-flexi-logger-view" } cursive_buffered_backend = { path = "../external/cursive_buffered_backend" } # cursive-multiplex = "0.6.0" @@ -45,12 +46,6 @@ hex = "^0" veilid-core = { path = "../veilid-core" } json = "^0" -[target.'cfg(not(target_os = "macos"))'.dependencies] -cursive = { path = "../external/cursive/cursive", default-features = false, features = [ "crossterm", "toml", "ansi" ]} - -[target.'cfg(target_os = "macos")'.dependencies] -cursive = { path = "../external/cursive/cursive", default-features = false, features = [ "ncurses-backend", "toml", "ansi" ]} - [dev-dependencies] serial_test = "^0"