mirror of
				https://github.com/NinjaCheetah/WiiPy.git
				synced 2025-11-04 00:16:19 -05:00 
			
		
		
		
	Added verbose option for EmuNAND title installs
This commit is contained in:
		
							parent
							
								
									dfb527388c
								
							
						
					
					
						commit
						935f5eb7df
					
				@ -78,7 +78,8 @@ def handle_emunand_info(args):
 | 
				
			|||||||
        else:
 | 
					        else:
 | 
				
			||||||
            print(f"  IOS{int(ios[-2:], 16)} ({ios.upper()})")
 | 
					            print(f"  IOS{int(ios[-2:], 16)} ({ios.upper()})")
 | 
				
			||||||
            tmd = emunand.get_title_tmd(ios)
 | 
					            tmd = emunand.get_title_tmd(ios)
 | 
				
			||||||
            print(f"    Version: {tmd.title_version} ({tmd.title_version_converted})")
 | 
					            print(f"    Version: {tmd.title_version} "
 | 
				
			||||||
 | 
					                  f"({libWiiPy.title.title_ver_dec_to_standard(tmd.title_version, tmd.title_id, bool(tmd.vwii))})")
 | 
				
			||||||
    print("")
 | 
					    print("")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    print(f"Installed Titles:")
 | 
					    print(f"Installed Titles:")
 | 
				
			||||||
@ -180,8 +181,13 @@ def handle_emunand_install_missing(args):
 | 
				
			|||||||
    print(f"\nAll missing IOSes have been installed!")
 | 
					    print(f"\nAll missing IOSes have been installed!")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def _emunand_logger(log):
 | 
				
			||||||
 | 
					    print(log)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def handle_emunand_title(args):
 | 
					def handle_emunand_title(args):
 | 
				
			||||||
    emunand = libWiiPy.nand.EmuNAND(args.emunand)
 | 
					    logger = _emunand_logger if args.verbose else lambda _: None
 | 
				
			||||||
 | 
					    emunand = libWiiPy.nand.EmuNAND(args.emunand, logger)
 | 
				
			||||||
    if args.skip_hash:
 | 
					    if args.skip_hash:
 | 
				
			||||||
        skip_hash = True
 | 
					        skip_hash = True
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
 | 
				
			|||||||
@ -22,11 +22,12 @@ def _print_tmd_info(tmd: libWiiPy.title.TMD, signing_cert=None):
 | 
				
			|||||||
    else:
 | 
					    else:
 | 
				
			||||||
        print(f"  Title ID: {tmd.title_id.upper()}")
 | 
					        print(f"  Title ID: {tmd.title_id.upper()}")
 | 
				
			||||||
    # This type of version number really only applies to the System Menu and IOS.
 | 
					    # This type of version number really only applies to the System Menu and IOS.
 | 
				
			||||||
 | 
					    title_version_converted = libWiiPy.title.title_ver_dec_to_standard(tmd.title_version, tmd.title_id, bool(tmd.vwii))
 | 
				
			||||||
    if tmd.title_id.startswith("00000001"):
 | 
					    if tmd.title_id.startswith("00000001"):
 | 
				
			||||||
        if tmd.title_id == "0000000100000001":
 | 
					        if tmd.title_id == "0000000100000001":
 | 
				
			||||||
            print(f"  Title Version: {tmd.title_version} (boot2v{tmd.title_version})")
 | 
					            print(f"  Title Version: {tmd.title_version} (boot2v{tmd.title_version})")
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            print(f"  Title Version: {tmd.title_version} ({tmd.title_version_converted})")
 | 
					            print(f"  Title Version: {tmd.title_version} ({title_version_converted})")
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        print(f"  Title Version: {tmd.title_version}")
 | 
					        print(f"  Title Version: {tmd.title_version}")
 | 
				
			||||||
    print(f"  TMD Version: {tmd.tmd_version}")
 | 
					    print(f"  TMD Version: {tmd.tmd_version}")
 | 
				
			||||||
@ -52,7 +53,7 @@ def _print_tmd_info(tmd: libWiiPy.title.TMD, signing_cert=None):
 | 
				
			|||||||
    else:
 | 
					    else:
 | 
				
			||||||
        print(f"  Certificate Info: {tmd.signature_issuer} (Unknown)")
 | 
					        print(f"  Certificate Info: {tmd.signature_issuer} (Unknown)")
 | 
				
			||||||
    if tmd.title_id == "0000000100000002":
 | 
					    if tmd.title_id == "0000000100000002":
 | 
				
			||||||
        match tmd.title_version_converted[-1:]:
 | 
					        match title_version_converted[-1:]:
 | 
				
			||||||
            case "U":
 | 
					            case "U":
 | 
				
			||||||
                region = "USA"
 | 
					                region = "USA"
 | 
				
			||||||
            case "E":
 | 
					            case "E":
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								wiipy.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								wiipy.py
									
									
									
									
									
								
							@ -111,6 +111,8 @@ if __name__ == "__main__":
 | 
				
			|||||||
                                                  "accepts a WAD file to read the TID from)")
 | 
					                                                  "accepts a WAD file to read the TID from)")
 | 
				
			||||||
    emunand_title_parser.add_argument("-s", "--skip-hash", help="skips validating the hashes of decrypted "
 | 
					    emunand_title_parser.add_argument("-s", "--skip-hash", help="skips validating the hashes of decrypted "
 | 
				
			||||||
                                      "content (install only)", action="store_true")
 | 
					                                      "content (install only)", action="store_true")
 | 
				
			||||||
 | 
					    emunand_title_parser.add_argument("-v", "--verbose", action="store_true",
 | 
				
			||||||
 | 
					                                      help="show verbose installation/uninstallation details")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Argument parser for the fakesign subcommand.
 | 
					    # Argument parser for the fakesign subcommand.
 | 
				
			||||||
    fakesign_parser = subparsers.add_parser("fakesign", help="fakesign a TMD, Ticket, or WAD (trucha bug)",
 | 
					    fakesign_parser = subparsers.add_parser("fakesign", help="fakesign a TMD, Ticket, or WAD (trucha bug)",
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user