[>] icon to metadata

This commit is contained in:
Maxim Khomutov 2025-03-24 02:19:32 +03:00
parent 176805ec41
commit ed5ee5dad1
2 changed files with 4 additions and 3 deletions

View File

@ -101,9 +101,9 @@ def cleanup():
os.makedirs(build_dir, exist_ok=True)
def build():
global product_name
global product_name, icon
new_ver = patch_core_build()
old_ver, product_name = patch_metadata(*new_ver)
old_ver, product_name, icon = patch_metadata(*new_ver)
logger.info("Building...")
# subprocess.run(['auto-py-to-exe', '--config', build_json_path], shell=True)
subprocess.run(get_pyinstaller_cmd())

View File

@ -13,6 +13,7 @@ def patch_metadata(major, minor, patch, build_i):
metadata = yaml.load(file)
logger.info(" - metadata loaded")
product_name = metadata['ProductName']
icon = metadata['Icon']
old_data = metadata['Version']
logger.info(f" - current version: {old_data}")
logger.info(f" - patched version: {major}.{minor}.{patch}.{build_i}")
@ -23,4 +24,4 @@ def patch_metadata(major, minor, patch, build_i):
logger.info(" - creating version file")
subprocess.run(['create-version-file', metadata_path, '--outfile', metadata_path_txt])
logger.info("Ready")
return old_data, product_name
return old_data, product_name, icon