diff --git a/CMakeLists.txt b/CMakeLists.txt

index 2f53628d..f2b1e070 100644

--- a/CMakeLists.txt

+++ b/CMakeLists.txt

@@ -74,10 +74,10 @@ option (ENABLE_FRIBIDI_BUILD "Build the GNU FriBidi library (if OFF, try pkg-

option (ENABLE_HARFBUZZ "Use the HarfBuzz library to shape text" ON)

option (ENABLE_HARFBUZZ_MINIMAL "Build the HarfBuzz library with minimal dependencies (if OFF, try pkg-config)" OFF)

option (ENABLE_MPG123 "Use mpg123 for decoding MPEG audio" ON)

+option (ENABLE_OPUS "Use llibopusfile for decoding Opus audio (via pkg-config)" ON)

option (ENABLE_SPARKLE "Use Sparkle for automatic updates (macOS)" OFF)

option (ENABLE_WEBP "Use libwebp to decode .webp images (via pkg-config)" ON)

option (ENABLE_WINSPARKLE "Use WinSparkle for automatic updates (Windows)" OFF)

-option (ENABLE_OPUS "Use llibopusfile for decoding Opus audio (via pkg-config)" ON)



include (BuildType)

include (Resources)

diff --git a/README.md b/README.md

index b4cdf404..c7923130 100644

--- a/README.md

+++ b/README.md

@@ -15,6 +15,7 @@ Like Gemini, Lagrange has been designed with minimalism in mind. It depends on a

+* Curses-based TUI as an alternative to the graphical interface



Downloads

@@ -46,7 +47,7 @@ You need a POSIX-compatible environment to compile Lagrange.

The required tools are a C11 compiler (e.g., Clang or GCC), CMake, pkg-config, and zip. Additional tools are required if HarfBuzz and GNU FriBidi are also compiled as part of the build (see next section for details).



  1. Download and extract a source tarball from [Releases][rel]. Please note that the GitHub/Gitea-generated tarballs do not contain HarfBuzz, GNU FriBidi, or the_Foundation submodules; check which tarball you are downloading. Alternatively, you may also clone the repository and its submodules: git clone --recursive --branch release https://git.skyjake.fi/gemini/lagrange

-2. Check that you have the recommended build tools and dependencies installed: SDL 2, OpenSSL 1.1.1, libpcre, libunistring, GNU FriBidi, and zlib. For example,

+2. Check that you have the recommended build tools and dependencies installed: SDL 2, OpenSSL, libpcre, libunistring, GNU FriBidi, and zlib. For example,

* on macOS using Homebrew: `brew install cmake automake sdl2 openssl@1.1 pcre libunistring fribidi`

* on Ubuntu: `sudo apt install cmake zip libsdl2-dev libssl-dev libpcre3-dev zlib1g-dev libunistring-dev libfribidi-dev`

* on Fedora: `sudo dnf install cmake zip SDL2-devel openssl-devel pcre-devel zlib-devel libunistring-devel fribidi-devel`

@@ -86,6 +87,7 @@ Note that the install target also deploys an XDG .desktop file for launching t

| ------------ | ----------- |

| ENABLE_CUSTOM_FRAME | Draw a custom window frame. (Only on Microsoft Windows.) The custom frame is more in line with the visual style of the rest of the UI, but does not implement all of the native window behaviors (e.g., snapping, system menu). |

| ENABLE_DOWNLOAD_EDIT | Allow changing the Downloads directory via the Preferences dialog. This should be set to OFF in sandboxed environments where downloaded files must be saved into a specific place. |

+| ENABLE_GUI | Build the GUI application (the default). |

| ENABLE_IDLE_SLEEP | Sleep in the main thread instead of waiting for events. On some platforms, when using SDL 2.0.16 or earlier, SDL_WaitEvent() may have a relatively high CPU usage. Setting this to ON polls for events periodically but otherwise keeps the main thread sleeping, reducing CPU usage. The drawback is that there is a slightly increased latency reacting to new events after idle mode ends. |

| ENABLE_FRIBIDI | Use the GNU FriBidi library for processing bidirectional text. FriBidi implements the Unicode Bidirectional Algorithm to determine text directions. |

| ENABLE_FRIBIDI_BUILD | Compile the GNU FriBidi library as part of the build. If set to OFF, pkg-config is used instead to locate the library. |

@@ -93,24 +95,27 @@ Note that the install target also deploys an XDG .desktop file for launching t

| ENABLE_HARFBUZZ_MINIMAL | Build the HarfBuzz library with all dependencies disabled. Useful when building the app for distribution so that the number of deployed dependencies will be minimized. A system-provided version of HarfBuzz is likely built with dependencies on FreeType and ICU at least. If set to OFF, pkg-config will be used to find HarfBuzz. | 

| ENABLE_IPC | Instances of the Lagrange executable communicate via signals or (on Windows) a system-provided IPC mechanism. This is used for controlling an existing Lagrange window via the CLI. If set to OFF, each instance of the app runs without knowledge of other instances. This may cause them to overwrite each other's runtime files. |

| ENABLE_KERNING | Use kerning information in the fonts to adjust glyph placement. Setting this ON improves text appearance in subtle ways but slows down text rendering. It may be a good idea to set this to OFF when running on a slow CPU. This option only affects the simple built-in text renderer, and has no effect on HarfBuzz. |

+| ENABLE_MOBILE_PHONE | Use the mobile phone UI variant. This replaces the sidebars with a sliding sheet and has other touch-friendly features. Settings and dialogs are presented as form-based sheets. |

+| ENABLE_MOBILE_TABLET | Use the tablet UI variant. Sidebars are available as on the desktop, but Settings and dialogs are presented as form-based sheets. |

| ENABLE_MPG123 | Use the mpg123 library for decoding MPEG audio files. |

+| ENABLE_OPUS | Use the opusfile library for decoding Opus audio files. |

| ENABLE_RELATIVE_EMBED | Locate resources only in relation to the executable. Useful when any system/predefined directories are not supposed to be accessed, e.g., in the Windows portable build. |

-| ENABLE_TUI | Build the TUI version (clagrange). The SEALCurses library is required: it is used instead of SDL. |

+| ENABLE_STATIC | Link dependencies statically. |

+| ENABLE_TUI | Build the TUI application (clagrange). The SEALCurses library is required (it replaces SDL); check that the lib/sealcurses submodule is checked out. |

| ENABLE_WEBP | Use libwebp to decode .webp images, if pkg-config can find the library. |

| ENABLE_WINDOWPOS_FIX | Set correct window position after the window has already been shown. This may be necessary on some platforms to prevent the window from being restored to the wrong position. |

| ENABLE_X11_SWRENDER | Default to software rendering when running under X11. By default Lagrange attempts to use the GPU for rendering the user interface. You can also use the --sw option at launch to force software rendering. |

+| ENABLE_X11_XLIB | Use the Xlib API directly under X11. This is used for window decoration color theming, for example. |



Compiling the TUI version



-Lagrange has an optional text-mode interface that enables running the app in the terminal. This is disabled by the default build settings. Setting the ENABLE_TUI option to YES will replace the SDL dependency with a library called SEALCurses that implements the required parts of the SDL API on top of Curses. The resulting executable is called clagrange.

+Lagrange has a text-mode interface that enables running the app in a terminal. However, it is mutually exclusive with the graphical interface, which means that the GUI and TUI are built as separate executables. By default, the TUI is disabled in the build settings. Set the ENABLE_TUI option to YES to build the TUI executable. If the GUI is not needed, you can also set ENABLE_GUI to NO. The TUI executable is called clagrange.



-The requirements for building the TUI version are the same as with the GUI, except ncurses is required instead of SDL. HarfBuzz and all the image and audio dependencies are excluded from the TUI build.

-

-The build-tui.sh helper script is provided for building the TUI version. All command line arguments given to the script are passed to CMake for further configuring the build. Note that the CMake install prefix variable (CMAKE_INSTALL_PREFIX) should not be set via an argument. Instead, the script will prompt for the install directory when run.

+In the TUI build, SDL is replaced with a library called SEALCurses that implements a subset of the SDL API on top of Curses. The requirements for building the TUI are otherwise the same as with the GUI, except HarfBuzz, FriBidi, and all the image and audio dependencies will not be used.



Compiling on macOS



-When using OpenSSL 1.1.1 from Homebrew, you must add its pkgconfig path to your PKG_CONFIG_PATH environment variable, for example:

+When using OpenSSL from Homebrew, you must add its pkgconfig path to your PKG_CONFIG_PATH environment variable, for example:



 export PKG_CONFIG_PATH=/opt/homebrew/Cellar/openssl@1.1/1.1.1i/lib/pkgconfig



Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/release/pcdiff/65bf1605d656a2d0bab8392e78f609c4a2335cee
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
31.294789 milliseconds
Gemini-to-HTML Time
2.764989 milliseconds

This content has been proxied by September (3851b).