From 24cf567c1a106bf9a4aeb90f092129d44a142487 Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Thu, 4 Jun 2026 12:58:53 +0000 Subject: [PATCH 01/11] feat: bump raylib to 6.0.0 --- CHANGELOG.md | 6 ++++++ Cargo.lock | 40 +++++++++------------------------------- Cargo.toml | 4 ++-- src/app/controller.rs | 1 + src/views/output.rs | 5 ++++- 5 files changed, 22 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f73aad..b439954 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [0.1.6-rc.1] - Unreleased + +### Changed + +- Bump `raylib` to `6.0.0` + ## [0.1.5] - 2026-05-15 ### Added diff --git a/Cargo.lock b/Cargo.lock index bdaa9bd..bc9366f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,9 +52,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bindgen" -version = "0.71.1" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ "bitflags", "cexpr", @@ -271,7 +271,7 @@ dependencies = [ [[package]] name = "f_value" -version = "0.1.5" +version = "0.1.6" dependencies = [ "chrono", "dirs", @@ -383,15 +383,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "glam" -version = "0.30.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b46b9ca4690308844c644e7c634d68792467260e051c8543e0c7871662b3ba7" -dependencies = [ - "mint", -] - [[package]] name = "glib-sys" version = "0.18.1" @@ -641,12 +632,6 @@ dependencies = [ "adler2", ] -[[package]] -name = "mint" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff" - [[package]] name = "nom" version = "7.1.3" @@ -768,12 +753,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "pdf-writer" version = "0.14.0" @@ -859,11 +838,10 @@ checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] name = "raylib" -version = "5.7.0" -source = "git+https://github.com/raylib-rs/raylib-rs.git#c7227f666187ab8c35be7162ced718205489aec2" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74b6057eb69bc6ac196260f5751a9bc69d69a445174d288ad87b9f6cefecd88c" dependencies = [ - "glam", - "paste", "raylib-sys", "seq-macro", "thiserror", @@ -871,13 +849,13 @@ dependencies = [ [[package]] name = "raylib-sys" -version = "5.7.0" -source = "git+https://github.com/raylib-rs/raylib-rs.git#c7227f666187ab8c35be7162ced718205489aec2" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36be0f95d9ea818847eedf4a6a73cbd5331db5a558069747dae827ac3c12fdf8" dependencies = [ "bindgen", "cc", "cmake", - "mint", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 167c230..42730fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "f_value" -version = "0.1.5" +version = "0.1.6" edition = "2021" description = "Tool for NISECI and HFBI calc" license = "GPL-3.0-only" @@ -28,7 +28,7 @@ locale_config = "0.3.0" miniz_oxide = "0.9.1" pdf-writer = "0.14.0" png = "0.18.1" -raylib = { git = "https://github.com/raylib-rs/raylib-rs.git", features = [ +raylib = { version = "6.0.0", features = [ "raygui", ] } rfd = { version = "0.17.2", default-features = false } diff --git a/src/app/controller.rs b/src/app/controller.rs index 1910dc1..b113fe7 100644 --- a/src/app/controller.rs +++ b/src/app/controller.rs @@ -25,6 +25,7 @@ use raylib::consts::GuiControl::DEFAULT; use raylib::consts::GuiControlProperty::TEXT_COLOR_NORMAL; use raylib::consts::GuiDefaultProperty::{BACKGROUND_COLOR, TEXT_SIZE, TEXT_SPACING}; use raylib::consts::KeyboardKey::*; +use raylib::prelude::RaylibGuiState; use raylib::RaylibHandle; use std::fs::File; use std::io::Write; diff --git a/src/views/output.rs b/src/views/output.rs index 695fbba..0bbf7dd 100644 --- a/src/views/output.rs +++ b/src/views/output.rs @@ -121,7 +121,10 @@ impl View for ProduzioneOutputView { d.gui_unlock(); } - d.gui_panel(rrect(panel_x, panel_y, panel_width, panel_height), "Output"); + d.gui_panel( + rrect(panel_x, panel_y, panel_width, panel_height), + Some("Output"), + ); let y_spacing = main_state.current_font_height + propwidth(d, 5); let output_start_y = panel_y + propwidth(d, 15); From 1015ae608b6db19d12afef8f935c8b797f967014 Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Thu, 4 Jun 2026 13:03:10 +0000 Subject: [PATCH 02/11] chore: bump pdf-writeer to 0.15.0 --- CHANGELOG.md | 1 + Cargo.lock | 4 ++-- Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b439954..8b87db9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Changed - Bump `raylib` to `6.0.0` +- Bump `pdf-writer` to `0.15.0` ## [0.1.5] - 2026-05-15 diff --git a/Cargo.lock b/Cargo.lock index bc9366f..b8cfddf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -755,9 +755,9 @@ dependencies = [ [[package]] name = "pdf-writer" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92a79477295a713c2ed425aa82a8b5d20cec3fdee203706cbe6f3854880c1c81" +checksum = "f5e456864a7a304047bff84977dc6fb162bd956475d40ba50b2dcecaada7f753" dependencies = [ "bitflags", "itoa", diff --git a/Cargo.toml b/Cargo.toml index 42730fd..b2bf4b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ dirs = "6.0.0" esox = "0.1.6" locale_config = "0.3.0" miniz_oxide = "0.9.1" -pdf-writer = "0.14.0" +pdf-writer = "0.15.0" png = "0.18.1" raylib = { version = "6.0.0", features = [ "raygui", From 8fedde9a74e476e944c3ea351745133c0fe66f4f Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Thu, 4 Jun 2026 13:23:12 +0000 Subject: [PATCH 03/11] feat: use raylib::prelude::RaylibGuiState::gui_load_style_from_memory --- CHANGELOG.md | 3 + Cargo.lock | 241 +----------------------------------------- Cargo.toml | 1 - src/app/controller.rs | 68 ++++-------- src/app/core.rs | 7 +- 5 files changed, 31 insertions(+), 289 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b87db9..5a6b782 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ ### Changed +- Drop `app::controller::{write_temp_style_file, load_style_from_memory}` + - Use `raylib::prelude::RaylibGuiState::gui_load_style_from_memory` - Bump `raylib` to `6.0.0` - Bump `pdf-writer` to `0.15.0` +- Drop `uuid` dep ## [0.1.5] - 2026-05-15 diff --git a/Cargo.lock b/Cargo.lock index b8cfddf..4be7547 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,12 +26,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anyhow" -version = "1.0.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" - [[package]] name = "atk-sys" version = "0.18.2" @@ -282,7 +276,6 @@ dependencies = [ "png", "raylib", "rfd", - "uuid", ] [[package]] @@ -304,12 +297,6 @@ dependencies = [ "miniz_oxide 0.8.9", ] -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - [[package]] name = "foldhash" version = "0.2.0" @@ -357,19 +344,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "getrandom" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", - "wasip3", -] - [[package]] name = "gio-sys" version = "0.18.1" @@ -428,15 +402,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "foldhash 0.1.5", -] - [[package]] name = "hashbrown" version = "0.16.1" @@ -449,7 +414,7 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" dependencies = [ - "foldhash 0.2.0", + "foldhash", "serde", "serde_core", ] @@ -483,12 +448,6 @@ dependencies = [ "cc", ] -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - [[package]] name = "indexmap" version = "2.13.1" @@ -497,8 +456,6 @@ checksum = "45a8a2b9cb3e0b0c1803dbb0758ffac5de2f425b23c28f518faabd9d805342ff" dependencies = [ "equivalent", "hashbrown 0.16.1", - "serde", - "serde_core", ] [[package]] @@ -541,12 +498,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - [[package]] name = "libc" version = "0.2.164" @@ -824,12 +775,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - [[package]] name = "raw-window-handle" version = "0.6.2" @@ -864,7 +809,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ - "getrandom 0.2.15", + "getrandom", "libredox", "thiserror", ] @@ -943,12 +888,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "semver" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" - [[package]] name = "seq-macro" version = "0.3.6" @@ -985,19 +924,6 @@ dependencies = [ "syn", ] -[[package]] -name = "serde_json" -version = "1.0.149" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" -dependencies = [ - "itoa", - "memchr", - "serde", - "serde_core", - "zmij", -] - [[package]] name = "serde_spanned" version = "0.6.9" @@ -1115,23 +1041,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "uuid" -version = "1.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" -dependencies = [ - "getrandom 0.4.2", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "version-compare" version = "0.2.1" @@ -1144,24 +1053,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasip2" -version = "1.0.2+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen", -] - [[package]] name = "wasm-bindgen" version = "0.2.105" @@ -1220,40 +1111,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags", - "hashbrown 0.15.5", - "indexmap", - "semver", -] - [[package]] name = "web-sys" version = "0.3.82" @@ -1382,97 +1239,3 @@ checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" dependencies = [ "memchr", ] - -[[package]] -name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap", - "prettyplease", - "syn", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - -[[package]] -name = "zmij" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml index b2bf4b2..02a099f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,4 +32,3 @@ raylib = { version = "6.0.0", features = [ "raygui", ] } rfd = { version = "0.17.2", default-features = false } -uuid = { version = "1.23.1", features = ["v4"] } diff --git a/src/app/controller.rs b/src/app/controller.rs index b113fe7..fdc9cae 100644 --- a/src/app/controller.rs +++ b/src/app/controller.rs @@ -25,18 +25,15 @@ use raylib::consts::GuiControl::DEFAULT; use raylib::consts::GuiControlProperty::TEXT_COLOR_NORMAL; use raylib::consts::GuiDefaultProperty::{BACKGROUND_COLOR, TEXT_SIZE, TEXT_SPACING}; use raylib::consts::KeyboardKey::*; +use raylib::error::LoadStyleFromMemoryError; use raylib::prelude::RaylibGuiState; use raylib::RaylibHandle; -use std::fs::File; -use std::io::Write; -use std::path::PathBuf; -use uuid::Uuid; pub(crate) fn update_main( rl: &mut RaylibHandle, actions: &mut Vec, main_state: &mut MainState, -) { +) -> Result<(), LoadStyleFromMemoryError> { main_state.should_quit = rl.window_should_close(); main_state.frame_counter += 1; @@ -70,7 +67,7 @@ pub(crate) fn update_main( main_state.current_font_height = main_state.default_font_height; rl.gui_set_style(DEFAULT, TEXT_SIZE, main_state.current_font_height); main_state.gui_theme_combobox_active = GuiTheme::Light as i32; - GuiTheme::load_and_set(&GuiTheme::Light, rl, main_state); + GuiTheme::load_and_set(&GuiTheme::Light, rl, main_state)?; let locale = get_locale(); main_state.locale_combobox_active = locale as i32; main_state.locale = locale; @@ -108,7 +105,7 @@ pub(crate) fn update_main( match >::try_from(theme_idx) { Ok(t) => { main_state.gui_theme_combobox_active = theme_idx; - t.load_and_set(rl, main_state); + t.load_and_set(rl, main_state)?; } Err(_) => eprintln!("unknown number in current theme check"), } @@ -134,76 +131,50 @@ pub(crate) fn update_main( if rl.is_key_pressed(KEY_F7) { main_state.showing_info_box = true; } -} - -fn write_temp_style_file(data: &[u8]) -> Result<(String, PathBuf), Box> { - // We employ a UUID to randomise the filename, as required - // to avoid insecure temporary files vulnerabilities - // See: https://doc.rust-lang.org/nightly/std/env/fn.temp_dir.html - let mut temp_path = std::env::temp_dir(); - let id = Uuid::new_v4(); - temp_path.push(format!("{}.rgs", id)); - - let mut file = File::create(&temp_path)?; - file.write_all(data)?; - - let string = String::from(temp_path.to_string_lossy()); - Ok((string, temp_path)) -} - -fn load_style_from_memory(rl: &mut RaylibHandle, data: &[u8]) { - // Al momento, raylib-rs non espone una funzione gui_load_style_from_memory(). - // Qui simuliamo la disponibilità runtime di un file .rgs, partendo dai byte - // di include_bytes!(). Non la migliore idea, ma sembra funzionare. - - // Write the data to a temporary file - let (temp_file_cstring, temp_file_path) = - write_temp_style_file(data).expect("Failed to write temp style file"); - - // Load the style - rl.gui_load_style(temp_file_cstring.as_str()); - - // Remove the temp file after loading the style - std::fs::remove_file(temp_file_path).expect("Failed to delete temp style file"); + Ok(()) } impl GuiTheme { - fn load_and_set(&self, rl: &mut RaylibHandle, main_state: &mut MainState) { + fn load_and_set( + &self, + rl: &mut RaylibHandle, + main_state: &mut MainState, + ) -> Result<(), LoadStyleFromMemoryError> { match self { GuiTheme::Dark => { - load_style_from_memory(rl, DARK_THEME_DATA); + rl.gui_load_style_from_memory(DARK_THEME_DATA)?; main_state.theme = GuiTheme::Dark; } GuiTheme::Bluish => { - load_style_from_memory(rl, BLUISH_THEME_DATA); + rl.gui_load_style_from_memory(BLUISH_THEME_DATA)?; main_state.theme = GuiTheme::Bluish; } GuiTheme::Candy => { - load_style_from_memory(rl, CANDY_THEME_DATA); + rl.gui_load_style_from_memory(CANDY_THEME_DATA)?; main_state.theme = GuiTheme::Candy; } GuiTheme::Cherry => { - load_style_from_memory(rl, CHERRY_THEME_DATA); + rl.gui_load_style_from_memory(CHERRY_THEME_DATA)?; main_state.theme = GuiTheme::Cherry; } GuiTheme::Cyber => { - load_style_from_memory(rl, CYBER_THEME_DATA); + rl.gui_load_style_from_memory(CYBER_THEME_DATA)?; main_state.theme = GuiTheme::Cyber; } GuiTheme::Jungle => { - load_style_from_memory(rl, JUNGLE_THEME_DATA); + rl.gui_load_style_from_memory(JUNGLE_THEME_DATA)?; main_state.theme = GuiTheme::Jungle; } GuiTheme::Lavanda => { - load_style_from_memory(rl, LAVANDA_THEME_DATA); + rl.gui_load_style_from_memory(LAVANDA_THEME_DATA)?; main_state.theme = GuiTheme::Lavanda; } GuiTheme::Terminal => { - load_style_from_memory(rl, TERMINAL_THEME_DATA); + rl.gui_load_style_from_memory(TERMINAL_THEME_DATA)?; main_state.theme = GuiTheme::Terminal; } GuiTheme::Ashes => { - load_style_from_memory(rl, ASHES_THEME_DATA); + rl.gui_load_style_from_memory(ASHES_THEME_DATA)?; main_state.theme = GuiTheme::Ashes; } GuiTheme::Light => { @@ -230,5 +201,6 @@ impl GuiTheme { main_state.colors.default_txt_color = Color::get_color(txt_color_int); main_state.colors.default_bg_color = Color::get_color(bg_color_int); main_state.current_font = rl.gui_get_font(); + Ok(()) } } diff --git a/src/app/core.rs b/src/app/core.rs index ac64035..ab1252b 100644 --- a/src/app/core.rs +++ b/src/app/core.rs @@ -519,7 +519,12 @@ impl App { let mut main_actions = Vec::::new(); while !self.main_state.should_quit { // Base update step - update_main(&mut self.rl, &mut main_actions, &mut self.main_state); + if let Err(load_style_error) = + update_main(&mut self.rl, &mut main_actions, &mut self.main_state) + { + eprintln!("Error while loading theme: {load_style_error}"); + // TODO: print error in GUI console too and put user there? + } self.controllers.update( &mut self.rl, From 39a03f8e79ba723a49e2ec1fbe4385b94f5b8d2a Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Thu, 4 Jun 2026 13:49:41 +0000 Subject: [PATCH 04/11] chore: use checkout@v6 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ca69ae..5106c59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: image: ghcr.io/jggr/f-value-builder:latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Cache cargo uses: actions/cache@v4 From 44b04fcd896262b660049cf22aee3bcef314b475 Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Thu, 4 Jun 2026 13:50:28 +0000 Subject: [PATCH 05/11] chore: use cache@v5 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5106c59..59c7559 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v6 - name: Cache cargo - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | target From 91261c5ad8835d5e3514c3756b5f98eaa28c3b89 Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Thu, 4 Jun 2026 13:54:42 +0000 Subject: [PATCH 06/11] chore: use upload-artifact@v7 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59c7559..466b378 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: run: cargo build - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: f_value-debug-linux path: target/debug/f_value From 778d400c145c5d2911b4d30fce233c0aedd5bb1b Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Sun, 14 Jun 2026 16:12:42 +0000 Subject: [PATCH 07/11] chore: update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a6b782..dd6c410 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## [0.1.6-rc.1] - Unreleased +## [0.1.6] - 2026-06-14 ### Changed From 37af51ee85f09036b73d7fcadf7f61b577cc76ee Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Sun, 14 Jun 2026 16:23:46 +0000 Subject: [PATCH 08/11] chore: bump chrono to 0.4.45 --- CHANGELOG.md | 1 + Cargo.lock | 4 ++-- Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd6c410..da75a41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Use `raylib::prelude::RaylibGuiState::gui_load_style_from_memory` - Bump `raylib` to `6.0.0` - Bump `pdf-writer` to `0.15.0` +- Bump `chrono` to `0.4.45` - Drop `uuid` dep ## [0.1.5] - 2026-05-15 diff --git a/Cargo.lock b/Cargo.lock index 4be7547..34556ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -139,9 +139,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.44" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ "iana-time-zone", "js-sys", diff --git a/Cargo.toml b/Cargo.toml index 02a099f..38e54e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ rfd-xdg-portal = ["rfd/xdg-portal"] chrono = "0.4.39" [dependencies] -chrono = "0.4.44" +chrono = "0.4.45" dirs = "6.0.0" esox = "0.1.6" locale_config = "0.3.0" From 5bcb2a7e159259324d1d86d809782321f01d2280 Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Sun, 14 Jun 2026 16:25:08 +0000 Subject: [PATCH 09/11] chore: bump chrono build-dep to 0.4.45 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 38e54e1..790b54b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ rfd-gtk3 = ["rfd/gtk3"] rfd-xdg-portal = ["rfd/xdg-portal"] [build-dependencies] -chrono = "0.4.39" +chrono = "0.4.45" [dependencies] chrono = "0.4.45" From 89edb29b2179b2085db78f809006efb24e7de25d Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Sun, 14 Jun 2026 16:28:48 +0000 Subject: [PATCH 10/11] chore: update scripts version --- scripts/app.rc | 8 ++++---- scripts/installer.nsi | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/app.rc b/scripts/app.rc index e420432..ddc77e2 100644 --- a/scripts/app.rc +++ b/scripts/app.rc @@ -3,8 +3,8 @@ IDI_ICON1 ICON "assets/icon.ico" 1 VERSIONINFO -FILEVERSION 0,1,5,0 -PRODUCTVERSION 0,1,5,0 +FILEVERSION 0,1,6,0 +PRODUCTVERSION 0,1,6,0 FILEOS 0x40004 FILETYPE 0x1 @@ -15,9 +15,9 @@ BEGIN BEGIN VALUE "CompanyName", "GtoR\0" VALUE "FileDescription", "Tool to calc NISECI/HFBI\0" - VALUE "FileVersion", "0.1.5\0" + VALUE "FileVersion", "0.1.6\0" VALUE "ProductName", "F-value\0" - VALUE "ProductVersion", "0.1.5\0" + VALUE "ProductVersion", "0.1.6\0" VALUE "OriginalFilename", "f_value.exe\0" END END diff --git a/scripts/installer.nsi b/scripts/installer.nsi index e74798a..e3b8187 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -7,12 +7,12 @@ Name "F-value" OutFile "F-value-installer.exe" InstallDir "$PROGRAMFILES\F_value" RequestExecutionLevel admin -VIProductVersion "0.1.5.0" +VIProductVersion "0.1.6.0" VIAddVersionKey "ProductName" "F-value" VIAddVersionKey "CompanyName" "GtoR" VIAddVersionKey "FileDescription" "F-value installer" -VIAddVersionKey "FileVersion" "0.1.5.0" -VIAddVersionKey "ProductVersion" "0.1.5.0" +VIAddVersionKey "FileVersion" "0.1.6.0" +VIAddVersionKey "ProductVersion" "0.1.6.0" VIAddVersionKey "LegalCopyright" "© 2026 GtoR" Icon "../assets/icon.ico" UninstallIcon "../assets/icon.ico" @@ -56,7 +56,7 @@ Section "Install" ; Add uninstall entry to Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\F-value" "DisplayName" "F-value" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\F-value" "Publisher" "GtoR" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\F-value" "DisplayVersion" "0.1.5" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\F-value" "DisplayVersion" "0.1.6" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\F-value" "UninstallString" "$INSTDIR\uninstall.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\F-value" "InstallLocation" "$INSTDIR" From 6100bb244dddfff24a7babda4e5974d370682eee Mon Sep 17 00:00:00 2001 From: jgabaut <109908086+jgabaut@users.noreply.github.com> Date: Sun, 14 Jun 2026 16:35:48 +0000 Subject: [PATCH 11/11] chore: bump ci actions --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 466b378..db37b26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,10 +53,10 @@ jobs: needs: build-debug steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Cache cargo - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | target @@ -70,7 +70,7 @@ jobs: run: cargo build --release - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: f_value-release-linux path: target/release/f_value @@ -84,10 +84,10 @@ jobs: needs: build-debug steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Cache cargo - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | target @@ -101,7 +101,7 @@ jobs: run: cargo build --target x86_64-pc-windows-gnu - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: f_value-debug-windows path: target/x86_64-pc-windows-gnu/debug/f_value.exe @@ -115,10 +115,10 @@ jobs: needs: crossbuild-debug steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Cache cargo - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | target @@ -132,7 +132,7 @@ jobs: run: cargo build --target x86_64-pc-windows-gnu --release - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: f_value-release-windows path: target/x86_64-pc-windows-gnu/release/f_value.exe