File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
2222- Manual build (Windows): ` pyinstaller --noconfirm --onefile --windowed --icon=app_icon.ico --name=glimpse main.py `
2323- Manual build (Linux/macOS): ` pyinstaller --noconfirm --onefile --windowed --icon=app_icon.png --name=glimpse main.py `
2424- Output binary will be in the ` dist/ ` folder
25- - ** Cross-platform icons** : Spec file bundles both PNG and ICO, runtime selects appropriate format
25+ - ** Cross-platform icons** : Spec file bundles both PNG and ICO, build-time selects appropriate format
2626
2727## Architecture
2828
Original file line number Diff line number Diff line change 11# -*- mode: python ; coding: utf-8 -*-
22
3+ import sys
4+
5+ # Select appropriate icon format for platform
6+ if sys .platform .startswith ('win' ):
7+ icon_file = 'app_icon.ico'
8+ else :
9+ icon_file = 'app_icon.png'
310
411a = Analysis (
512 ['main.py' ],
@@ -35,5 +42,5 @@ exe = EXE(
3542 target_arch = None ,
3643 codesign_identity = None ,
3744 entitlements_file = None ,
38- icon = 'app_icon.png' ,
45+ icon = icon_file ,
3946)
You can’t perform that action at this time.
0 commit comments