Skip to content

Commit

Permalink
Merge pull request #149 from an-anime-team/next
Browse files Browse the repository at this point in the history
Release 3.6.0
  • Loading branch information
krypt0nn authored Jun 17, 2024
2 parents 8921ad9 + 4021167 commit e61ff64
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 39 deletions.
26 changes: 0 additions & 26 deletions .vscode/launch.json

This file was deleted.

20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion assets/honkers-railway-launcher.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Exec=AppRun
Type=Application
Categories=Game
Terminal=false
Keywords=aagl
Keywords=thrl
4 changes: 2 additions & 2 deletions assets/locales/it/main.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
29 changes: 23 additions & 6 deletions src/background.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
18 changes: 17 additions & 1 deletion src/ui/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,23 @@ impl SimpleComponent for AboutDialog {
"<p>Added</p>",

"<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>"
].join("\n"),

Expand Down

0 comments on commit e61ff64

Please sign in to comment.