Simplify icon generation

master
Jonah Brüchert 2020-08-06 21:19:17 +02:00
parent ab43528027
commit f597b3f2d5
No known key found for this signature in database
GPG Key ID: A81E075ABEC80A7E
6 changed files with 13 additions and 18 deletions

View File

@ -154,16 +154,11 @@ if(ANDROID OR WIN32 OR APPLE)
endif()
# Set app icon
if(APPLE)
set(KAIDAN_ICNS "${CMAKE_SOURCE_DIR}/misc/macos/kaidan.icns")
set_source_files_properties(${KAIDAN_ICNS} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
elseif(WIN32)
include(ECMAddAppIcon)
file(GLOB WIN_ICONS_SRCS "${CMAKE_SOURCE_DIR}/misc/windows/*kaidan.png")
message(STATUS ${WIN_ICONS_SRCS})
ecm_add_app_icon(KAIDAN_ICNS ICONS ${WIN_ICONS_SRCS})
message(STATUS ${KAIDAN_ICNS})
endif()
include(ECMAddAppIcon)
file(GLOB ICONS_SRCS "${CMAKE_SOURCE_DIR}/misc/app-icons/*kaidan.png")
message(STATUS ${ICONS_SRCS})
ecm_add_app_icon(KAIDAN_ICNS ICONS ${ICONS_SRCS})
message(STATUS ${KAIDAN_ICNS})
if(QUICK_COMPILER)
qtquick_compiler_add_resources(KAIDAN_QML_QRC src/qml/qml.qrc)

View File

Before

Width:  |  Height:  |  Size: 770 B

After

Width:  |  Height:  |  Size: 770 B

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -19,17 +19,18 @@ androidlogo() {
rendersvg $KAIDAN_SOURCES/data/images/kaidan.svg "$KAIDAN_SOURCES/misc/android/res/mipmap-$1/logo.png" $(( $2 * 4 ))
}
winlogo() {
rendersvg $KAIDAN_SOURCES/data/images/kaidan.svg "$KAIDAN_SOURCES/misc/windows/$1-kaidan.png" $1
optipng -o9 "$KAIDAN_SOURCES/misc/windows/$1-kaidan.png"
# App icons for ECM
app_icon() {
rendersvg $KAIDAN_SOURCES/data/images/kaidan.svg "$KAIDAN_SOURCES/misc/app-icons/$1-kaidan.png" $1
optipng -o9 "$KAIDAN_SOURCES/misc/app-icons/$1-kaidan.png"
}
mkdir -p $KAIDAN_SOURCES/misc/windows
winlogo 16
winlogo 32
winlogo 48
winlogo 256
app_icon 16
app_icon 32
app_icon 48
app_icon 256
androidlogo ldpi 36
androidlogo mdpi 48
@ -37,4 +38,3 @@ androidlogo hdpi 72
androidlogo xhdpi 96
androidlogo xxhdpi 144
androidlogo xxxhdpi 192