[!!] fix build
This commit is contained in:
parent
2d0fca9845
commit
605919d1c8
@ -14,19 +14,27 @@ splash = "" # Читается из metadata
|
|||||||
|
|
||||||
def get_pyinstaller_cmd():
|
def get_pyinstaller_cmd():
|
||||||
splash_str = ""
|
splash_str = ""
|
||||||
|
uac_admin = ""
|
||||||
|
dwt = ""
|
||||||
|
add_data = [f'--add-data {path_fix + d}' for d in data]
|
||||||
if splash:
|
if splash:
|
||||||
splash_str = f' --splash {path_fix + splash} '
|
splash_str = f' --splash {path_fix + splash} '
|
||||||
|
if add_data:
|
||||||
|
add_data = f"{' '.join(add_data)} "
|
||||||
|
if disable_windowed_traceback:
|
||||||
|
dwt = " --disable-windowed-traceback "
|
||||||
|
if admin:
|
||||||
|
uac_admin = " --uac-admin "
|
||||||
pyinstaller_cmd = \
|
pyinstaller_cmd = \
|
||||||
(f'pyinstaller --noconfirm --onedir --console --clean {splash_str}'
|
(f'pyinstaller --noconfirm --onedir --console --clean '
|
||||||
f'--icon {path_fix + icon} --version-file {path_fix + metadata_path_txt} --name {product_name}'
|
f'--icon {path_fix + icon} --version-file {path_fix + metadata_path_txt}'
|
||||||
f'{"".join([f' --add-data {path_fix + d}' for d in data])} '
|
f'{splash_str}{add_data}{dwt}{uac_admin}'
|
||||||
f'--workpath {workpath} --distpath {distpath} --specpath {specpath} '
|
f'--workpath {workpath} --distpath {distpath} --specpath {specpath} '
|
||||||
f'--contents-directory {contents_directory} --optimize {optimize} '
|
f'--contents-directory {contents_directory} --optimize {optimize} '
|
||||||
f'{"--disable-windowed-traceback " if disable_windowed_traceback else ""}'
|
f'--name {product_name} {main}').split(" ")
|
||||||
f'{"--uac-admin " if admin else ""} '
|
pyinstaller_cmd = [x for x in pyinstaller_cmd if x]
|
||||||
f'{main}')
|
|
||||||
logger.info(f"execute: {pyinstaller_cmd}")
|
logger.info(f"execute: {pyinstaller_cmd}")
|
||||||
return pyinstaller_cmd.split(" ")
|
return pyinstaller_cmd
|
||||||
|
|
||||||
def calculate_sha256(file_path):
|
def calculate_sha256(file_path):
|
||||||
sha256_hash = hashlib.sha256()
|
sha256_hash = hashlib.sha256()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user