add gist
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
[package]
|
||||
name = "prometeu-runtime-desktop"
|
||||
name = "prometeu-runtime"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "prometeu-runtime"
|
||||
path = "src/main.rs"
|
||||
|
||||
[package.metadata.dist]
|
||||
dist = true
|
||||
include = ["../../VERSION.txt"]
|
||||
|
||||
[dependencies]
|
||||
prometeu-core = { path = "../prometeu-core" }
|
||||
@@ -3,6 +3,37 @@ name = "prometeu"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "prometeu"
|
||||
path = "src/main.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "prometeu-runtime"
|
||||
path = "../prometeu-runtime/src/main.rs"
|
||||
|
||||
# Future binaries (commented)
|
||||
# [[bin]]
|
||||
# name = "prometeuc"
|
||||
# path = "../prometeuc/src/main.rs"
|
||||
#
|
||||
# [[bin]]
|
||||
# name = "prometeup"
|
||||
# path = "../prometeup/src/main.rs"
|
||||
|
||||
[package.metadata.dist]
|
||||
dist = true
|
||||
include = [
|
||||
"../../VERSION.txt",
|
||||
"../../dist-staging/devtools-protocol"
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
prometeu-core = { path = "../prometeu-core" }
|
||||
winit = "0.30.12"
|
||||
pixels = "0.15.0"
|
||||
cpal = "0.15.3"
|
||||
ringbuf = "0.4.7"
|
||||
serde_json = "1.0"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
../../../devtools-protocol/protocol.json
|
||||
+10
-33
@@ -116,41 +116,18 @@ fn dispatch(exe_dir: &Path, bin_name: &str, args: &[&str]) {
|
||||
let bin_path = get_binary_path(exe_dir, bin_name);
|
||||
|
||||
if !bin_path.exists() {
|
||||
// Tries to find the runtime with the exact name (prometeu-runtime-desktop)
|
||||
// in case prometeu-runtime is just an alias or link that doesn't exist yet
|
||||
let alt_bin_name = if bin_name == "prometeu-runtime" {
|
||||
Some("prometeu-runtime-desktop")
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let final_bin_path = if let Some(alt_name) = alt_bin_name {
|
||||
let alt_path = get_binary_path(exe_dir, alt_name);
|
||||
if alt_path.exists() {
|
||||
alt_path
|
||||
} else {
|
||||
bin_path
|
||||
eprintln!(
|
||||
"prometeu: command '{}' is not yet available in this distribution",
|
||||
match bin_name {
|
||||
"prometeu-runtime" => "run/debug",
|
||||
"prometeuc" => "build/verify c",
|
||||
"prometeup" => "pack/verify p",
|
||||
_ => bin_name,
|
||||
}
|
||||
} else {
|
||||
bin_path
|
||||
};
|
||||
|
||||
if !final_bin_path.exists() {
|
||||
eprintln!(
|
||||
"prometeu: command '{}' is not yet available in this distribution",
|
||||
match bin_name {
|
||||
"prometeu-runtime" => "run/debug",
|
||||
"prometeuc" => "build/verify c",
|
||||
"prometeup" => "pack/verify p",
|
||||
_ => bin_name,
|
||||
}
|
||||
);
|
||||
std::process::exit(1);
|
||||
}
|
||||
execute_bin(&final_bin_path, args);
|
||||
} else {
|
||||
execute_bin(&bin_path, args);
|
||||
);
|
||||
std::process::exit(1);
|
||||
}
|
||||
execute_bin(&bin_path, args);
|
||||
}
|
||||
|
||||
fn execute_bin(bin_path: &Path, args: &[&str]) {
|
||||
|
||||
Reference in New Issue
Block a user