diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-06-14 09:26:23 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-11-04 07:40:15 +0100 |
commit | aff4dd6b8715625fdb7250671373bd77b947445d (patch) | |
tree | 6607fee7bd9a2d5c0379e145b9532c23ed0c6d18 | |
parent | b1ee29534562a03b5b74453942241e94df4ef21e (diff) | |
download | xK-aff4dd6b8715625fdb7250671373bd77b947445d.tar.gz xK-aff4dd6b8715625fdb7250671373bd77b947445d.tar.xz xK-aff4dd6b8715625fdb7250671373bd77b947445d.zip |
Make xF a first-class citizen
-rw-r--r-- | CMakeLists.txt | 32 | ||||
-rw-r--r-- | README.adoc | 9 | ||||
-rw-r--r-- | xC.adoc | 2 | ||||
-rw-r--r-- | xF.adoc | 34 |
4 files changed, 69 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2263af0..9afcdf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,6 +176,7 @@ add_custom_command (OUTPUT xC-proto.c add_custom_target (xC-proto DEPENDS ${PROJECT_BINARY_DIR}/xC-proto.c) # Build +set (project_binaries xB xC xD) foreach (name xB xC xD) add_executable (${name} ${name}.c ${project_config}) target_link_libraries (${name} ${project_libraries}) @@ -187,12 +188,13 @@ add_dependencies (xC replies xC-proto) target_link_libraries (xC ${xC_libraries}) if (WANT_XF) - pkg_check_modules (x11 REQUIRED x11 xrender xft fontconfig) - include_directories (${x11_INCLUDE_DIRS}) - link_directories (${x11_LIBRARY_DIRS}) + list (APPEND project_binaries xF) + pkg_check_modules (x11 REQUIRED x11 xrender xft fontconfig libpng) add_executable (xF xF.c ${project_config}) add_dependencies (xF xC-proto) + target_include_directories (xF PRIVATE ${x11_INCLUDE_DIRS}) + target_link_directories (xF PRIVATE ${x11_LIBRARY_DIRS}) target_link_libraries (xF ${x11_LIBRARIES} ${project_libraries}) add_threads (xF) endif () @@ -226,13 +228,33 @@ add_custom_target (clang-tidy WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) # Installation -install (TARGETS xB xC xD DESTINATION ${CMAKE_INSTALL_BINDIR}) +install (TARGETS ${project_binaries} DESTINATION ${CMAKE_INSTALL_BINDIR}) install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) install (DIRECTORY plugins/xB/ DESTINATION ${CMAKE_INSTALL_DATADIR}/xB/plugins USE_SOURCE_PERMISSIONS) install (DIRECTORY plugins/xC/ DESTINATION ${CMAKE_INSTALL_DATADIR}/xC/plugins) +# Rasterize and install SVG icons +if (WANT_XF) + include (IconUtils) + + set (icon_base ${PROJECT_BINARY_DIR}/icons) + set (icon_png_list) + foreach (icon_size 16 32 48) + icon_to_png (xF ${PROJECT_SOURCE_DIR}/xF.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 xF.svg + DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) + install (DIRECTORY ${icon_base} + DESTINATION ${CMAKE_INSTALL_DATADIR}) +endif () + # Generate documentation from text markup find_program (ASCIIDOCTOR_EXECUTABLE asciidoctor) find_program (A2X_EXECUTABLE a2x) @@ -241,7 +263,7 @@ if (NOT ASCIIDOCTOR_EXECUTABLE AND NOT A2X_EXECUTABLE) "falling back to a substandard manual page generator") endif () -foreach (page xB xC xD) +foreach (page ${project_binaries}) set (page_output "${PROJECT_BINARY_DIR}/${page}.1") list (APPEND project_MAN_PAGES "${page_output}") if (ASCIIDOCTOR_EXECUTABLE) diff --git a/README.adoc b/README.adoc index 3cfecb7..3db0db4 100644 --- a/README.adoc +++ b/README.adoc @@ -33,6 +33,10 @@ including link:xC.adoc#_key_bindings[keyboard shortcuts]. image::xP.webp[align="center"] +xF +-- +The X11 frontend for 'xC', still under development. + xD -- The IRC daemon. It is designed for use as a regular user application rather @@ -81,16 +85,17 @@ or as a https://git.janouch.name/p/nixexprs[Nix derivation]. Building -------- Build-only dependencies: CMake, pkg-config, awk, liberty (included), - asciidoctor or asciidoc (recommended but optional) + + asciidoctor or asciidoc (recommended but optional), rsvg-convert (for 'xF') + Common runtime dependencies: openssl + Additionally for 'xC': curses, libffi, readline >= 6.0 or libedit >= 2013-07-12, lua >= 5.3 (optional) + +Additionally for 'xF': x11, xrender, xft, fontconfig, libpng $ git clone --recursive https://git.janouch.name/p/xK.git $ mkdir xK/build $ cd xK/build $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DWANT_READLINE=ON -DWANT_LIBEDIT=OFF -DWITH_LUA=ON + -DWANT_READLINE=ON -DWANT_LIBEDIT=OFF -DWITH_LUA=ON -DWITH_XF=OFF $ make To install the application, you can do either the usual: @@ -124,4 +124,4 @@ or submit pull requests. See also -------- -*less*(1), *readline*(3) or *editline*(7) +*less*(1), *readline*(3) or *editline*(7), *xF*(1) @@ -0,0 +1,34 @@ +xF(1) +===== +:doctype: manpage +:manmanual: xK Manual +:mansource: xK {release-version} + +Name +---- +xF - X11 frontend for xC + +Synopsis +-------- +*xF* [_OPTION_]... RELAY-ADDRESS + +Description +----------- +*xF* is an X11 frontend for the relay interface of the *xC* IRC client. + +Options +------- +*-h*, *--help*:: + Display a help message and exit. + +*-V*, *--version*:: + Output version information and exit. + +Reporting bugs +-------------- +Use https://git.janouch.name/p/xK to report bugs, request features, +or submit pull requests. + +See also +-------- +*xC*(1) |