Compare commits
172 Commits
main
...
v0.6.2-pre
Author | SHA1 | Date | |
---|---|---|---|
|
6ebb421a7b | ||
|
6ef80be01f | ||
|
1a3c090612 | ||
|
fe7c8d2834 | ||
|
b3168b0a58 | ||
|
b1cffb44ad | ||
|
5414213a19 | ||
|
6ce845e761 | ||
|
ecff4846ed | ||
|
1578924579 | ||
|
33fc7d0f6a | ||
|
461eb05ac5 | ||
|
cb210b16e1 | ||
|
41ff4acd65 | ||
|
24672aa500 | ||
|
05def16ba6 | ||
|
c3cda3b845 | ||
|
3858e743f3 | ||
|
d28fed938c | ||
|
ff22c49ced | ||
|
82a1e4ba53 | ||
|
de7a661465 | ||
|
7e8e0fbc97 | ||
|
b09b92ee7f | ||
|
917640c4e6 | ||
|
949ff87bca | ||
|
8685961eed | ||
|
7965314c6b | ||
|
cb70b8c415 | ||
|
79a1533eaa | ||
|
665e580c79 | ||
|
d5de7244e3 | ||
|
c2e90e17db | ||
|
c81518aec7 | ||
|
f48cd874f0 | ||
|
228abe5317 | ||
|
9efd34600a | ||
|
572c66cc16 | ||
|
cf87f7c741 | ||
|
dc8b01b4c8 | ||
|
9e8893ce75 | ||
|
6f92e1fb71 | ||
|
96c3e504f8 | ||
|
00c14d2a02 | ||
|
0378f19a75 | ||
|
64f4ae6429 | ||
|
b2cc21aed0 | ||
|
dc5957ea41 | ||
|
54abce4d30 | ||
|
6ae33cdcb3 | ||
|
c9d30fa95a | ||
|
dc81430f6b | ||
|
9c122506ce | ||
|
f2ba92c31d | ||
|
c92fb88e83 | ||
|
1e0e0090f5 | ||
|
48f6a96a01 | ||
|
f4fe1c6699 | ||
|
59f1b09337 | ||
|
237fa8c16f | ||
|
78e155408e | ||
|
3033dd2315 | ||
|
48851fa8d3 | ||
|
84ea4e48af | ||
|
b408f13cce | ||
|
959c3a8a61 | ||
|
73df20ebb6 | ||
|
08814a8c3e | ||
|
65094d4701 | ||
|
a20b1acdda | ||
|
75b1d6254b | ||
|
65f05a5a1c | ||
|
fa6bdc9f29 | ||
|
7595a46b44 | ||
|
c41a843315 | ||
|
a90a60ec3a | ||
|
209b599120 | ||
|
9f00b0c0e7 | ||
|
aaede9b6cb | ||
|
8a14008706 | ||
|
ad7e78ec47 | ||
|
140f4c335f | ||
|
3e1a266c3e | ||
|
92663425ef | ||
|
ffa379e6dd | ||
|
a41375a791 | ||
|
ac76e9bb89 | ||
|
546d8c4cdf | ||
|
12ccc9554f | ||
|
c117eaeb31 | ||
|
50c7b9fbd7 | ||
|
f09271c29c | ||
|
b71c15cb8e | ||
|
a3000bd2fa | ||
|
cc00cad4f2 | ||
|
6a16299cee | ||
|
565a69566c | ||
|
1727446cfc | ||
|
4282eb7b75 | ||
|
a2922540c5 | ||
|
601abd008f | ||
|
322fd2f98a | ||
|
e061bca7a3 | ||
|
87e86cc954 | ||
|
d5d847df75 | ||
|
d620bc9838 | ||
|
76a7d8b2c6 | ||
|
6c7fbd1ff1 | ||
|
18651a68ca | ||
|
79559fe46a | ||
|
8fd66d16af | ||
|
4d3c6b9dab | ||
|
7ca7615222 | ||
|
2195f42abc | ||
|
f7635d4089 | ||
|
9598ec3dfe | ||
|
37266207e7 | ||
|
e041df80c5 | ||
|
b157bcb2c2 | ||
|
beae0adce5 | ||
|
f9ec044a15 | ||
|
0be3adf8d1 | ||
|
59f347462d | ||
|
78e4e18176 | ||
|
e0f4a5102e | ||
|
c80765d091 | ||
|
3b77755848 | ||
|
4c1114f3e0 | ||
|
b69611e66b | ||
|
6ec4deed32 | ||
|
744e309190 | ||
|
83e1f67d0d | ||
|
b83720af0a | ||
|
7e36b7496c | ||
|
98cbc2a9a7 | ||
|
85e17260eb | ||
|
14181845fb | ||
|
9323f12442 | ||
|
a7bf44f105 | ||
|
e715cd5abf | ||
|
a234232751 | ||
|
e84a8db0aa | ||
|
fdf35efa81 | ||
|
e94d71b80e | ||
|
d233dfb53c | ||
|
d04083c473 | ||
|
98d43d2627 | ||
|
4fe5ed1f77 | ||
|
7398ca6ca7 | ||
|
4e6ef5d0e5 | ||
|
33463f1a6e | ||
|
41311ed5ad | ||
|
69686b3a09 | ||
|
8be94a31ac | ||
|
99da9832ff | ||
|
b175fc2b5f | ||
|
02ae0459cb | ||
|
611049ec1b | ||
|
2e4467779d | ||
|
e2c22a716b | ||
|
796c67d708 | ||
|
21b7b1ea4b | ||
|
c4046ae148 | ||
|
b1decd0b17 | ||
|
966a63df62 | ||
|
abb583aeff | ||
|
06584a3195 | ||
|
7fcfa2aa57 | ||
|
2e4436ed9a | ||
|
d92319e15f | ||
|
a5cb68e7fa | ||
|
eb161c2375 |
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -21,14 +21,10 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- target: x86_64-unknown-linux-gnu
|
- target: x86_64-unknown-linux-gnu
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
- target: aarch64-unknown-linux-gnu
|
|
||||||
os: ubuntu-20.04
|
|
||||||
- target: x86_64-pc-windows-msvc
|
- target: x86_64-pc-windows-msvc
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
- target: i686-pc-windows-msvc
|
- target: i686-pc-windows-msvc
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
- target: x86_64-apple-darwin
|
|
||||||
os: macos-latest
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
404
Cargo.lock
generated
404
Cargo.lock
generated
@ -17,15 +17,24 @@ version = "1.0.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "aho-corasick"
|
||||||
|
version = "1.0.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "86b8f9420f797f2d9e935edf629310eb938a0d839f984e25327f3c7eed22300c"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "alterware-launcher"
|
name = "alterware-launcher"
|
||||||
version = "0.6.10"
|
version = "0.6.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"colored",
|
"colored",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
"http_req",
|
||||||
"indicatif",
|
"indicatif",
|
||||||
"mslnk",
|
"mslnk",
|
||||||
"openssl",
|
|
||||||
"rand",
|
"rand",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"self-replace",
|
"self-replace",
|
||||||
@ -118,10 +127,11 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "colored"
|
name = "colored"
|
||||||
version = "2.1.0"
|
version = "2.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8"
|
checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"is-terminal",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
@ -164,21 +174,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "crc"
|
|
||||||
version = "3.0.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe"
|
|
||||||
dependencies = [
|
|
||||||
"crc-catalog",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "crc-catalog"
|
|
||||||
version = "2.4.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crypto-common"
|
name = "crypto-common"
|
||||||
version = "0.1.6"
|
version = "0.1.6"
|
||||||
@ -201,23 +196,22 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dirs"
|
name = "dirs"
|
||||||
version = "5.0.1"
|
version = "3.0.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
|
checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dirs-sys",
|
"dirs-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dirs-sys"
|
name = "dirs-sys"
|
||||||
version = "0.4.1"
|
version = "0.3.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
|
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"option-ext",
|
|
||||||
"redox_users",
|
"redox_users",
|
||||||
"windows-sys 0.48.0",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -312,21 +306,21 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-core"
|
name = "futures-core"
|
||||||
version = "0.3.30"
|
version = "0.3.29"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
|
checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-io"
|
name = "futures-io"
|
||||||
version = "0.3.30"
|
version = "0.3.29"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
|
checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-macro"
|
name = "futures-macro"
|
||||||
version = "0.3.30"
|
version = "0.3.29"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
|
checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -335,21 +329,21 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-sink"
|
name = "futures-sink"
|
||||||
version = "0.3.30"
|
version = "0.3.29"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
|
checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-task"
|
name = "futures-task"
|
||||||
version = "0.3.30"
|
version = "0.3.29"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
|
checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-util"
|
name = "futures-util"
|
||||||
version = "0.3.30"
|
version = "0.3.29"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
|
checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-io",
|
"futures-io",
|
||||||
@ -442,6 +436,19 @@ dependencies = [
|
|||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "http_req"
|
||||||
|
version = "0.10.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a536d8715c89f5647abd1563c490b75a76221de4b57833a1f243cf5c5fe7860c"
|
||||||
|
dependencies = [
|
||||||
|
"rustls",
|
||||||
|
"rustls-pemfile",
|
||||||
|
"unicase",
|
||||||
|
"webpki",
|
||||||
|
"webpki-roots",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "httparse"
|
name = "httparse"
|
||||||
version = "1.8.0"
|
version = "1.8.0"
|
||||||
@ -513,9 +520,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indicatif"
|
name = "indicatif"
|
||||||
version = "0.17.8"
|
version = "0.17.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3"
|
checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"console",
|
"console",
|
||||||
"instant",
|
"instant",
|
||||||
@ -539,6 +546,17 @@ version = "2.9.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
|
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "is-terminal"
|
||||||
|
version = "0.4.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
|
||||||
|
dependencies = [
|
||||||
|
"hermit-abi",
|
||||||
|
"rustix",
|
||||||
|
"windows-sys 0.48.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itoa"
|
name = "itoa"
|
||||||
version = "1.0.6"
|
version = "1.0.6"
|
||||||
@ -547,18 +565,18 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "js-sys"
|
name = "js-sys"
|
||||||
version = "0.3.67"
|
version = "0.3.63"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1"
|
checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "keyvalues-parser"
|
name = "keyvalues-parser"
|
||||||
version = "0.2.0"
|
version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7e4c8354918309196302015ac9cae43362f1a13d0d5c5539a33b4c2fd2cd6d25"
|
checksum = "7d990301996c856ea07a84bc291e76f1273db52683663efc05c8d355976897e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pest",
|
"pest",
|
||||||
"pest_derive",
|
"pest_derive",
|
||||||
@ -567,11 +585,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "keyvalues-serde"
|
name = "keyvalues-serde"
|
||||||
version = "0.2.1"
|
version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0447866c47c00f8bd1949618e8f63017cf93e985b4684dc28d784527e2882390"
|
checksum = "da419ac133bb3ddf0dbf9c12fcc0ce01d994fcb65f6f1713faf15cc689320b5f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"keyvalues-parser",
|
"keyvalues-parser",
|
||||||
|
"once_cell",
|
||||||
|
"paste",
|
||||||
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
@ -584,9 +605,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.150"
|
version = "0.2.147"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
|
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
@ -623,9 +644,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mio"
|
name = "mio"
|
||||||
version = "0.8.9"
|
version = "0.8.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0"
|
checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"wasi",
|
"wasi",
|
||||||
@ -694,9 +715,9 @@ checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openssl"
|
name = "openssl"
|
||||||
version = "0.10.64"
|
version = "0.10.58"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f"
|
checksum = "a9dfc0783362704e97ef3bd24261995a699468440099ef95d869b4d9732f829a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.4.0",
|
"bitflags 2.4.0",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@ -724,33 +745,23 @@ version = "0.1.5"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "openssl-src"
|
|
||||||
version = "300.1.6+3.1.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openssl-sys"
|
name = "openssl-sys"
|
||||||
version = "0.9.101"
|
version = "0.9.94"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff"
|
checksum = "2f55da20b29f956fb01f0add8683eb26ee13ebe3ebd935e49898717c6b4b2830"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
"openssl-src",
|
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "option-ext"
|
name = "paste"
|
||||||
version = "0.2.0"
|
version = "1.0.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "percent-encoding"
|
name = "percent-encoding"
|
||||||
@ -834,18 +845,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.76"
|
version = "1.0.63"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c"
|
checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.35"
|
version = "1.0.28"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
|
checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
@ -910,10 +921,39 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest"
|
name = "regex"
|
||||||
version = "0.11.24"
|
version = "1.9.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251"
|
checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick",
|
||||||
|
"memchr",
|
||||||
|
"regex-automata",
|
||||||
|
"regex-syntax",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-automata"
|
||||||
|
version = "0.3.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick",
|
||||||
|
"memchr",
|
||||||
|
"regex-syntax",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-syntax"
|
||||||
|
version = "0.7.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "reqwest"
|
||||||
|
version = "0.11.22"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -933,11 +973,9 @@ dependencies = [
|
|||||||
"once_cell",
|
"once_cell",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"rustls-pemfile",
|
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_urlencoded",
|
"serde_urlencoded",
|
||||||
"sync_wrapper",
|
|
||||||
"system-configuration",
|
"system-configuration",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-native-tls",
|
"tokio-native-tls",
|
||||||
@ -951,6 +989,35 @@ dependencies = [
|
|||||||
"winreg 0.50.0",
|
"winreg 0.50.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ring"
|
||||||
|
version = "0.16.20"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"libc",
|
||||||
|
"once_cell",
|
||||||
|
"spin 0.5.2",
|
||||||
|
"untrusted 0.7.1",
|
||||||
|
"web-sys",
|
||||||
|
"winapi",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ring"
|
||||||
|
version = "0.17.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "911b295d2d302948838c8ac142da1ee09fa7863163b44e6715bc9357905878b8"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"getrandom",
|
||||||
|
"libc",
|
||||||
|
"spin 0.9.8",
|
||||||
|
"untrusted 0.9.0",
|
||||||
|
"windows-sys 0.48.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc-demangle"
|
name = "rustc-demangle"
|
||||||
version = "0.1.23"
|
version = "0.1.23"
|
||||||
@ -971,14 +1038,36 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-pemfile"
|
name = "rustls"
|
||||||
version = "1.0.4"
|
version = "0.21.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
|
checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8"
|
||||||
|
dependencies = [
|
||||||
|
"log",
|
||||||
|
"ring 0.16.20",
|
||||||
|
"rustls-webpki",
|
||||||
|
"sct",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustls-pemfile"
|
||||||
|
version = "1.0.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustls-webpki"
|
||||||
|
version = "0.101.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe"
|
||||||
|
dependencies = [
|
||||||
|
"ring 0.16.20",
|
||||||
|
"untrusted 0.7.1",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "1.0.13"
|
version = "1.0.13"
|
||||||
@ -994,6 +1083,16 @@ dependencies = [
|
|||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sct"
|
||||||
|
version = "0.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
|
||||||
|
dependencies = [
|
||||||
|
"ring 0.16.20",
|
||||||
|
"untrusted 0.7.1",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "security-framework"
|
name = "security-framework"
|
||||||
version = "2.9.2"
|
version = "2.9.2"
|
||||||
@ -1030,24 +1129,24 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "semver"
|
name = "semver"
|
||||||
version = "1.0.22"
|
version = "1.0.20"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"
|
checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.197"
|
version = "1.0.190"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
|
checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.197"
|
version = "1.0.190"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
|
checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -1056,9 +1155,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.114"
|
version = "1.0.107"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
|
checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"ryu",
|
"ryu",
|
||||||
@ -1115,45 +1214,50 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "socket2"
|
name = "socket2"
|
||||||
version = "0.5.5"
|
version = "0.5.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
|
checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "steamlocate"
|
name = "spin"
|
||||||
version = "2.0.0-beta.2"
|
version = "0.5.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c3b6a4810c4e7fecb0123a9a8ba99b335c17d92e636c265ef99108ee4734c812"
|
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "spin"
|
||||||
|
version = "0.9.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "steamlocate"
|
||||||
|
version = "2.0.0-alpha.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2b1568c4a70a26c4373fe1131ffa4eff055459631b6e40c6bc118615f2d870c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crc",
|
|
||||||
"dirs",
|
"dirs",
|
||||||
"keyvalues-parser",
|
"keyvalues-parser",
|
||||||
"keyvalues-serde",
|
"keyvalues-serde",
|
||||||
"serde",
|
"serde",
|
||||||
"winreg 0.51.0",
|
"winreg 0.10.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.48"
|
version = "2.0.28"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
|
checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "sync_wrapper"
|
|
||||||
version = "0.1.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "system-configuration"
|
name = "system-configuration"
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
@ -1190,18 +1294,18 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "1.0.51"
|
version = "1.0.40"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7"
|
checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl",
|
"thiserror-impl",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror-impl"
|
name = "thiserror-impl"
|
||||||
version = "1.0.51"
|
version = "1.0.40"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df"
|
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -1225,9 +1329,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.36.0"
|
version = "1.33.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931"
|
checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -1235,16 +1339,16 @@ dependencies = [
|
|||||||
"mio",
|
"mio",
|
||||||
"num_cpus",
|
"num_cpus",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"socket2 0.5.5",
|
"socket2 0.5.4",
|
||||||
"tokio-macros",
|
"tokio-macros",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio-macros"
|
name = "tokio-macros"
|
||||||
version = "2.2.0"
|
version = "2.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
|
checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -1327,6 +1431,15 @@ version = "0.1.6"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
|
checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicase"
|
||||||
|
version = "2.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"
|
||||||
|
dependencies = [
|
||||||
|
"version_check",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-bidi"
|
name = "unicode-bidi"
|
||||||
version = "0.3.13"
|
version = "0.3.13"
|
||||||
@ -1354,6 +1467,18 @@ version = "0.1.11"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
|
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "untrusted"
|
||||||
|
version = "0.7.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "untrusted"
|
||||||
|
version = "0.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "url"
|
name = "url"
|
||||||
version = "2.4.1"
|
version = "2.4.1"
|
||||||
@ -1394,9 +1519,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen"
|
name = "wasm-bindgen"
|
||||||
version = "0.2.90"
|
version = "0.2.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406"
|
checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"wasm-bindgen-macro",
|
"wasm-bindgen-macro",
|
||||||
@ -1404,9 +1529,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-backend"
|
name = "wasm-bindgen-backend"
|
||||||
version = "0.2.90"
|
version = "0.2.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd"
|
checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bumpalo",
|
"bumpalo",
|
||||||
"log",
|
"log",
|
||||||
@ -1419,9 +1544,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-futures"
|
name = "wasm-bindgen-futures"
|
||||||
version = "0.4.40"
|
version = "0.4.36"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461"
|
checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
@ -1431,9 +1556,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro"
|
name = "wasm-bindgen-macro"
|
||||||
version = "0.2.90"
|
version = "0.2.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999"
|
checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"wasm-bindgen-macro-support",
|
"wasm-bindgen-macro-support",
|
||||||
@ -1441,9 +1566,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro-support"
|
name = "wasm-bindgen-macro-support"
|
||||||
version = "0.2.90"
|
version = "0.2.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7"
|
checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -1454,15 +1579,15 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-shared"
|
name = "wasm-bindgen-shared"
|
||||||
version = "0.2.90"
|
version = "0.2.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b"
|
checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-streams"
|
name = "wasm-streams"
|
||||||
version = "0.4.0"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129"
|
checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
@ -1473,14 +1598,30 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "web-sys"
|
name = "web-sys"
|
||||||
version = "0.3.67"
|
version = "0.3.63"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed"
|
checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "webpki"
|
||||||
|
version = "0.22.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53"
|
||||||
|
dependencies = [
|
||||||
|
"ring 0.17.2",
|
||||||
|
"untrusted 0.9.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "webpki-roots"
|
||||||
|
version = "0.25.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winapi"
|
name = "winapi"
|
||||||
version = "0.3.9"
|
version = "0.3.9"
|
||||||
@ -1637,19 +1778,18 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winreg"
|
name = "winreg"
|
||||||
version = "0.50.0"
|
version = "0.10.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
|
checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"winapi",
|
||||||
"windows-sys 0.48.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winreg"
|
name = "winreg"
|
||||||
version = "0.51.0"
|
version = "0.50.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc"
|
checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
|
29
Cargo.toml
29
Cargo.toml
@ -1,33 +1,36 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "alterware-launcher"
|
name = "alterware-launcher"
|
||||||
version = "0.6.10"
|
version = "0.6.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
build = "res/build.rs"
|
build = "res/build.rs"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
opt-level = "s"
|
opt-level = "s"
|
||||||
|
|
||||||
|
# Symbols are a nice thing
|
||||||
|
debug = true
|
||||||
|
|
||||||
panic = "abort"
|
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]
|
||||||
|
http_req = { version = "0.10.1", default-features = false, features = [
|
||||||
|
"rust-tls",
|
||||||
|
] }
|
||||||
sha1_smol = "1.0.0"
|
sha1_smol = "1.0.0"
|
||||||
serde = { version = "1.0.197", features = ["derive"] }
|
serde = { version = "1.0.190", features = ["derive"] }
|
||||||
serde_json = "1.0.114"
|
serde_json = "1.0.107"
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
semver = "1.0.22"
|
semver = "1.0.20"
|
||||||
colored = "2.1.0"
|
colored = "2.0.4"
|
||||||
reqwest = { version = "0.11.24", features = ["stream"] }
|
reqwest = { version = "0.11.22", features = ["stream"] }
|
||||||
futures-util = "0.3.30"
|
futures-util = "0.3.29"
|
||||||
indicatif = "0.17.8"
|
indicatif = "0.17.7"
|
||||||
tokio = {version="1.36.0", features = ["rt-multi-thread", "macros"]}
|
tokio = {version="1.33.0", features = ["rt-multi-thread", "macros"]}
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
|
||||||
openssl = { version = "0.10.64", default-features = false, features = ["vendored"] }
|
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
steamlocate = "=2.0.0-beta.2"
|
steamlocate = "2.0.0-alpha.0"
|
||||||
mslnk = "0.1.8"
|
mslnk = "0.1.8"
|
||||||
self-replace = "1.3.7"
|
self-replace = "1.3.7"
|
||||||
|
|
||||||
|
27
README.md
27
README.md
@ -4,16 +4,13 @@
|
|||||||
|
|
||||||
##### IW4x | IW4-SP | IW5-Mod | IW6-Mod | S1-Mod
|
##### IW4x | IW4-SP | IW5-Mod | IW6-Mod | S1-Mod
|
||||||
|
|
||||||
  
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Installation
|
#### Installation
|
||||||
|
|
||||||
1. Download the game from [Steam](https://store.steampowered.com/)
|
1. Download the [latest alterware-launcher.exe](https://github.com/mxve/alterware-launcher/releases/latest/download/alterware-launcher.exe)
|
||||||
2. Download the [latest alterware-launcher.exe](https://github.com/mxve/alterware-launcher/releases/latest/download/alterware-launcher.exe)
|
2. Place alterware-launcher.exe in the game directory
|
||||||
3. Place alterware-launcher.exe in the game directory
|
3. Run alterware-launcher.exe, after updating the game will launch automatically
|
||||||
4. Run alterware-launcher.exe, after updating the game will launch automatically
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -38,8 +35,6 @@
|
|||||||
- See [client-args.md](client-args.md)
|
- See [client-args.md](client-args.md)
|
||||||
- ```--version```, ```-v```
|
- ```--version```, ```-v```
|
||||||
- Print the launcher version
|
- Print the launcher version
|
||||||
- ```--ignore-required-files```
|
|
||||||
- Install client even if required files are missing
|
|
||||||
|
|
||||||
Example: ```alterware-launcher.exe iw4x --bonus -u --path "C:\Games\IW4x" --pass "-console"```
|
Example: ```alterware-launcher.exe iw4x --bonus -u --path "C:\Games\IW4x" --pass "-console"```
|
||||||
|
|
||||||
@ -68,9 +63,6 @@ alterware-launcher.json
|
|||||||
- ```args```
|
- ```args```
|
||||||
- See --pass
|
- See --pass
|
||||||
- Default: ""
|
- Default: ""
|
||||||
- ```use_https```
|
|
||||||
- Use HTTPS for downloads
|
|
||||||
- Default: false
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -90,6 +82,13 @@ Visit the [AlterWare Forum](https://forum.alterware.dev/) or [Discord](https://d
|
|||||||
---
|
---
|
||||||
|
|
||||||
### Note for server owners:
|
### Note for server owners:
|
||||||
When the launcher updates itself __on Windows__ it will restart by spawning a new console. If you are automating this process, you should probably use ```--skip-launcher-update``` and download the latest launcher yourself from [here](https://github.com/mxve/alterware-launcher/releases/latest/download/alterware-launcher.exe).
|
When the launcher updates itself it needs to be restarted. It will return exit code 201 in this case.
|
||||||
|
|
||||||
The linux build does __not__ update itself.
|
```
|
||||||
|
@echo off
|
||||||
|
:loop
|
||||||
|
start /wait alterware-launcher.exe --update
|
||||||
|
if %errorlevel% equ 201 (
|
||||||
|
goto loop
|
||||||
|
)
|
||||||
|
```
|
@ -36,17 +36,6 @@ pub fn save_value(config_path: PathBuf, key: &str, value: bool) {
|
|||||||
"download_bonus_content" => config.download_bonus_content = value,
|
"download_bonus_content" => config.download_bonus_content = value,
|
||||||
"ask_bonus_content" => config.ask_bonus_content = value,
|
"ask_bonus_content" => config.ask_bonus_content = value,
|
||||||
"force_update" => config.force_update = value,
|
"force_update" => config.force_update = value,
|
||||||
"use_https" => config.use_https = value,
|
|
||||||
_ => (),
|
|
||||||
}
|
|
||||||
save(config_path, config);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn save_value_s(config_path: PathBuf, key: &str, value: String) {
|
|
||||||
let mut config = load(config_path.clone());
|
|
||||||
match key {
|
|
||||||
"args" => config.args = value.to_string(),
|
|
||||||
"engine" => config.engine = value.to_string(),
|
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
save(config_path, config);
|
save(config_path, config);
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
use semver::Version;
|
use semver::Version;
|
||||||
|
|
||||||
pub async fn latest_tag(owner: &str, repo: &str) -> String {
|
pub fn latest_tag(owner: &str, repo: &str) -> String {
|
||||||
let github_body = crate::http_async::get_body_string(
|
let github_body = crate::http::get_body_string(
|
||||||
format!(
|
format!(
|
||||||
"https://api.github.com/repos/{}/{}/releases/latest",
|
"https://api.github.com/repos/{}/{}/releases/latest",
|
||||||
owner, repo
|
owner, repo
|
||||||
)
|
)
|
||||||
.as_str(),
|
.as_str(),
|
||||||
)
|
);
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
let github_json: serde_json::Value = serde_json::from_str(&github_body).unwrap();
|
let github_json: serde_json::Value = serde_json::from_str(&github_body).unwrap();
|
||||||
github_json["tag_name"].to_string().replace('"', "")
|
github_json["tag_name"].to_string().replace('"', "")
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn latest_version(owner: &str, repo: &str) -> Version {
|
pub fn latest_version(owner: &str, repo: &str) -> Version {
|
||||||
let tag = latest_tag(owner, repo).await.replace('v', "");
|
let tag = latest_tag(owner, repo).replace('v', "");
|
||||||
Version::parse(&tag).unwrap()
|
Version::parse(&tag).unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
pub const MASTER: &str = "cdn.alterware.ovh";
|
pub const MASTER: &str = "https://master.alterware.dev";
|
||||||
pub const GH_OWNER: &str = "mxve";
|
pub const GH_OWNER: &str = "mxve";
|
||||||
pub const GH_REPO: &str = "alterware-launcher";
|
pub const GH_REPO: &str = "alterware-launcher";
|
||||||
pub const GH_IW4X_OWNER: &str = "iw4x";
|
pub const GH_IW4X_OWNER: &str = "iw4x";
|
||||||
|
84
src/http.rs
Normal file
84
src/http.rs
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
use crate::global;
|
||||||
|
use crate::misc;
|
||||||
|
use std::{fs, io::Write, path::Path, str};
|
||||||
|
|
||||||
|
pub fn get_body(url: &str) -> Vec<u8> {
|
||||||
|
let mut res: Vec<u8> = Vec::new();
|
||||||
|
|
||||||
|
match http_req::request::Request::new(&url.try_into().unwrap())
|
||||||
|
.header(
|
||||||
|
"User-Agent",
|
||||||
|
&format!(
|
||||||
|
"AlterWare Launcher | github.com/{}/{}",
|
||||||
|
global::GH_OWNER,
|
||||||
|
global::GH_REPO
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.send(&mut res)
|
||||||
|
{
|
||||||
|
Ok(req) => {
|
||||||
|
if req.status_code() == http_req::response::StatusCode::new(302)
|
||||||
|
|| req.status_code() == http_req::response::StatusCode::new(301)
|
||||||
|
{
|
||||||
|
let location = req.headers().get("Location").unwrap().as_str();
|
||||||
|
return get_body(location);
|
||||||
|
}
|
||||||
|
|
||||||
|
if req.status_code() != http_req::response::StatusCode::new(200) {
|
||||||
|
misc::fatal_error(&format!(
|
||||||
|
"Could not get body from {}, got {}",
|
||||||
|
url,
|
||||||
|
req.status_code()
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Err(e) => {
|
||||||
|
misc::fatal_error(&format!("Could not get body from {}, got:\n{}", url, e));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
res
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn get_body_string(url: &str) -> String {
|
||||||
|
String::from_utf8(get_body(url)).unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn download_file(url: &str, file_path: &Path) {
|
||||||
|
let body = get_body(url);
|
||||||
|
|
||||||
|
match fs::File::create(file_path) {
|
||||||
|
Ok(mut file) => match file.write_all(&body) {
|
||||||
|
Ok(_) => (),
|
||||||
|
Err(e) => {
|
||||||
|
misc::fatal_error(&format!(
|
||||||
|
"Could not write to file {}, got:\n{}",
|
||||||
|
file_path.to_str().unwrap(),
|
||||||
|
e
|
||||||
|
));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Err(e) => {
|
||||||
|
match e.kind() {
|
||||||
|
std::io::ErrorKind::NotFound => {
|
||||||
|
fs::create_dir_all(file_path.parent().unwrap()).unwrap();
|
||||||
|
return download_file(url, file_path);
|
||||||
|
}
|
||||||
|
std::io::ErrorKind::PermissionDenied => {
|
||||||
|
misc::fatal_error(&format!(
|
||||||
|
"Permission to {} denied.\n Please try:\n 1. Running the launcher as administrator.\n 2. Manually deleting the last downloaded file.\n 3. If your game is in the program files directory try moving it to another location.\n 4. Create an exception/exclusion in your Anti-Virus Software for either the last downloaded file or the entire game directory.\n\n\n{}",
|
||||||
|
file_path.to_str().unwrap(),
|
||||||
|
e
|
||||||
|
));
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
|
||||||
|
misc::fatal_error(&format!(
|
||||||
|
"Could not create file {}, got:\n{}",
|
||||||
|
file_path.to_str().unwrap(),
|
||||||
|
e
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -10,7 +10,7 @@ use reqwest::Client;
|
|||||||
|
|
||||||
use crate::misc;
|
use crate::misc;
|
||||||
|
|
||||||
pub async fn download_file_progress(
|
pub async fn download_file(
|
||||||
client: &Client,
|
client: &Client,
|
||||||
pb: &ProgressBar,
|
pb: &ProgressBar,
|
||||||
url: &str,
|
url: &str,
|
||||||
@ -19,14 +19,6 @@ pub async fn download_file_progress(
|
|||||||
) -> Result<(), String> {
|
) -> Result<(), String> {
|
||||||
let res = client
|
let res = client
|
||||||
.get(url)
|
.get(url)
|
||||||
.header(
|
|
||||||
"User-Agent",
|
|
||||||
&format!(
|
|
||||||
"AlterWare Launcher | github.com/{}/{}",
|
|
||||||
crate::global::GH_OWNER,
|
|
||||||
crate::global::GH_REPO
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.send()
|
.send()
|
||||||
.await
|
.await
|
||||||
.or(Err(format!("Failed to GET from '{}'", &url)))?;
|
.or(Err(format!("Failed to GET from '{}'", &url)))?;
|
||||||
@ -58,70 +50,3 @@ pub async fn download_file_progress(
|
|||||||
pb.set_message(String::default());
|
pb.set_message(String::default());
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn download_file(url: &str, path: &PathBuf) -> Result<(), String> {
|
|
||||||
let client = Client::new();
|
|
||||||
match client
|
|
||||||
.get(url)
|
|
||||||
.header(
|
|
||||||
"User-Agent",
|
|
||||||
&format!(
|
|
||||||
"AlterWare Launcher | github.com/{}/{}",
|
|
||||||
crate::global::GH_OWNER,
|
|
||||||
crate::global::GH_REPO
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.send()
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
Ok(res) => {
|
|
||||||
let body = res.bytes().await.or(Err("Failed to download file"))?;
|
|
||||||
let mut file = File::create(path).or(Err("Failed to create file"))?;
|
|
||||||
file.write_all(&body).or(Err("Failed to write to file"))?;
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
Err(e) => {
|
|
||||||
misc::fatal_error(&format!(
|
|
||||||
"Could not download file from {}, got:\n{}",
|
|
||||||
url, e
|
|
||||||
));
|
|
||||||
Err("Could not download file".to_string())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn get_body(url: &str) -> Result<Vec<u8>, String> {
|
|
||||||
let client = Client::new();
|
|
||||||
match client
|
|
||||||
.get(url)
|
|
||||||
.header(
|
|
||||||
"User-Agent",
|
|
||||||
&format!(
|
|
||||||
"AlterWare Launcher | github.com/{}/{}",
|
|
||||||
crate::global::GH_OWNER,
|
|
||||||
crate::global::GH_REPO
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.send()
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
Ok(res) => {
|
|
||||||
println!(
|
|
||||||
"[DEBUG] {} {}",
|
|
||||||
res.status().to_string().bright_yellow(),
|
|
||||||
url.bright_yellow()
|
|
||||||
);
|
|
||||||
let body = res.bytes().await.or(Err("Failed to get body"))?;
|
|
||||||
Ok(body.to_vec())
|
|
||||||
}
|
|
||||||
Err(e) => {
|
|
||||||
misc::fatal_error(&format!("Could not get body from {}, got:\n{}", url, e));
|
|
||||||
Err("Could not get body".to_string())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn get_body_string(url: &str) -> Result<String, String> {
|
|
||||||
let body = get_body(url).await?;
|
|
||||||
Ok(String::from_utf8(body).unwrap())
|
|
||||||
}
|
|
||||||
|
22
src/io.rs
Normal file
22
src/io.rs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
use std::{fs, path::Path};
|
||||||
|
|
||||||
|
pub fn unzip(zip_path: &Path, out_path: &Path) {
|
||||||
|
let mut archive = zip::ZipArchive::new(fs::File::open(zip_path).unwrap()).unwrap();
|
||||||
|
for i in 0..archive.len() {
|
||||||
|
let mut file = archive.by_index(i).unwrap();
|
||||||
|
let outpath = out_path.join(file.name());
|
||||||
|
|
||||||
|
if (*file.name()).ends_with('/') {
|
||||||
|
fs::create_dir_all(outpath).unwrap();
|
||||||
|
} else {
|
||||||
|
println!("Unpacking {}", file.name());
|
||||||
|
if let Some(p) = outpath.parent() {
|
||||||
|
if !p.exists() {
|
||||||
|
fs::create_dir_all(p).unwrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let mut outfile = fs::File::create(&outpath).unwrap();
|
||||||
|
std::io::copy(&mut file, &mut outfile).unwrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
16
src/iw4x.rs
16
src/iw4x.rs
@ -1,6 +1,6 @@
|
|||||||
use crate::github;
|
use crate::github;
|
||||||
use crate::global::*;
|
use crate::global::*;
|
||||||
use crate::http_async;
|
use crate::http;
|
||||||
use crate::misc;
|
use crate::misc;
|
||||||
|
|
||||||
use colored::*;
|
use colored::*;
|
||||||
@ -14,12 +14,12 @@ pub fn local_revision(dir: &Path) -> u16 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn remote_revision() -> u16 {
|
pub fn remote_revision() -> u16 {
|
||||||
misc::rev_to_int(&github::latest_tag(GH_IW4X_OWNER, GH_IW4X_REPO).await)
|
misc::rev_to_int(&github::latest_tag(GH_IW4X_OWNER, GH_IW4X_REPO))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn update(dir: &Path) {
|
pub fn update(dir: &Path) {
|
||||||
let remote = remote_revision().await;
|
let remote = remote_revision();
|
||||||
let local = local_revision(dir);
|
let local = local_revision(dir);
|
||||||
|
|
||||||
if remote <= local && dir.join("iw4x.dll").exists() {
|
if remote <= local && dir.join("iw4x.dll").exists() {
|
||||||
@ -39,14 +39,12 @@ pub async fn update(dir: &Path) {
|
|||||||
"Downloading".bright_yellow(),
|
"Downloading".bright_yellow(),
|
||||||
misc::cute_path(&dir.join("iw4x.dll"))
|
misc::cute_path(&dir.join("iw4x.dll"))
|
||||||
);
|
);
|
||||||
http_async::download_file(
|
http::download_file(
|
||||||
&format!(
|
&format!(
|
||||||
"{}/download/iw4x.dll",
|
"{}/download/iw4x.dll",
|
||||||
github::latest_release_url(GH_IW4X_OWNER, GH_IW4X_REPO)
|
github::latest_release_url(GH_IW4X_OWNER, GH_IW4X_REPO)
|
||||||
),
|
),
|
||||||
&dir.join("iw4x.dll"),
|
&dir.join("iw4x.dll"),
|
||||||
)
|
);
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
fs::write(dir.join(".iw4xrevision"), format!("r{}", remote)).unwrap();
|
fs::write(dir.join(".iw4xrevision"), format!("r{}", remote)).unwrap();
|
||||||
}
|
}
|
||||||
|
281
src/main.rs
281
src/main.rs
@ -1,6 +1,7 @@
|
|||||||
mod config;
|
mod config;
|
||||||
mod github;
|
mod github;
|
||||||
mod global;
|
mod global;
|
||||||
|
mod http;
|
||||||
mod http_async;
|
mod http_async;
|
||||||
mod iw4x;
|
mod iw4x;
|
||||||
mod misc;
|
mod misc;
|
||||||
@ -21,24 +22,17 @@ use steamlocate::SteamDir;
|
|||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
fn get_installed_games(games: &Vec<Game>) -> Vec<(u32, PathBuf)> {
|
fn get_installed_games(games: &Vec<Game>) -> Vec<(u32, PathBuf)> {
|
||||||
let mut installed_games = Vec::new();
|
let mut installed_games = Vec::new();
|
||||||
let steamdir_result = SteamDir::locate();
|
let mut steamdir = match SteamDir::locate() {
|
||||||
|
Some(steamdir) => steamdir,
|
||||||
let steamdir = match steamdir_result {
|
None => {
|
||||||
Ok(steamdir) => steamdir,
|
println!("{}", "Steam not found!".yellow());
|
||||||
Err(error) => {
|
|
||||||
println!("Error locating Steam: {}", error);
|
|
||||||
return installed_games;
|
return installed_games;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for game in games {
|
for game in games {
|
||||||
if let Ok(Some((app, library))) = steamdir.find_app(game.app_id) {
|
if let Some(app) = steamdir.app(&game.app_id) {
|
||||||
let game_path = library
|
installed_games.push((game.app_id, PathBuf::from(&app.path)));
|
||||||
.path()
|
|
||||||
.join("steamapps")
|
|
||||||
.join("common")
|
|
||||||
.join(&app.install_dir);
|
|
||||||
installed_games.push((game.app_id, game_path));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,14 +93,14 @@ fn setup_desktop_links(path: &Path, game: &Game) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
async fn auto_install(path: &Path, game: &Game<'_>, master_url: &String) {
|
async fn auto_install(path: &Path, game: &Game<'_>) {
|
||||||
setup_client_links(game, path);
|
setup_client_links(game, path);
|
||||||
setup_desktop_links(path, game);
|
setup_desktop_links(path, game);
|
||||||
update(game, path, false, false, None, master_url, None).await;
|
update(game, path, false, false).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
async fn windows_launcher_install(games: &Vec<Game<'_>>, master_url: &String) {
|
async fn windows_launcher_install(games: &Vec<Game<'_>>) {
|
||||||
println!(
|
println!(
|
||||||
"{}",
|
"{}",
|
||||||
"No game specified/found. Checking for installed Steam games..".yellow()
|
"No game specified/found. Checking for installed Steam games..".yellow()
|
||||||
@ -120,7 +114,7 @@ async fn windows_launcher_install(games: &Vec<Game<'_>>, master_url: &String) {
|
|||||||
println!("Found game in current directory.");
|
println!("Found game in current directory.");
|
||||||
println!("Installing AlterWare client for {}.", id);
|
println!("Installing AlterWare client for {}.", id);
|
||||||
let game = games.iter().find(|&g| g.app_id == *id).unwrap();
|
let game = games.iter().find(|&g| g.app_id == *id).unwrap();
|
||||||
auto_install(path, game, master_url).await;
|
auto_install(path, game).await;
|
||||||
println!("Installation complete. Please run the launcher again or use a shortcut to launch the game.");
|
println!("Installation complete. Please run the launcher again or use a shortcut to launch the game.");
|
||||||
std::io::stdin().read_line(&mut String::new()).unwrap();
|
std::io::stdin().read_line(&mut String::new()).unwrap();
|
||||||
std::process::exit(0);
|
std::process::exit(0);
|
||||||
@ -133,9 +127,13 @@ async fn windows_launcher_install(games: &Vec<Game<'_>>, master_url: &String) {
|
|||||||
println!("{}: {}", id, path.display());
|
println!("{}: {}", id, path.display());
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("Enter the ID of the game you want to install the AlterWare client for:");
|
println!("Enter the ID of the game you want to install the AlterWare client for, enter 0 for manual selection:");
|
||||||
let input: u32 = misc::stdin().parse().unwrap();
|
let input: u32 = misc::stdin().parse().unwrap();
|
||||||
|
|
||||||
|
if input == 0 {
|
||||||
|
return manual_install(games).await;
|
||||||
|
}
|
||||||
|
|
||||||
for (id, path) in installed_games.iter() {
|
for (id, path) in installed_games.iter() {
|
||||||
if *id == input {
|
if *id == input {
|
||||||
let game = games.iter().find(|&g| g.app_id == input).unwrap();
|
let game = games.iter().find(|&g| g.app_id == input).unwrap();
|
||||||
@ -147,7 +145,7 @@ async fn windows_launcher_install(games: &Vec<Game<'_>>, master_url: &String) {
|
|||||||
fs::copy(launcher_path, target_path).unwrap();
|
fs::copy(launcher_path, target_path).unwrap();
|
||||||
println!("Launcher copied to {}", path.display());
|
println!("Launcher copied to {}", path.display());
|
||||||
}
|
}
|
||||||
auto_install(path, game, master_url).await;
|
auto_install(path, game).await;
|
||||||
println!("Installation complete. Please run the launcher again or use a shortcut to launch the game.");
|
println!("Installation complete. Please run the launcher again or use a shortcut to launch the game.");
|
||||||
std::io::stdin().read_line(&mut String::new()).unwrap();
|
std::io::stdin().read_line(&mut String::new()).unwrap();
|
||||||
break;
|
break;
|
||||||
@ -155,35 +153,31 @@ async fn windows_launcher_install(games: &Vec<Game<'_>>, master_url: &String) {
|
|||||||
}
|
}
|
||||||
std::process::exit(0);
|
std::process::exit(0);
|
||||||
} else {
|
} else {
|
||||||
println!(
|
manual_install(games).await;
|
||||||
"No installed games found. Make sure to place the launcher in the game directory."
|
|
||||||
);
|
|
||||||
std::io::stdin().read_line(&mut String::new()).unwrap();
|
|
||||||
std::process::exit(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fn prompt_client_selection(games: &[Game]) -> String {
|
fn prompt_client_selection(games: &[Game]) -> String {
|
||||||
// println!(
|
println!(
|
||||||
// "Couldn't detect any games, please select a client to install in the current directory:"
|
"Couldn't detect any games, please select a client to install in the current directory:"
|
||||||
// );
|
);
|
||||||
// for (i, g) in games.iter().enumerate() {
|
for (i, g) in games.iter().enumerate() {
|
||||||
// for c in g.client.iter() {
|
for c in g.client.iter() {
|
||||||
// println!("{}: {}", i, c);
|
println!("{}: {}", i, c);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// let input: usize = misc::stdin().parse().unwrap();
|
let input: usize = misc::stdin().parse().unwrap();
|
||||||
// String::from(games[input].client[0])
|
String::from(games[input].client[0])
|
||||||
// }
|
}
|
||||||
|
|
||||||
// async fn manual_install(games: &[Game<'_>]) {
|
async fn manual_install(games: &[Game<'_>]) {
|
||||||
// let selection = prompt_client_selection(games);
|
let selection = prompt_client_selection(games);
|
||||||
// let game = games.iter().find(|&g| g.client[0] == selection).unwrap();
|
let game = games.iter().find(|&g| g.client[0] == selection).unwrap();
|
||||||
// update(game, &env::current_dir().unwrap(), false, false).await;
|
update(game, &env::current_dir().unwrap(), false, false).await;
|
||||||
// println!("Installation complete. Please run the launcher again or use a shortcut to launch the game.");
|
println!("Installation complete. Please run the launcher again or use a shortcut to launch the game.");
|
||||||
// std::io::stdin().read_line(&mut String::new()).unwrap();
|
std::io::stdin().read_line(&mut String::new()).unwrap();
|
||||||
// std::process::exit(0);
|
std::process::exit(0);
|
||||||
// }
|
}
|
||||||
|
|
||||||
fn total_download_size(cdn_info: &Vec<CdnFile>, remote_dir: &str) -> u64 {
|
fn total_download_size(cdn_info: &Vec<CdnFile>, remote_dir: &str) -> u64 {
|
||||||
let remote_dir = format!("{}/", remote_dir);
|
let remote_dir = format!("{}/", remote_dir);
|
||||||
@ -203,8 +197,6 @@ async fn update_dir(
|
|||||||
dir: &Path,
|
dir: &Path,
|
||||||
hashes: &mut HashMap<String, String>,
|
hashes: &mut HashMap<String, String>,
|
||||||
pb: &ProgressBar,
|
pb: &ProgressBar,
|
||||||
skip_iw4x_sp: bool,
|
|
||||||
master_url: &String,
|
|
||||||
) {
|
) {
|
||||||
misc::pb_style_download(pb, false);
|
misc::pb_style_download(pb, false);
|
||||||
|
|
||||||
@ -216,9 +208,6 @@ async fn update_dir(
|
|||||||
if !file.name.starts_with(&remote_dir_pre) || file.name == "iw4/iw4x.dll" {
|
if !file.name.starts_with(&remote_dir_pre) || file.name == "iw4/iw4x.dll" {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if skip_iw4x_sp && file.name == "iw4/iw4x-sp.exe" {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let sha1_remote = file.hash.to_lowercase();
|
let sha1_remote = file.hash.to_lowercase();
|
||||||
let file_name = &file.name.replace(remote_dir_pre.as_str(), "");
|
let file_name = &file.name.replace(remote_dir_pre.as_str(), "");
|
||||||
@ -270,10 +259,10 @@ async fn update_dir(
|
|||||||
fs::create_dir_all(parent).unwrap();
|
fs::create_dir_all(parent).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
http_async::download_file_progress(
|
http_async::download_file(
|
||||||
&client,
|
&client,
|
||||||
pb,
|
pb,
|
||||||
&format!("{}/{}", master_url, file.name),
|
&format!("{}/{}", MASTER, file.name),
|
||||||
&file_path,
|
&file_path,
|
||||||
file.size as u64,
|
file.size as u64,
|
||||||
)
|
)
|
||||||
@ -284,31 +273,11 @@ async fn update_dir(
|
|||||||
misc::pb_style_download(pb, false);
|
misc::pb_style_download(pb, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn update(
|
async fn update(game: &Game<'_>, dir: &Path, bonus_content: bool, force: bool) {
|
||||||
game: &Game<'_>,
|
let cdn_info: Vec<CdnFile> = serde_json::from_str(&http::get_body_string(
|
||||||
dir: &Path,
|
format!("{}/files.json", MASTER).as_str(),
|
||||||
bonus_content: bool,
|
))
|
||||||
force: bool,
|
|
||||||
skip_iw4x_sp: Option<bool>,
|
|
||||||
master_url: &String,
|
|
||||||
ignore_required_files: Option<bool>,
|
|
||||||
) {
|
|
||||||
let skip_iw4x_sp = skip_iw4x_sp.unwrap_or(false);
|
|
||||||
let ignore_required_files = ignore_required_files.unwrap_or(false);
|
|
||||||
|
|
||||||
let res = http_async::get_body_string(format!("{}/files.json", master_url).as_str())
|
|
||||||
.await
|
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let cdn_info: Vec<CdnFile> = serde_json::from_str(&res).unwrap();
|
|
||||||
|
|
||||||
if !ignore_required_files && !game.required_files_exist(dir) {
|
|
||||||
println!(
|
|
||||||
"{}\nVerify game file integrity on Steam or reinstall the game.",
|
|
||||||
"Critical game files missing.".bright_red()
|
|
||||||
);
|
|
||||||
std::io::stdin().read_line(&mut String::new()).unwrap();
|
|
||||||
std::process::exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut hashes = HashMap::new();
|
let mut hashes = HashMap::new();
|
||||||
let hash_file = dir.join(".sha-sums");
|
let hash_file = dir.join(".sha-sums");
|
||||||
@ -323,126 +292,20 @@ async fn update(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if game.engine == "iw4" {
|
if game.engine == "iw4" {
|
||||||
iw4x::update(dir).await;
|
iw4x::update(dir);
|
||||||
|
|
||||||
let iw4x_dirs = vec!["iw4x", "zone/patch"];
|
|
||||||
for d in &iw4x_dirs {
|
|
||||||
if let Ok(dir_iter) = dir.join(d).read_dir() {
|
|
||||||
'outer: for file in dir_iter.filter_map(|entry| entry.ok()) {
|
|
||||||
let file_path = file.path();
|
|
||||||
|
|
||||||
if file_path.is_dir() {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let file_path_rel = match file_path.strip_prefix(dir) {
|
|
||||||
Ok(rel) => rel.to_path_buf(),
|
|
||||||
Err(_) => continue,
|
|
||||||
};
|
|
||||||
|
|
||||||
if iw4x_dirs
|
|
||||||
.iter()
|
|
||||||
.any(|prefix| file_path_rel.starts_with(Path::new(prefix)))
|
|
||||||
{
|
|
||||||
if !cdn_info
|
|
||||||
.iter()
|
|
||||||
.any(|cdn_file| cdn_file.name.starts_with("iw4"))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let should_continue = cdn_info.iter().any(|cdn_file| {
|
|
||||||
let path_rem = Path::new(&cdn_file.name)
|
|
||||||
.strip_prefix(Path::new("iw4"))
|
|
||||||
.unwrap_or_else(|_| Path::new(&cdn_file.name));
|
|
||||||
path_rem == file_path_rel
|
|
||||||
});
|
|
||||||
|
|
||||||
if should_continue {
|
|
||||||
continue 'outer;
|
|
||||||
}
|
|
||||||
|
|
||||||
println!(
|
|
||||||
"[{}] {}",
|
|
||||||
"Removed".bright_red(),
|
|
||||||
misc::cute_path(&file_path)
|
|
||||||
);
|
|
||||||
|
|
||||||
if fs::remove_file(&file_path).is_err() {
|
|
||||||
println!(
|
|
||||||
"[{}] Couldn't delete {}",
|
|
||||||
"Error".bright_red(),
|
|
||||||
misc::cute_path(&file_path)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let pb = ProgressBar::new(0);
|
let pb = ProgressBar::new(0);
|
||||||
update_dir(
|
update_dir(&cdn_info, game.engine, dir, &mut hashes, &pb).await;
|
||||||
&cdn_info,
|
|
||||||
game.engine,
|
|
||||||
dir,
|
|
||||||
&mut hashes,
|
|
||||||
&pb,
|
|
||||||
skip_iw4x_sp,
|
|
||||||
master_url,
|
|
||||||
)
|
|
||||||
.await;
|
|
||||||
|
|
||||||
if bonus_content && !game.bonus.is_empty() {
|
if bonus_content && !game.bonus.is_empty() {
|
||||||
for bonus in game.bonus.iter() {
|
for bonus in game.bonus.iter() {
|
||||||
update_dir(
|
update_dir(&cdn_info, bonus, dir, &mut hashes, &pb).await;
|
||||||
&cdn_info,
|
|
||||||
bonus,
|
|
||||||
dir,
|
|
||||||
&mut hashes,
|
|
||||||
&pb,
|
|
||||||
skip_iw4x_sp,
|
|
||||||
master_url,
|
|
||||||
)
|
|
||||||
.await;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pb.finish();
|
pb.finish();
|
||||||
|
|
||||||
for f in game.delete.iter() {
|
|
||||||
let file_path = dir.join(f);
|
|
||||||
if file_path.is_file() {
|
|
||||||
if fs::remove_file(&file_path).is_err() {
|
|
||||||
println!(
|
|
||||||
"[{}] Couldn't delete {}",
|
|
||||||
"Error".bright_red(),
|
|
||||||
misc::cute_path(&file_path)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
println!(
|
|
||||||
"[{}] {}",
|
|
||||||
"Removed".bright_red(),
|
|
||||||
misc::cute_path(&file_path)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else if file_path.is_dir() {
|
|
||||||
if fs::remove_dir_all(&file_path).is_err() {
|
|
||||||
println!(
|
|
||||||
"[{}] Couldn't delete {}",
|
|
||||||
"Error".bright_red(),
|
|
||||||
misc::cute_path(&file_path)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
println!(
|
|
||||||
"[{}] {}",
|
|
||||||
"Removed".bright_red(),
|
|
||||||
misc::cute_path(&file_path)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut hash_file_content = String::new();
|
let mut hash_file_content = String::new();
|
||||||
for (file, hash) in hashes.iter() {
|
for (file, hash) in hashes.iter() {
|
||||||
hash_file_content.push_str(&format!("{} {}\n", hash, file));
|
hash_file_content.push_str(&format!("{} {}\n", hash, file));
|
||||||
@ -524,7 +387,6 @@ async fn main() {
|
|||||||
println!(" --force/-f: Force file hash recheck");
|
println!(" --force/-f: Force file hash recheck");
|
||||||
println!(" --pass <args>: Pass arguments to the game");
|
println!(" --pass <args>: Pass arguments to the game");
|
||||||
println!(" --skip-launcher-update: Skip launcher self-update");
|
println!(" --skip-launcher-update: Skip launcher self-update");
|
||||||
println!(" --ignore-required-files: Skip required files check");
|
|
||||||
println!(
|
println!(
|
||||||
"\nExample:\n alterware-launcher.exe iw4x --bonus --pass \"-console -nointro\""
|
"\nExample:\n alterware-launcher.exe iw4x --bonus --pass \"-console -nointro\""
|
||||||
);
|
);
|
||||||
@ -564,14 +426,8 @@ async fn main() {
|
|||||||
|
|
||||||
let mut cfg = config::load(install_path.join("alterware-launcher.json"));
|
let mut cfg = config::load(install_path.join("alterware-launcher.json"));
|
||||||
|
|
||||||
let master_url = if cfg.use_https {
|
|
||||||
format!("https://{}", MASTER)
|
|
||||||
} else {
|
|
||||||
format!("http://{}", MASTER)
|
|
||||||
};
|
|
||||||
|
|
||||||
if !arg_bool(&args, "--skip-launcher-update") && !cfg.skip_self_update {
|
if !arg_bool(&args, "--skip-launcher-update") && !cfg.skip_self_update {
|
||||||
self_update::run(cfg.update_only).await;
|
self_update::run(cfg.update_only);
|
||||||
} else {
|
} else {
|
||||||
arg_remove(&mut args, "--skip-launcher-update");
|
arg_remove(&mut args, "--skip-launcher-update");
|
||||||
}
|
}
|
||||||
@ -594,11 +450,6 @@ async fn main() {
|
|||||||
arg_remove(&mut args, "-f");
|
arg_remove(&mut args, "-f");
|
||||||
}
|
}
|
||||||
|
|
||||||
let ignore_required_files = arg_bool(&args, "--ignore-required-files");
|
|
||||||
if ignore_required_files {
|
|
||||||
arg_remove(&mut args, "--ignore-required-files");
|
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(pass) = arg_value(&args, "--pass") {
|
if let Some(pass) = arg_value(&args, "--pass") {
|
||||||
cfg.args = pass;
|
cfg.args = pass;
|
||||||
arg_remove_value(&mut args, "--pass");
|
arg_remove_value(&mut args, "--pass");
|
||||||
@ -606,15 +457,8 @@ async fn main() {
|
|||||||
cfg.args = String::default();
|
cfg.args = String::default();
|
||||||
}
|
}
|
||||||
|
|
||||||
let games_json = http_async::get_body_string(format!("{}/games.json", master_url).as_str())
|
let games_json = http::get_body_string(format!("{}/games.json", MASTER).as_str());
|
||||||
.await
|
let games: Vec<Game> = serde_json::from_str(&games_json).unwrap();
|
||||||
.unwrap();
|
|
||||||
let games: Vec<Game> = serde_json::from_str(&games_json).unwrap_or_else(|error| {
|
|
||||||
println!("Error parsing games.json: {:#?}", error);
|
|
||||||
fs::write("alterware-launcher-error.txt", &games_json).unwrap();
|
|
||||||
misc::stdin();
|
|
||||||
std::process::exit(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
let mut game: String = String::new();
|
let mut game: String = String::new();
|
||||||
if args.len() > 1 {
|
if args.len() > 1 {
|
||||||
@ -651,23 +495,6 @@ async fn main() {
|
|||||||
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 {
|
||||||
if cfg.engine.is_empty() {
|
|
||||||
cfg.engine = String::from(g.engine);
|
|
||||||
config::save_value_s(
|
|
||||||
install_path.join("alterware-launcher.json"),
|
|
||||||
"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(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if cfg.ask_bonus_content && !g.bonus.is_empty() {
|
if cfg.ask_bonus_content && !g.bonus.is_empty() {
|
||||||
println!("Download bonus content? (Y/n)");
|
println!("Download bonus content? (Y/n)");
|
||||||
let input = misc::stdin().to_ascii_lowercase();
|
let input = misc::stdin().to_ascii_lowercase();
|
||||||
@ -689,9 +516,6 @@ async fn main() {
|
|||||||
install_path.as_path(),
|
install_path.as_path(),
|
||||||
cfg.download_bonus_content,
|
cfg.download_bonus_content,
|
||||||
cfg.force_update,
|
cfg.force_update,
|
||||||
Some(&game != "iw4x-sp"),
|
|
||||||
&master_url,
|
|
||||||
Some(ignore_required_files),
|
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
if !cfg.update_only {
|
if !cfg.update_only {
|
||||||
@ -703,7 +527,10 @@ async fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
windows_launcher_install(&games, &master_url).await;
|
windows_launcher_install(&games).await;
|
||||||
|
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
manual_install(&games).await;
|
||||||
|
|
||||||
println!("{}", "Game not found!".bright_red());
|
println!("{}", "Game not found!".bright_red());
|
||||||
println!("Place the launcher in the game folder, if that doesn't work specify the client on the command line (ex. alterware-launcher.exe iw4-sp)");
|
println!("Place the launcher in the game folder, if that doesn't work specify the client on the command line (ex. alterware-launcher.exe iw4-sp)");
|
||||||
|
@ -2,24 +2,26 @@ use crate::github;
|
|||||||
use crate::global::*;
|
use crate::global::*;
|
||||||
|
|
||||||
use semver::Version;
|
use semver::Version;
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
use std::{thread, time};
|
||||||
|
|
||||||
pub async fn self_update_available() -> bool {
|
pub fn self_update_available() -> bool {
|
||||||
let current_version: Version = Version::parse(env!("CARGO_PKG_VERSION")).unwrap();
|
let current_version: Version = Version::parse(env!("CARGO_PKG_VERSION")).unwrap();
|
||||||
let latest_version = github::latest_version(GH_OWNER, GH_REPO).await;
|
let latest_version = github::latest_version(GH_OWNER, GH_REPO);
|
||||||
|
|
||||||
current_version < latest_version
|
current_version < latest_version
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
pub async fn run(_update_only: bool) {
|
pub fn run(_update_only: bool) {
|
||||||
if self_update_available().await {
|
if self_update_available() {
|
||||||
println!("A new version of the AlterWare launcher is available.");
|
println!("A new version of the AlterWare launcher is available.");
|
||||||
println!(
|
println!(
|
||||||
"Download it at {}",
|
"Download it at {}",
|
||||||
github::latest_release_url(GH_OWNER, GH_REPO)
|
github::latest_release_url(GH_OWNER, GH_REPO)
|
||||||
);
|
);
|
||||||
println!("Launching in 10 seconds..");
|
println!("Launching in 10 seconds..");
|
||||||
tokio::time::sleep(tokio::time::Duration::from_secs(10)).await;
|
thread::sleep(time::Duration::from_secs(10));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,10 +39,10 @@ pub fn restart() -> std::io::Error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
pub async fn run(update_only: bool) {
|
pub fn run(update_only: bool) {
|
||||||
use std::{fs, path::PathBuf};
|
use std::{fs, path::PathBuf};
|
||||||
|
|
||||||
use crate::http_async;
|
use crate::http;
|
||||||
use crate::misc;
|
use crate::misc;
|
||||||
|
|
||||||
let working_dir = std::env::current_dir().unwrap();
|
let working_dir = std::env::current_dir().unwrap();
|
||||||
@ -60,7 +62,7 @@ pub async fn run(update_only: bool) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if self_update_available().await {
|
if self_update_available() {
|
||||||
println!("Performing launcher self-update.");
|
println!("Performing launcher self-update.");
|
||||||
println!(
|
println!(
|
||||||
"If you run into any issues, please download the latest version at {}",
|
"If you run into any issues, please download the latest version at {}",
|
||||||
@ -80,16 +82,14 @@ pub async fn run(update_only: bool) {
|
|||||||
"alterware-launcher.exe"
|
"alterware-launcher.exe"
|
||||||
};
|
};
|
||||||
|
|
||||||
http_async::download_file(
|
http::download_file(
|
||||||
&format!(
|
&format!(
|
||||||
"{}/download/{}",
|
"{}/download/{}",
|
||||||
github::latest_release_url(GH_OWNER, GH_REPO),
|
github::latest_release_url(GH_OWNER, GH_REPO),
|
||||||
launcher_name
|
launcher_name
|
||||||
),
|
),
|
||||||
&file_path,
|
&file_path,
|
||||||
)
|
);
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
if !file_path.exists() {
|
if !file_path.exists() {
|
||||||
println!("Failed to download launcher update.");
|
println!("Failed to download launcher update.");
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use std::path::Path;
|
|
||||||
|
|
||||||
#[derive(serde::Deserialize, serde::Serialize, Clone)]
|
#[derive(serde::Deserialize, serde::Serialize, Clone)]
|
||||||
pub struct CdnFile {
|
pub struct CdnFile {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
@ -14,21 +12,6 @@ pub struct Game<'a> {
|
|||||||
pub references: Vec<&'a str>,
|
pub references: Vec<&'a str>,
|
||||||
pub app_id: u32,
|
pub app_id: u32,
|
||||||
pub bonus: Vec<&'a str>,
|
pub bonus: Vec<&'a str>,
|
||||||
pub delete: Vec<&'a str>,
|
|
||||||
pub required: Vec<&'a str>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a> Game<'a> {
|
|
||||||
pub fn required_files_exist(&self, dir: &Path) -> bool {
|
|
||||||
for required_file in &self.required {
|
|
||||||
let file_path = dir.join(required_file);
|
|
||||||
if !file_path.exists() {
|
|
||||||
println!("Required file {} does not exist", file_path.display());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(serde::Deserialize, serde::Serialize)]
|
#[derive(serde::Deserialize, serde::Serialize)]
|
||||||
@ -39,10 +22,6 @@ pub struct Config {
|
|||||||
pub ask_bonus_content: bool,
|
pub ask_bonus_content: bool,
|
||||||
pub force_update: bool,
|
pub force_update: bool,
|
||||||
pub args: String,
|
pub args: String,
|
||||||
#[serde(default)]
|
|
||||||
pub engine: String,
|
|
||||||
#[serde(default)]
|
|
||||||
pub use_https: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Config {
|
impl Default for Config {
|
||||||
@ -54,8 +33,6 @@ impl Default for Config {
|
|||||||
ask_bonus_content: true,
|
ask_bonus_content: true,
|
||||||
force_update: false,
|
force_update: false,
|
||||||
args: String::default(),
|
args: String::default(),
|
||||||
engine: String::default(),
|
|
||||||
use_https: true,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user