mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-12 22:26:13 -04:00

Added AMI PFAT nested detection at each file Added Award BIOS payload naming at each file Switched Panasonic BIOS LZNT1 external library Improved Panasonic LZNT1 detection and length Improved Dell PFS code structure and fixed bugs Improved code exception handling (raise, catch) Improved code definitions (PEP8, docs, types) Fixed some arguments missing from help screens
66 lines
1.5 KiB
Python
66 lines
1.5 KiB
Python
#!/usr/bin/env python3 -B
|
|
# coding=utf-8
|
|
|
|
"""
|
|
Copyright (C) 2022-2024 Plato Mavropoulos
|
|
"""
|
|
|
|
from common.path_ops import project_root, safe_path
|
|
from common.system import get_os_ver
|
|
|
|
|
|
def get_bgs_tool():
|
|
"""
|
|
https://github.com/allowitsme/big-tool by Dmitry Frolov
|
|
https://github.com/platomav/BGScriptTool by Plato Mavropoulos
|
|
"""
|
|
|
|
try:
|
|
# noinspection PyUnresolvedReferences
|
|
from external.big_script_tool import BigScript # pylint: disable=C0415
|
|
|
|
return BigScript
|
|
except ModuleNotFoundError:
|
|
pass
|
|
|
|
return None
|
|
|
|
|
|
def get_comextract_path() -> str:
|
|
""" Get ToshibaComExtractor path """
|
|
|
|
exec_name = f'comextract{".exe" if get_os_ver()[1] else ""}'
|
|
|
|
return safe_path(project_root(), ['external', exec_name])
|
|
|
|
|
|
def get_szip_path() -> str:
|
|
""" Get 7-Zip path """
|
|
|
|
exec_name = '7z.exe' if get_os_ver()[1] else '7zzs'
|
|
|
|
return safe_path(project_root(), ['external', exec_name])
|
|
|
|
|
|
def get_tiano_path() -> str:
|
|
""" Get TianoCompress path """
|
|
|
|
exec_name = f'TianoCompress{".exe" if get_os_ver()[1] else ""}'
|
|
|
|
return safe_path(project_root(), ['external', exec_name])
|
|
|
|
|
|
def get_uefifind_path() -> str:
|
|
""" Get UEFIFind path """
|
|
|
|
exec_name = f'UEFIFind{".exe" if get_os_ver()[1] else ""}'
|
|
|
|
return safe_path(project_root(), ['external', exec_name])
|
|
|
|
|
|
def get_uefiextract_path() -> str:
|
|
""" Get UEFIExtract path """
|
|
|
|
exec_name = f'UEFIExtract{".exe" if get_os_ver()[1] else ""}'
|
|
|
|
return safe_path(project_root(), ['external', exec_name])
|