chore: rename metadata to use pw_create_unique_exe
Some checks failed
Code check / Check code (push) Failing after 1m12s

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-10-12 12:14:31 +05:00
parent f4aee15b5d
commit 2d6ef84798
15 changed files with 13 additions and 10 deletions

View File

Before

Width:  |  Height:  |  Size: 634 KiB

After

Width:  |  Height:  |  Size: 634 KiB

View File

Before

Width:  |  Height:  |  Size: 315 KiB

After

Width:  |  Height:  |  Size: 315 KiB

View File

Before

Width:  |  Height:  |  Size: 978 KiB

After

Width:  |  Height:  |  Size: 978 KiB

View File

Before

Width:  |  Height:  |  Size: 650 KiB

After

Width:  |  Height:  |  Size: 650 KiB

View File

Before

Width:  |  Height:  |  Size: 391 KiB

After

Width:  |  Height:  |  Size: 391 KiB

View File

Before

Width:  |  Height:  |  Size: 710 KiB

After

Width:  |  Height:  |  Size: 710 KiB

View File

Before

Width:  |  Height:  |  Size: 627 KiB

After

Width:  |  Height:  |  Size: 627 KiB

View File

@@ -209,21 +209,24 @@ class PortProtonAPI:
exe_name = f"{export_match.group(1).strip()}.exe" exe_name = f"{export_match.group(1).strip()}.exe"
else: else:
# --- portwine_exe= --- (многострочный, сложный вариант) portwine_match = None
portwine_match = re.search( for line in content.splitlines():
r'portwine_exe\s*=\s*(?:["\']?\$\(.+?\)[\'"]?|["\'].*?\.exe["\']|[^\n]+)', stripped = line.strip()
content, # Игнорируем закомментированные строки
re.DOTALL, if stripped.startswith("#"):
) continue
if portwine_match: # Ищем portwine_exe только в активных строках
exe_expr = portwine_match.group(0).split("=", 1)[1].strip() if "portwine_exe" in stripped and "=" in stripped:
exe_expr = exe_expr.strip("'\" ") portwine_match = stripped
break
# --- Найти .exe внутри выражения (разрешаем точки в имени) --- if portwine_match:
exe_expr = portwine_match.split("=", 1)[1].strip().strip("'\" ")
exe_candidates = re.findall(r'[-\w\s/\\\.]+\.exe', exe_expr) exe_candidates = re.findall(r'[-\w\s/\\\.]+\.exe', exe_expr)
if exe_candidates: if exe_candidates:
exe_name = os.path.basename(exe_candidates[-1].strip()) exe_name = os.path.basename(exe_candidates[-1].strip())
# Fallback # Fallback
if not display_name and exe_name: if not display_name and exe_name:
display_name = exe_name display_name = exe_name