Skip to content

Commit 7f7227e

Browse files
fix: windows icon
1 parent 44ec8bb commit 7f7227e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

glimpse.spec

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
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

411
a = 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
)

0 commit comments

Comments
 (0)