Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
dedcecf
:hammer: Start removing boost.
JonasGilg Mar 23, 2025
cf6d9d0
:wrench: Finish removing boost and also replace fmt::format with std:…
JonasGilg Apr 12, 2025
eb314f7
:sparkles: Apply clang-format.
JonasGilg Apr 13, 2025
44a292f
Merge branch 'main' into feature/replace-boost
JonasGilg Apr 13, 2025
f0ab824
:wrench: Update CEF.
JonasGilg Apr 13, 2025
c3c0b26
:wrench: Fix missing includes to functional.
JonasGilg Apr 13, 2025
46d70c5
:wrench: Fix cef bugs.
JonasGilg Apr 13, 2025
b4ef2ee
:sparkles: Apply clang-format.
JonasGilg Apr 13, 2025
4aed804
:green_heart: Update CI.
JonasGilg Apr 13, 2025
d8881de
:green_heart: Fix tests and CI.
JonasGilg Apr 13, 2025
3a54645
:green_heart: Fix tests and CI.
JonasGilg Apr 13, 2025
7ee53ec
:sparkles: Apply clang-format.
JonasGilg Apr 13, 2025
8fbc79e
:green_heart: Fix CI.
JonasGilg Apr 13, 2025
17b1220
:wrench: Remove deprecated register keyword from OpenSG.
JonasGilg Apr 13, 2025
ad5bfc6
:wrench: Remove deprecated register keyword from OpenSG.
JonasGilg Apr 13, 2025
965c611
:wrench: Remove unused variables.
JonasGilg Apr 14, 2025
277b416
:wrench: Remove unused variable for cef file access, as that cannot b…
JonasGilg Apr 14, 2025
3acfd90
:beetle: Fix missing swiftshader files.
JonasGilg Apr 16, 2025
715cd8a
:wrench: Set CEF directories.
JonasGilg Apr 16, 2025
fcce509
:sparkles: Apply clang format.
JonasGilg Apr 16, 2025
b1ededd
:memo: Fix replace error.
JonasGilg May 6, 2025
4801f13
:green_heart: Apply suggestion.
JonasGilg May 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 9 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ jobs:
fi

build_linux_gcc:
name: Linux GCC 11.4.0
runs-on: ubuntu-22.04
name: Linux GCC 13.3.0
runs-on: ubuntu-24.04
if: >
github.event_name == 'pull_request' ||
( contains(github.ref, 'main') && !contains(github.event.head_commit.message, '[no-ci]') ) ||
Expand All @@ -99,7 +99,7 @@ jobs:
run: |
sudo apt-get update -q
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libx11-dev
sudo apt-get install libxi-dev libgconf-2-4 libboost-all-dev lcov xvfb
sudo apt-get install libxi-dev lcov xvfb libfreetype-dev
- name: Build Externals
run: >
./make_externals.sh -G "Unix Makefiles"
Expand Down Expand Up @@ -130,15 +130,15 @@ jobs:
path-to-lcov: ./build/linux-Release/coverage.info

build_linux_clang:
name: Linux Clang 14.0
runs-on: ubuntu-22.04
name: Linux Clang 18.0
runs-on: ubuntu-24.04
if: >
github.event_name == 'pull_request' ||
( contains(github.ref, 'main') && !contains(github.event.head_commit.message, '[no-ci]') ) ||
contains(github.event.head_commit.message, '[run-ci]')
env:
CC: clang-14
CXX: clang++-14
CC: clang-18
CXX: clang++-18
COSMOSCOUT_USE_PCH: false
COSMOSCOUT_USE_UNITY_BUILD: false
steps:
Expand All @@ -154,7 +154,7 @@ jobs:
run: |
sudo apt-get update -q
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libx11-dev
sudo apt-get install libxi-dev libgconf-2-4 libboost-all-dev
sudo apt-get install libxi-dev libfreetype-dev
- name: Build Externals
run: >
./make_externals.sh -G "Unix Makefiles"
Expand Down Expand Up @@ -184,7 +184,6 @@ jobs:
( contains(github.ref, 'main') && !contains(github.event.head_commit.message, '[no-ci]') ) ||
contains(github.event.head_commit.message, '[run-ci]')
env:
BOOST_ROOT_1_72_0: C:\hostedtoolcache\windows\Boost\1.72.0\x86_64
COSMOSCOUT_USE_PCH: true
COSMOSCOUT_USE_UNITY_BUILD: true
steps:
Expand All @@ -200,13 +199,6 @@ jobs:
uses: ilammy/msvc-dev-cmd@v1
- name: Download Dependencies
run: |
# From https://github.com/actions/virtual-environments/issues/2667
$url = "https://github.com/actions/boost-versions/releases/download/1.72.0-20200608.4/boost-1.72.0-win32-msvc14.2-x86_64.tar.gz"
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.tar.gz")
7z.exe x "$env:TEMP\boost.tar.gz" -o"$env:TEMP\boostArchive" -y | Out-Null
7z.exe x "$env:TEMP\boostArchive" -o"$env:TEMP\boost" -y | Out-Null
Push-Location -Path "$env:TEMP\boost"
Invoke-Expression .\setup.ps1
choco install ninja
- name: Build Externals
shell: cmd
Expand All @@ -216,10 +208,9 @@ jobs:
- name: Build CosmoScout VR
shell: cmd
run: |
cmake --preset windows-ninja-release-config -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DBOOST_ROOT=%BOOST_ROOT_1_72_0%
cmake --preset windows-ninja-release-config -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
cmake --build --preset windows-ninja-release-build
- name: Run Tests
shell: cmd
run: |
SET PATH=%BOOST_ROOT_1_72_0%\\lib;%PATH%
install\\windows-Release\\bin\\run_tests.bat
18 changes: 3 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
source_code:
name: Source Code
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -35,7 +35,7 @@ jobs:

release_linux:
name: Linux
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -46,7 +46,6 @@ jobs:
sudo apt-get update -q
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libx11-dev
sudo apt-get install libxi-dev libgconf-2-4
sudo apt-get install libboost-all-dev
- name: Build Externals
run: ./make_externals.sh -G "Unix Makefiles"
- name: Build CosmoScout VR
Expand All @@ -70,29 +69,18 @@ jobs:
release_windows:
name: Windows
runs-on: windows-2019
env:
BOOST_ROOT_1_72_0: C:\hostedtoolcache\windows\Boost\1.72.0\x86_64
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Checkout Submodules
run: git submodule update --init --recursive
- name: Download Boost
run: |
# From https://github.com/actions/virtual-environments/issues/2667
$url = "https://github.com/actions/boost-versions/releases/download/1.72.0-20200608.4/boost-1.72.0-win32-msvc14.2-x86_64.tar.gz"
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.tar.gz")
7z.exe x "$env:TEMP\boost.tar.gz" -o"$env:TEMP\boostArchive" -y | Out-Null
7z.exe x "$env:TEMP\boostArchive" -o"$env:TEMP\boost" -y | Out-Null
Push-Location -Path "$env:TEMP\boost"
Invoke-Expression .\setup.ps1
- name: Build Externals
shell: cmd
run: make_externals.bat -G "Visual Studio 16 2019" -A x64
- name: Build CosmoScout VR
shell: cmd
run: |
cmake --preset windows-vs-release-config -DBOOST_ROOT=%BOOST_ROOT_1_72_0%
cmake --preset windows-vs-release-config
cmake --build --preset windows-vs-release-build
- name: Create Release
run: |
Expand Down
35 changes: 2 additions & 33 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ project(cosmoscout-vr VERSION 1.10.0)

# Use cmake 3.12's <PACKAGE>_ROOT variabled for searching.
cmake_policy(SET CMP0074 NEW)
# cmake_policy(SET CMP0167 OLD)

# Ensure local modules (for dependencies etc.) are found.
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
Expand All @@ -32,12 +31,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)

include(GenerateExportHeader)

# Boost and OpenGL must be present on your system. All other dependencies are included as submodules
# in "externals/". Those must be built beforehand, preferably using the scripts "make_externals.*".
set(Boost_REALPATH ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost REQUIRED COMPONENTS system chrono date_time filesystem)
find_package(OpenGL REQUIRED)

# You have to provide the directory where the externals got installed to. The scripts make_*.sh and
Expand Down Expand Up @@ -184,30 +177,6 @@ install(
FILES_MATCHING PATTERN "*.so*" PATTERN "*.dll*"
)

# Copy boost libraries to install directory.
foreach(BOOST_LIB
${Boost_CHRONO_LIBRARY_DEBUG}
${Boost_CHRONO_LIBRARY_RELEASE}
${Boost_DATE_TIME_LIBRARY_DEBUG}
${Boost_DATE_TIME_LIBRARY_RELEASE}
${Boost_FILESYSTEM_LIBRARY_RELEASE}
${Boost_FILESYSTEM_LIBRARY_DEBUG}
${Boost_SYSTEM_LIBRARY_RELEASE}
${Boost_SYSTEM_LIBRARY_DEBUG}
)
if(EXISTS "${BOOST_LIB}")
get_filename_component(LIB_BASE_NAME ${BOOST_LIB} NAME_WE)
get_filename_component(LIB_PATH ${BOOST_LIB} PATH)
if (WIN32)
install(FILES ${LIB_PATH}/${LIB_BASE_NAME}.dll DESTINATION "lib")
endif()
if (UNIX)
file(GLOB LIB_FILES ${LIB_PATH}/${LIB_BASE_NAME}.so*)
install(FILES ${LIB_FILES} DESTINATION "lib")
endif()
endif()
endforeach()

# Install documentation directory
install(DIRECTORY
${CMAKE_SOURCE_DIR}/docs
Expand Down Expand Up @@ -261,11 +230,11 @@ configure_file(
# compiler settings --------------------------------------------------------------------------------

add_definitions(
-DBOOST_ALL_DYN_LINK
-DGLM_ENABLE_EXPERIMENTAL
-DGLM_FORCE_SWIZZLE
-DNOMINMAX
-DSPDLOG_COMPILED_LIB
-DSPDLOG_USE_STD_FORMAT
)

if (MSVC)
Expand Down Expand Up @@ -294,7 +263,7 @@ else()
)
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Enable unit tests
Expand Down
30 changes: 0 additions & 30 deletions LICENSE-3RD-PARTY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.


# ------------------------------------------------------------------------------------------------ #
# Boost (system, chrono, filesystem, date_time) #
# http://www.boost.org/LICENSE_1_0.txt #
# ------------------------------------------------------------------------------------------------ #

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.


# ------------------------------------------------------------------------------------------------ #
# c-ares #
# https://c-ares.haxx.se/license.html #
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindCEF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ find_path(CEF_INCLUDE_DIR include/cef_version.h
HINTS ${CEF_ROOT_DIR}/include/cef)

# Locate library.
find_path(CEF_RESOURCE_DIR cef.pak
find_path(CEF_RESOURCE_DIR resources.pak
HINTS ${CEF_ROOT_DIR}/share/cef)

find_path(CEF_LIBRARY_DIR snapshot_blob.bin
find_path(CEF_LIBRARY_DIR v8_context_snapshot.bin
HINTS ${CEF_ROOT_DIR}/lib)

find_library(CEF_LIBRARY NAMES cef libcef
Expand Down
2 changes: 1 addition & 1 deletion externals/spdlog
Submodule spdlog updated 185 files
7 changes: 4 additions & 3 deletions make_externals.bat
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ echo.

cmake -E make_directory "%BUILD_DIR%/spdlog" && cd "%BUILD_DIR%/spdlog"
cmake %CMAKE_FLAGS% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_INSTALL_PREFIX="%INSTALL_DIR%"^
-DSPDLOG_BUILD_TESTS=Off -DSPDLOG_ENABLE_PCH=On "%EXTERNALS_DIR%/spdlog" || goto :error
-DSPDLOG_BUILD_TESTS=Off -D SPDLOG_BUILD_EXAMPLE=Off -DSPDLOG_ENABLE_PCH=On^
-DSPDLOG_USE_STD_FORMAT=On "%EXTERNALS_DIR%/spdlog" || goto :error

cmake --build . --config %BUILD_TYPE% --target install --parallel %NUMBER_OF_PROCESSORS% || goto :error

Expand Down Expand Up @@ -394,12 +395,12 @@ echo.
echo Downloading, building and installing cef (this may take some time) ...
echo.

set CEF_DIR=cef_binary_88.1.6+g4fe33a1+chromium-88.0.4324.96_windows64_minimal
set CEF_DIR=cef_binary_135.0.20+ge7de5c3+chromium-135.0.7049.85_windows64_minimal

cmake -E make_directory "%BUILD_DIR%/cef/extracted" && cd "%BUILD_DIR%/cef"

IF NOT EXIST cef.tar (
curl.exe https://cef-builds.spotifycdn.com/cef_binary_88.1.6%%2Bg4fe33a1%%2Bchromium-88.0.4324.96_windows64_minimal.tar.bz2 --output cef.tar.bz2
curl.exe https://cef-builds.spotifycdn.com/cef_binary_135.0.20+ge7de5c3+chromium-135.0.7049.85_windows64_minimal.tar.bz2 --output cef.tar.bz2
cd "%BUILD_DIR%/cef/extracted"
"%BUILD_DIR%/cef/bzip2/bin/bunzip2.exe" -v ../cef.tar.bz2
) else (
Expand Down
7 changes: 4 additions & 3 deletions make_externals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ echo ""

cmake -E make_directory "$BUILD_DIR/spdlog" && cd "$BUILD_DIR/spdlog"
cmake "${CMAKE_FLAGS[@]}" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DSPDLOG_BUILD_TESTS=Off \
-DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_BUILD_TYPE=$BUILD_TYPE "$EXTERNALS_DIR/spdlog"
-DSPDLOG_USE_STD_FORMAT=On -DCMAKE_POSITION_INDEPENDENT_CODE=On \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE "$EXTERNALS_DIR/spdlog"
cmake --build . --target install --parallel "$(nproc)"

# civetweb -----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -306,10 +307,10 @@ echo ""
echo "Downloading, building and installing cef ..."
echo ""

CEF_DIR=cef_binary_88.1.6+g4fe33a1+chromium-88.0.4324.96_linux64_minimal
CEF_DIR=cef_binary_135.0.20+ge7de5c3+chromium-135.0.7049.85_linux64_minimal

cmake -E make_directory "$BUILD_DIR/cef/extracted" && cd "$BUILD_DIR/cef"
wget -nc https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linux64_minimal.tar.bz2
wget -nc https://cef-builds.spotifycdn.com/cef_binary_135.0.20+ge7de5c3+chromium-135.0.7049.85_linux64_minimal.tar.bz2

cd "$BUILD_DIR/cef/extracted"
cmake -E tar xfj ../$CEF_DIR.tar.bz2
Expand Down
6 changes: 3 additions & 3 deletions plugins/csl-node-editor/src/NodeFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ std::string NodeFactory::getSocketSource() const {
// This JavaScript code registers new rete socket types and adds custom CSS style snippets to the
// web page to color the sockets.
for (auto const& s : mSockets) {
source += fmt::format("CosmoScout.socketTypes['{0}'] = new Rete.Socket('{0}');\n", s.first);
source += fmt::format("addSocketStyle('{}', '{}');\n", s.first, s.second);
source += std::format("CosmoScout.socketTypes['{0}'] = new Rete.Socket('{0}');\n", s.first);
source += std::format("addSocketStyle('{}', '{}');\n", s.first, s.second);
}

return source;
Expand Down Expand Up @@ -73,7 +73,7 @@ std::string NodeFactory::getRegisterSource() const {
// This sets up the required code for registering the rete components.
for (auto const& f : mNodeCreateFuncs) {
source += "{\n";
source += fmt::format("const component = new {}Component();\n", f.first);
source += std::format("const component = new {}Component();\n", f.first);
source += "CosmoScout.nodeEditor.register(component);\n";
source += "}\n";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ int angstromMode(std::vector<std::string> const& arguments) {
"The scattering data will be written to <name>_scattering.csv and "
"<name>_absorption.csv, respectively (default: \"" +
cOutput + "\").");
args.addArgument({"--alpha"}, &cAlpha, fmt::format("The alpha parameter (default: {}).", cAlpha));
args.addArgument({"--beta"}, &cBeta, fmt::format("The beta parameter (default: {}).", cBeta));
args.addArgument({"--alpha"}, &cAlpha, std::format("The alpha parameter (default: {}).", cAlpha));
args.addArgument({"--beta"}, &cBeta, std::format("The beta parameter (default: {}).", cBeta));
args.addArgument({"--single-scattering-albedo"}, &cSingleScatteringAlbedo,
fmt::format("The single-scattering albedo (default: {}).", cSingleScatteringAlbedo));
std::format("The single-scattering albedo (default: {}).", cSingleScatteringAlbedo));
args.addArgument({"--scale-height"}, &cScaleHeight,
fmt::format("The scale height of the particles (default: {}).", cScaleHeight));
std::format("The scale height of the particles (default: {}).", cScaleHeight));
common::addLambdaFlags(args, &cLambdas, &cMinLambda, &cMaxLambda, &cLambdaSamples);
args.addArgument({"-h", "--help"}, &cPrintHelp, "Show this help message.");

Expand Down Expand Up @@ -82,8 +82,8 @@ int angstromMode(std::vector<std::string> const& arguments) {
double beta_sca = cSingleScatteringAlbedo * beta_ext;
double beta_abs = beta_ext - beta_sca;

scatteringOutput << fmt::format("{},{}", lambda, beta_sca) << std::endl;
absorptionOutput << fmt::format("{},{}", lambda, beta_abs) << std::endl;
scatteringOutput << std::format("{},{}", lambda, beta_sca) << std::endl;
absorptionOutput << std::format("{},{}", lambda, beta_abs) << std::endl;
}

return 0;
Expand Down
6 changes: 3 additions & 3 deletions plugins/csp-atmospheres/scattering-table-generator/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ void addLambdaFlags(cs::utils::CommandLine& commandLine, std::string* lambdas, d
double* maxLambda, int32_t* lambdaSamples) {

commandLine.addArgument({"--min-lambda"}, minLambda,
fmt::format("The minimum wavelength in m (default: {})", *minLambda));
std::format("The minimum wavelength in m (default: {})", *minLambda));
commandLine.addArgument({"--max-lambda"}, maxLambda,
fmt::format("The maximum wavelength in m (default: {})", *maxLambda));
std::format("The maximum wavelength in m (default: {})", *maxLambda));
commandLine.addArgument({"--lambda-samples"}, lambdaSamples,
fmt::format("The number of wavelengths to compute (default: {})", *lambdaSamples));
std::format("The number of wavelengths to compute (default: {})", *lambdaSamples));
commandLine.addArgument({"--lambdas"}, lambdas,
"A comma-separated list of wavelengths in m. If provided, --min-lambda, --max-lambda, and "
"--lambda-samples are ignored.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ int densityMode(std::vector<std::string> const& arguments) {
// Now write a density value for each altitude.
auto densities = sampleDensities(densitySettings, cAltitudeSamples, cMinAltitude, cMaxAltitude);
for (auto density : densities) {
output << fmt::format("{}", density) << std::endl;
output << std::format("{}", density) << std::endl;
}

return 0;
Expand Down
Loading
Loading