aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-06-14 09:26:23 +0200
committerPřemysl Eric Janouch <p@janouch.name>2024-03-04 16:15:23 +0100
commit7986ee8ae69cd84fcd9f046faeeade64714dcac5 (patch)
tree41c65b59208efc46cd56a2ce3a664315bdf73414
parentd450c6cc5fe4caa2f9a1db3f0ec76c84b6a110af (diff)
downloadxK-7986ee8ae69cd84fcd9f046faeeade64714dcac5.tar.gz
xK-7986ee8ae69cd84fcd9f046faeeade64714dcac5.tar.xz
xK-7986ee8ae69cd84fcd9f046faeeade64714dcac5.zip
Make xF a first-class citizen
-rw-r--r--CMakeLists.txt32
-rw-r--r--README.adoc9
-rw-r--r--xC.adoc2
-rw-r--r--xF.adoc34
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 6784e84..489c48d 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
@@ -77,16 +81,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:
diff --git a/xC.adoc b/xC.adoc
index e2ef827..ec134d0 100644
--- a/xC.adoc
+++ b/xC.adoc
@@ -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)
diff --git a/xF.adoc b/xF.adoc
new file mode 100644
index 0000000..75609bf
--- /dev/null
+++ b/xF.adoc
@@ -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)