mirror of
https://github.com/alterware/alterware-launcher.git
synced 2026-03-26 12:03:04 +00:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
f4ac00d29f
|
|||
| b45ef12f5a | |||
| 2b61682464 | |||
| 7928e4dbfb | |||
| 863b9266b8 | |||
| cb2a278b14 | |||
| fb18d179b0 | |||
|
|
cc77ef778e | ||
|
|
a3cb1bd6aa | ||
|
|
24c35c577f | ||
|
|
ff4d75bc7c | ||
|
|
0b700bd825 | ||
| c8d8964a33 | |||
| 4f5f1bc1a5 | |||
|
|
c455278ca6 | ||
| 86a3587aa7 | |||
| 83d353ffba | |||
| 902fc70b56 | |||
| 9a9153fc93 | |||
| c4425b786e | |||
| 3d609ff570 | |||
|
|
6be4c1a8e5 | ||
|
|
f1cd1f225d | ||
|
|
ec221ed543 | ||
|
|
b8cec3a404 | ||
|
|
a17e47b97d | ||
|
|
24d66aab75 |
12
.github/workflows/lint.yml
vendored
12
.github/workflows/lint.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
@@ -86,7 +86,7 @@ jobs:
|
|||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
|
|||||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -9,8 +9,8 @@ jobs:
|
|||||||
create-release:
|
create-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: taiki-e/create-gh-release-action@v1.9.1
|
- uses: taiki-e/create-gh-release-action@v1.9.2
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -29,8 +29,8 @@ jobs:
|
|||||||
os: windows-latest
|
os: windows-latest
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: taiki-e/upload-rust-binary-action@v1.27.0
|
- uses: taiki-e/upload-rust-binary-action@v1.28.0
|
||||||
with:
|
with:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
bin: alterware-launcher
|
bin: alterware-launcher
|
||||||
|
|||||||
600
Cargo.lock
generated
600
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "alterware-launcher"
|
name = "alterware-launcher"
|
||||||
version = "0.11.5"
|
version = "0.11.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
build = "res/build.rs"
|
build = "res/build.rs"
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ rand = "0.9"
|
|||||||
semver = "1.0"
|
semver = "1.0"
|
||||||
colored = "3.0"
|
colored = "3.0"
|
||||||
once_cell = "1.21"
|
once_cell = "1.21"
|
||||||
reqwest = { version = "0.12", features = ["stream"] }
|
reqwest = { version = "0.13", features = ["stream"] }
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
indicatif = "0.18"
|
indicatif = "0.18"
|
||||||
@@ -37,11 +37,11 @@ self-replace = "1.5"
|
|||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
winresource = "0.1"
|
winresource = "0.1"
|
||||||
static_vcruntime = "2.0"
|
static_vcruntime = "3.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
strip-ansi-escapes = "0.2"
|
strip-ansi-escapes = "0.2"
|
||||||
serial_test = "3.2"
|
serial_test = "3.4"
|
||||||
|
|
||||||
[package.metadata.winresource]
|
[package.metadata.winresource]
|
||||||
OriginalFilename = "alterware-launcher.exe"
|
OriginalFilename = "alterware-launcher.exe"
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ pub async fn download_file_progress(
|
|||||||
format!("Failed to GET from '{url}'")
|
format!("Failed to GET from '{url}'")
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
if !res.status().is_success() {
|
||||||
|
return Err(format!("Request failed with status: {}", res.status()));
|
||||||
|
}
|
||||||
|
|
||||||
let total_size = res.content_length().unwrap_or(size);
|
let total_size = res.content_length().unwrap_or(size);
|
||||||
debug!("Download size: {}", misc::human_readable_bytes(total_size));
|
debug!("Download size: {}", misc::human_readable_bytes(total_size));
|
||||||
pb.set_length(total_size);
|
pb.set_length(total_size);
|
||||||
@@ -93,6 +97,10 @@ pub async fn get_body(url: &str) -> Result<Vec<u8>, String> {
|
|||||||
|
|
||||||
debug!("{} {url}", res.status());
|
debug!("{} {url}", res.status());
|
||||||
|
|
||||||
|
if !res.status().is_success() {
|
||||||
|
return Err(format!("Request failed with status: {}", res.status()));
|
||||||
|
}
|
||||||
|
|
||||||
res.bytes()
|
res.bytes()
|
||||||
.await
|
.await
|
||||||
.map(|b| b.to_vec())
|
.map(|b| b.to_vec())
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ pub async fn run(update_only: bool, prerelease: Option<bool>) {
|
|||||||
"alterware-launcher.exe"
|
"alterware-launcher.exe"
|
||||||
};
|
};
|
||||||
|
|
||||||
http_async::download_file(
|
if let Err(e) = http_async::download_file(
|
||||||
&format!(
|
&format!(
|
||||||
"{}/download/{}",
|
"{}/download/{}",
|
||||||
github::download_url(GH_OWNER, GH_REPO, None),
|
github::download_url(GH_OWNER, GH_REPO, None),
|
||||||
@@ -102,7 +102,11 @@ pub async fn run(update_only: bool, prerelease: Option<bool>) {
|
|||||||
&file_path,
|
&file_path,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
{
|
||||||
|
error!("Self-update download failed: {e}");
|
||||||
|
crate::println_error!("Self-update failed ({e}), skipping update.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if !file_path.exists() {
|
if !file_path.exists() {
|
||||||
crate::println_error!("Failed to download launcher update.");
|
crate::println_error!("Failed to download launcher update.");
|
||||||
|
|||||||
Reference in New Issue
Block a user