From 3c96448bcfbada82b4a8739dd216205920ee3ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Sat, 10 Feb 2024 11:06:55 +0100 Subject: Bump liberty, add an icon --- CMakeLists.txt | 18 +++++++++++++++++- LICENSE | 2 +- README.adoc | 7 ++++--- hex.svg | 10 ++++++++++ liberty | 2 +- 5 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 hex.svg diff --git a/CMakeLists.txt b/CMakeLists.txt index 52a5c5d..26ea1a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,7 @@ if (WITH_LUA) endif () endif () -pkg_check_modules (x11 x11 xrender xft fontconfig) +pkg_check_modules (x11 x11 xrender xft fontconfig libpng) option (WITH_X11 "Build with X11 support" ${x11_FOUND}) if (WITH_X11) if (NOT x11_FOUND) @@ -110,6 +110,22 @@ if (WITH_LUA) DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) endif () if (WITH_X11) + include (IconUtils) + + set (icon_base ${PROJECT_BINARY_DIR}/icons) + set (icon_png_list) + foreach (icon_size 16 32 48) + icon_to_png (${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}.svg + ${icon_size} ${icon_base} icon_png) + list (APPEND icon_png_list ${icon_png}) + endforeach () + + add_custom_target (icons ALL DEPENDS ${icon_png_list}) + + install (FILES ${PROJECT_NAME}.svg + DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) + install (DIRECTORY ${icon_base} + DESTINATION ${CMAKE_INSTALL_DATADIR}) install (FILES ${PROJECT_NAME}.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) endif () diff --git a/LICENSE b/LICENSE index 7b6617a..d5d26bc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016 - 2023, Přemysl Eric Janouch +Copyright (c) 2016 - 2024, Přemysl Eric Janouch Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. diff --git a/README.adoc b/README.adoc index 37ac4b6..3722cce 100644 --- a/README.adoc +++ b/README.adoc @@ -23,10 +23,11 @@ The rest of this README will concern itself with externalities. Building and Running -------------------- -Build dependencies: CMake, pkg-config, awk, liberty (included), - termo (included), asciidoctor or asciidoc (recommended but optional) + +Build-only dependencies: CMake, pkg-config, awk, liberty (included), + termo (included), asciidoctor or asciidoc (recommended but optional), + rsvg-convert (X11) + Runtime dependencies: ncursesw, libunistring, Lua >= 5.3 (for highlighting) + -Optional runtime dependencies: x11, xft +Optional runtime dependencies: x11 + xft + libpng (X11) $ git clone --recursive https://git.janouch.name/p/hex.git $ mkdir hex/build diff --git a/hex.svg b/hex.svg new file mode 100644 index 0000000..9868180 --- /dev/null +++ b/hex.svg @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/liberty b/liberty index 4c28746..1966b81 160000 --- a/liberty +++ b/liberty @@ -1 +1 @@ -Subproject commit 4c2874649d4b1d2414793d60915d309f0bf67117 +Subproject commit 1966b81b4d51998666c81e4618d42c25712f17a1 -- cgit v1.2.3