mirror of
https://github.com/alterware/alterware-launcher.git
synced 2025-12-05 15:57:50 +00:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a30d6950c8 | ||
|
|
6f241dffe2 | ||
|
|
806758088d | ||
| d65a006bce | |||
| baf90de24e | |||
| 2bd2a28ac7 | |||
|
|
ce55264321 | ||
|
|
7760cedd82 | ||
|
|
64084c6fe0 | ||
| 1d5b0347e3 | |||
|
|
e38acd3fb4 | ||
| f171cf0b9e | |||
|
|
5797564121 | ||
| 2d5c9db851 | |||
| b0299e23d4 | |||
| 5ec6fab024 | |||
| 76dd8f2895 | |||
| 5a3bfa5fa7 | |||
|
|
d1356c70fa | ||
|
|
595fefef15 | ||
|
|
35ad7bd62e | ||
|
|
09f348e9b1 |
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@@ -3,9 +3,9 @@ updates:
|
||||
- package-ecosystem: "cargo" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: "monthly"
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: "monthly"
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: taiki-e/upload-rust-binary-action@v1.25.0
|
||||
- uses: taiki-e/upload-rust-binary-action@v1.26.0
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
bin: alterware-launcher
|
||||
|
||||
166
Cargo.lock
generated
166
Cargo.lock
generated
@@ -19,7 +19,7 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||
|
||||
[[package]]
|
||||
name = "alterware-launcher"
|
||||
version = "0.11.0"
|
||||
version = "0.11.3"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"colored",
|
||||
@@ -29,7 +29,7 @@ dependencies = [
|
||||
"mslnk",
|
||||
"once_cell",
|
||||
"openssl",
|
||||
"rand 0.9.0",
|
||||
"rand 0.9.1",
|
||||
"reqwest",
|
||||
"self-replace",
|
||||
"semver",
|
||||
@@ -597,9 +597,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "httparse"
|
||||
version = "1.8.0"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
|
||||
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
||||
|
||||
[[package]]
|
||||
name = "humantime"
|
||||
@@ -609,9 +609,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
||||
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "1.5.1"
|
||||
version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f"
|
||||
checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"futures-channel",
|
||||
@@ -662,21 +662,28 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "hyper-util"
|
||||
version = "0.1.10"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
|
||||
checksum = "dc2fdfdbff08affe55bb779f33b053aa1fe5dd5b54c257343c17edfa55711bdb"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bytes",
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"hyper",
|
||||
"ipnet",
|
||||
"libc",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"socket2",
|
||||
"system-configuration",
|
||||
"tokio",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
"windows-registry",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -741,6 +748,16 @@ version = "2.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
|
||||
|
||||
[[package]]
|
||||
name = "iri-string"
|
||||
version = "0.7.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.6"
|
||||
@@ -749,10 +766,11 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.67"
|
||||
version = "0.3.77"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1"
|
||||
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
@@ -786,9 +804,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.170"
|
||||
version = "0.2.172"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828"
|
||||
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
|
||||
|
||||
[[package]]
|
||||
name = "libredox"
|
||||
@@ -947,9 +965,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.20.3"
|
||||
version = "1.21.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
|
||||
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
||||
|
||||
[[package]]
|
||||
name = "openssl"
|
||||
@@ -1154,13 +1172,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.9.0"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
|
||||
checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97"
|
||||
dependencies = [
|
||||
"rand_chacha 0.9.0",
|
||||
"rand_core 0.9.2",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1224,9 +1241,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
version = "0.12.12"
|
||||
version = "0.12.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da"
|
||||
checksum = "eabf4c97d9130e2bf606614eb937e86edac8292eaa6f422f995d7e8de1eb1813"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bytes",
|
||||
@@ -1241,31 +1258,28 @@ dependencies = [
|
||||
"hyper-rustls",
|
||||
"hyper-tls",
|
||||
"hyper-util",
|
||||
"ipnet",
|
||||
"js-sys",
|
||||
"log",
|
||||
"mime",
|
||||
"native-tls",
|
||||
"once_cell",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"rustls-pemfile",
|
||||
"rustls-pki-types",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"sync_wrapper",
|
||||
"system-configuration",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tokio-util",
|
||||
"tower",
|
||||
"tower-http",
|
||||
"tower-service",
|
||||
"url",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"wasm-streams",
|
||||
"web-sys",
|
||||
"windows-registry",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1314,15 +1328,6 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-pemfile"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"
|
||||
dependencies = [
|
||||
"rustls-pki-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-pki-types"
|
||||
version = "1.10.0"
|
||||
@@ -1340,6 +1345,12 @@ dependencies = [
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.13"
|
||||
@@ -1427,9 +1438,9 @@ checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.218"
|
||||
version = "1.0.219"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
|
||||
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
@@ -1446,9 +1457,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.218"
|
||||
version = "1.0.219"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
|
||||
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -1573,12 +1584,12 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
||||
|
||||
[[package]]
|
||||
name = "socket2"
|
||||
version = "0.5.5"
|
||||
version = "0.5.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
|
||||
checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1728,9 +1739,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.43.0"
|
||||
version = "1.45.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e"
|
||||
checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"bytes",
|
||||
@@ -1836,6 +1847,24 @@ dependencies = [
|
||||
"tower-service",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tower-http"
|
||||
version = "0.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"
|
||||
dependencies = [
|
||||
"bitflags 2.4.0",
|
||||
"bytes",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"iri-string",
|
||||
"pin-project-lite",
|
||||
"tower",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tower-layer"
|
||||
version = "0.3.3"
|
||||
@@ -1998,23 +2027,24 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.90"
|
||||
version = "0.2.100"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406"
|
||||
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
"rustversion",
|
||||
"wasm-bindgen-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.90"
|
||||
version = "0.2.100"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd"
|
||||
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"log",
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.98",
|
||||
@@ -2035,9 +2065,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.90"
|
||||
version = "0.2.100"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999"
|
||||
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
@@ -2045,9 +2075,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.90"
|
||||
version = "0.2.100"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7"
|
||||
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -2058,9 +2088,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.90"
|
||||
version = "0.2.100"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b"
|
||||
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-streams"
|
||||
@@ -2136,33 +2169,38 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-registry"
|
||||
version = "0.2.0"
|
||||
name = "windows-link"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0"
|
||||
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
|
||||
|
||||
[[package]]
|
||||
name = "windows-registry"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3bab093bdd303a1240bb99b8aba8ea8a69ee19d34c9e2ef9594e708a4878820"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
"windows-result",
|
||||
"windows-strings",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-result"
|
||||
version = "0.2.0"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
|
||||
checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-strings"
|
||||
version = "0.1.0"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
|
||||
checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
|
||||
dependencies = [
|
||||
"windows-result",
|
||||
"windows-targets 0.52.6",
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
40
Cargo.toml
40
Cargo.toml
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "alterware-launcher"
|
||||
version = "0.11.0"
|
||||
version = "0.11.3"
|
||||
edition = "2021"
|
||||
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
|
||||
|
||||
[dependencies]
|
||||
blake3 = "1.8.2"
|
||||
serde = { version = "1.0.218", features = ["derive"] }
|
||||
serde_json = "1.0.140"
|
||||
rand = "0.9.0"
|
||||
semver = "1.0.25"
|
||||
colored = "3.0.0"
|
||||
once_cell = "1.20.3"
|
||||
reqwest = { version = "0.12.12", features = ["stream"] }
|
||||
futures-util = "0.3.31"
|
||||
futures = "0.3.31"
|
||||
indicatif = "0.17.11"
|
||||
tokio = { version="1.43.0", features = ["rt-multi-thread", "macros"] }
|
||||
simple-log = "2.3.0"
|
||||
blake3 = "1.8"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
rand = "0.9"
|
||||
semver = "1.0"
|
||||
colored = "3.0"
|
||||
once_cell = "1.21"
|
||||
reqwest = { version = "0.12", features = ["stream"] }
|
||||
futures-util = "0.3"
|
||||
futures = "0.3"
|
||||
indicatif = "0.17"
|
||||
tokio = { version="1.45", features = ["rt-multi-thread", "macros"] }
|
||||
simple-log = "2.3"
|
||||
walkdir = "2.5"
|
||||
|
||||
[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]
|
||||
# todo: update to 2.0.x; needs testing on windows
|
||||
steamlocate = "=2.0.0-beta.2"
|
||||
mslnk = "0.1.8"
|
||||
self-replace = "1.5.0"
|
||||
mslnk = "0.1"
|
||||
self-replace = "1.5"
|
||||
|
||||
[build-dependencies]
|
||||
winresource = "0.1.19"
|
||||
winresource = "0.1"
|
||||
static_vcruntime = "2.0"
|
||||
|
||||
[dev-dependencies]
|
||||
strip-ansi-escapes = "0.2.1"
|
||||
serial_test = "3.2.0"
|
||||
strip-ansi-escapes = "0.2"
|
||||
serial_test = "3.2"
|
||||
|
||||
[package.metadata.winresource]
|
||||
OriginalFilename = "alterware-launcher.exe"
|
||||
|
||||
14
README.md
14
README.md
@@ -4,7 +4,7 @@
|
||||
|
||||
#### Official launcher for AlterWare Call of Duty mods
|
||||
|
||||
##### IW4x | IW4-SP | IW5-Mod | IW6-Mod | S1-Mod
|
||||
##### IW4-SP | IW5-Mod | IW6-Mod | S1-Mod
|
||||
|
||||
  
|
||||
</div>
|
||||
@@ -39,8 +39,7 @@
|
||||
4. Run `alterware-launcher.exe`. After updating, the game will launch automatically.
|
||||
|
||||
> [!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.
|
||||
> To keep using it, set `"skip_self_update": true` in the `alterware-launcher.json` config file.
|
||||
> Windows 7 is no longer supported.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> ### Information for server owners:
|
||||
@@ -100,9 +99,6 @@
|
||||
> [!IMPORTANT]
|
||||
> **Only legitimate copies of the games are supported. If you don't own the game, please buy it.**
|
||||
|
||||
> **IW4x**
|
||||
> Call of Duty: Modern Warfare 2 - Multiplayer
|
||||
|
||||
> **IW4-SP**
|
||||
> Call of Duty: Modern Warfare 2 - Singeplayer
|
||||
|
||||
@@ -119,7 +115,7 @@
|
||||
|
||||
## ⚙️ Command line arguments
|
||||
|
||||
- ```iw4-sp```, ```iw4x```, ```iw5-mod```, ```iw6-mod```, ```s1-mod```
|
||||
- ```iw4-sp```, ```iw5-mod```, ```iw6-mod```, ```s1-mod```
|
||||
- Skip automatic detection and launch the specified game
|
||||
- Must be the first argument if used
|
||||
- ```--help```
|
||||
@@ -149,7 +145,7 @@
|
||||
- ```--redist```
|
||||
- Install or reinstall redistributables
|
||||
- ```--prerelease```
|
||||
- Update to prerelease version of clients (currently only available for IW4x) and launcher
|
||||
- Update to prerelease version of the launcher
|
||||
- ```--rate```
|
||||
- Rate and display CDN servers
|
||||
- ```--cdn-url```
|
||||
@@ -159,7 +155,7 @@
|
||||
|
||||
##### Example:
|
||||
```shell
|
||||
alterware-launcher.exe iw4x --bonus -u --path "C:\Games\IW4x" --pass "-console"
|
||||
alterware-launcher.exe iw6 --bonus -u --path "C:\Games\IW6x" --pass "-headless"
|
||||
```
|
||||
> [!TIP]
|
||||
> Some arguments can be set in alterware-launcher.json, args generally override the values of the config.
|
||||
|
||||
@@ -1,27 +1,3 @@
|
||||
# IW4x
|
||||
[github.com/iw4x/iw4x-client#command-line-arguments](https://github.com/iw4x/iw4x-client#command-line-arguments)
|
||||
|
||||
| Argument | Description |
|
||||
|:------------------------|:-----------------------------------------------|
|
||||
| `-tests` | Perform unit tests. |
|
||||
| `-entries` | Print to the console a list of every asset as they are loaded from zonefiles. |
|
||||
| `-stdout` | Redirect all logging output to the terminal iw4x is started from, or if there is none, creates a new terminal window to write log information in. |
|
||||
| `-console` | Allow the game to display its own separate interactive console window. |
|
||||
| `-dedicated` | Starts the game as a headless dedicated server. |
|
||||
| `-bigminidumps` | Include all code sections from loaded modules in the dump. |
|
||||
| `-reallybigminidumps` | Include data sections from all loaded modules in the dump. |
|
||||
| `-dump` | Write info of loaded assets to the raw folder as they are being loaded. |
|
||||
| `-nointro` | Skip game's cinematic intro. |
|
||||
| `-version` | Print IW4x build info on startup. |
|
||||
| `-nosteam` | Disable friends feature and do not update Steam about the game's current status just like an invisible mode. |
|
||||
| `-unprotect-dvars` | Allow the server to modify saved/archive dvars. |
|
||||
| `-zonebuilder` | Start the interactive zonebuilder tool console instead of starting the game. |
|
||||
| `-disable-notifies` | Disable "Anti-CFG" checks |
|
||||
| `-disable-mongoose` | Disable Mongoose HTTP server |
|
||||
| `-disable-rate-limit-check` | Disable RCOn rate limit checks |
|
||||
| `+<command>` | Execute game command (ex. `+set net_port 1337`)|
|
||||
|
||||
|
||||
# S1-Mod, IW6-Mod
|
||||
| Argument | Description |
|
||||
|:------------------------|:-----------------------------------------------|
|
||||
|
||||
@@ -15,7 +15,7 @@ pub fn save_cache(dir: &Path, cache: Cache) {
|
||||
let cache_path = dir.join("awcache.json");
|
||||
let cache_serialized = serde_json::to_string_pretty(&cache).unwrap();
|
||||
fs::write(cache_path, cache_serialized).unwrap_or_else(|e| {
|
||||
error!("Failed to save cache: {}", e);
|
||||
error!("Failed to save cache: {e}");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
18
src/cdn.rs
18
src/cdn.rs
@@ -195,12 +195,8 @@ pub struct Hosts {
|
||||
|
||||
impl Hosts {
|
||||
/// create new rated hosts instance
|
||||
pub async fn new(use_iw4x_cdns: bool) -> Self {
|
||||
let cdn_hosts = if use_iw4x_cdns {
|
||||
crate::global::IW4X_CDN_HOSTS.to_vec()
|
||||
} else {
|
||||
crate::global::CDN_HOSTS.to_vec()
|
||||
};
|
||||
pub async fn new() -> Self {
|
||||
let cdn_hosts = crate::global::CDN_HOSTS.to_vec();
|
||||
|
||||
let mut hosts = Hosts {
|
||||
servers: cdn_hosts,
|
||||
@@ -276,7 +272,7 @@ impl Hosts {
|
||||
}
|
||||
|
||||
/// CDN rating function for --rate flag
|
||||
pub async fn rate_cdns_and_display(use_iw4x_cdns: bool) {
|
||||
pub async fn rate_cdns_and_display() {
|
||||
use colored::Colorize;
|
||||
|
||||
let (asn, region_str) = crate::http::get_location_info().await;
|
||||
@@ -288,16 +284,12 @@ pub async fn rate_cdns_and_display(use_iw4x_cdns: bool) {
|
||||
"Unknown".bright_red()
|
||||
);
|
||||
} else {
|
||||
println!("User region: {:?}", user_region);
|
||||
println!("User region: {user_region:?}");
|
||||
}
|
||||
|
||||
println!("Rating CDNs...");
|
||||
|
||||
let cdn_hosts = if use_iw4x_cdns {
|
||||
crate::global::IW4X_CDN_HOSTS.to_vec()
|
||||
} else {
|
||||
crate::global::CDN_HOSTS.to_vec()
|
||||
};
|
||||
let cdn_hosts = crate::global::CDN_HOSTS.to_vec();
|
||||
|
||||
let mut hosts = Hosts {
|
||||
servers: cdn_hosts,
|
||||
|
||||
@@ -17,17 +17,13 @@ pub async fn latest_tag_full(
|
||||
repo: &str,
|
||||
) -> Result<String, Box<dyn std::error::Error>> {
|
||||
let github_body = crate::http_async::get_body_string(
|
||||
format!(
|
||||
"https://api.github.com/repos/{}/{}/releases/latest",
|
||||
owner, repo
|
||||
)
|
||||
.as_str(),
|
||||
format!("https://api.github.com/repos/{owner}/{repo}/releases/latest").as_str(),
|
||||
)
|
||||
.await
|
||||
.map_err(|e| format!("Failed to fetch GitHub API: {}", e))?;
|
||||
.map_err(|e| format!("Failed to fetch GitHub API: {e}"))?;
|
||||
|
||||
let github_json: serde_json::Value = serde_json::from_str(&github_body)
|
||||
.map_err(|e| format!("Failed to parse GitHub API response: {}", e))?;
|
||||
.map_err(|e| format!("Failed to parse GitHub API response: {e}"))?;
|
||||
|
||||
let tag_name = github_json
|
||||
.get("tag_name")
|
||||
@@ -43,13 +39,13 @@ pub async fn latest_tag_prerelease(
|
||||
repo: &str,
|
||||
) -> Result<String, Box<dyn std::error::Error>> {
|
||||
let github_body = crate::http_async::get_body_string(
|
||||
format!("https://api.github.com/repos/{}/{}/releases", owner, repo).as_str(),
|
||||
format!("https://api.github.com/repos/{owner}/{repo}/releases").as_str(),
|
||||
)
|
||||
.await
|
||||
.map_err(|e| format!("Failed to fetch GitHub API: {}", e))?;
|
||||
.map_err(|e| format!("Failed to fetch GitHub API: {e}"))?;
|
||||
|
||||
let github_json: serde_json::Value = serde_json::from_str(&github_body)
|
||||
.map_err(|e| format!("Failed to parse GitHub API response: {}", e))?;
|
||||
.map_err(|e| format!("Failed to parse GitHub API response: {e}"))?;
|
||||
|
||||
let latest_release = github_json.get(0).ok_or("No releases found")?;
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@ use crate::cdn::{Hosts, Region, Server};
|
||||
|
||||
pub const GH_OWNER: &str = "alterware";
|
||||
pub const GH_REPO: &str = "alterware-launcher";
|
||||
pub const GH_IW4X_OWNER: &str = "iw4x";
|
||||
pub const GH_IW4X_REPO: &str = "iw4x-client";
|
||||
pub const DEFAULT_MASTER: &str = "https://cdn.alterware.ovh";
|
||||
|
||||
pub const CDN_HOSTS: [Server; 2] = [
|
||||
@@ -19,11 +17,6 @@ pub const CDN_HOSTS: [Server; 2] = [
|
||||
Server::new("us-cdn.alterware.ovh", Region::NorthAmerica),
|
||||
];
|
||||
|
||||
pub const IW4X_CDN_HOSTS: [Server; 2] = [
|
||||
Server::new("cdn.iw4x.dev", Region::Europe),
|
||||
Server::new("cf-cdn.iw4x.dev", Region::Global),
|
||||
];
|
||||
|
||||
pub const IP2ASN: &str = "https://ip2asn.getserve.rs/v1/as/ip/self";
|
||||
|
||||
pub static USER_AGENT: Lazy<String> = Lazy::new(|| {
|
||||
@@ -87,12 +80,10 @@ pub static PREFIXES: Lazy<HashMap<&'static str, PrintPrefix>> = Lazy::new(|| {
|
||||
])
|
||||
});
|
||||
|
||||
pub async fn check_connectivity_and_rate_cdns(
|
||||
use_iw4x_cdns: bool,
|
||||
) -> Pin<Box<dyn Future<Output = bool> + Send>> {
|
||||
pub async fn check_connectivity_and_rate_cdns() -> Pin<Box<dyn Future<Output = bool> + Send>> {
|
||||
Box::pin(async move {
|
||||
crate::println_info!("Initializing CDN rating system...");
|
||||
let hosts = Hosts::new(use_iw4x_cdns).await;
|
||||
let hosts = Hosts::new().await;
|
||||
let best_cdn = hosts.get_master_url();
|
||||
|
||||
if let Some(cdn_url) = best_cdn {
|
||||
@@ -135,7 +126,7 @@ pub fn check_connectivity(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
check_connectivity_and_rate_cdns(false).await.await
|
||||
check_connectivity_and_rate_cdns().await.await
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
46
src/iw4x.rs
46
src/iw4x.rs
@@ -1,46 +0,0 @@
|
||||
use crate::extend::*;
|
||||
use crate::github;
|
||||
use crate::global::*;
|
||||
use crate::http_async;
|
||||
use crate::misc;
|
||||
use crate::structs;
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
pub async fn remote_revision(prerelease: Option<bool>) -> u16 {
|
||||
match github::latest_tag(GH_IW4X_OWNER, GH_IW4X_REPO, prerelease).await {
|
||||
Ok(tag) => misc::rev_to_int(&tag),
|
||||
Err(_) => {
|
||||
crate::println_error!("Failed to get latest version for {GH_IW4X_OWNER}/{GH_IW4X_REPO}, assuming we are up to date.");
|
||||
0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn update(dir: &Path, cache: &mut structs::Cache, prerelease: Option<bool>) {
|
||||
let remote = remote_revision(prerelease).await;
|
||||
let local = misc::rev_to_int(&cache.iw4x_revision);
|
||||
|
||||
if remote <= local && dir.join("iw4x.dll").exists() {
|
||||
crate::println_info!("No files to download for IW4x");
|
||||
return;
|
||||
}
|
||||
|
||||
crate::println_info!("Downloading outdated or missing files for IW4x",);
|
||||
println!(
|
||||
"{}{}",
|
||||
misc::prefix("downloading"),
|
||||
dir.join("iw4x.dll").cute_path()
|
||||
);
|
||||
http_async::download_file(
|
||||
&format!(
|
||||
"{}/iw4x.dll",
|
||||
github::download_url(GH_IW4X_OWNER, GH_IW4X_REPO, Some(&format!("r{remote}")))
|
||||
),
|
||||
&dir.join("iw4x.dll"),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
cache.iw4x_revision = format!("r{remote}");
|
||||
}
|
||||
140
src/main.rs
140
src/main.rs
@@ -6,7 +6,6 @@ mod github;
|
||||
mod global;
|
||||
mod http;
|
||||
mod http_async;
|
||||
mod iw4x;
|
||||
mod misc;
|
||||
mod self_update;
|
||||
mod structs;
|
||||
@@ -28,7 +27,7 @@ use mslnk::ShellLink;
|
||||
use simple_log::LogConfigBuilder;
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
collections::{HashMap, HashSet},
|
||||
collections::HashMap,
|
||||
env, fs,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
@@ -117,7 +116,7 @@ fn setup_desktop_links(path: &Path, game: &Game) {
|
||||
async fn auto_install(path: &Path, game: &Game<'_>) {
|
||||
setup_client_links(game, path);
|
||||
setup_desktop_links(path, game);
|
||||
update(game, path, false, false, None, None, None).await;
|
||||
update(game, path, false, false, None).await;
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
@@ -187,7 +186,7 @@ fn total_download_size(cdn_info: &Vec<CdnFile>, remote_dir: &str) -> u64 {
|
||||
let remote_dir = format!("{remote_dir}/");
|
||||
let mut size: u64 = 0;
|
||||
for file in cdn_info {
|
||||
if !file.name.starts_with(&remote_dir) || file.name == "iw4/iw4x.dll" {
|
||||
if !file.name.starts_with(&remote_dir) {
|
||||
continue;
|
||||
}
|
||||
size += file.size as u64;
|
||||
@@ -201,7 +200,6 @@ async fn update_dir(
|
||||
dir: &Path,
|
||||
hashes: &mut HashMap<String, String>,
|
||||
pb: &ProgressBar,
|
||||
skip_iw4x_sp: bool,
|
||||
) {
|
||||
misc::pb_style_download(pb, false);
|
||||
|
||||
@@ -210,10 +208,7 @@ async fn update_dir(
|
||||
let mut files_to_download: Vec<CdnFile> = vec![];
|
||||
|
||||
for file in cdn_info {
|
||||
if !file.name.starts_with(&remote_dir_pre) || file.name == "iw4/iw4x.dll" {
|
||||
continue;
|
||||
}
|
||||
if skip_iw4x_sp && file.name == "iw4/iw4x-sp.exe" {
|
||||
if !file.name.starts_with(&remote_dir_pre) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -337,15 +332,12 @@ async fn update(
|
||||
dir: &Path,
|
||||
bonus_content: bool,
|
||||
force: bool,
|
||||
skip_iw4x_sp: Option<bool>,
|
||||
ignore_required_files: Option<bool>,
|
||||
prerelease: Option<bool>,
|
||||
) {
|
||||
info!("Starting update for game engine: {}", game.engine);
|
||||
info!("Update path: {}", dir.display());
|
||||
debug!("Bonus content: {}, Force update: {}", bonus_content, force);
|
||||
|
||||
let skip_iw4x_sp = skip_iw4x_sp.unwrap_or(false);
|
||||
let ignore_required_files = ignore_required_files.unwrap_or(false);
|
||||
|
||||
let res =
|
||||
@@ -405,66 +397,12 @@ async fn update(
|
||||
}
|
||||
}
|
||||
|
||||
if game.engine == "iw4" {
|
||||
iw4x::update(dir, &mut cache, prerelease).await;
|
||||
|
||||
let scan_dirs = ["iw4x", "zone/patch"];
|
||||
let valid_files: HashSet<_> = cdn_info
|
||||
.iter()
|
||||
.filter_map(|cdn_file| {
|
||||
if cdn_file.name.starts_with("iw4/") || cdn_file.name.starts_with("iw4-dlc/") {
|
||||
Some(Path::new(&cdn_file.name).to_path_buf())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
for scan_dir in scan_dirs.iter() {
|
||||
let full_scan_dir = dir.join(scan_dir);
|
||||
if !full_scan_dir.exists() || !full_scan_dir.is_dir() {
|
||||
continue;
|
||||
}
|
||||
|
||||
for entry in walkdir::WalkDir::new(&full_scan_dir)
|
||||
.into_iter()
|
||||
.filter_map(Result::ok)
|
||||
.filter(|e| e.file_type().is_file())
|
||||
{
|
||||
let rel_path = entry.path().strip_prefix(dir).unwrap_or(entry.path());
|
||||
let cdn_paths = [
|
||||
Path::new("iw4").join(rel_path),
|
||||
Path::new("iw4-dlc").join(rel_path),
|
||||
];
|
||||
|
||||
if !cdn_paths.iter().any(|path| valid_files.contains(path)) {
|
||||
crate::println_info!("{}{}", misc::prefix("removed"), entry.path().cute_path());
|
||||
if std::fs::remove_file(entry.path()).is_err() {
|
||||
crate::println_error!(
|
||||
"{}Couldn't delete {}",
|
||||
misc::prefix("error"),
|
||||
entry.path().cute_path()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let pb = ProgressBar::new(0);
|
||||
update_dir(
|
||||
&cdn_info,
|
||||
game.engine,
|
||||
dir,
|
||||
&mut cache.hashes,
|
||||
&pb,
|
||||
skip_iw4x_sp,
|
||||
)
|
||||
.await;
|
||||
update_dir(&cdn_info, game.engine, dir, &mut cache.hashes, &pb).await;
|
||||
|
||||
if bonus_content && !game.bonus.is_empty() {
|
||||
for bonus in game.bonus.iter() {
|
||||
update_dir(&cdn_info, bonus, dir, &mut cache.hashes, &pb, skip_iw4x_sp).await;
|
||||
update_dir(&cdn_info, bonus, dir, &mut cache.hashes, &pb).await;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -549,9 +487,18 @@ 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");
|
||||
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());
|
||||
std::process::Command::new("wine")
|
||||
|
||||
let launcher = if misc::is_program_in_path("umu-run") {
|
||||
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()])
|
||||
.current_dir(file_path.parent().unwrap())
|
||||
.spawn()
|
||||
@@ -622,6 +569,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]
|
||||
async fn main() {
|
||||
#[cfg(windows)]
|
||||
@@ -648,6 +605,10 @@ async fn main() {
|
||||
|
||||
let mut args: Vec<String> = env::args().collect();
|
||||
|
||||
if args.iter().any(|arg| arg == "iw4x") {
|
||||
show_iw4x_info();
|
||||
}
|
||||
|
||||
if arg_bool(&args, "--help") {
|
||||
println!("CLI Args:");
|
||||
println!(" <client>: Specify the client to launch");
|
||||
@@ -667,9 +628,7 @@ async fn main() {
|
||||
println!(" --offline: Run in offline mode");
|
||||
println!(" --skip-connectivity-check: Don't check connectivity");
|
||||
println!(" --rate: Display CDN rating information and exit");
|
||||
println!(
|
||||
"\nExample:\n alterware-launcher.exe iw4x --bonus --pass \"-console -nointro\""
|
||||
);
|
||||
println!("\nExample:\n alterware-launcher.exe iw6 --pass \"-headless\"");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -704,21 +663,8 @@ async fn main() {
|
||||
install_path = env::current_dir().unwrap();
|
||||
}
|
||||
|
||||
let mut is_iw4x = false;
|
||||
if args.len() > 1 && args[1] == "iw4x" {
|
||||
is_iw4x = true;
|
||||
} else {
|
||||
let iw4x_reference_files = ["iw4mp.exe", "iw4sp.exe", "iw4x.exe"];
|
||||
for ref_file in iw4x_reference_files.iter() {
|
||||
if install_path.join(ref_file).exists() {
|
||||
is_iw4x = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if arg_bool(&args, "--rate") {
|
||||
cdn::rate_cdns_and_display(is_iw4x).await;
|
||||
cdn::rate_cdns_and_display().await;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -750,9 +696,7 @@ async fn main() {
|
||||
if initial_cdn.is_some() {
|
||||
cfg.offline = !global::check_connectivity(initial_cdn).await;
|
||||
} else {
|
||||
cfg.offline = !global::check_connectivity_and_rate_cdns(is_iw4x)
|
||||
.await
|
||||
.await;
|
||||
cfg.offline = !global::check_connectivity_and_rate_cdns().await.await;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -933,6 +877,10 @@ async fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
if game == "iw4x" {
|
||||
show_iw4x_info();
|
||||
}
|
||||
|
||||
for g in games.iter() {
|
||||
for c in g.client.iter() {
|
||||
if c == &game {
|
||||
@@ -943,14 +891,6 @@ async fn main() {
|
||||
"engine",
|
||||
cfg.engine.clone(),
|
||||
);
|
||||
if cfg.engine == "iw4" && cfg.args.is_empty() {
|
||||
cfg.args = String::from("-stdout");
|
||||
config::save_value_s(
|
||||
install_path.join("alterware-launcher.json"),
|
||||
"args",
|
||||
cfg.args.clone(),
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
if !cfg.skip_redist {
|
||||
@@ -979,9 +919,7 @@ async fn main() {
|
||||
install_path.as_path(),
|
||||
cfg.download_bonus_content,
|
||||
cfg.force_update,
|
||||
Some(&game != "iw4x-sp"),
|
||||
Some(ignore_required_files),
|
||||
Some(cfg.prerelease),
|
||||
)
|
||||
.await;
|
||||
if !cfg.update_only {
|
||||
|
||||
@@ -12,13 +12,6 @@ pub fn stdin() -> String {
|
||||
input.trim().to_string()
|
||||
}
|
||||
|
||||
pub fn rev_to_int(rev: &str) -> u16 {
|
||||
rev.strip_prefix('r')
|
||||
.unwrap_or("0")
|
||||
.parse::<u16>()
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
pub fn human_readable_bytes(bytes: u64) -> String {
|
||||
let mut bytes = bytes as f64;
|
||||
let mut i = 0;
|
||||
|
||||
Reference in New Issue
Block a user