### Install Binaries Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Installs the main Eternal Terminal executables to the system's binary directory with specific permissions. ```cmake install( TARGETS etserver etterminal et htm htmd PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION "bin") ``` -------------------------------- ### Install Eternal Terminal on Ubuntu using PPA Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Add the Eternal Terminal PPA and install `et` on Ubuntu systems. This method ensures you get the latest stable version. ```bash sudo add-apt-repository ppa:jgmath2000/et sudo apt-get update sudo apt-get install et ``` -------------------------------- ### Install Eternal Terminal on openSUSE Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Add the Eternal Terminal Open Build Service repository, refresh repositories, and install EternalTerminal on openSUSE. ```bash zypper ar -f obs://network zypper ref zypper in EternalTerminal ``` -------------------------------- ### Build and Install Eternal Terminal from Source Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Clone the repository, navigate to the directory, create a build directory, configure with CMake, compile, and install Eternal Terminal from source. ```bash git clone --recurse-submodules --depth 1 https://github.com/MisterTea/EternalTerminal.git cd EternalTerminal mkdir build cd build cmake ../ make sudo make install ``` -------------------------------- ### Install Eternal Terminal on FreeBSD Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Install Eternal Terminal on FreeBSD using the `pkg` package manager. ```bash pkg install eternalterminal ``` -------------------------------- ### Install macOS Dependencies and Build Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Installs necessary dependencies using Homebrew and builds Eternal Terminal from source on macOS. ```bash brew install autoconf automake libtool git clone --recurse-submodules --depth 1 https://github.com/MisterTea/EternalTerminal.git cd EternalTerminal mkdir build cd build cmake ../ make -j$(nproc) && sudo make install ``` -------------------------------- ### Install Dependencies for Eternal Terminal on Gentoo Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Install the necessary development dependencies for building Eternal Terminal from source on Gentoo systems. ```bash sudo emerge dev-libs/boost dev-libs/libsodium \ dev-libs/protobuf dev-util/cmake dev-cpp/gflags ``` -------------------------------- ### Install Debian/Ubuntu Dependencies Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Installs the required development packages for building Eternal Terminal on Debian-based systems. ```bash sudo apt install libsodium-dev autoconf libtool libprotobuf-dev protobuf-compiler libutempter-dev libcurl4-openssl-dev build-essential ninja-build cmake git zip pkg-config ``` -------------------------------- ### Install Bash Completion Script Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Installs the bash completion script for the 'et' command if BashCompletion is found and a completion directory is available. ```cmake find_package(BashCompletion QUIET) if(NOT BASH_COMPLETION_COMPLETIONSDIR) find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_get_variable(BASH_COMPLETION_COMPLETIONSDIR bash-completion completionsdir) endif() endif() if(BASH_COMPLETION_COMPLETIONSDIR) install(FILES scripts/et-completion.bash RENAME et DESTINATION ${BASH_COMPLETION_COMPLETIONSDIR}) else() message(WARNING "Could not find bash completion directory. Skipping installation of bash completion script.") endif() ``` -------------------------------- ### Verify ET Client Installation Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Check if the 'et' executable is available in your system's PATH. ```bash which et ``` -------------------------------- ### Manual et Server Service File Update Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Provides an example of the corrected ExecStart line for the et server systemd service file. ```bash ExecStart=/usr/local/bin/etserver --cfgfile=/etc/et.cfg --logtostdout ``` -------------------------------- ### Verify ET Server Installation and Status Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Check the status of the Eternal Terminal server service. You may need to enable and start it manually. ```bash systemctl status et ``` ```bash sudo systemctl enable --now et ``` -------------------------------- ### Install Zsh Completion Script Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Installs the Zsh completion script for the 'et' command to the site-functions directory. ```cmake if(NOT ZSH_COMPLETIONS_DIR) include(GNUInstallDirs) set(ZSH_COMPLETIONS_DIR "${CMAKE_INSTALL_DATAROOTDIR}/zsh/site-functions") endif() install(FILES scripts/et-completion.zsh RENAME _et DESTINATION ${ZSH_COMPLETIONS_DIR}) ``` -------------------------------- ### Reverse Port Forwarding Examples Source: https://github.com/mistertea/eternalterminal/blob/master/docs/protocol.md These commands demonstrate various ways to configure reverse port forwarding, specifying single ports, multiple ports, and Unix sockets. ```bash et -x -r 8080:8080 user@myhost ``` ```bash et -x -r 22:2222 user@myhost ``` ```bash et -x -r 5037:5037 user@myhost ``` ```bash et -x -r 5037:5037,8080:8080 user@myhost ``` ```bash et -x -r ENV_VAR_NAME:/var/run/example.sock user@myhost ``` -------------------------------- ### Install Eternal Terminal with Homebrew on macOS Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Use this command to install `et` on macOS using Homebrew. Ensure Homebrew is installed first. ```bash brew install et ``` -------------------------------- ### Install Eternal Terminal on CentOS 8 Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Install `et` on CentOS 8 by enabling the EPEL repository and then installing the package. ```bash sudo dnf install epel-release sudo dnf install et ``` -------------------------------- ### Install CentOS 7 Dependencies Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Installs essential development libraries and tools for building Eternal Terminal on CentOS 7. ```bash sudo yum install epel-release sudo yum install cmake3 boost-devel libsodium-devel protobuf-devel protobuf-compiler gflags-devel protobuf-lite-devel libcurl-devel perl-IPC-Cmd perl-Data-Dumper libunwind-devel libutempter-devel ``` -------------------------------- ### Install Dependencies for Eternal Terminal on Fedora Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Install the necessary development dependencies for building Eternal Terminal from source on Fedora systems. ```bash sudo dnf install boost-devel libsodium-devel protobuf-devel \ protobuf-compiler cmake gflags-devel libcurl-devel ``` -------------------------------- ### Install Eternal Terminal on Fedora Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Install `et` on Fedora systems (version 29 and later) using `dnf`. ```bash sudo dnf install et ``` -------------------------------- ### NixOS configuration with EternalTerminal module Source: https://github.com/mistertea/eternalterminal/blob/master/NIXOS-readme.md Example NixOS configuration using a flake input for EternalTerminal. This imports the NixOS module and adds the client tools to the system's PATH. ```nix { inputs.et.url = "github:MisterTea/EternalTerminal"; outputs = { nixpkgs, et, ... }: { nixosConfigurations.my-host = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ et.nixosModules.default ({ pkgs, ... }: { environment.systemPackages = [ et.packages.${pkgs.stdenv.hostPlatform.system}.default ]; services.eternalTerminal = { enable = true; openFirewall = true; port = 2022; settings.Networking.bind_ip = "0.0.0.0"; }; }) ]; }; }; } ``` -------------------------------- ### Install Eternal Terminal with MacPorts Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Install `et` on macOS using MacPorts. This is an alternative to Homebrew. ```bash sudo port install et ``` -------------------------------- ### Enable vcpkg Toolchain Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Sets the CMake toolchain file to use vcpkg for managing dependencies. Also sets vcpkg installation options. ```cmake set(CMAKE_TOOLCHAIN_FILE "${EXTERNAL_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake") set(VCPKG_INSTALL_OPTIONS "--allow-unsupported") ``` -------------------------------- ### CPack Package Configuration Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Sets CPack variables for package name, vendor, summary, version, and installation directory. ```cmake set(CPACK_PACKAGE_NAME "EternalTerminal") set(CPACK_PACKAGE_VENDOR "https://github.com/MisterTea/EternalTerminal") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Remote terminal for the busy and impatient") set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) set(CPACK_PACKAGE_INSTALL_DIRECTORY "EternalTerminal") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") ``` -------------------------------- ### Disable httplib Installation Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Prevents the installation of httplib files. ```cmake set(HTTPLIB_INSTALL OFF) ``` -------------------------------- ### NixOS Configuration for Eternal Terminal Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Example NixOS configuration using flakes to enable Eternal Terminal, manage its configuration, and the `etserver` service. This allows declarative management of the service. ```nix { inputs.et.url = "github:MisterTea/EternalTerminal"; outputs = { nixpkgs, et, ... }: { nixosConfigurations.my-host = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ et.nixosModules.default ({ ... }: { services.eternalTerminal = { enable = true; openFirewall = true; port = 2022; settings.Networking.bind_ip = "0.0.0.0"; }; }) ]; }; }; } ``` -------------------------------- ### Install CentOS 7 SCL Dependencies Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Installs Software Collections (SCL) for development toolsets required for building Eternal Terminal on CentOS 7. ```bash sudo yum install centos-release-scl sudo yum install devtoolset-11 devtoolset-11-libatomic-devel rh-git227 ``` -------------------------------- ### Build Eternal Terminal on CentOS 7 with SCL Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Clones the source, configures the build using SCL-enabled toolsets, and installs Eternal Terminal on CentOS 7. ```bash git clone --recurse-submodules --depth 1 https://github.com/MisterTea/EternalTerminal.git cd EternalTerminal mkdir build cd build scl enable devtoolset-11 rh-git227 'cmake3 ../' scl enable devtoolset-11 'make && sudo make install' sudo cp ../systemctl/et.service /etc/systemd/system/ sudo cp ../etc/et.cfg /etc/ ``` -------------------------------- ### Install Eternal Terminal on Debian using deb repo Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Add the Eternal Terminal deb repository and install `et` on Debian systems. This method is suitable for Debian 11 or older as well. ```bash echo "deb [signed-by=/etc/apt/keyrings/et.gpg] https://mistertea.github.io/debian-et/debian-source/ $(grep VERSION_CODENAME /etc/os-release | cut -d= -f2) main" | sudo tee -a /etc/apt/sources.list.d/et.list sudo mkdir -m 0755 -p /etc/apt/keyrings # only if you're using Debian 11 or older curl -sSL https://github.com/MisterTea/debian-et/raw/master/et.gpg | sudo tee /etc/apt/keyrings/et.gpg >/dev/null sudo apt update sudo apt install et ``` -------------------------------- ### Get Code Coverage Source: https://github.com/mistertea/eternalterminal/blob/master/AGENTS.md Generate code coverage reports using the coverage.sh script. ```bash bash coverage.sh ``` -------------------------------- ### SSH Config for Non-Standard Ports and Jumphosts Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Example SSH configuration file to manage connections to servers with non-standard SSH ports and through jumphosts. ```ssh-config Host dev HostName 192.168.1.1 User fred Port 5555 ProxyJump user@jumphost.example.org:22 ``` -------------------------------- ### Forward Port Forwarding Commands Source: https://github.com/mistertea/eternalterminal/blob/master/docs/protocol.md Examples of using the `et` command with the `-t` flag to establish forward port forwarding. Specify source and destination ports or ranges for the tunnel. ```bash et -x -t 8080:8080 user@myhost ``` ```bash et -x -t 2222:22 user@myhost ``` ```bash et -x -t 8080:8080,2222:22 user@myhost ``` ```bash et -x -t 8080-8089:8080-8089 user@myhost ``` -------------------------------- ### Set Default Install Prefix for Non-Apple/Windows Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Sets the default CMAKE_INSTALL_PREFIX to '/usr' if it has not been changed and the build is not on Apple or Windows. ```cmake IF(NOT APPLE AND NOT WIN32) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install prefix" FORCE) endif() ENDIF() ``` -------------------------------- ### Reload systemd and Start et Service Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Reloads systemd daemon configurations and enables/starts the et service on CentOS 7. ```bash sudo systemctl daemon-reload sudo systemctl enable --now et.service ``` -------------------------------- ### CPack Generator and Debian Settings Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Configures the CPack generator and specific settings for Debian packages, including control files, installed directories, maintainer, and dependencies. ```cmake if(NOT CPACK_GENERATOR) SET(CPACK_GENERATOR "STGZ;TGZ;TZ;DEB") endif() SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/debian/postinst;${CMAKE_SOURCE_DIR}/debian/postrm;${CMAKE_SOURCE_DIR}/debian/prerm") SET(CPACK_INSTALLED_DIRECTORIES "${CMAKE_SOURCE_DIR}/systemctl;/lib/systemd/system" "${CMAKE_SOURCE_DIR}/etc;/etc") SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Unmaintained") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libprotobuf-dev, libc6 (>= 2.34), libgcc-s1 (>= 3.3.1), libstdc++6 (>= 12), libutempter0 (>= 1.1.5)") SET(CPACK_DEBIAN_PACKAGE_SUGGESTS "systemd") ``` -------------------------------- ### Configure etserver Daemon on x86 Macs Source: https://github.com/mistertea/eternalterminal/blob/master/README.md This command configures the `etserver` daemon to launch on boot for x86 Macs. It involves copying and loading a launchd property list file. ```bash sudo cp ../init/launchd/homebrew.mxcl.et.plist /Library/LaunchDaemons/homebrew.mxcl.et.plist sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.et.plist ``` -------------------------------- ### Configure etserver Daemon on M1 Macs Source: https://github.com/mistertea/eternalterminal/blob/master/README.md This command configures the `etserver` daemon to launch on boot for Apple Silicon (M1) Macs. It involves copying and loading a launchd property list file. ```bash sudo sed 's:/usr/local/bin/etserver:/opt/homebrew/bin/etserver:g' ../init/launchd/homebrew.mxcl.et.plist | sudo tee /Library/LaunchDaemons/homebrew.mxcl.et.plist sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.et.plist ``` -------------------------------- ### Configure Port Forwarding and Remote Command Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Use ET to set up port forwarding pairs and execute a command immediately after connection. ```bash et hostname -t "18000:8000, 18001-18003:8001-8003" -c "your_command" ``` -------------------------------- ### Run Deploy Script in Docker Source: https://github.com/mistertea/eternalterminal/blob/master/docs/creating_release.md Execute the deployment script for Ubuntu PPA within a Docker container. ```bash deploy_ubuntu_ppa.sh ``` -------------------------------- ### Build et-server Docker Image Source: https://github.com/mistertea/eternalterminal/blob/master/docker/README.md Builds the Docker image for the et-server using the make command. Lists the created Docker images. ```bash make ``` ```bash docker images |grep et-.* ``` -------------------------------- ### Build All Debian Packages Source: https://github.com/mistertea/eternalterminal/blob/master/docs/creating_release.md Build all Debian packages within a Vagrant VM. ```bash build_all_deb.sh ``` -------------------------------- ### Run Linting Source: https://github.com/mistertea/eternalterminal/blob/master/AGENTS.md Check code style and quality using the format.sh script. ```bash bash format.sh ``` -------------------------------- ### Build and Package Eternal Terminal on Debian/Ubuntu Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Fetches the source code, configures the build for Debian packaging, and creates a .deb package. Includes a check for ARM architecture. ```bash git clone --recurse-submodules --depth 1 https://github.com/MisterTea/EternalTerminal.git cd EternalTerminal mkdir build cd build # For ARM (including OS/X with apple silicon): if [[ $(uname -a | grep 'arm|aarch64') ]]; then export VCPKG_FORCE_SYSTEM_BINARIES=1; fi cmake -DCPACK_GENERATOR=DEB ../ make -j$(nproc) package sudo dpkg --install *.deb ``` -------------------------------- ### Run Unit Tests Source: https://github.com/mistertea/eternalterminal/blob/master/AGENTS.md Execute unit tests using ninja and ctest. Ensure you are in the build directory. ```bash pushd build; ninja && ctest --parallel; popd ``` -------------------------------- ### Connect via Jumphost (Custom Ports) Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Connect to an ET server through a jumphost, specifying custom ports for both the target server and the jumphost. ```bash et hostname:8888 --jumphost jump_hostname --jport 9999 ``` -------------------------------- ### Enter Nix development shell Source: https://github.com/mistertea/eternalterminal/blob/master/NIXOS-readme.md Enter a development shell with all necessary package inputs and developer tools for working on EternalTerminal within NixOS. ```bash nix develop path:. ``` -------------------------------- ### Connect via Jumphost (Default Ports) Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Connect to an ET server through a jumphost, assuming both the target server and jumphost use the default ET port (2022). ```bash et hostname --jumphost jump_hostname ``` -------------------------------- ### Show Nix flake outputs Source: https://github.com/mistertea/eternalterminal/blob/master/NIXOS-readme.md Use this command to inspect the available outputs from the Nix flake, such as packages and development shells. ```bash nix flake show path:. ``` -------------------------------- ### Connect to ET Server (Default Port, Same User) Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Connect to an ET server running on the default port (2022) using the same username as the current local user. ```bash et hostname ``` -------------------------------- ### Configure macOS et Server Service Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Copies the launchd plist file to the correct location and loads the et server service for persistent operation on macOS. ```bash sudo cp ../init/launchd/homebrew.mxcl.et.plist /Library/LaunchDaemons sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.et.plist ``` -------------------------------- ### Build Nix package Source: https://github.com/mistertea/eternalterminal/blob/master/NIXOS-readme.md Build the EternalTerminal package using Nix. The --no-link flag prevents creating a symlink in the Nix store's result directory. ```bash nix build path:. --no-link ``` -------------------------------- ### Add Static Library 'et-lib' Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Defines a static library named 'et-lib' and lists its source files, including easylogging++ and PlatformFolders. ```cmake add_library( et-lib STATIC ${EXTERNAL_DIR}/easyloggingpp/src/easylogging++.h ${EXTERNAL_DIR}/easyloggingpp/src/easylogging++.cc ${EXTERNAL_DIR}/PlatformFolders/sago/platform_folders.cpp ) ``` -------------------------------- ### Build Project with CMake in Nix Source: https://github.com/mistertea/eternalterminal/blob/master/2026-03-28-pr.md Builds the project using CMake within a Nix development shell, utilizing Ninja as the generator and parallelizing the build process. ```bash nix develop path:. --command bash -lc 'cmake --build build -j"$(nproc)"' ``` -------------------------------- ### Update et Server Service File Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Uses sed to automatically update the ExecStart line in the systemd service file with the correct etserver path. ```bash sudo sed -ie "s|ExecStart=[^[:space:]]*[[:space:]]|ExecStart=$(which etserver) |" /etc/systemd/system/et.service ``` -------------------------------- ### Include Directories for External Libraries (if VCPKG is disabled) Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Specifies include directories for external libraries when VCPKG is disabled, including system includes for cpp-httplib. ```cmake include_directories( SYSTEM ${EXTERNAL_DIR}/cpp-httplib ) include_directories( ${EXTERNAL_DIR}/simpleini ${EXTERNAL_DIR}/json/include ${EXTERNAL_DIR}/cxxopts/include ) ``` -------------------------------- ### Connect to ET Server (Custom Port, Different User) Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Connect to an ET server running on a custom port (e.g., 8000) and specify a different username. ```bash et user@hostname:8000 ``` -------------------------------- ### Include Directories Configuration Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Configures include directories for various external libraries and project source directories. ```cmake include_directories( ${EXTERNAL_DIR}/easyloggingpp/src ${EXTERNAL_DIR}/PlatformFolders ${EXTERNAL_DIR}/ThreadPool ${EXTERNAL_DIR}/sole ${EXTERNAL_DIR}/base64 src/base src/terminal src/terminal/forwarding src/htm ${PROTOBUF_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CURSES_INCLUDE_DIR} ${sodium_INCLUDE_DIR} ${SELINUX_INCLUDE_DIR} ${UTEMPTER_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${SIMPLEINI_INCLUDE_DIRS} ) if(NOT ANDROID) include_directories(${EXTERNAL_DIR}/UniversalStacktrace/ust) endif() ``` -------------------------------- ### Enable Unicode Definitions for Windows Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Adds definitions for UNICODE and _UNICODE when building on Windows to enable Unicode support. ```cmake if(WIN32) # Enable unicode add_definitions(-DUNICODE) add_definitions(-D_UNICODE) endif() ``` -------------------------------- ### Test Target Configuration Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Configures the 'et-test' executable, linking necessary libraries and setting up test discovery with Catch2. ```cmake add_dependencies(et-test generated-code TerminalCommon et-lib) target_link_libraries( et-test LINK_PUBLIC TerminalCommon et-lib Catch2::Catch2WithMain ${CMAKE_THREAD_LIBS_INIT} ${PROTOBUF_LIBS} ${sodium_LIBRARY_RELEASE} ${SELINUX_LIBRARIES} ${UTEMPTER_LIBRARIES} ${Boost_LIBRARIES} ${CORE_LIBRARIES}) catch_discover_tests( et-test TEST_PREFIX "et-test." WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ADD_TAGS_AS_LABELS PROPERTIES TIMEOUT 300 ) add_sanitizers(et-test) if(TARGET test) add_dependencies(test et-test) endif() ``` -------------------------------- ### Configure Project with CMake in Nix Source: https://github.com/mistertea/eternalterminal/blob/master/2026-03-28-pr.md Configures the project using CMake within a Nix development shell, disabling VCPKG and telemetry for a cleaner build environment. ```bash nix develop path:. --command bash -lc 'cmake -S . -B build -GNinja -DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON' ``` -------------------------------- ### Connect using SSH Config (Default ET Port) Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Connect to a host defined in your SSH config file, assuming the ET server is running on the default port (2022) on both the target and jumphost. ```bash et dev ``` -------------------------------- ### Add New Release Entry to Changelog Source: https://github.com/mistertea/eternalterminal/blob/master/docs/creating_release.md Edit the changelog file to include an entry for the new release. ```bash deployment/debian_SOURCE/changelog ``` -------------------------------- ### Connect using SSH Config (Custom Jumphost ET Port) Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Connect to a host defined in your SSH config file, specifying a custom port for the ET server running on the jumphost. ```bash et dev:8000 -jport 9000 ``` -------------------------------- ### Add External Libraries via Subdirectory (if VCPKG is disabled) Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Adds external libraries like Catch2, cxxopts, cpp-httplib, and json as subdirectories when VCPKG is disabled. ```cmake add_subdirectory(${EXTERNAL_DIR}/Catch2) add_subdirectory(${EXTERNAL_DIR}/cxxopts) add_subdirectory(${EXTERNAL_DIR}/cpp-httplib) add_subdirectory(${EXTERNAL_DIR}/json) ``` -------------------------------- ### Configure Protobuf Static Libraries Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Sets the option to use static libraries for Protocol Buffers. ```cmake set(Protobuf_USE_STATIC_LIBS ON) ``` -------------------------------- ### Find etserver Binary Location Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Determines the full path to the etserver executable on CentOS 7. ```bash which etserver ``` -------------------------------- ### Find Packages via CONFIG (if VCPKG is enabled) Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Finds packages using the CONFIG mode when VCPKG is enabled, requiring configuration files for each package. ```cmake find_package(Catch2 CONFIG REQUIRED) find_package(httplib CONFIG REQUIRED) find_package(cxxopts CONFIG REQUIRED) find_package(nlohmann_json CONFIG REQUIRED) ``` -------------------------------- ### Define Project and Languages Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Defines the project name, version, and the programming languages used (C and C++). ```cmake project(EternalTCP VERSION 6.2.11 LANGUAGES C CXX) ``` -------------------------------- ### View EternalTerminal service logs Source: https://github.com/mistertea/eternalterminal/blob/master/NIXOS-readme.md View the logs for the EternalTerminal service using journalctl. This helps in debugging issues by examining the service's output and errors. ```bash journalctl -u eternal-terminal -b ``` -------------------------------- ### Find SimpleINI Include Directory Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Locates the include directory for the SimpleINI library by searching for a specific file. ```cmake find_path(SIMPLEINI_INCLUDE_DIRS "ConvertUTF.c") ``` -------------------------------- ### etterminal Launch Command Source: https://github.com/mistertea/eternalterminal/blob/master/docs/protocol.md This command is used by the 'et' client to launch the 'etterminal' process on the server. It includes client ID, passkey, and terminal type, with 'XXX' prefix indicating regeneration. ```sh echo 'XXX1234567890123/12345678901234567890123456789012_xterm-256color' | etterminal ``` -------------------------------- ### Check EternalTerminal service status Source: https://github.com/mistertea/eternalterminal/blob/master/NIXOS-readme.md Use systemctl to check the status of the EternalTerminal service. This is useful for verifying if the server is running correctly. ```bash systemctl status eternal-terminal ``` -------------------------------- ### Set C++ Standard to 17 Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Enables C++17 standard and marks it as required for the project. ```cmake # Enable C++-17 set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) ``` -------------------------------- ### Set Windows vcpkg Target Triplet Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Configures the vcpkg target triplet for Windows builds, specifically for a static x64 runtime. Also enables static runtime for protobuf. ```cmake if(WIN32) set(VCPKG_TARGET_TRIPLET "x64-windows-static" CACHE STRING "VCPKG Triplet") set(protobuf_MSVC_STATIC_RUNTIME ON) endif() ``` -------------------------------- ### Find Protobuf and ABSL Libraries Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Sets the Protobuf library target and conditionally finds ABSL and utf8_range libraries if Protobuf version is 4 or greater. ```cmake set(PROTOBUF_LIBS protobuf::libprotobuf) if(Protobuf_VERSION VERSION_GREATER_EQUAL 4) find_package(absl REQUIRED) find_package(utf8_range CONFIG REQUIRED) set(PROTOBUF_LIBS ${PROTOBUF_LIBS} absl::log_internal_check_op utf8_range::utf8_validity utf8_range::utf8_range) endif() ``` -------------------------------- ### Create GitHub Release Tag Source: https://github.com/mistertea/eternalterminal/blob/master/docs/creating_release.md Tag the latest commit for a GitHub release. Replace A.B.C with the major.minor.patch version. ```bash et-vA.B.C ``` -------------------------------- ### Define Core Libraries Based on Platform Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Defines the list of core libraries to link against, varying based on the target operating system (Android, FreeBSD, NetBSD, Windows, Apple, or generic Unix-like). ```cmake if(ANDROID) set(CORE_LIBRARIES OpenSSL::SSL ZLIB::ZLIB util) elseif(FREEBSD) set(CORE_LIBRARIES OpenSSL::SSL ZLIB::ZLIB util execinfo) elseif(NETBSD) set(CORE_LIBRARIES OpenSSL::SSL ZLIB::ZLIB util resolv execinfo) elseif(WIN32) set(CORE_LIBRARIES OpenSSL::SSL ZLIB::ZLIB Ws2_32 Shlwapi dbghelp) elseif(APPLE) set(CORE_LIBRARIES OpenSSL::SSL ZLIB::ZLIB util resolv) else() set(CORE_LIBRARIES httplib::httplib cxxopts::cxxopts nlohmann_json::nlohmann_json OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB util resolv atomic stdc++fs ) endif() ``` -------------------------------- ### Run et-server Docker Container Source: https://github.com/mistertea/eternalterminal/blob/master/docker/README.md Runs the et-server Docker container, mapping host ports to container ports and mounting necessary volumes for SSH and user data. ```bash docker run -it --rm -p 2022:2022 -p 2222:22 \ -v /etc/ssh:/etc/ssh \ -v /etc/passwd:/etc/passwd \ -v /etc/shadow:/etc/shadow \ -v /etc/group:/etc/group \ -v /home:/home \ et-server ``` -------------------------------- ### Configure MSVC Runtime Library Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Sets the MSVC runtime library for Visual Studio builds, including debug configurations. ```cmake if(MSVC) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") endif() ``` -------------------------------- ### Run Tests with CTest in Nix Source: https://github.com/mistertea/eternalterminal/blob/master/2026-03-28-pr.md Executes project tests using CTest within a Nix development shell, parallelizing test execution for faster feedback. ```bash nix develop path:. --command bash -lc 'ctest --test-dir build --parallel "$(nproc)"' ``` -------------------------------- ### Configure SSH Client for et-server Source: https://github.com/mistertea/eternalterminal/blob/master/docker/README.md Adds a configuration to the client's SSH config file to connect to the et-server using a specific host alias and port. ```bash Host myhost Port 2222 ``` -------------------------------- ### Client Connection Sequence Diagram Source: https://github.com/mistertea/eternalterminal/blob/master/docs/protocol.md Visualizes the sequence of messages exchanged between the Eternal Terminal client (et), server (etserver), and terminal during the connection process. ```mermaid sequenceDiagram participant et participant etserver participant etterminal et->>etserver: ConnectRequest (client id, version) Note right of etserver: Match client id with terminal etserver->>et: ConnectResponse et->>etserver: InitialPayload etserver->>et: InitialResponse Note left of et: Connection complete et->>etserver: TerminalBuffer input (encrypted) etserver-->etterminal: terminal in/out etserver->>et: TerminalBuffer output (encrypted) ``` -------------------------------- ### Handle Missing Boost Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Sets Boost include directory and libraries to empty if Boost is not found, preventing build errors. ```cmake if(NOT Boost_FOUND) set(Boost_INCLUDE_DIR "") set(Boost_LIBRARIES "") endif() ``` -------------------------------- ### Configure Easylogging++ Flags Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Sets C++ compiler flags for easylogging++ to disable default log files, enable crash logs, ensure thread safety, and catch C++ exceptions. Also defines SENTRY_BUILD_STATIC for static Sentry builds. ```cmake set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DELPP_NO_DEFAULT_LOG_FILE -DELPP_FEATURE_CRASH_LOG -DELPP_THREAD_SAFE -DELPP_STRICT_PERMISSIONS -DSENTRY_BUILD_STATIC" ) ``` -------------------------------- ### Target Decoration Macro Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt A macro to apply common sanitizers and precompile headers to a target. ```cmake macro(DECORATE_TARGET TARGET_NAME) add_sanitizers(${TARGET_NAME}) target_precompile_headers(${TARGET_NAME} PUBLIC "src/base/Headers.hpp") endmacro() ``` -------------------------------- ### Generate Protocol Buffer C++ Code Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Generates C++ source and header files from Protocol Buffer definition files (.proto). ```cmake protobuf_generate_cpp(ET_SRCS ET_HDRS proto/ET.proto) set_source_files_properties(${ET_SRCS} ${ET_HDRS} PROPERTIES GENERATED TRUE) protobuf_generate_cpp(ETERMINAL_SRCS ETERMINAL_HDRS proto/ETerminal.proto) set_source_files_properties(${ETERMINAL_SRCS} ${ETERMINAL_HDRS} PROPERTIES GENERATED TRUE) add_custom_target(generated-code DEPENDS ${ET_SRCS} ${ET_HDRS} ${ETERMINAL_SRCS} ${ETERMINAL_HDRS}) ``` -------------------------------- ### Enable Debug Info for Unix Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Enables debug information flags (-g -ggdb3) for C++ and C compilers on Unix-like systems. ```cmake if(UNIX) # Enable debug info set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -ggdb3") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -ggdb3") endif() ``` -------------------------------- ### Find Required Packages Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Finds and makes required packages available for the build. These are essential dependencies. ```cmake find_package(ZLIB REQUIRED) find_package(OpenSSL REQUIRED) find_package(Sanitizers REQUIRED) find_package(Threads REQUIRED) find_package(sodium REQUIRED) find_package(Protobuf REQUIRED) find_package(Unwind) ``` -------------------------------- ### Port Forwarding Sequence Diagram Source: https://github.com/mistertea/eternalterminal/blob/master/docs/protocol.md Visual representation of the sequence of operations for establishing and transmitting data during forward port forwarding in Eternal Terminal. ```mermaid sequenceDiagram participant user participant et participant etserver participant destination user->>et: Connect to port et->>etserver: PortForwardDestinationRequest etserver->>destination: Open tcp connection etserver->>et: PortForwardDestinationResponse loop Transmit user->>et: TCP traffic et->>etserver: PortForwardData etserver->>destination: TCP traffic end loop Receive destination->>etserver: TCP traffic etserver->>et: PortForwardData et->>user: TCP traffic end ``` -------------------------------- ### Set macOS SDK Path in CMake Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Configures the macOS SDK path for Xcode builds if it's not already set. ```cmake if(APPLE) if(NOT CMAKE_OSX_SYSROOT) set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk") endif() endif() ``` -------------------------------- ### Enable Compile Commands Export Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Adds a definition to export compile commands, typically used by IDEs like VSCode for better code navigation. ```cmake # Enable compile commands export for vscode add_definitions(-DCMAKE_EXPORT_COMPILE_COMMANDS=ON) ``` -------------------------------- ### Conditionally Add Unwind and Sentry Libraries Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Conditionally inserts the 'unwind::unwind' library at the beginning of CORE_LIBRARIES if Unwind is found, and 'sentry::sentry' if USE_SENTRY is enabled. ```cmake IF(Unwind_FOUND) list(INSERT CORE_LIBRARIES 0 unwind::unwind) ENDIF() IF(USE_SENTRY) list(INSERT CORE_LIBRARIES 0 sentry::sentry) ENDIF() ``` -------------------------------- ### Conditional SELinux and UTEMPTER Flags Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Conditionally adds flags for SELinux and UTEMPTER support based on whether they are found. If not found, corresponding include directories and libraries are cleared. ```cmake if(SELINUX_FOUND) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_SELINUX") else() set(SELINUX_INCLUDE_DIR "") set(SELINUX_LIBRARIES "") endif() if(UTEMPTER_FOUND) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_UTEMPTER") else() set(UTEMPTER_INCLUDE_DIR "") set(UTEMPTER_LIBRARIES "") endif() ``` -------------------------------- ### Fuzzer Executable Configuration Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Defines fuzzer executables for TerminalServer and TerminalServerRouter, linking required libraries and applying fuzzer decorations. ```cmake add_executable( TerminalServerFuzzer test/TerminalServerFuzzer.cpp test/FuzzableTerminalServer.hpp ) add_dependencies(TerminalServerFuzzer TerminalCommon et-lib) target_link_libraries( TerminalServerFuzzer TerminalCommon et-lib ${CMAKE_THREAD_LIBS_INIT} ${PROTOBUF_LIBS} ${sodium_LIBRARY_RELEASE} ${SELINUX_LIBRARIES} ${UTEMPTER_LIBRARIES} ${Boost_LIBRARIES} ${CORE_LIBRARIES}) decorate_fuzzer(TerminalServerFuzzer) add_executable( TerminalServerRouterFuzzer test/TerminalServerRouterFuzzer.cpp test/FuzzableTerminalServer.hpp ) add_dependencies(TerminalServerRouterFuzzer TerminalCommon et-lib) target_link_libraries( TerminalServerRouterFuzzer TerminalCommon et-lib ${CMAKE_THREAD_LIBS_INIT} ${PROTOBUF_LIBS} ${sodium_LIBRARY_RELEASE} ${SELINUX_LIBRARIES} ${UTEMPTER_LIBRARIES} ${Boost_LIBRARIES} ${CORE_LIBRARIES}) decorate_fuzzer(TerminalServerRouterFuzzer) ``` -------------------------------- ### Set SODIUM_STATIC Flag for Windows Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Conditionally sets the SODIUM_STATIC flag for C++ compiler when building on Windows. ```cmake IF(WIN32) SET(CMAKE_CXX_FLAGS "-DSODIUM_STATIC") ENDIF(WIN32) ``` -------------------------------- ### Add CMake Script Directory Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Appends a directory to the CMake module path to allow finding custom modules. ```cmake list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") ``` -------------------------------- ### Reverse Tunnel Protocol Sequence Diagram Source: https://github.com/mistertea/eternalterminal/blob/master/docs/protocol.md This sequence diagram illustrates the flow of communication for reverse tunnels, from initial login to data transmission. ```mermaid sequenceDiagram participant destination participant et participant etserver participant user as Server-side user et->>etserver: Login with reversetunnels in InitialPayload Note right of etserver: Listen to ports user->>etserver: Connect to port etserver->>et: PortForwardDestinationRequest et->>destination: Open tcp connection et->>etserver: PortForwardDestinationResponse loop Transmit and receive user-->etserver: TCP traffic etserver-->>et: PortForwardData et-->destination: TCP traffic et-->>etserver: PortForwardData end ``` -------------------------------- ### Determine macOS vcpkg Target Triplet Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Determines the vcpkg target triplet for macOS based on the system architecture (e.g., arm64 for Apple Silicon, x64 for Intel). ```cmake elseif(APPLE) execute_process( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE VCPKG_ARCHITECTURE) message(STATUS "Architecture: ${VCPKG_ARCHITECTURE}") if(${VCPKG_ARCHITECTURE} STREQUAL "arm64") # Apple Silicon set(VCPKG_TARGET_TRIPLET "arm64-osx" CACHE STRING "VCPKG Triplet") else() set(VCPKG_TARGET_TRIPLET "x64-osx" CACHE STRING "VCPKG Triplet") endif() ``` -------------------------------- ### Determine Linux vcpkg Target Triplet Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Determines the vcpkg target triplet for Linux based on the system architecture, supporting various x86, x86_64, and ARM variants. ```cmake else() execute_process( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE VCPKG_ARCHITECTURE) message(STATUS "Architecture: ${VCPKG_ARCHITECTURE}") if(${VCPKG_ARCHITECTURE} STREQUAL "x86_64") set(VCPKG_TARGET_TRIPLET "x64-linux" CACHE STRING "VCPKG Triplet") elseif(${VCPKG_ARCHITECTURE} STREQUAL "x86_86") set(VCPKG_TARGET_TRIPLET "x86-linux" CACHE STRING "VCPKG Triplet") elseif(${VCPKG_ARCHITECTURE} STREQUAL "aarch64") set(VCPKG_TARGET_TRIPLET "arm64-linux" CACHE STRING "VCPKG Triplet") elseif(${VCPKG_ARCHITECTURE} STREQUAL "arm64") set(VCPKG_TARGET_TRIPLET "arm64-linux" CACHE STRING "VCPKG Triplet") elseif(${VCPKG_ARCHITECTURE} MATCHES "arm.*") set(VCPKG_TARGET_TRIPLET "arm-linux" CACHE STRING "VCPKG Triplet") else() set(VCPKG_TARGET_TRIPLET "${VCPKG_ARCHITECTURE}-linux" CACHE STRING "VCPKG Triplet") endif() endif() ``` -------------------------------- ### Set CMake Policy CMP0063 Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Enforces visibility properties for all target types, including object and static libraries. ```cmake cmake_policy(SET CMP0063 NEW) ``` -------------------------------- ### Reconnection Sequence Diagram Source: https://github.com/mistertea/eternalterminal/blob/master/docs/protocol.md Illustrates the sequence of messages exchanged during a client reconnection. ```mermaid sequenceDiagram participant et participant etserver participant etterminal et->>etserver: ConnectRequest (client id, version) Note right of etserver: Match client id with terminal etserver->>et: ConnectResponse (RETURNING_CLIENT) et->>etserver: SequenceHeader etserver->>et: SequenceHeader et->>etserver: CatchupBuffer (w/ encrypted packets) etserver->>et: CatchupBuffer (w/ encrypted packets) ``` -------------------------------- ### Add Sanitizers CMake Module Path Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Prepends the sanitizers CMake module path to the existing module path. ```cmake set(CMAKE_MODULE_PATH "${EXTERNAL_DIR}/sanitizers-cmake/cmake" ${CMAKE_MODULE_PATH}) ``` -------------------------------- ### Set CMake Policy CMP0057 Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Ensures that CMake can correctly check its inputs for the BoostConfig.cmake module. ```cmake cmake_policy(SET CMP0057 NEW) ``` -------------------------------- ### Fuzzer Decoration Macro Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt A macro to apply sanitizers and fuzzer-specific flags to a target. It enforces AddressSanitizer and requires Clang compiler for fuzzing. ```cmake macro(DECORATE_FUZZER TARGET_NAME) add_sanitizers(${TARGET_NAME}) if(FUZZING) # ASAN must also be enabled to build fuzzers. if(NOT SANITIZE_ADDRESS) message(FATAL_ERROR "Fuzzing requires SANITIZE_ADDRESS=ON to detect memory errors.") endif() if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS " -fsanitize=fuzzer") set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY LINK_FLAGS " -fsanitize=fuzzer") else() message(FATAL_ERROR "Currently fuzzing is only supported with Clang.") endif() endif() endmacro() ``` -------------------------------- ### Enable Code Coverage Flags Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Enables debug symbols and coverage flags for GCC and Clang compilers when the CODE_COVERAGE option is enabled. ```cmake if(CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g --coverage") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g --coverage") endif(CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") ``` -------------------------------- ### Disable et Server on Debian/Ubuntu Source: https://github.com/mistertea/eternalterminal/blob/master/README.md Disables and stops the et server service using systemctl on Debian/Ubuntu systems. ```bash sudo systemctl disable --now et ``` -------------------------------- ### Set External Directory in CMake Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Defines the directory for external dependencies relative to the source directory. ```cmake set(EXTERNAL_DIR "${CMAKE_SOURCE_DIR}/external") ``` -------------------------------- ### Set CMake Policy CMP0074 Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Ensures that CMake does not ignore ROOT variables for packages, such as _ROOT. ```cmake cmake_policy(SET CMP0074 NEW) ``` -------------------------------- ### Update Git Submodules Source: https://github.com/mistertea/eternalterminal/blob/master/docs/creating_release.md Ensure that all git submodules are updated to their latest commits. ```bash git submodule update --recursive --init ``` -------------------------------- ### Disable ZSTD for httplib Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Disables the use of ZSTD compression for httplib if it's available. ```cmake set(HTTPLIB_USE_ZSTD_IF_AVAILABLE OFF) ``` -------------------------------- ### Disable Crash Log Handling Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt Disables default crash log handling for easylogging++ when the DISABLE_CRASH_LOG variable is set. ```cmake if(DISABLE_CRASH_LOG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DELPP_DISABLE_DEFAULT_CRASH_HANDLING") endif(DISABLE_CRASH_LOG) ``` -------------------------------- ### Merge Master Branch Source: https://github.com/mistertea/eternalterminal/blob/master/docs/creating_release.md Pull in the latest changes from the master branch into the current release branch. ```bash git merge master ``` -------------------------------- ### Prevent Conda Compilers in CMake Source: https://github.com/mistertea/eternalterminal/blob/master/CMakeLists.txt This snippet detects if a Conda environment is active and forces CMake to use system compilers instead of those provided by Conda. It clears cached compiler paths and explicitly sets the C and C++ compilers to system defaults. ```cmake cmake_minimum_required(VERSION 3.16.3) # Prevent conda/miniconda compilers from being used # This must happen before the project() command to ensure system compilers are used if(DEFINED ENV{CONDA_PREFIX}) message(STATUS "Conda environment detected at: $ENV{CONDA_PREFIX}") message(STATUS "Forcing use of system compilers instead of conda compilers") # If compilers are already cached with conda paths, clear them if(DEFINED CMAKE_C_COMPILER AND CMAKE_C_COMPILER MATCHES "conda|miniconda") message(STATUS "Clearing cached conda C compiler: ${CMAKE_C_COMPILER}") unset(CMAKE_C_COMPILER CACHE) endif() if(DEFINED CMAKE_CXX_COMPILER AND CMAKE_CXX_COMPILER MATCHES "conda|miniconda") message(STATUS "Clearing cached conda C++ compiler: ${CMAKE_CXX_COMPILER}") unset(CMAKE_CXX_COMPILER CACHE) endif() # Find and set system compilers (will be used by project() command) find_program(SYSTEM_C_COMPILER NAMES gcc cc PATHS /usr/bin /bin NO_DEFAULT_PATH REQUIRED) find_program(SYSTEM_CXX_COMPILER NAMES g++ c++ PATHS /usr/bin /bin NO_DEFAULT_PATH REQUIRED) set(CMAKE_C_COMPILER "${SYSTEM_C_COMPILER}" CACHE FILEPATH "C compiler" FORCE) set(CMAKE_CXX_COMPILER "${SYSTEM_CXX_COMPILER}" CACHE FILEPATH "C++ compiler" FORCE) message(STATUS "Using C compiler: ${CMAKE_C_COMPILER}") message(STATUS "Using C++ compiler: ${CMAKE_CXX_COMPILER}") # Unset conda environment variables to prevent them from affecting the build unset(ENV{CC}) unset(ENV{CXX}) unset(ENV{CFLAGS}) unset(ENV{CXXFLAGS}) unset(ENV{LDFLAGS}) unset(ENV{AR}) unset(ENV{RANLIB}) unset(ENV{NM}) endif() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.