Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2c0f2fffc | ||
|
|
a6be413190 | ||
|
|
8034eef8c7 | ||
|
|
3b0d5295d3 | ||
|
|
ff46a570fc | ||
|
|
7db64e337d | ||
|
|
522ab489cd |
No files matched your search
+16
-1
@@ -2,6 +2,19 @@
|
|||||||
|
|
||||||
## [Unreleased] - ReleaseDate
|
## [Unreleased] - ReleaseDate
|
||||||
|
|
||||||
|
## [0.2.14] - 2026-03-14
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix deletion of character build directories
|
||||||
|
- Prevent installer from downloading beta versions
|
||||||
|
|
||||||
|
## [0.2.13] - 2026-03-09
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix size of ascendancy flavour texts
|
||||||
|
|
||||||
## [0.2.12] - 2026-03-09
|
## [0.2.12] - 2026-03-09
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
@@ -161,8 +174,10 @@
|
|||||||
- First release
|
- First release
|
||||||
|
|
||||||
<!-- next-url -->
|
<!-- next-url -->
|
||||||
[Unreleased]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.12...HEAD
|
[Unreleased]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.14...HEAD
|
||||||
|
|
||||||
|
[0.2.14]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.13...v0.2.14
|
||||||
|
[0.2.13]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.12...v0.2.13
|
||||||
[0.2.12]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.11...v0.2.12
|
[0.2.12]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.11...v0.2.12
|
||||||
[0.2.11]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.10...v0.2.11
|
[0.2.11]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.10...v0.2.11
|
||||||
[0.2.10]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.9...v0.2.10
|
[0.2.10]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.9...v0.2.10
|
||||||
|
|||||||
Generated
+1
-1
@@ -2506,7 +2506,7 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rusty-path-of-building"
|
name = "rusty-path-of-building"
|
||||||
version = "0.2.12"
|
version = "0.2.14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ authors = ["meehl"]
|
|||||||
description = "Cross-platform runtime for Path of Building"
|
description = "Cross-platform runtime for Path of Building"
|
||||||
repository = "https://github.com/meehl/rusty-path-of-building"
|
repository = "https://github.com/meehl/rusty-path-of-building"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
version = "0.2.12"
|
version = "0.2.14"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -9,7 +9,8 @@ use crate::{
|
|||||||
input::{get_cursor_pos, is_key_down},
|
input::{get_cursor_pos, is_key_down},
|
||||||
lua::{load_module, protected_call, protected_load_module},
|
lua::{load_module, protected_call, protected_load_module},
|
||||||
paths::{
|
paths::{
|
||||||
get_runtime_path, get_script_path, get_user_path, get_work_dir, make_dir, set_work_dir,
|
get_runtime_path, get_script_path, get_user_path, get_work_dir, make_dir, remove_dir,
|
||||||
|
set_work_dir,
|
||||||
},
|
},
|
||||||
rendering::PoBString,
|
rendering::PoBString,
|
||||||
search_handle::new_search_handle,
|
search_handle::new_search_handle,
|
||||||
@@ -51,6 +52,7 @@ pub fn register_globals(lua: &Lua) -> LuaResult<()> {
|
|||||||
globals.set("GetWorkDir", lua.create_function(get_work_dir)?)?;
|
globals.set("GetWorkDir", lua.create_function(get_work_dir)?)?;
|
||||||
globals.set("SetWorkDir", lua.create_function(set_work_dir)?)?;
|
globals.set("SetWorkDir", lua.create_function(set_work_dir)?)?;
|
||||||
globals.set("MakeDir", lua.create_function(make_dir)?)?;
|
globals.set("MakeDir", lua.create_function(make_dir)?)?;
|
||||||
|
globals.set("RemoveDir", lua.create_function(remove_dir)?)?;
|
||||||
|
|
||||||
// console
|
// console
|
||||||
globals.set("ConPrintf", lua.create_function(console_printf)?)?;
|
globals.set("ConPrintf", lua.create_function(console_printf)?)?;
|
||||||
|
|||||||
@@ -47,3 +47,15 @@ pub fn make_dir(l: &Lua, path: String) -> LuaResult<MultiValue> {
|
|||||||
Err(err) => Ok((Value::Nil, err.to_string()).into_lua_multi(l)?),
|
Err(err) => Ok((Value::Nil, err.to_string()).into_lua_multi(l)?),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn remove_dir(l: &Lua, (path, recursive): (String, Option<bool>)) -> LuaResult<MultiValue> {
|
||||||
|
let result = if recursive.unwrap_or(false) {
|
||||||
|
fs::remove_dir_all(&path)
|
||||||
|
} else {
|
||||||
|
fs::remove_dir(&path)
|
||||||
|
};
|
||||||
|
match result {
|
||||||
|
Ok(_) => Ok(Value::Boolean(true).into_lua_multi(l)?),
|
||||||
|
Err(err) => Ok((Value::Nil, err.to_string()).into_lua_multi(l)?),
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -484,8 +484,15 @@ fn build_layout_job<'a>(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: check how PoB determines font size
|
// NOTE: This is just an approximation and was chosen based on how it looks.
|
||||||
let font_size = (line_height - 2).clamp(11, 32) as f32;
|
//
|
||||||
|
// PoB uses pre-rendered font atlases of discrete sizes and selects the appropriate
|
||||||
|
// atlas based on the provided height. Rusty-PoB dynamically renders fonts to a
|
||||||
|
// cached font atlas to support the selection of arbitrary sizes.
|
||||||
|
//
|
||||||
|
// TODO: font size in some dropdowns is too small, e.g. socket group selection in
|
||||||
|
// 'Calcs' tab
|
||||||
|
let font_size = (line_height - 2).max(1) as f32;
|
||||||
|
|
||||||
let mut job = LayoutJob::new(
|
let mut job = LayoutJob::new(
|
||||||
font_family,
|
font_family,
|
||||||
|
|||||||
+10
-6
@@ -11,7 +11,6 @@ use crate::{
|
|||||||
use flate2::read::GzDecoder;
|
use flate2::read::GzDecoder;
|
||||||
use parley::{FontFamily, GenericFamily};
|
use parley::{FontFamily, GenericFamily};
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
|
||||||
use std::{
|
use std::{
|
||||||
fs::{self},
|
fs::{self},
|
||||||
io::copy,
|
io::copy,
|
||||||
@@ -19,9 +18,15 @@ use std::{
|
|||||||
sync::mpsc::{self, Receiver, TryRecvError},
|
sync::mpsc::{self, Receiver, TryRecvError},
|
||||||
thread,
|
thread,
|
||||||
};
|
};
|
||||||
|
use std::{
|
||||||
|
sync::LazyLock,
|
||||||
|
time::{Duration, SystemTime, UNIX_EPOCH},
|
||||||
|
};
|
||||||
use ureq::{Agent, http::Response};
|
use ureq::{Agent, http::Response};
|
||||||
|
|
||||||
const REPO_NAME: &str = "meehl/rusty-pob-manifest";
|
const REPO_NAME: &str = "meehl/rusty-pob-manifest";
|
||||||
|
static VERSION_RE: LazyLock<Regex> =
|
||||||
|
LazyLock::new(|| Regex::new(r"^(\d+)\.(\d+)\.(\d+)$").unwrap());
|
||||||
|
|
||||||
enum DownloadProgress {
|
enum DownloadProgress {
|
||||||
Percentage(f32), // percentage of total size (between 0 and 1)
|
Percentage(f32), // percentage of total size (between 0 and 1)
|
||||||
@@ -236,6 +241,9 @@ fn fetch_compatibility_info(game: Game) -> anyhow::Result<Vec<VersionReq>> {
|
|||||||
Ok(compatibility_table
|
Ok(compatibility_table
|
||||||
.pairs::<String, String>()
|
.pairs::<String, String>()
|
||||||
.filter_map(|p| p.ok())
|
.filter_map(|p| p.ok())
|
||||||
|
// filter out beta versions. beta version adds a suffix to the version string which is not
|
||||||
|
// matched by the version regex resulting in them being filtered out
|
||||||
|
.filter(|(pob_version, _)| VERSION_RE.is_match(pob_version))
|
||||||
.map(|(pob_version, min_req_rpob_ver)| VersionReq {
|
.map(|(pob_version, min_req_rpob_ver)| VersionReq {
|
||||||
pob_ver: pob_version,
|
pob_ver: pob_version,
|
||||||
min_rpob_ver: min_req_rpob_ver,
|
min_rpob_ver: min_req_rpob_ver,
|
||||||
@@ -359,8 +367,6 @@ fn download_path_of_building<P: AsRef<Path>>(
|
|||||||
|
|
||||||
/// Replaces UpdateCheck with rusty-path-of-building's modified version
|
/// Replaces UpdateCheck with rusty-path-of-building's modified version
|
||||||
fn replace_updatecheck<P: AsRef<Path>>(target_dir: P) -> anyhow::Result<()> {
|
fn replace_updatecheck<P: AsRef<Path>>(target_dir: P) -> anyhow::Result<()> {
|
||||||
log::info!("Downloading modified UpdateCheck.lua script...");
|
|
||||||
|
|
||||||
download_file(
|
download_file(
|
||||||
&format!(
|
&format!(
|
||||||
"https://raw.githubusercontent.com/{REPO_NAME}/main/{}",
|
"https://raw.githubusercontent.com/{REPO_NAME}/main/{}",
|
||||||
@@ -570,10 +576,8 @@ fn http_get_with_backoff(url: &str) -> anyhow::Result<Response<ureq::Body>> {
|
|||||||
|
|
||||||
/// Compares two SemVer versions and returns true if v2 is higher or equal than v1
|
/// Compares two SemVer versions and returns true if v2 is higher or equal than v1
|
||||||
fn is_higher_version(v1: &str, v2: &str) -> anyhow::Result<bool> {
|
fn is_higher_version(v1: &str, v2: &str) -> anyhow::Result<bool> {
|
||||||
let re = Regex::new(r"^(\d+)\.(\d+)\.(\d+)$").unwrap();
|
|
||||||
|
|
||||||
let parse_version = |v: &str| -> anyhow::Result<(u32, u32, u32)> {
|
let parse_version = |v: &str| -> anyhow::Result<(u32, u32, u32)> {
|
||||||
let caps = re
|
let caps = VERSION_RE
|
||||||
.captures(v)
|
.captures(v)
|
||||||
.ok_or_else(|| anyhow::anyhow!("Invalid semver format: {}", v))?;
|
.ok_or_else(|| anyhow::anyhow!("Invalid semver format: {}", v))?;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user