diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 939424b..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -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}" - } - ] -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c0f45ab..d89b0e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [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 ### Added @@ -29,6 +45,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added Thai - Added Ukrainian +### Fixed + +- Fixed GtkSwitch UI state representation + ### Changed - Update wish url diff --git a/Cargo.lock b/Cargo.lock index 808e3ef..93a28e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -57,7 +57,8 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] 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 = [ "anyhow", "bzip2", @@ -81,7 +82,8 @@ dependencies = [ [[package]] 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 = [ "anime-game-core", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 6dd833b..ce469d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ glib-build-tools = "0.19" [dependencies.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"] # path = "../anime-launcher-sdk" # ! for dev purposes only diff --git a/assets/honkers-railway-launcher.desktop b/assets/honkers-railway-launcher.desktop index 121ac19..4d72c16 100644 --- a/assets/honkers-railway-launcher.desktop +++ b/assets/honkers-railway-launcher.desktop @@ -5,4 +5,4 @@ Exec=AppRun Type=Application Categories=Game Terminal=false -Keywords=aagl +Keywords=thrl diff --git a/assets/locales/it/main.ftl b/assets/locales/it/main.ftl index 4c89ee5..383f231 100644 --- a/assets/locales/it/main.ftl +++ b/assets/locales/it/main.ftl @@ -17,12 +17,12 @@ wish-url = Apri i desideri about = Informazioni -close = { $commandType -> +close = { $form -> [verb] Chiudersi *[noun] Chiudi } -hide = { $commandType -> +hide = { $form -> [verb] Nascondersi *[noun] Nascondi } diff --git a/src/background.rs b/src/background.rs index ec4b362..8c0f152 100644 --- a/src/background.rs +++ b/src/background.rs @@ -64,22 +64,32 @@ pub fn download_background() -> anyhow::Result<()> { let info = get_background_info()?; + let mut download_image = true; + if crate::BACKGROUND_FILE.exists() { let hash = Md5::digest(std::fs::read(crate::BACKGROUND_FILE.as_path())?); if format!("{:x}", hash).to_lowercase() == info.hash { 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(), |_, _| {}) { - anyhow::bail!(err); + if let Err(err) = downloader.download(crate::BACKGROUND_FILE.as_path(), |_, _| {}) { + anyhow::bail!(err); + } } // Workaround for GTK weakness @@ -89,7 +99,14 @@ pub fn download_background() -> anyhow::Result<()> { .arg("-o") .arg(crate::BACKGROUND_PRIMARY_FILE.as_path()) .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 { diff --git a/src/ui/about.rs b/src/ui/about.rs index 7321a09..d1e53f8 100644 --- a/src/ui/about.rs +++ b/src/ui/about.rs @@ -103,7 +103,23 @@ impl SimpleComponent for AboutDialog { "

Added

", "", + + "

Fixed

", + + "", + + "

Changed

", + + "" ].join("\n"),