Fix: UAC shows unknown .msi filenames #6

Merged
Sergey Sharybin merged 1 commits from msi_descrption into main 2024-10-03 17:15:20 +02:00
2 changed files with 8 additions and 2 deletions

View File

@ -266,7 +266,10 @@ def pack_win(builder: worker.blender.CodeBuilder, pack_format: str) -> None:
os.rename(source_cpack_file_path, final_package_file_path)
else:
os.rename(bogus_cpack_file_path, final_package_file_path)
worker.blender.sign.sign_windows_files(builder.service_env_id, [final_package_file_path])
version_info = worker.blender.version.VersionInfo(builder)
description = f"Blender {version_info.version}"
worker.blender.sign.sign_windows_files(builder.service_env_id, [final_package_file_path],
description=description)
generate_file_hash(final_package_file_path)

View File

@ -5,7 +5,7 @@
import pathlib
import sys
from typing import Sequence
from typing import Optional, Sequence
import worker.blender
import worker.utils
@ -14,6 +14,7 @@ import worker.utils
def sign_windows_files(
service_env_id: str,
file_paths: Sequence[pathlib.Path],
description: Optional[str],
certificate_id: str = "",
) -> None:
import conf.worker
@ -37,6 +38,8 @@ def sign_windows_files(
"--server-url",
worker.utils.HiddenArgument(server_url),
]
if description:
cmd += ["--description", description]
# Signing one file at a time causes a stampede on servers, resulting in blocking.
# Instead sign in chunks of multiple files.