mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-09 13:52:00 -04:00

Unified extracted output directory naming logic Multiple code fixes, refactors and improvements
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
#coding=utf-8
|
|
|
|
"""
|
|
Copyright (C) 2022 Plato Mavropoulos
|
|
"""
|
|
|
|
from common.path_ops import project_root, safe_path
|
|
from common.system import get_os_ver
|
|
|
|
# https://github.com/allowitsme/big-tool by Dmitry Frolov
|
|
# https://github.com/platomav/BGScriptTool by Plato Mavropoulos
|
|
def get_bgs_tool():
|
|
try:
|
|
# noinspection PyUnresolvedReferences
|
|
from external.big_script_tool import BigScript # pylint: disable=E0401,E0611
|
|
except Exception:
|
|
BigScript = None
|
|
|
|
return BigScript
|
|
|
|
# Get UEFIFind path
|
|
def get_uefifind_path():
|
|
exec_name = f'UEFIFind{".exe" if get_os_ver()[1] else ""}'
|
|
|
|
return safe_path(project_root(), ['external', exec_name])
|
|
|
|
# Get UEFIExtract path
|
|
def get_uefiextract_path():
|
|
exec_name = f'UEFIExtract{".exe" if get_os_ver()[1] else ""}'
|
|
|
|
return safe_path(project_root(), ['external', exec_name])
|
|
|
|
# Get ToshibaComExtractor path
|
|
def get_comextract_path():
|
|
exec_name = f'comextract{".exe" if get_os_ver()[1] else ""}'
|
|
|
|
return safe_path(project_root(), ['external', exec_name])
|