1 parent
639362fbf5
commit
bdd69f0aad
101 files changed
+22691
-531
No files matched your search
+61
-4
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 4.0.0)
|
||||
project(Echoion VERSION 1.0.0 LANGUAGES CXX)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(cmake/DependencyLock.cmake)
|
||||
|
||||
# Default to a Release build when the developer/CI did not pick a config.
|
||||
# Without this, single-config generators leave CMAKE_BUILD_TYPE empty and GCC
|
||||
@@ -40,6 +41,39 @@ if(ECHOION_STATIC_LINK)
|
||||
message(STATUS "Static GCC runtime linking enabled")
|
||||
endif()
|
||||
|
||||
# Release artifacts should not expose checkout, dependency, or build-machine
|
||||
# paths through __FILE__, std::source_location, or optional DWARF data. Keep
|
||||
# developer builds unchanged so local diagnostics can still use absolute paths;
|
||||
# scripts/release.sh enables this option for production builds.
|
||||
option(ECHOION_REPRODUCIBLE_BUILD
|
||||
"Replace local source/build prefixes in compiler-generated paths" OFF)
|
||||
if(ECHOION_REPRODUCIBLE_BUILD)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
set(_echoionPrefixMaps
|
||||
"${CMAKE_SOURCE_DIR}=Echoion"
|
||||
"${CMAKE_BINARY_DIR}=EchoionBuild")
|
||||
if(DEFINED CPM_Void_SOURCE AND NOT CPM_Void_SOURCE STREQUAL "")
|
||||
list(APPEND _echoionPrefixMaps
|
||||
"${CPM_Void_SOURCE}=VoidLibrary")
|
||||
endif()
|
||||
if(DEFINED CPM_VoidTeamspeak_SOURCE AND
|
||||
NOT CPM_VoidTeamspeak_SOURCE STREQUAL "")
|
||||
list(APPEND _echoionPrefixMaps
|
||||
"${CPM_VoidTeamspeak_SOURCE}=VoidTeamspeak")
|
||||
endif()
|
||||
foreach(_echoionPrefixMap IN LISTS _echoionPrefixMaps)
|
||||
add_compile_options(
|
||||
"$<$<COMPILE_LANGUAGE:C,CXX>:-ffile-prefix-map=${_echoionPrefixMap}>"
|
||||
"$<$<COMPILE_LANGUAGE:C,CXX>:-fmacro-prefix-map=${_echoionPrefixMap}>"
|
||||
"$<$<COMPILE_LANGUAGE:C,CXX>:-fdebug-prefix-map=${_echoionPrefixMap}>")
|
||||
endforeach()
|
||||
message(STATUS "Reproducible compiler path mapping enabled")
|
||||
else()
|
||||
message(WARNING
|
||||
"ECHOION_REPRODUCIBLE_BUILD is not supported by this compiler")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Include CPM
|
||||
file(
|
||||
DOWNLOAD
|
||||
@@ -64,10 +98,10 @@ CPMAddPackage(
|
||||
# which CPM honours over the git checkout below.
|
||||
CPMAddPackage(
|
||||
NAME Void
|
||||
GIT_REPOSITORY http://git.faumaray.ru/void/voidlibrary.git
|
||||
GIT_REPOSITORY https://git.faumaray.ru/void/voidlibrary.git
|
||||
# Keep clean/container releases reproducible. CPM_Void_SOURCE still
|
||||
# overrides this revision for local dependency development.
|
||||
GIT_TAG 8583a479dda93be3394dfadefd7875ddd9e376dc
|
||||
GIT_TAG ${ECHOION_VOID_REVISION}
|
||||
OPTIONS
|
||||
"VOID_ENABLE_TESTING OFF"
|
||||
)
|
||||
@@ -77,9 +111,9 @@ CPMAddPackage(
|
||||
# -DCPM_VoidTeamspeak_SOURCE=$HOME/Project/Personal/VoidTeamspeak
|
||||
CPMAddPackage(
|
||||
NAME VoidTeamspeak
|
||||
GIT_REPOSITORY http://git.faumaray.ru/void/voidteamspeak.git
|
||||
GIT_REPOSITORY https://git.faumaray.ru/void/voidteamspeak.git
|
||||
# This revision supplies the typed administration API used by Standalone.
|
||||
GIT_TAG 89911ff107bc57347e3f91c9e0544265d64de5df
|
||||
GIT_TAG ${ECHOION_VOID_TEAMSPEAK_REVISION}
|
||||
OPTIONS
|
||||
"VOID_TEAMSPEAK_BUILD_TESTS OFF"
|
||||
"VOID_ENABLE_TESTING OFF"
|
||||
@@ -135,6 +169,7 @@ option(BUILD_CORE "Build EchoionCore" ON)
|
||||
option(BUILD_DESKTOP "Build EchoionDesktop" ON)
|
||||
option(BUILD_WEB "Build EchoionWeb browser dashboard" ON)
|
||||
option(BUILD_STANDALONE "Build EchoionStandalone daemon with native TeamSpeak client" ON)
|
||||
option(BUILD_FIRST_PARTY_PLUGINS "Build bundled Echoion extension plugins" ON)
|
||||
option(BUILD_TESTS "Build tests" OFF)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
@@ -149,6 +184,10 @@ if(BUILD_API)
|
||||
add_subdirectory(EchoionApi)
|
||||
endif()
|
||||
|
||||
if(BUILD_FIRST_PARTY_PLUGINS)
|
||||
add_subdirectory(plugins)
|
||||
endif()
|
||||
|
||||
if(BUILD_STANDALONE)
|
||||
add_subdirectory(EchoionHost)
|
||||
endif()
|
||||
@@ -171,6 +210,14 @@ endif()
|
||||
# VoidTeamspeak is resolved above as a regular reusable package. The legacy
|
||||
# TeamSpeak client plugin and in-tree protocol directories are no longer built.
|
||||
|
||||
# The updater is a deliberately small, dynamically linked lifecycle helper.
|
||||
# It validates and journals local operations but leaves network/feed work to
|
||||
# the daemon through typed request files. Define it before Standalone so the
|
||||
# Linux release-staging test can use the real helper binary.
|
||||
if(UNIX AND NOT APPLE)
|
||||
add_subdirectory(packaging/updater)
|
||||
endif()
|
||||
|
||||
# EchoionStandalone links the host-common loader and native protocol client.
|
||||
if(BUILD_STANDALONE)
|
||||
add_subdirectory(EchoionStandalone)
|
||||
@@ -220,8 +267,14 @@ if(ECHOION_INSTALL_RUNTIME_BUNDLE)
|
||||
COMPONENT Runtime)
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/packaging/service/echoion.service.in"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/packaging/service/echoion-updater.service.in"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/packaging/service/echoion-updater.timer.in"
|
||||
DESTINATION service
|
||||
COMPONENT Runtime)
|
||||
install(PROGRAMS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/validate-release-manifest.py"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/echoion/tools"
|
||||
COMPONENT Runtime)
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE"
|
||||
@@ -353,8 +406,12 @@ endif()
|
||||
message(STATUS "")
|
||||
message(STATUS "Echoion Configuration:")
|
||||
message(STATUS " Version: ${PROJECT_VERSION}")
|
||||
if(DEFINED ECHOION_RUNTIME_VERSION)
|
||||
message(STATUS " Runtime release version: ${ECHOION_RUNTIME_VERSION}")
|
||||
endif()
|
||||
message(STATUS " C++ Standard: ${CMAKE_CXX_STANDARD}")
|
||||
message(STATUS " Build API: ${BUILD_API}")
|
||||
message(STATUS " Build first-party plugins: ${BUILD_FIRST_PARTY_PLUGINS}")
|
||||
message(STATUS " Build Core: ${BUILD_CORE}")
|
||||
message(STATUS " Build Desktop: ${BUILD_DESKTOP}")
|
||||
message(STATUS " Build Web: ${BUILD_WEB}")
|
||||
|
||||
Reference in new issue
Block a user