From 57f79a7365e478a9bebc14710991e06a7a116502 Mon Sep 17 00:00:00 2001 From: "dolgolyov.alexei" Date: Sat, 28 Mar 2026 18:37:51 +0300 Subject: [PATCH] docs: add NSIS shortcut icons section to CI/CD guide Explains how to use custom .ico files for shortcuts instead of the default Python/WSH icon that appears in the taskbar. --- gitea-python-ci-cd.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gitea-python-ci-cd.md b/gitea-python-ci-cd.md index d141afd..51bf55a 100644 --- a/gitea-python-ci-cd.md +++ b/gitea-python-ci-cd.md @@ -472,6 +472,23 @@ Section "Start with Windows" SecAutostart ; Optional — Startup folder shortcut ; But NOT $INSTDIR\data (user config) ``` +### Shortcut Icons + +By default, shortcuts that launch via `wscript.exe` or `python.exe` inherit the Python/Windows Script Host icon in the taskbar. To use a custom icon, set the 4th parameter of `CreateShortcut` to your `.ico` file: + +```nsi +; Set installer/uninstaller icons (shown during install wizard) +!define MUI_ICON "src\static\icons\icon.ico" +!define MUI_UNICON "src\static\icons\icon.ico" + +; Shortcut with custom icon (4th param = icon path, 5th = icon index) +CreateShortcut "$DESKTOP\${APPNAME}.lnk" \ + "wscript.exe" '"$INSTDIR\scripts\start-hidden.vbs"' \ + "$INSTDIR\app\static\icons\icon.ico" 0 +``` + +The `.ico` file must be bundled in the distribution (copied by the build script). The same icon path applies to Start Menu, Desktop, and Startup shortcuts. + ### Hidden Launcher (VBS) Bat files briefly flash a console window even with `@echo off`. To avoid this,