1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(flatpak): use SVG for icon

Flatpak doesn't allow compressed SVGs as icons because this is against
the specification.
This commit is contained in:
sudden6 2019-02-09 12:02:56 +01:00
parent d2508e7eac
commit 489027ea1e
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
3 changed files with 14 additions and 5 deletions

View File

@ -12,6 +12,7 @@ option(USE_FILTERAUDIO "Enable the echo canceling backend" ON)
option(UPDATE_CHECK "Enable automatic update check" ON)
option(USE_CCACHE "Use ccache when available" ON)
option(SPELL_CHECK "Enable spell cheching support" ON)
option(SVGZ_ICON "Compress the SVG icon of qTox" ON)
option(ASAN "Compile with AddressSanitizer" OFF)
# process generated files if cmake >= 3.10

View File

@ -46,10 +46,17 @@ else()
install(FILES ${path_from} DESTINATION ${path_to})
endforeach(size)
# process the icon, compress if enabled
set(SVG_SRC "${CMAKE_SOURCE_DIR}/img/icons/qtox.svg")
set(SVG_GZIP "${CMAKE_BINARY_DIR}/qtox.svgz")
install(CODE "
execute_process(COMMAND gzip -S z INPUT_FILE ${SVG_SRC} OUTPUT_FILE ${SVG_GZIP})
" COMPONENT Runtime)
install(FILES "${SVG_GZIP}" DESTINATION "share/icons/hicolor/scalable/apps")
if(${SVGZ_ICON})
set(SVG_GZIP "${CMAKE_BINARY_DIR}/qtox.svgz")
install(CODE "
execute_process(COMMAND gzip -S z INPUT_FILE ${SVG_SRC} OUTPUT_FILE ${SVG_GZIP})
" COMPONENT Runtime)
set(SVG_DEST "${SVG_GZIP}")
else()
set(SVG_DEST "${SVG_SRC}")
endif()
install(FILES "${SVG_DEST}" DESTINATION "share/icons/hicolor/scalable/apps")
endif()

View File

@ -145,6 +145,7 @@
{
"name": "qTox",
"buildsystem": "cmake-ninja",
"config-opts": ["-DSVGZ_ICON=OFF"],
"sources": [
{
"type": "dir",