diff --git a/CMakeLists.txt b/CMakeLists.txt index 6adae49..26d0abf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,8 @@ option(BUILD_CORE "Build EchoionCore" ON) option(BUILD_PLUGIN "Build EchoionPlugin" ON) option(BUILD_DESKTOP "Build EchoionDesktop" ON) option(BUILD_WEB "Build EchoionWeb (browser interface + sync-watch)" ON) +option(BUILD_PROTOCOL "Build EchoionProtocol (native TeamSpeak UDP client)" ON) +option(BUILD_STANDALONE "Build EchoionStandalone (daemon; no TeamSpeak client)" ON) option(BUILD_TESTS "Build tests" OFF) option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(ECHOION_STATIC_LINK "Statically link dependencies for standalone distribution" ON) @@ -144,6 +146,17 @@ if(BUILD_PLUGIN) add_subdirectory(EchoionPlugin) endif() +# EchoionProtocol: standalone TeamSpeak UDP client library (no Echoion deps). +if(BUILD_PROTOCOL OR BUILD_STANDALONE) + add_subdirectory(EchoionProtocol) +endif() + +# EchoionStandalone: reuses the plugin's CoreLoader, so it needs EchoionPlugin's +# sources present. It links the Api + EchoionProtocol and loads Core at runtime. +if(BUILD_STANDALONE) + add_subdirectory(EchoionStandalone) +endif() + if(BUILD_DESKTOP) add_subdirectory(EchoionDesktop) endif() diff --git a/systemd/echoion-standalone.service b/systemd/echoion-standalone.service new file mode 100644 index 0000000..2aa599f --- /dev/null +++ b/systemd/echoion-standalone.service @@ -0,0 +1,33 @@ +# Echoion standalone daemon — connects to a TeamSpeak 3/6 server as its own +# client over the native UDP protocol. Replaces the old +# teamspeak-echoion.service, which had to run a full GUI TeamSpeak client under +# Weston + RDP just to host the plugin. None of that is needed anymore. +# +# Install: copy `echoiond` and `Echoion.ts` (the Core library) somewhere on +# disk, put config.json in ~/.config/echoion/ (or pass --config), then: +# systemctl --user enable --now echoion-standalone +# +# Identity is generated on first run and persisted to +# ~/.config/echoion/identity.txt (override with ECHOION_IDENTITY_PATH). + +[Unit] +Description=Echoion Music Bot (standalone TeamSpeak client) +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +# Directory holding echoiond and the Core library Echoion.ts. +WorkingDirectory=%h/echoion +Environment=ECHOION_CORE_PATH=%h/echoion/Echoion.ts +# Optional tuning: +# Environment=ECHOION_SECURITY_LEVEL=8 +# Environment=ECHOION_OPUS_BITRATE=96000 +# Environment=ECHOION_IDENTITY_PATH=%h/.config/echoion/identity.txt +ExecStart=%h/echoion/echoiond --config %h/.config/echoion/config.json +Restart=always +RestartSec=5 +LimitNOFILE=65536 + +[Install] +WantedBy=default.target