Use psxcdgen_ex under WSL and improve wslpath and makefiles

This commit is contained in:
Jaby Blubb
2023-08-25 05:15:23 +02:00
parent 5f21d7ebe7
commit 2c37c2b412
14 changed files with 113 additions and 70 deletions

View File

@@ -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, exit_with_error};
use std::path::PathBuf;
use tool_helper::{Error, exit_with_error, read_file_to_string};
#[derive(Parser)]
#[clap(about = "Creates an ISO image from a description file", long_about = None)]
@@ -37,7 +37,7 @@ impl SystemType {
fn run_main(cmd_line: CommandLine) -> Result<(), Error> {
let encoding_functions = cmd_line.system_type.get_encoding_functions();
let (desc, lba_embedded_files) = psxcdgen_ex::process(config_reader::parse_xml(std::fs::read_to_string(cmd_line.input_file)?)?, encoding_functions.lba_calculator)?;
let (desc, lba_embedded_files) = psxcdgen_ex::process(config_reader::parse_xml(read_file_to_string(&cmd_line.input_file)?)?, encoding_functions.lba_calculator)?;
let file_map = desc.create_file_map();
psxcdgen_ex::process_files(file_map, lba_embedded_files, encoding_functions.length_calculator)?;