Added App Icon

This commit is contained in:
2026-08-28 17:40:43 +02:00
parent 73c20a0ff2
commit 7c85397af0
16 changed files with 178 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
"""Best-effort Windows first-run shortcut, including direct Python launches."""
import os
from pathlib import Path
import subprocess
def ensure_desktop_shortcut():
if os.name != "nt":
return
root = Path(__file__).resolve().parent
if (root / "runtime" / "desktop-shortcut-created.txt").exists():
return
powershell = Path(os.environ["SystemRoot"]) / "System32/WindowsPowerShell/v1.0/powershell.exe"
try:
subprocess.run(
[str(powershell), "-NoProfile", "-NonInteractive", "-File", str(root / "create_shortcut.ps1")],
cwd=root, timeout=10, check=True, capture_output=True,
creationflags=subprocess.CREATE_NO_WINDOW,
)
except (OSError, subprocess.SubprocessError) as error:
print(f"Desktop shortcut setup skipped: {error}")