mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Update messages in yabridgectl
This commit is contained in:
@@ -65,7 +65,7 @@ pub fn remove_directory(config: &mut Config, path: &Path) -> Result<()> {
|
|||||||
.with_context(|| format!("Could not remove '{}'", file.path().display()))?;
|
.with_context(|| format!("Could not remove '{}'", file.path().display()))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("\nRemoved {} files.", orphan_files.len());
|
println!("\nRemoved {} files", orphan_files.len());
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
@@ -243,9 +243,9 @@ pub fn do_sync(config: &Config, prune: bool, verbose: bool) -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
"Finished setting up {} plugins using {}, skipped {} non-plugin '.dll' files.",
|
"Finished setting up {} plugins using {}, skipped {} non-plugin '.dll' files",
|
||||||
num_installed,
|
num_installed,
|
||||||
config.method.plural(),
|
config.method.plural_name(),
|
||||||
num_skipped_files
|
num_skipped_files
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -255,11 +255,12 @@ pub fn do_sync(config: &Config, prune: bool, verbose: bool) -> Result<()> {
|
|||||||
"\n{}",
|
"\n{}",
|
||||||
wrap(&format!(
|
wrap(&format!(
|
||||||
"Warning: 'yabridge-host.exe' is not present in your login shell's search \
|
"Warning: 'yabridge-host.exe' is not present in your login shell's search \
|
||||||
path. Yabridge won't be able to run using the copy-based installatin method \
|
path. Yabridge won't be able to run using the copy-based installation method \
|
||||||
until this is fixed.\n\
|
until this is fixed.\n\
|
||||||
Add '{}' to {}'s login shell {} environment variable. See the \
|
Add '{}' to {}'s login shell {} environment variables. See the \
|
||||||
troubleshooting section of the readme for more details. Rerun this command to \
|
troubleshooting section of the readme for more details. Rerun this command to \
|
||||||
verify that this has been set up correctly, and then reboot your system.\n\
|
verify that the variable has been set correctly, and then reboot your system \
|
||||||
|
to complete the setup.\n\
|
||||||
\n\
|
\n\
|
||||||
https://github.com/robbert-vdh/yabridge#troubleshooting-common-issues",
|
https://github.com/robbert-vdh/yabridge#troubleshooting-common-issues",
|
||||||
libyabridge_path.parent().unwrap().display(),
|
libyabridge_path.parent().unwrap().display(),
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ pub enum InstallationMethod {
|
|||||||
|
|
||||||
impl InstallationMethod {
|
impl InstallationMethod {
|
||||||
/// The plural term for this installation methodd, using in string formatting.
|
/// The plural term for this installation methodd, using in string formatting.
|
||||||
pub fn plural(&self) -> &str {
|
pub fn plural_name(&self) -> &str {
|
||||||
match &self {
|
match &self {
|
||||||
InstallationMethod::Copy => "copies",
|
InstallationMethod::Copy => "copies",
|
||||||
InstallationMethod::Symlink => "symlinks",
|
InstallationMethod::Symlink => "symlinks",
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ mod config;
|
|||||||
mod files;
|
mod files;
|
||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
// TODO: Naming and descriptions could be made clearer
|
|
||||||
// TODO: Reward parts of the readme
|
// TODO: Reward parts of the readme
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
@@ -55,7 +54,7 @@ fn main() -> Result<()> {
|
|||||||
.about("Remove a plugin install location")
|
.about("Remove a plugin install location")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("path")
|
Arg::with_name("path")
|
||||||
.about("Path to a directory")
|
.about("Path to a previously added directory")
|
||||||
.possible_values(&plugin_directories)
|
.possible_values(&plugin_directories)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.required(true),
|
.required(true),
|
||||||
@@ -71,17 +70,18 @@ fn main() -> Result<()> {
|
|||||||
Arg::with_name("method")
|
Arg::with_name("method")
|
||||||
.long("method")
|
.long("method")
|
||||||
.about("The installation method to use")
|
.about("The installation method to use")
|
||||||
.long_about(&format!("The installation method to use. \
|
.long_about(&format!(
|
||||||
'{}' works in every situation but it requires you to rerun \
|
"The installation method to use. \
|
||||||
'yabridgectl sync' whenever you update yabridge. You'll also \
|
'{}' works in every situation but it requires you to modify your PATH \
|
||||||
have to modify your PATH environment variable so yabridge is \
|
environment variable so yabridge is able to find 'yabridge-host.exe'. \
|
||||||
able to find 'yabridge-host.exe'.\
|
'yabridgectl sync' whenever you update yabridge. You'll also have to \
|
||||||
'{}' only works for hosts that support individually \
|
rerun 'yabridgectl sync' whenever you update yabridge. \
|
||||||
sandboxed plugins such as Bitwig Studio, but it does not \
|
'{}' only works for hosts that support individually sandboxed plugins \
|
||||||
require you to set environment variables or to manually \
|
such as Bitwig Studio, but it does not require setting environment \
|
||||||
update your plugins.",
|
variables or to manual updates.",
|
||||||
"copy".bright_white(),
|
"copy".bright_white(),
|
||||||
"symlink".bright_white()))
|
"symlink".bright_white()
|
||||||
|
))
|
||||||
.setting(clap::ArgSettings::NextLineHelp)
|
.setting(clap::ArgSettings::NextLineHelp)
|
||||||
.possible_values(&["copy", "symlink"])
|
.possible_values(&["copy", "symlink"])
|
||||||
.takes_value(true),
|
.takes_value(true),
|
||||||
@@ -90,7 +90,11 @@ fn main() -> Result<()> {
|
|||||||
Arg::with_name("path")
|
Arg::with_name("path")
|
||||||
.long("path")
|
.long("path")
|
||||||
.about("Path to the directory containing 'libyabridge.so'")
|
.about("Path to the directory containing 'libyabridge.so'")
|
||||||
.long_about("Path to the directory containing 'libyabridge.so'. If this is not set, then yabridgectl will look in both '/usr/lib' and '~/.local/share/yabridge' by default.")
|
.long_about(
|
||||||
|
"Path to the directory containing 'libyabridge.so'. If this is \
|
||||||
|
not set, then yabridgectl will look in both '/usr/lib' and \
|
||||||
|
'~/.local/share/yabridge' by default.",
|
||||||
|
)
|
||||||
.validator(validate_path)
|
.validator(validate_path)
|
||||||
.takes_value(true),
|
.takes_value(true),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -62,11 +62,11 @@ pub fn verify_path_setup() -> Result<(), String> {
|
|||||||
"nu" => command.arg("-c").arg("which yabridge-host.exe"),
|
"nu" => command.arg("-c").arg("which yabridge-host.exe"),
|
||||||
shell => {
|
shell => {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"{}",
|
"\n{}",
|
||||||
wrap(&format!(
|
wrap(&format!(
|
||||||
"WARNING: Yabridgectl does not know how to handle your login shell, \
|
"WARNING: Yabridgectl does not know how to handle your login shell \
|
||||||
'{}', skipping PATH setup check. Feel free to open a bug report to \
|
'{}', skipping PATH setup check. Feel free to open a feature request \
|
||||||
get yabridgectl to support your shell.\n\
|
in order to get yabridgectl to support your shell.\n\
|
||||||
\n\
|
\n\
|
||||||
https://github.com/robbert-vdh/yabridge/issues",
|
https://github.com/robbert-vdh/yabridge/issues",
|
||||||
shell.bright_white(),
|
shell.bright_white(),
|
||||||
|
|||||||
Reference in New Issue
Block a user