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

Linux script for create icns #108

Merged
merged 6 commits into from
Mar 21, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Template for a Game using the awesome [Bevy engine][bevy] featuring out of the b
You should keep the `credits` directory up to date. The release workflow automatically includes the directory in every build.

### Updating the icons
1. Replace `build/macos/icon_1024x1024.png` with a `1024` times `1024` pixel png icon and run `create_icns.sh` (make sure to run the script inside the `build/macos` directory) - _Note: this requires a mac_
1. Replace `build/macos/icon_1024x1024.png` with a `1024` times `1024` pixel png icon and run `create_icns.sh` or `create_icns_linux.sh` if you use linux (make sure to run the script inside the `build/macos` directory) - _Note: `create_icns.sh` requires a mac, and `create_icns_linux.sh` requires imagemagick and png2icns_
2. Replace `build/windows/icon.ico` (used for windows executable and as favicon for the web-builds)
* You can create an `.ico` file for windows by following these steps:
1. Open `macos/AppIcon.iconset/icon_256x256.png` in [Gimp](https://www.gimp.org/downloads/)
Expand Down
Binary file modified build/macos/AppIcon.iconset/icon_128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/macos/AppIcon.iconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/macos/AppIcon.iconset/icon_16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/macos/AppIcon.iconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/macos/AppIcon.iconset/icon_256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/macos/AppIcon.iconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/macos/AppIcon.iconset/icon_32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/macos/AppIcon.iconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/macos/AppIcon.iconset/icon_512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions build/macos/create_icns_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env sh

rm -rf AppIcon.iconset/*
mkdir -p AppIcon.iconset
convert ../icon_1024x1024.png -resize 16x16 AppIcon.iconset/icon_16x16.png
convert ../icon_1024x1024.png -resize 32x32 AppIcon.iconset/[email protected]
convert ../icon_1024x1024.png -resize 32x32 AppIcon.iconset/icon_32x32.png
convert ../icon_1024x1024.png -resize 64x64 AppIcon.iconset/[email protected]
convert ../icon_1024x1024.png -resize 128x128 AppIcon.iconset/icon_128x128.png
convert ../icon_1024x1024.png -resize 256x256 AppIcon.iconset/[email protected]
convert ../icon_1024x1024.png -resize 256x256 AppIcon.iconset/icon_256x256.png
convert ../icon_1024x1024.png -resize 512x512 AppIcon.iconset/[email protected]
convert ../icon_1024x1024.png -resize 512x512 AppIcon.iconset/icon_512x512.png
cp ../icon_1024x1024.png AppIcon.iconset/[email protected]
png2icns ./AppIcon.icns AppIcon.iconset/icon_16x16.png AppIcon.iconset/icon_32x32.png AppIcon.iconset/icon_128x128.png AppIcon.iconset/icon_256x256.png AppIcon.iconset/icon_512x512.png
Fidius-jko marked this conversation as resolved.
Show resolved Hide resolved
mkdir -p src/Game.app/Contents/Resources
mv AppIcon.icns src/Game.app/Contents/Resources/
Binary file modified build/macos/src/Game.app/Contents/Resources/AppIcon.icns
Binary file not shown.
Loading