Add colored output to most tools; Make mkoverlay more tolerant for missing overlay files; Make psxcdgen_ex emit a warning when no license file is specified
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "psxcdgen_ex"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
@@ -8,6 +8,7 @@ edition = "2021"
|
||||
[dependencies]
|
||||
cdtypes = {path = "../cdtypes"}
|
||||
clap = {version = "*", features = ["derive"]}
|
||||
colored = "*"
|
||||
no-comment = "*"
|
||||
paste = "*"
|
||||
roxmltree = "*"
|
||||
|
@@ -2,6 +2,7 @@ use super::{*, SectorWriter, {CDDesc, Error}};
|
||||
use super::super::types::{helper::{DirectoryRecordMember, PathTableMember}, layout::Layout, *};
|
||||
use builder::SubModeBuilder;
|
||||
use cdtypes::types::{cdstring::{AString, DString}, date::*, dir_record::*, helper::{round_bytes_mode2_form1, sector_count_mode2_form1}, path_table::*, pvd as cd_pvd, lsb_msb::*, sector::Mode2Form1};
|
||||
use colored::*;
|
||||
use tool_helper::{BufferedInputFile, format_if_error, open_input_file_buffered};
|
||||
use std::io::{Read, Seek, SeekFrom};
|
||||
|
||||
@@ -197,7 +198,8 @@ fn process_system_area(system_area: &SystemArea, sec_writer: &mut dyn SectorWrit
|
||||
}
|
||||
|
||||
else {
|
||||
// No license specified - filling it with zeros
|
||||
// No license specified - filling it with zeros
|
||||
eprintln!("{}", "WARNING: No license file provided. Some emulators (like No$PSX) will not boot this CD.".yellow());
|
||||
for _ in 0..SYSTEM_AREA_SECTOR_COUNT {
|
||||
sec_writer.write_cd_xa_data(builder::create_xa_data_zero())?;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
use clap::{Parser, ValueEnum};
|
||||
use psxcdgen_ex::{encoder::{EncodingFunctions, psx::{calculate_psx_lbas, calculate_psx_length_for, encode_psx_image}}, file_writer::{ImageType, write_image}, config_reader};
|
||||
use std::{path::PathBuf, };
|
||||
use tool_helper::Error;
|
||||
use std::{path::PathBuf};
|
||||
use tool_helper::{Error, exit_with_error};
|
||||
|
||||
#[derive(Parser)]
|
||||
#[clap(about = "Creates an ISO image from a description file", long_about = None)]
|
||||
@@ -57,11 +57,11 @@ fn main() {
|
||||
Ok(cmd_line) => {
|
||||
match run_main(cmd_line) {
|
||||
Ok(_) => (),
|
||||
Err(error) => eprintln!("{}", error)
|
||||
Err(error) => exit_with_error(error)
|
||||
}
|
||||
},
|
||||
Err(error) => {
|
||||
eprintln!("{}", error);
|
||||
exit_with_error(Error::from_error(error))
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user