mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-13 06:34:42 -04:00
Added Panasonic BIOS Package Extractor v2.0_a7
New processes to better handle PE files Various common package fixes and improvements
This commit is contained in:
parent
f5905ec662
commit
fc73921967
12 changed files with 400 additions and 35 deletions
|
@ -35,7 +35,7 @@ def get_tiano_path():
|
|||
return safe_path(project_root(), ['external',exec_name])
|
||||
|
||||
# EFI/Tiano Decompression via TianoCompress
|
||||
def efi_decompress(in_path, out_path, padding=0, comp_type='--uefi'):
|
||||
def efi_decompress(in_path, out_path, padding=0, silent=False, comp_type='--uefi'):
|
||||
try:
|
||||
subprocess.run([get_tiano_path(), '-d', in_path, '-o', out_path, '-q', comp_type], check=True, stdout=subprocess.DEVNULL)
|
||||
|
||||
|
@ -43,10 +43,12 @@ def efi_decompress(in_path, out_path, padding=0, comp_type='--uefi'):
|
|||
|
||||
if os.path.getsize(out_path) != size_orig: raise Exception('EFI_DECOMPRESS_ERROR')
|
||||
except:
|
||||
printer(f'Error: TianoCompress could not extract file {in_path}!', padding)
|
||||
if not silent:
|
||||
printer(f'Error: TianoCompress could not extract file {in_path}!', padding)
|
||||
|
||||
return 1
|
||||
|
||||
printer('Succesfull EFI decompression via TianoCompress!', padding)
|
||||
if not silent:
|
||||
printer('Succesfull EFI decompression via TianoCompress!', padding)
|
||||
|
||||
return 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue