diff --git a/.gitignore b/.gitignore index 59964fc..85d026b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,18 @@ ignore/ target/ shared/ +saves/ .mcp.json launch.json tasks.json -scsi1.raw -scsi2.raw -cdrom4.iso +*.raw +*.iso +*.chd +*.img +prom.bin +nvram.bin Cargo.lock iris.toml -nvram.bin +screenshot_*.png *.log +.DS_Store diff --git a/iris-gui/build.rs b/iris-gui/build.rs new file mode 100644 index 0000000..1a45e5e --- /dev/null +++ b/iris-gui/build.rs @@ -0,0 +1,26 @@ +// Bake the release version into APP_VERSION at compile time. +// +// In CI, RELEASE_VERSION is set to the date-stamped tag (e.g. "2025-06-09-02-00"). +// Locally, it falls back to the Cargo.toml version with a "-dev" suffix so +// debug builds are distinguishable from releases. +// +// The rerun-if-env-changed directives are required: without them, Cargo's +// build-script caching would keep APP_VERSION frozen at whatever value was +// baked on the first compile, even after RELEASE_VERSION changes between +// the `cargo test` and `cargo build` steps in CI. +fn main() { + println!("cargo:rerun-if-env-changed=RELEASE_VERSION"); + println!("cargo:rerun-if-env-changed=CARGO_PKG_VERSION"); + + let version = std::env::var("RELEASE_VERSION") + .unwrap_or_else(|_| std::env::var("CARGO_PKG_VERSION").unwrap_or_else(|_| "0.0.0".into())); + + let profile = std::env::var("PROFILE").unwrap_or_default(); + let full_version = if profile == "debug" && std::env::var("RELEASE_VERSION").is_err() { + format!("{}-dev", version) + } else { + version + }; + + println!("cargo:rustc-env=APP_VERSION={}", full_version); +} diff --git a/iris-gui/src/config_ui.rs b/iris-gui/src/config_ui.rs index 7dbb99b..a608b80 100644 --- a/iris-gui/src/config_ui.rs +++ b/iris-gui/src/config_ui.rs @@ -93,7 +93,7 @@ fn show_general(ui: &mut Ui, cfg: &mut MachineConfig) { path_row(ui, "nvram", &mut cfg.nvram, Pick::SaveFile, NVRAM_FILTERS); ui.end_row(); - ui.label("Serial log (ttyd1 → file)"); + ui.label("Serial log (ttyd1 -> file)"); path_row_opt(ui, "serial_log", &mut cfg.serial_log, Pick::SaveFile, ANY_FILTERS); ui.end_row(); }); @@ -212,7 +212,7 @@ fn show_disks(ui: &mut Ui, cfg: &mut MachineConfig) { ui.end_row(); } - ui.label("Overlay (COW writes → .overlay)"); + ui.label("Overlay (COW writes -> .overlay)"); ui.checkbox(&mut dev.overlay, ""); ui.end_row(); @@ -273,7 +273,7 @@ fn show_network(ui: &mut Ui, cfg: &mut MachineConfig) { }); ui.label("host"); ui.add(DragValue::new(&mut pf.host_port).range(1..=65535)); - ui.label("→ guest"); + ui.label("-> guest"); ui.add(DragValue::new(&mut pf.guest_port).range(1..=65535)); ComboBox::from_id_salt(("bind", i)) .selected_text(match pf.bind { ForwardBind::Localhost => "localhost", ForwardBind::Any => "any" }) diff --git a/iris-gui/src/main.rs b/iris-gui/src/main.rs index 0640560..b7a3bc9 100644 --- a/iris-gui/src/main.rs +++ b/iris-gui/src/main.rs @@ -378,7 +378,7 @@ impl App { self.prefs.machines.insert(n.clone(), cfg); self.prefs.active_machine = Some(n.clone()); let _ = self.prefs.save(); - self.toast(format!("renamed → '{n}'")); + self.toast(format!("renamed -> '{n}'")); } ui.close_menu(); } @@ -530,8 +530,10 @@ impl App { ui.label(RichText::new("Ctrl+= / Ctrl+- / Ctrl+0 to zoom").weak().small()); }); ui.menu_button("Help", |ui| { - ui.label("iris-gui — SGI Indy emulator launcher"); - ui.label(format!("iris-gui {}", env!("CARGO_PKG_VERSION"))); + ui.label(RichText::new("IRIS — SGI Indy (MIPS R4400) Emulator").strong()); + ui.label(format!("Version {}", env!("APP_VERSION"))); + ui.separator(); + ui.hyperlink_to("techomancer/iris on GitHub", "https://github.com/techomancer/iris"); ui.separator(); ui.label(RichText::new("Build features:").strong()); use iris::build_features as bf; @@ -540,7 +542,6 @@ impl App { ui.label(format!(" jit: {}", if bf::JIT { "on" } else { "off" })); ui.label(format!(" rex-jit: {}", if bf::REX_JIT { "on" } else { "off" })); ui.label(format!(" lightning: {}", if bf::LIGHTNING { "on (no debug)" } else { "off" })); - ui.hyperlink_to("README", "https://github.com/dsarfati/iris"); }); }); } @@ -563,7 +564,7 @@ impl App { if ui.add_enabled(running, egui::Button::new("💾 Save state")).clicked() { self.emu.send(Cmd::SaveState(self.save_state_name.clone())); } - if ui.add_enabled(running, egui::Button::new("↶ Restore state")).clicked() { + if ui.add_enabled(running, egui::Button::new("Restore state")).clicked() { self.emu.send(Cmd::RestoreState(self.restore_state_name.clone())); } ui.separator(); @@ -704,7 +705,7 @@ impl App { ui.label(if std::path::Path::new(&self.cfg.prom).exists() { self.cfg.prom.clone() } else { - format!("{} (missing → embedded fallback)", self.cfg.prom) + format!("{} (missing -> embedded fallback)", self.cfg.prom) }); ui.end_row(); ui.label("NVRAM"); diff --git a/iris-gui/src/scsi_menu.rs b/iris-gui/src/scsi_menu.rs index 770d56f..d9e7ead 100644 --- a/iris-gui/src/scsi_menu.rs +++ b/iris-gui/src/scsi_menu.rs @@ -70,7 +70,7 @@ pub fn draw(ui: &mut Ui, cfg: &MachineConfig) -> ScsiAction { let overlay_label = if d.overlay { "Disable COW overlay" } else { - "Enable COW overlay (writes → .overlay)" + "Enable COW overlay (writes -> .overlay)" }; if ui.button(overlay_label).clicked() { action = ScsiAction::ToggleOverlay { id };