-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
git
committed
Sep 21, 2024
1 parent
52bc899
commit cc8379a
Showing
9 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
# prepare | ||
# brew install --cask inkscape | ||
|
||
# get current script directory | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
path_build="${DIR}/../electron/resources/build" | ||
path_source_png="${path_build}/logo_1024x1024.png" | ||
|
||
size=(16 32 44 48 64 128 150 256 512) | ||
for i in "${size[@]}"; do | ||
path_png="${path_build}/logo@${i}x$i.png" | ||
echo "Generated: logo@${i}x$i.png" | ||
inkscape --export-type="png" --export-filename="${path_png}" -w $i -h $i "${path_source_png}" | ||
done | ||
|
||
path_ico="${path_build}/logo.ico" | ||
echo "Generated: logo.ico" | ||
magick "${path_source_png}" -define icon:auto-resize=256,48,32,16 "${path_ico}" | ||
|
||
echo "Generated: logo.png" | ||
rm -rf "${path_build}/logo.png" | ||
cp -a "${path_build}/[email protected]" "${path_build}/logo.png" | ||
|
||
echo "Generated: logo.icns" | ||
path_iconset="${path_build}/icon.iconset" | ||
rm -rf "${path_iconset}" | ||
mkdir -p "${path_iconset}" | ||
cp -a "${path_build}/[email protected]" "${path_iconset}/icon_256x256.png" | ||
cp -a "${path_build}/[email protected]" "${path_iconset}/icon_32x32.png" | ||
cp -a "${path_build}/[email protected]" "${path_iconset}/icon_16x16.png" | ||
iconutil -c icns "${path_iconset}" -o "${path_build}/logo.icns" | ||
|
||
echo "Generated: appx/StoreLogo.png" | ||
cp -a "${path_build}/[email protected]" "${path_build}/appx/StoreLogo.png" | ||
echo "Generated: appx/Square44x44Logo.png" | ||
cp -a "${path_build}/[email protected]" "${path_build}/appx/Square44x44Logo.png" | ||
echo "Generated: appx/Square150x150Logo.png" | ||
cp -a "${path_build}/[email protected]" "${path_build}/appx/Square150x150Logo.png" | ||
echo "Generated: appx/Wide310x150Logo.png" | ||
magick "${path_build}/[email protected]" -resize 310x150 -background none -gravity center -extent 310x150 "${path_build}/appx/Wide310x150Logo.png" | ||
|
||
rm -rf "${path_iconset}" | ||
rm -rf ${path_build}/logo@* |