fix install flow

This commit is contained in:
2026-08-04 19:07:40 -05:00
parent bbdcbd1e7f
commit c9c164277f
2 changed files with 19 additions and 1 deletions
+18
View File
@@ -246,6 +246,24 @@ fn main() {
let args: Vec<String> = std::env::args().collect();
let no_node = args.iter().any(|a| a == "--no-node");
if args.iter().any(|a| a == "--version" || a == "-v") {
println!("gelectron v{}", env!("CARGO_PKG_VERSION"));
std::process::exit(0);
}
if args.iter().any(|a| a == "--help" || a == "-h") {
println!(
"gelectron v{} - Firefox-engine Electron alternative\n\n\
Usage:\n \
\x20 gelectron <path-to-app> Run an Electron app\n \
\x20 gelectron --no-node WebView-only mode (no Node.js)\n \
\x20 gelectron --version Print version\n \
\x20 gelectron --help Show this help",
env!("CARGO_PKG_VERSION")
);
std::process::exit(0);
}
// If no args, try to auto-detect app path for packaged apps
let raw_app_path = if args.iter().skip(1).find(|a| !a.starts_with('-')).is_some() {
args.iter().skip(1).find(|a| !a.starts_with('-')).unwrap().clone()
+1 -1
View File
@@ -38,7 +38,7 @@ if ! command -v node >/dev/null 2>&1; then
fi
echo "==> Building gelectron (release)..."
cargo build --release -p gelectron
cargo build --release --manifest-path "$REPO_DIR/Cargo.toml" -p gelectron
BIN="$REPO_DIR/target/release/gelectron"
if [[ ! -f "$BIN" ]]; then
echo "error: build finished but $BIN is missing" >&2