Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add windows icon #111

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
g++-mingw-w64-i686 \
devscripts \
appstream \
imagemagick \
desktop-file-utils

- name: Build
Expand All @@ -39,7 +40,7 @@ jobs:
with:
name: cnping-exe
path: "*.exe"

- name: Build deb
run: debuild --no-sign

Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,14 @@ updateicons : ${ICONSPATH}scalable/apps/${APPNAME}.svg
convert $^ -resize 256x256 ${ICONSPATH}256x256/apps/${APPNAME}.png
convert $^ -resize 1024x1024 ${ICONSPATH}1024x1024/apps/${APPNAME}.png

# after creating the ico file use GIMP to compress it:
# Image-> Mode -> Indexed...
# Choose "Generate optimum palette"
# Maximum number of colors: 3 (may change if the icon changes)
# "Convert"
# File -> Export As
# Check "Compressed (PNG)" in every resolution
# "Export"
cnping.ico: ${ICONSPATH}scalable/apps/${APPNAME}.svg
convert $^ -density 300 -define icon:auto-resize=256,64,16 -background none $@

Binary file added cnping.ico
Binary file not shown.
1 change: 1 addition & 0 deletions resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ BEGIN
PUSHBUTTON "&Close", 8, 175, 80, 100, 10
END

MAIN_ICON ICON "cnping.ico"