Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
0378f19a75 | |||
64f4ae6429 | |||
b2cc21aed0 | |||
dc5957ea41 | |||
54abce4d30 | |||
6ae33cdcb3 | |||
c9d30fa95a | |||
dc81430f6b | |||
9c122506ce | |||
f2ba92c31d | |||
c92fb88e83 | |||
1e0e0090f5 | |||
48f6a96a01 | |||
f4fe1c6699 | |||
59f1b09337 |
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@ -18,14 +18,21 @@ jobs:
|
||||
upload-assets:
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
- windows-latest
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-20.04
|
||||
- target: i686-unknown-linux-gnu
|
||||
os: ubuntu-20.04
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
- target: i686-pc-windows-msvc
|
||||
os: windows-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: taiki-e/upload-rust-binary-action@v1
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
bin: alterware-launcher
|
||||
tar: unix
|
||||
zip: windows
|
||||
|
19
Cargo.lock
generated
19
Cargo.lock
generated
@ -30,7 +30,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "alterware-launcher"
|
||||
version = "0.5.0"
|
||||
version = "0.5.2"
|
||||
dependencies = [
|
||||
"colored",
|
||||
"http_req",
|
||||
@ -42,7 +42,6 @@ dependencies = [
|
||||
"serde_json",
|
||||
"sha1_smol",
|
||||
"steamlocate",
|
||||
"windows-sys",
|
||||
"winres",
|
||||
"zip",
|
||||
]
|
||||
@ -313,9 +312,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "http_req"
|
||||
version = "0.9.2"
|
||||
version = "0.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f680177f2ebe4aabd573d07b322d15a5e0fbc97cd739fd627b08043c89041f8"
|
||||
checksum = "42ce34c74ec562d68f2c23a532c62c1332ff1d1b6147fd118bd1938e090137d0"
|
||||
dependencies = [
|
||||
"rustls",
|
||||
"unicase",
|
||||
@ -707,9 +706,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "self-replace"
|
||||
version = "1.3.6"
|
||||
version = "1.3.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c56335359191626938ef6fdeb478f9f6a7c6020254d7f4641c7d810369fa0ec1"
|
||||
checksum = "525db198616b2bcd0f245daf7bfd8130222f7ee6af9ff9984c19a61bf1160c55"
|
||||
dependencies = [
|
||||
"fastrand 1.9.0",
|
||||
"tempfile",
|
||||
@ -718,9 +717,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.18"
|
||||
version = "1.0.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918"
|
||||
checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
@ -744,9 +743,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.106"
|
||||
version = "1.0.107"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2"
|
||||
checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"ryu",
|
||||
|
14
Cargo.toml
14
Cargo.toml
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "alterware-launcher"
|
||||
version = "0.5.0"
|
||||
version = "0.5.2"
|
||||
edition = "2021"
|
||||
build = "res/build.rs"
|
||||
|
||||
@ -15,25 +15,21 @@ panic = "abort"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
http_req = { version = "0.9.2", default-features = false, features = [
|
||||
http_req = { version = "0.9.3", default-features = false, features = [
|
||||
"rust-tls",
|
||||
] }
|
||||
sha1_smol = "1.0.0"
|
||||
serde = { version = "1.0.188", features = ["derive"] }
|
||||
serde_json = "1.0.106"
|
||||
serde_json = "1.0.107"
|
||||
rand = "0.8.5"
|
||||
semver = "1.0.18"
|
||||
semver = "1.0.19"
|
||||
zip = "0.6.6"
|
||||
colored = "2.0.4"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
steamlocate = "2.0.0-alpha.0"
|
||||
mslnk = "0.1.8"
|
||||
# https://github.com/mitsuhiko/self-replace/pull/16/
|
||||
windows-sys = { version = "0.48", features = [
|
||||
"Win32_Security",
|
||||
] }
|
||||
self-replace = "1.3.6"
|
||||
self-replace = "1.3.7"
|
||||
|
||||
[build-dependencies]
|
||||
winres = "0.1.12"
|
||||
|
@ -13,7 +13,7 @@ pub fn load(config_path: PathBuf) -> Config {
|
||||
}
|
||||
|
||||
pub fn save(config_path: PathBuf, config: Config) {
|
||||
fs::write(config_path, serde_json::to_string(&config).unwrap()).unwrap();
|
||||
fs::write(config_path, serde_json::to_string_pretty(&config).unwrap()).unwrap();
|
||||
}
|
||||
|
||||
pub fn save_value(config_path: PathBuf, key: &str, value: bool) {
|
||||
|
@ -267,6 +267,7 @@ fn launch(file_path: &PathBuf, args: &str) {
|
||||
println!("Launching {} {}", file_path.display(), args);
|
||||
std::process::Command::new(file_path)
|
||||
.args(args.trim().split(' '))
|
||||
.current_dir(file_path.parent().unwrap())
|
||||
.spawn()
|
||||
.expect("Failed to launch the game")
|
||||
.wait()
|
||||
@ -372,6 +373,7 @@ fn main() {
|
||||
|
||||
if arg_bool(&args, "--bonus") {
|
||||
cfg.download_bonus_content = true;
|
||||
cfg.ask_bonus_content = false;
|
||||
arg_remove(&mut args, "--bonus");
|
||||
}
|
||||
|
||||
|
@ -60,10 +60,17 @@ pub fn run(update_only: bool) {
|
||||
fs::remove_file(&update_binary).unwrap();
|
||||
}
|
||||
|
||||
let launcher_name = if cfg!(target_arch = "x86") {
|
||||
"alterware-launcher-x86.exe"
|
||||
} else {
|
||||
"alterware-launcher.exe"
|
||||
};
|
||||
println!("{}", launcher_name);
|
||||
http::download_file(
|
||||
&format!(
|
||||
"{}/download/alterware-launcher.exe",
|
||||
github::latest_release_url(GH_OWNER, GH_REPO)
|
||||
"{}/download/{}",
|
||||
github::latest_release_url(GH_OWNER, GH_REPO),
|
||||
launcher_name
|
||||
),
|
||||
&file_path,
|
||||
);
|
||||
|
Reference in New Issue
Block a user