mirror of
https://github.com/alterware/alterware-launcher.git
synced 2025-12-06 00:07:48 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f241dffe2 | ||
|
|
806758088d | ||
| d65a006bce | |||
| baf90de24e | |||
| 2bd2a28ac7 |
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -19,7 +19,7 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "alterware-launcher"
|
name = "alterware-launcher"
|
||||||
version = "0.11.1"
|
version = "0.11.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"blake3",
|
"blake3",
|
||||||
"colored",
|
"colored",
|
||||||
|
|||||||
40
Cargo.toml
40
Cargo.toml
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "alterware-launcher"
|
name = "alterware-launcher"
|
||||||
version = "0.11.1"
|
version = "0.11.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
build = "res/build.rs"
|
build = "res/build.rs"
|
||||||
|
|
||||||
@@ -11,37 +11,37 @@ panic = "abort"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
blake3 = "1.8.2"
|
blake3 = "1.8"
|
||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0.140"
|
serde_json = "1.0"
|
||||||
rand = "0.9.1"
|
rand = "0.9"
|
||||||
semver = "1.0.25"
|
semver = "1.0"
|
||||||
colored = "3.0.0"
|
colored = "3.0"
|
||||||
once_cell = "1.21.3"
|
once_cell = "1.21"
|
||||||
reqwest = { version = "0.12.20", features = ["stream"] }
|
reqwest = { version = "0.12", features = ["stream"] }
|
||||||
futures-util = "0.3.31"
|
futures-util = "0.3"
|
||||||
futures = "0.3.31"
|
futures = "0.3"
|
||||||
indicatif = "0.17.11"
|
indicatif = "0.17"
|
||||||
tokio = { version="1.45.1", features = ["rt-multi-thread", "macros"] }
|
tokio = { version="1.45", features = ["rt-multi-thread", "macros"] }
|
||||||
simple-log = "2.3.0"
|
simple-log = "2.3"
|
||||||
walkdir = "2.5"
|
walkdir = "2.5"
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
openssl = { version = "0.10.71", default-features = false, features = ["vendored"] }
|
openssl = { version = "0.10", default-features = false, features = ["vendored"] }
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
# todo: update to 2.0.x; needs testing on windows
|
# todo: update to 2.0.x; needs testing on windows
|
||||||
steamlocate = "=2.0.0-beta.2"
|
steamlocate = "=2.0.0-beta.2"
|
||||||
mslnk = "0.1.8"
|
mslnk = "0.1"
|
||||||
self-replace = "1.5.0"
|
self-replace = "1.5"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
winresource = "0.1.19"
|
winresource = "0.1"
|
||||||
static_vcruntime = "2.0"
|
static_vcruntime = "2.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
strip-ansi-escapes = "0.2.1"
|
strip-ansi-escapes = "0.2"
|
||||||
serial_test = "3.2.0"
|
serial_test = "3.2"
|
||||||
|
|
||||||
[package.metadata.winresource]
|
[package.metadata.winresource]
|
||||||
OriginalFilename = "alterware-launcher.exe"
|
OriginalFilename = "alterware-launcher.exe"
|
||||||
|
|||||||
@@ -39,8 +39,7 @@
|
|||||||
4. Run `alterware-launcher.exe`. After updating, the game will launch automatically.
|
4. Run `alterware-launcher.exe`. After updating, the game will launch automatically.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Windows 7 is no longer supported. [v0.6.12](https://github.com/alterware/alterware-launcher/releases/tag/v0.6.12) is the last version that will run on Windows 7.
|
> Windows 7 is no longer supported.
|
||||||
> To keep using it, set `"skip_self_update": true` in the `alterware-launcher.json` config file.
|
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> ### Information for server owners:
|
> ### Information for server owners:
|
||||||
|
|||||||
33
src/main.rs
33
src/main.rs
@@ -549,9 +549,18 @@ fn launch(file_path: &PathBuf, args: &str) {
|
|||||||
fn launch(file_path: &PathBuf, args: &str) {
|
fn launch(file_path: &PathBuf, args: &str) {
|
||||||
println!("\n\nJoin the AlterWare Discord server:\nhttps://discord.gg/2ETE8engZM\n\n");
|
println!("\n\nJoin the AlterWare Discord server:\nhttps://discord.gg/2ETE8engZM\n\n");
|
||||||
crate::println_info!("Launching {} {args}", file_path.display());
|
crate::println_info!("Launching {} {args}", file_path.display());
|
||||||
let exit_status = if misc::is_program_in_path("wine") {
|
|
||||||
println!("Found wine, launching game using wine.\nIf you run into issues or want to launch a different way, run {} manually.", file_path.display());
|
let launcher = if misc::is_program_in_path("umu-run") {
|
||||||
std::process::Command::new("wine")
|
Some("umu-run")
|
||||||
|
} else if misc::is_program_in_path("wine") {
|
||||||
|
Some("wine")
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
|
let exit_status = if let Some(launcher) = launcher {
|
||||||
|
println!("Found {launcher}, launching game using {launcher}.\nIf you run into issues or want to launch a different way, run {} manually.", file_path.display());
|
||||||
|
std::process::Command::new(launcher)
|
||||||
.args([file_path.to_str().unwrap(), args.trim()])
|
.args([file_path.to_str().unwrap(), args.trim()])
|
||||||
.current_dir(file_path.parent().unwrap())
|
.current_dir(file_path.parent().unwrap())
|
||||||
.spawn()
|
.spawn()
|
||||||
@@ -622,6 +631,16 @@ fn arg_remove_value(args: &mut Vec<String>, arg: &str) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn show_iw4x_info() {
|
||||||
|
println!(
|
||||||
|
"{}",
|
||||||
|
"IW4x is not provided through AlterWare anymore.".bright_red()
|
||||||
|
);
|
||||||
|
println!("Please visit https://aka.alterware.dev/iw4x for more information");
|
||||||
|
misc::stdin();
|
||||||
|
std::process::exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
@@ -648,6 +667,10 @@ async fn main() {
|
|||||||
|
|
||||||
let mut args: Vec<String> = env::args().collect();
|
let mut args: Vec<String> = env::args().collect();
|
||||||
|
|
||||||
|
if args.iter().any(|arg| arg == "iw4x") {
|
||||||
|
show_iw4x_info();
|
||||||
|
}
|
||||||
|
|
||||||
if arg_bool(&args, "--help") {
|
if arg_bool(&args, "--help") {
|
||||||
println!("CLI Args:");
|
println!("CLI Args:");
|
||||||
println!(" <client>: Specify the client to launch");
|
println!(" <client>: Specify the client to launch");
|
||||||
@@ -916,6 +939,10 @@ async fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if game == "iw4x" {
|
||||||
|
show_iw4x_info();
|
||||||
|
}
|
||||||
|
|
||||||
for g in games.iter() {
|
for g in games.iter() {
|
||||||
for c in g.client.iter() {
|
for c in g.client.iter() {
|
||||||
if c == &game {
|
if c == &game {
|
||||||
|
|||||||
Reference in New Issue
Block a user