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,