Integrate all the progress into master #6
|
@ -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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<Track>
|
||||
<File name = "SYSTEM.CNF">System.cnf</File>
|
||||
<!--For pkg use: SLES_000.25;1 or SLUS_001.51;1 - no japanse version yet. Otherwise leave as "XXXX_AAA.AA"-->
|
||||
<Main name = "SLES_000.25" lba_source = "../application/src/asset_mgr.cpp">../application/bin/%TV_FORMAT%/PSX-release/PoolBox.psexe</Main>
|
||||
<Main name = "%BOOT%" lba_source = "../application/src/asset_mgr.cpp">../application/bin/%TV_FORMAT%/PSX-release/PoolBox.psexe</Main>
|
||||
<Overlay name = "CTO.BIN" lba_source = "../application/src/Overlay/ControllerTest/controller_test_assets.cpp">../application/bin/%TV_FORMAT%/PSX-release/Overlay.controller_tests</Overlay>
|
||||
<Overlay name = "GTO.BIN" lba_source = "../application/src/Overlay/GPUTest/gpu_test_assets.cpp">../application/bin/%TV_FORMAT%/PSX-release/Overlay.gpu_tests</Overlay>
|
||||
<Overlay name = "GTE.BIN">../application/bin/%TV_FORMAT%/PSX-release/Overlay.gte_tests</Overlay>
|
||||
|
|
|
@ -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)?
|
||||
|
|
|
@ -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<F: Fn(String) -> 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<BufWriter<std::fs::File>, Error> {
|
||||
|
|
Loading…
Reference in New Issue