cIOS building stub, continuing on desktop

This commit is contained in:
2026-03-10 16:38:31 -04:00
parent 449097967c
commit 3f112856e5
3 changed files with 93 additions and 40 deletions

View File

@@ -45,24 +45,10 @@ enum Commands {
/// The path to a TMD, Ticket, or WAD
input: String,
},
/// Apply patches to an IOS
IosPatch {
/// The IOS WAD to apply patches to
input: String,
#[arg(short, long)]
/// An optional output path; default to overwriting input file if not provided
output: Option<String>,
/// Set a new IOS version (0-65535)
#[arg(short, long)]
version: Option<u16>,
/// Set the slot that this IOS will install into
#[arg(short, long)]
slot: Option<u8>,
/// Set all patched content to be non-shared
#[arg(short, long, action)]
no_shared: bool,
#[command(flatten)]
enabled_patches: title::iospatcher::EnabledPatches,
/// Modify an IOS
Ios {
#[command(subcommand)]
command: title::ios::Commands
},
/// Compress/decompress data using LZ77 compression
Lz77 {
@@ -137,24 +123,31 @@ fn main() -> Result<()> {
Some(Commands::Info { input }) => {
info::info(input)?
},
Some(Commands::IosPatch {
input,
output,
version,
slot,
no_shared,
enabled_patches
}
) => {
title::iospatcher::patch_ios(
input,
output,
version,
slot,
no_shared,
enabled_patches,
)?
}
Some(Commands::Ios { command }) => {
match command {
title::ios::Commands::Cios {
base,
map,
output,
cios_version,
modules,
slot,
version
} => {
title::ios::build_cios(base, map, output, cios_version, modules, slot, version)?
},
title::ios::Commands::Patch {
input,
output,
version,
slot,
no_shared,
enabled_patches
} => {
title::ios::patch_ios(input, output, version, slot, no_shared, enabled_patches)?
}
}
},
Some(Commands::Lz77 { command }) => {
match command {
archive::lz77::Commands::Compress { input, output } => {