diff --git a/examples/PoolBox/iso/Config.xml b/examples/PoolBox/iso/Config.xml index 725c3e02..eb57a721 100644 --- a/examples/PoolBox/iso/Config.xml +++ b/examples/PoolBox/iso/Config.xml @@ -4,15 +4,14 @@ %PSX_LICENSE_PATH%/%PSX_LICENSE%.DAT - System.cnf.subst - ../application/bin/%PSX_TV_FORMAT%/PSX-release/PoolBox.psexe - ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.bios_info - ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.controller_tests - ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.gpu_tests - ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.gte_tests - ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.font_cycler - ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.screen_center + ../application/bin/%PSX_TV_FORMAT%/PSX-release/PoolBox.psexe + ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.bios_info + ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.controller_tests + ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.gpu_tests + ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.gte_tests + ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.font_cycler + ../application/bin/%PSX_TV_FORMAT%/PSX-release/Overlay.screen_center diff --git a/src/Tools/psxcdgen_ex/Cargo.toml b/src/Tools/psxcdgen_ex/Cargo.toml index 1f7d6707..4bd1ed4f 100644 --- a/src/Tools/psxcdgen_ex/Cargo.toml +++ b/src/Tools/psxcdgen_ex/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "psxcdgen_ex" -version = "0.6.0" +version = "1.0.0" edition = "2021" [profile.release] diff --git a/src/Tools/psxcdgen_ex/src/config_reader/xml.rs b/src/Tools/psxcdgen_ex/src/config_reader/xml.rs index 7571922b..a8a26ae1 100644 --- a/src/Tools/psxcdgen_ex/src/config_reader/xml.rs +++ b/src/Tools/psxcdgen_ex/src/config_reader/xml.rs @@ -1,3 +1,4 @@ +use attribute_names::LBA_SOURCE; use cdtypes::types::time::Time; use std::path::PathBuf; use tool_helper::{format_if_error, path_with_env_from, print_warning, string_with_env_from}; @@ -86,16 +87,26 @@ fn parse_track(track: roxmltree::Node, config: &mut Configuration) -> Result<(), } else { + tool_helper::print_warning(format!("The main file should always contain the \"{}\" attribute, even when just empty", LBA_SOURCE)); parse_regular_file(file, false) } } fn parse_overlay_file(file: roxmltree::Node, is_hidden: bool) -> Result { - // v They will be compressed automatically - let common = read_common_properties(&file, is_hidden, Some(LZ4State::AlreadyCompressed))?; - let path = path_from_node(&file, &common.name)?; + // v They will be compressed automatically + let common = read_common_properties(&file, is_hidden, Some(LZ4State::AlreadyCompressed))?; + let path = path_from_node(&file, &common.name)?; + let lba_source = { + if let Some(lba_source) = file.attribute(attribute_names::LBA_SOURCE) { + lba_source + } - Ok(File{common, path, kind: FileKind::Overlay(PathBuf::from(file.attribute(attribute_names::LBA_SOURCE).unwrap_or_default()))}) + else { + tool_helper::print_warning(format!("Overlays should always contain the \"{}\" attribute, even when just empty", LBA_SOURCE)); + "" + } + }; + Ok(File{common, path, kind: FileKind::Overlay(PathBuf::from(lba_source))}) } fn parse_xa_audio(file: roxmltree::Node, is_hidden: bool) -> Result {