Merge pull request #149 from an-anime-team/next

Release 3.6.0
This commit is contained in:
Observer KRypt0n_ 2024-06-17 16:06:19 +02:00 committed by GitHub
commit e61ff6484c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 68 additions and 39 deletions

26
.vscode/launch.json vendored
View file

@ -1,26 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"cargo": {
"args": [
"build",
"--bin=honkers-railway-launcher",
"--package=honkers-railway-launcher"
],
"filter": {
"name": "honkers-railway-launcher",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}

View file

@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Added
- List missing dependencies on non-standard distros during initial setup
- Added 2.2.0 voiceovers sizes
### Fixed
- Fixed Italian localization breaking the launcher
### Changed
- Support new game API
- Improved background pictures processing
- Updated desktop file entry to include "aagl" keyword
- Localized `force-grab-cursor` to Ukrainian
## [1.5.5] - 08.05.2024 ## [1.5.5] - 08.05.2024
### Added ### Added
@ -29,6 +45,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added Thai - Added Thai
- Added Ukrainian - Added Ukrainian
### Fixed
- Fixed GtkSwitch UI state representation
### Changed ### Changed
- Update wish url - Update wish url

6
Cargo.lock generated
View file

@ -57,7 +57,8 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
[[package]] [[package]]
name = "anime-game-core" name = "anime-game-core"
version = "1.18.4" version = "1.19.0"
source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.19.0#2bec59f6bc6a1bb3ce8f0162ca8e3bd4d349cc34"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bzip2", "bzip2",
@ -81,7 +82,8 @@ dependencies = [
[[package]] [[package]]
name = "anime-launcher-sdk" name = "anime-launcher-sdk"
version = "1.13.4" version = "1.14.0"
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.14.0#1e94edd76e114ddf72347f049071e10af522827b"
dependencies = [ dependencies = [
"anime-game-core", "anime-game-core",
"anyhow", "anyhow",

View file

@ -19,7 +19,7 @@ glib-build-tools = "0.19"
[dependencies.anime-launcher-sdk] [dependencies.anime-launcher-sdk]
git = "https://github.com/an-anime-team/anime-launcher-sdk" git = "https://github.com/an-anime-team/anime-launcher-sdk"
tag = "1.12.10" tag = "1.14.0"
features = ["all", "star-rail", "star-rail-patch"] features = ["all", "star-rail", "star-rail-patch"]
# path = "../anime-launcher-sdk" # ! for dev purposes only # path = "../anime-launcher-sdk" # ! for dev purposes only

View file

@ -5,4 +5,4 @@ Exec=AppRun
Type=Application Type=Application
Categories=Game Categories=Game
Terminal=false Terminal=false
Keywords=aagl Keywords=thrl

View file

@ -17,12 +17,12 @@ wish-url = Apri i desideri
about = Informazioni about = Informazioni
close = { $commandType -> close = { $form ->
[verb] Chiudersi [verb] Chiudersi
*[noun] Chiudi *[noun] Chiudi
} }
hide = { $commandType -> hide = { $form ->
[verb] Nascondersi [verb] Nascondersi
*[noun] Nascondi *[noun] Nascondi
} }

View file

@ -64,22 +64,32 @@ pub fn download_background() -> anyhow::Result<()> {
let info = get_background_info()?; let info = get_background_info()?;
let mut download_image = true;
if crate::BACKGROUND_FILE.exists() { if crate::BACKGROUND_FILE.exists() {
let hash = Md5::digest(std::fs::read(crate::BACKGROUND_FILE.as_path())?); let hash = Md5::digest(std::fs::read(crate::BACKGROUND_FILE.as_path())?);
if format!("{:x}", hash).to_lowercase() == info.hash { if format!("{:x}", hash).to_lowercase() == info.hash {
tracing::debug!("Background picture is already downloaded. Skipping"); tracing::debug!("Background picture is already downloaded. Skipping");
return Ok(()); download_image = false;
if crate::BACKGROUND_PRIMARY_FILE.exists() {
tracing::debug!("Background picture is already patched. Skipping");
return Ok(());
}
} }
} }
let mut downloader = Downloader::new(&info.uri)?; if download_image {
let mut downloader = Downloader::new(&info.uri)?;
downloader.continue_downloading = false; downloader.continue_downloading = false;
if let Err(err) = downloader.download(crate::BACKGROUND_FILE.as_path(), |_, _| {}) { if let Err(err) = downloader.download(crate::BACKGROUND_FILE.as_path(), |_, _| {}) {
anyhow::bail!(err); anyhow::bail!(err);
}
} }
// Workaround for GTK weakness // Workaround for GTK weakness
@ -89,7 +99,14 @@ pub fn download_background() -> anyhow::Result<()> {
.arg("-o") .arg("-o")
.arg(crate::BACKGROUND_PRIMARY_FILE.as_path()) .arg(crate::BACKGROUND_PRIMARY_FILE.as_path())
.spawn()? .spawn()?
.wait_with_output()?; .wait()?;
// If it failed to re-code the file - just copy it
// Will happen with HSR because devs apparently named
// their background image ".webp" while it's JPEG
if !crate::BACKGROUND_PRIMARY_FILE.exists() {
std::fs::copy(crate::BACKGROUND_FILE.as_path(), crate::BACKGROUND_PRIMARY_FILE.as_path())?;
}
} }
else { else {

View file

@ -103,7 +103,23 @@ impl SimpleComponent for AboutDialog {
"<p>Added</p>", "<p>Added</p>",
"<ul>", "<ul>",
"<li>Added Czech</li>", "<li>List missing dependencies on non-standard distros during initial setup</li>",
"<li>Added 2.2.0 voiceovers sizes</li>",
"</ul>",
"<p>Fixed</p>",
"<ul>",
"<li>Fixed Italian localization breaking the launcher</li>",
"</ul>",
"<p>Changed</p>",
"<ul>",
"<li>Support new game API</li>",
"<li>Improved background pictures processing</li>",
"<li>Updated desktop file entry to include aagl keyword</li>",
"<li>Localized force-grab-cursor to Ukrainian</li>",
"</ul>" "</ul>"
].join("\n"), ].join("\n"),