diff --git a/examples/PoolBox/Makefile b/examples/PoolBox/Makefile index 1dbc762b..728841cc 100644 --- a/examples/PoolBox/Makefile +++ b/examples/PoolBox/Makefile @@ -12,14 +12,17 @@ endif ifeq ($(REGION),SCEE) export TV_FORMAT=PAL export LICENSE=LICENSEE + export BOOT=SLES_000.25 endif ifeq ($(REGION),SCEA) export TV_FORMAT=NTSC export LICENSE=LICENSEA + export BOOT=SLUS_001.51 endif ifeq ($(REGION),SCEI) export TV_FORMAT=NTSC export LICENSE=LICENSEJ + export BOOT=XXXX_AAA.AA endif ifndef TV_FORMAT diff --git a/examples/PoolBox/iso/Config.xml b/examples/PoolBox/iso/Config.xml index 93b3e4a0..070b647a 100644 --- a/examples/PoolBox/iso/Config.xml +++ b/examples/PoolBox/iso/Config.xml @@ -6,7 +6,7 @@ System.cnf -
../application/bin/%TV_FORMAT%/PSX-release/PoolBox.psexe
+
../application/bin/%TV_FORMAT%/PSX-release/PoolBox.psexe
../application/bin/%TV_FORMAT%/PSX-release/Overlay.controller_tests ../application/bin/%TV_FORMAT%/PSX-release/Overlay.gpu_tests ../application/bin/%TV_FORMAT%/PSX-release/Overlay.gte_tests diff --git a/src/Tools/psxcdgen_ex/src/config_reader/xml.rs b/src/Tools/psxcdgen_ex/src/config_reader/xml.rs index 991e7eb8..234d2726 100644 --- a/src/Tools/psxcdgen_ex/src/config_reader/xml.rs +++ b/src/Tools/psxcdgen_ex/src/config_reader/xml.rs @@ -1,5 +1,5 @@ use std::path::PathBuf; -use tool_helper::{format_if_error, path_with_env_from}; +use tool_helper::{format_if_error, path_with_env_from, string_with_env_from}; use crate::config_reader::Directory; use super::{CommonProperties, Configuration, Error, File, FileKind, LZ4State}; @@ -132,7 +132,7 @@ fn read_common_properties(xml: &roxmltree::Node, is_hidden: bool, force_lz4_stat }; Ok(CommonProperties{ - name: String::from(xml.attribute(attribute_names::NAME).unwrap_or_default()), + name: string_with_env_from(xml.attribute(attribute_names::NAME).unwrap_or_default()), is_hidden: is_hidden | parse_boolean_attribute(&xml, attribute_names::HIDDEN)?, lz4_state, padded_size: read_padded_size(&xml)? diff --git a/src/Tools/tool_helper/src/lib.rs b/src/Tools/tool_helper/src/lib.rs index 3cba8d99..e5912951 100644 --- a/src/Tools/tool_helper/src/lib.rs +++ b/src/Tools/tool_helper/src/lib.rs @@ -38,6 +38,8 @@ macro_rules! format_if_error_drop_cause { }; } +const DEFAULT_ENV_EXPAND_OPTIONS : ExpandOptions = ExpandOptions{expansion_type: Some(ExpansionType::All), default_to_empty: false}; + pub struct Error { pub exit_code: i32, pub text: String, @@ -162,8 +164,12 @@ pub fn callback_if_any_error String, T, E: std::string::ToStrin } } +pub fn string_with_env_from(str: &str) -> String { + String::from(envmnt::expand(str, Some(DEFAULT_ENV_EXPAND_OPTIONS))) +} + pub fn path_with_env_from(path: &str) -> PathBuf { - PathBuf::from(envmnt::expand(path, Some(ExpandOptions{expansion_type: Some(ExpansionType::All), default_to_empty: false}))) + PathBuf::from(envmnt::expand(path, Some(DEFAULT_ENV_EXPAND_OPTIONS))) } pub fn open_output_file(output_path: &PathBuf) -> Result, Error> {