From 01223c86727650f7a5c1304731d9d5d46f78702a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 13:48:55 +0200 Subject: [PATCH 01/44] Fix warning: "Exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD must be given. Assuming POST_BUILD to preserve backward compatibility." --- tools/jsdoc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jsdoc/CMakeLists.txt b/tools/jsdoc/CMakeLists.txt index 5a062b7ee9..bc61784890 100644 --- a/tools/jsdoc/CMakeLists.txt +++ b/tools/jsdoc/CMakeLists.txt @@ -14,7 +14,7 @@ file(TO_NATIVE_PATH ${JSDOC_WORKING_DIR}/root.js NATIVE_JSDOC_WORKING_DIR) set(JSDOC_OUTPUT_PATH ${OUTPUT_DIR} CACHE INTERNAL "${PROJECT_NAME}: JSDoc output directory") -add_custom_command(TARGET ${TARGET_NAME} +add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND ${NPM_EXECUTABLE} --no-progress install && ${JSDOC_PATH} ${NATIVE_JSDOC_WORKING_DIR} -c ${JSDOC_CONFIG_PATH} -d ${OUTPUT_DIR} WORKING_DIRECTORY ${JSDOC_WORKING_DIR} COMMENT "generate the JSDoc JSON" From 317e1a7d88a96477ad3cc55371e6884b3d4e5cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 13:58:50 +0200 Subject: [PATCH 02/44] Replace OVERTE_WARNINGS_AS_ERRORS with CMake's new COMPILE_WARNING_AS_ERROR. --- CMakeLists.txt | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ac4f74039..e4baac5b66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,11 +3,11 @@ # Copyright 2020-2025 Overte e.V. # SPDX-License-Identifier: Apache-2.0 -# 3.14 is the minimum version that supports symlinks on Windows -cmake_minimum_required(VERSION 3.14) # This should allow using long paths on Windows SET(CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "") +# 3.24 is the minimum version that supports COMPILE_WARNING_AS_ERROR +cmake_minimum_required(VERSION 3.24) include(SelectLibraryConfigurations) @@ -93,6 +93,8 @@ if( NOT WIN32 ) message($ENV{CXXFLAGS}) endif() + +# # OVERTE_WARNINGS # # Here we add the ability to allowlist warnings we've determined we can't fix, or are safe to @@ -101,14 +103,7 @@ endif() # # We can also treat warnings as errors. Without the allowlist this will almost certainly lead # to a build failure. - -if(NOT DEFINED OVERTE_WARNINGS_ALLOWLIST) - set(OVERTE_WARNINGS_ALLOWLIST true CACHE BOOL "Allowlist some warnings we can't currently fix") -endif() - -if(NOT DEFINED OVERTE_WARNINGS_AS_ERRORS) - set(OVERTE_WARNINGS_AS_ERRORS false CACHE BOOL "Count warnings as errors") -endif() +set(OVERTE_WARNINGS_ALLOWLIST ON CACHE BOOL "Allowlist some warnings we can't currently fix.") if(OVERTE_WARNINGS_ALLOWLIST) if (NOT WIN32) @@ -130,14 +125,13 @@ if(OVERTE_WARNINGS_ALLOWLIST) endif() endif() -if(OVERTE_WARNINGS_AS_ERRORS) - if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" OR (CMAKE_CXX_COMPILER_ID MATCHES "" AND WIN32)) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") - set(CMAKE_CFLAGS "${CMAKE_CFLAGS} /WX") - else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") - set(CMAKE_CFLAGS "${CMAKE_CFLAGS} -Werror") - endif() +# Enabling warnings-as-errors by default on our Linux target and on Windows. +# Our current Linux development target is Ubuntu 22.04, which uses GCC 11.2. +# TODO: Enable warnings-as-errors once we stop throwing warnings on the relevant platforms. +if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") AND (CMAKE_CXX_COMPILER_VERSION MATCHES "11")) + set(COMPILE_WARNING_AS_ERROR OFF CACHE BOOL "") +elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") # Windows + set(COMPILE_WARNING_AS_ERROR OFF CACHE BOOL "") endif() From 19a8f75654c7d44e01f1ba81cf7f4292af69f7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 14:02:37 +0200 Subject: [PATCH 03/44] Add note about CMake documentation. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4baac5b66..b5ffaf19cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ # Copyright 2020-2025 Overte e.V. # SPDX-License-Identifier: Apache-2.0 +# As the official CMake documentation is pretty bad for non-experts, Craig Scott's "Professional CMake: A Practical Guide" is a worthwhile investment, +# both as a guide and as a reference manual. https://crascit.com/professional-cmake/ # This should allow using long paths on Windows SET(CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "") From cee546cfe059c0441dbbb02caa9cfba07600d42b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 14:10:24 +0200 Subject: [PATCH 04/44] Replace CMAKE_BACKTRACE_URL and CMAKE_BACKTRACE_TOKEN environment variables with OVERTE_BACKTRACE_URL and OVERTE_BACKTRACE_TOKEN CMake cache variables. --- .github/workflows/linux_server_build.yml | 10 ---------- .github/workflows/master_build.yml | 3 --- .github/workflows/pr_build.yml | 5 ----- .github/workflows/release_build.yml | 3 --- BUILD.md | 14 +++++++++----- CMakeLists.txt | 2 ++ cmake/macros/AddCrashpad.cmake | 17 +++++++---------- .../networking/src/crash-handler/CrashHandler.h | 12 ++++++------ .../CrashHandlerBackend_Crashpad.cpp | 5 +++-- 9 files changed, 27 insertions(+), 44 deletions(-) diff --git a/.github/workflows/linux_server_build.yml b/.github/workflows/linux_server_build.yml index d4e6c4ab7a..3217714683 100644 --- a/.github/workflows/linux_server_build.yml +++ b/.github/workflows/linux_server_build.yml @@ -207,16 +207,6 @@ jobs: echo "BUILD_NUMBER=$GIT_COMMIT_SHORT" >> $GITHUB_ENV - # Disabled until we build with Crashpad again. - #~ if [ "${{ github.ref_type }}" == "tag" ]; then - #~ export CMAKE_BACKTRACE_URL="${{ secrets.SENTRY_MINIDUMP_ENDPOINT }}" - #~ export CMAKE_BACKTRACE_TOKEN="${{ github.ref_name }}_${{ matrix.os }}_${{ github.sha }}" - #~ else - #~ # We're building a PR, default to the PR endpoint - #~ export CMAKE_BACKTRACE_URL="https://o4504831972343808.ingest.sentry.io/api/4504832427950080/minidump/?sentry_key=f511de295975461b8f92a36f4a4a4f32" - #~ export CMAKE_BACKTRACE_TOKEN="server_pr_${{ github.event.number }}_${{ github.sha }}" - #~ fi - - name: Configure Build Environment 3 shell: bash run: | diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index af18b560f9..c79271a5c8 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -21,9 +21,6 @@ env: UPLOAD_BUCKET: overte-public UPLOAD_REGION: fra1 UPLOAD_ENDPOINT: "https://fra1.digitaloceanspaces.com" - # Disabled until we build with Crashpad again. - # CMAKE_BACKTRACE_URL: ${{ secrets.SENTRY_MINIDUMP_ENDPOINT }} - # CMAKE_BACKTRACE_TOKEN: master_${{ github.event.number }}_${{ github.sha }} # OSX-specific variables DEVELOPER_DIR: /Applications/Xcode_11.2.app/Contents/Developer diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 96bd88ba1a..9a8b87e200 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -17,11 +17,6 @@ env: RELEASE_TYPE: PR RELEASE_NUMBER: ${{ github.event.number }} VERSION_CODE: ${{ github.event.number }} - # Sentry Crash Reporting - # We can't use secrets or actions here, so the actual value has to be hardcoded. - # Disabled until we build with Crashpad again. - # CMAKE_BACKTRACE_URL: "https://o4504831972343808.ingest.sentry.io/api/4504832427950080/minidump/?sentry_key=f511de295975461b8f92a36f4a4a4f32" - # CMAKE_BACKTRACE_TOKEN: PR_${{ github.event.number }}_${{ github.sha }} UPLOAD_BUCKET: overte-public UPLOAD_REGION: fra1 diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index b42a5c3530..7b780fa5e9 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -23,9 +23,6 @@ env: UPLOAD_BUCKET: overte-public UPLOAD_REGION: fra1 UPLOAD_ENDPOINT: "https://fra1.digitaloceanspaces.com" - # Disabled until we build with Crashpad again. - # CMAKE_BACKTRACE_URL: ${{ secrets.SENTRY_MINIDUMP_ENDPOINT }} - # CMAKE_BACKTRACE_TOKEN: ${{ github.ref_name }}_Windows_${{ github.sha }} # WIN-specific variables PreferredToolArchitecture: X64 diff --git a/BUILD.md b/BUILD.md index 76f41433ae..a6ebfb57ad 100644 --- a/BUILD.md +++ b/BUILD.md @@ -60,11 +60,6 @@ Where `/path/to/directory` is the path to a directory where you wish the build f #### Possible Environment Variables ```text -// The URL to post the dump to. -CMAKE_BACKTRACE_URL -// The identifying tag of the release. -CMAKE_BACKTRACE_TOKEN - // The release version, e.g., 2021.3.2. RELEASE_NUMBER // The build commit, e.g., use a Git hash for the most recent commit in the branch - fd6973b. @@ -93,6 +88,15 @@ USE_STABLE_GLOBAL_SERVICES=1 BUILD_GLOBAL_SERVICES=STABLE ``` +#### Possible CMake Variables + +```text +// The URL to post the dump to. +OVERTE_BACKTRACE_URL +// The identifying tag of the release. +OVERTE_BACKTRACE_TOKEN +``` + #### Generate Files ```bash diff --git a/CMakeLists.txt b/CMakeLists.txt index b5ffaf19cd..e9be2e59c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,6 +169,8 @@ set(BUILD_TOOLS_OPTION ON) set(BUILD_INSTALLER_OPTION ON) set(DISABLE_QML_OPTION OFF) set(DOWNLOAD_SERVERLESS_CONTENT_OPTION OFF) +set(OVERTE_BACKTRACE_URL "" CACHE STRING "URL to an endpoint for uploading crash-dumps. For example Sentry.") +set(OVERTE_BACKTRACE_TOKEN "" CACHE STRING "Token used to identify with release or build is uploading crash-dumps.") if (ANDROID OR UWP) set(BUILD_SERVER_OPTION OFF) diff --git a/cmake/macros/AddCrashpad.cmake b/cmake/macros/AddCrashpad.cmake index dfd4cc188c..2543c0b507 100644 --- a/cmake/macros/AddCrashpad.cmake +++ b/cmake/macros/AddCrashpad.cmake @@ -4,6 +4,7 @@ # # Created by Clement Brisset on 01/19/18. # Copyright 2018 High Fidelity, Inc. +# Copyright 2025 Overte e.V. # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html @@ -13,18 +14,14 @@ macro(add_crashpad) set (USE_CRASHPAD TRUE) message(STATUS "Checking crashpad config") - if ("$ENV{CMAKE_BACKTRACE_URL}" STREQUAL "") - message(STATUS "Checking crashpad config - CMAKE_BACKTRACE_URL is not set, disabled.") + if (OVERTE_BACKTRACE_URL STREQUAL "") + message(STATUS "Checking crashpad config - -DOVERTE_BACKTRACE_URL is empty, disabled.") set(USE_CRASHPAD FALSE) - else() - set(CMAKE_BACKTRACE_URL $ENV{CMAKE_BACKTRACE_URL}) endif() - if ("$ENV{CMAKE_BACKTRACE_TOKEN}" STREQUAL "") - message(STATUS "Checking crashpad config - CMAKE_BACKTRACE_TOKEN is not set, disabled.") + if (OVERTE_BACKTRACE_TOKEN STREQUAL "") + message(STATUS "Checking crashpad config - -DOVERTE_BACKTRACE_TOKEN is empty, disabled.") set(USE_CRASHPAD FALSE) - else() - set(CMAKE_BACKTRACE_TOKEN $ENV{CMAKE_BACKTRACE_TOKEN}) endif() if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") @@ -42,8 +39,8 @@ macro(add_crashpad) endif() add_definitions(-DHAS_CRASHPAD) - add_definitions(-DCMAKE_BACKTRACE_URL=\"${CMAKE_BACKTRACE_URL}\") - add_definitions(-DCMAKE_BACKTRACE_TOKEN=\"${CMAKE_BACKTRACE_TOKEN}\") + add_definitions(-DOVERTE_BACKTRACE_URL=\"${OVERTE_BACKTRACE_URL}\") + add_definitions(-DOVERTE_BACKTRACE_TOKEN=\"${OVERTE_BACKTRACE_TOKEN}\") target_include_directories(${TARGET_NAME} PRIVATE ${CRASHPAD_INCLUDE_DIRS}) target_link_libraries(${TARGET_NAME} ${CRASHPAD_LIBRARY} ${CRASHPAD_UTIL_LIBRARY} ${CRASHPAD_BASE_LIBRARY}) diff --git a/libraries/networking/src/crash-handler/CrashHandler.h b/libraries/networking/src/crash-handler/CrashHandler.h index d2e8a4b5b5..75213a4dd8 100644 --- a/libraries/networking/src/crash-handler/CrashHandler.h +++ b/libraries/networking/src/crash-handler/CrashHandler.h @@ -3,7 +3,7 @@ // // // Created by Dale Glass on 25/06/2023. -// Copyright 2023 Overte e.V. +// Copyright 2023-2025 Overte e.V. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -103,7 +103,7 @@ public slots: * Reasons for it failing to start include: * * * Not having a crash reporter for the platform - * * Crash reporter not being configured with reporting URLs (CMAKE_BACKTRACE_TOKEN and CMAKE_BACKTRACE_URL) + * * Crash reporter not being configured with reporting URLs (OVERTE_BACKTRACE_TOKEN and OVERTE_BACKTRACE_URL) * * Crash reporter is present and configured, but failed to initialize for some reason * * @return true Crash reporter is present, configured and working. @@ -118,7 +118,7 @@ public slots: * This setting is independent of isCrashMonitorStarted() -- crash reporting may be enabled but fail to work * due to the crash reporting component being missing or failing to initialize. * - * @return true Crashes will be reported to CMAKE_BACKTRACE_URL + * @return true Crashes will be reported to OVERTE_BACKTRACE_URL * @return false Crashes will not be reported */ bool isEnabled() const { return _crashReportingEnabled; } @@ -126,7 +126,7 @@ public slots: /** * @brief Set whether we want to submit crash reports to the report server * - * The report server is configured with CMAKE_BACKTRACE_URL. + * The report server is configured with OVERTE_BACKTRACE_URL. * Emits crashReportingEnabledChanged signal. * * @note This automatically calls start(), so it should be called after setPath(), setUrl() and setToken() @@ -137,7 +137,7 @@ public slots: /** * @brief Set the URL where to send crash reports to * - * If not set, a predefined URL specified at compile time via CMAKE_BACKTRACE_URL + * If not set, a predefined URL specified at compile time via OVERTE_BACKTRACE_URL * will be used. * * @param url URL @@ -150,7 +150,7 @@ public slots: * This is an identifier in the crash collection service, such as Sentry, and may contain * a branch name or a version number. * - * If not set, a predefined token specified at compile time via CMAKE_BACKTRACE_TOKEN + * If not set, a predefined token specified at compile time via OVERTE_BACKTRACE_TOKEN * will be used. * * @param token Token diff --git a/libraries/networking/src/crash-handler/CrashHandlerBackend_Crashpad.cpp b/libraries/networking/src/crash-handler/CrashHandlerBackend_Crashpad.cpp index 70b0189f29..cf893f267b 100644 --- a/libraries/networking/src/crash-handler/CrashHandlerBackend_Crashpad.cpp +++ b/libraries/networking/src/crash-handler/CrashHandlerBackend_Crashpad.cpp @@ -4,6 +4,7 @@ // // Created by Clement Brisset on 01/19/18. // Copyright 2018 High Fidelity, Inc. +// Copyright 2025 Overte e.V. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -47,8 +48,8 @@ Q_LOGGING_CATEGORY(crash_handler, "overte.crash_handler") -static const std::string BACKTRACE_URL{ CMAKE_BACKTRACE_URL }; -static const std::string BACKTRACE_TOKEN{ CMAKE_BACKTRACE_TOKEN }; +static const std::string BACKTRACE_URL{ OVERTE_BACKTRACE_URL }; +static const std::string BACKTRACE_TOKEN{ OVERTE_BACKTRACE_TOKEN }; std::string custom_backtrace_url; std::string custom_backtrace_token; From 9233b7a3b597937f2c59650b2569dd1c37a749ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 14:14:28 +0200 Subject: [PATCH 05/44] Remove unused MOBILE variable. --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9be2e59c4..11d1307583 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,11 +149,6 @@ if (NOT DEFINED SERVER_ONLY) set(SERVER_ONLY 0) endif() -if (ANDROID OR UWP) - set(MOBILE 1) -else() - set(MOBILE 0) -endif() From 5e14df33deb606828483179d7cfaf5dfb7b0982e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 15:07:03 +0200 Subject: [PATCH 06/44] Replace USE_GLES environment variables with OVERTE_RENDERING_BACKEND cache variable. --- BUILD.md | 2 +- CMakeLists.txt | 39 ++++++++++++++++------------- cmake/macros/AutoScribeShader.cmake | 4 +-- plugins/CMakeLists.txt | 4 +-- plugins/oculus/CMakeLists.txt | 4 +-- plugins/openvr/CMakeLists.txt | 4 +-- 6 files changed, 30 insertions(+), 27 deletions(-) diff --git a/BUILD.md b/BUILD.md index a6ebfb57ad..18c6c40a75 100644 --- a/BUILD.md +++ b/BUILD.md @@ -140,7 +140,7 @@ maximum compatibility. ### Developer Build Options -* USE_GLES +* OVERTE_RENDERING_BACKEND * DISABLE_UI ### Devices diff --git a/CMakeLists.txt b/CMakeLists.txt index 11d1307583..1daf37d230 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,21 +13,12 @@ cmake_minimum_required(VERSION 3.24) include(SelectLibraryConfigurations) -# read USE_GLES enviroment variable and sets it as GLES option -# TODO still gets overwritten by "use GLES on linux aarch64" -set(GLES_OPTION "$ENV{USE_GLES}") - # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) # Instruct CMake to run rcc automatically when needed set(CMAKE_AUTORCC ON) -# use GLES on linux aarch64 -if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") - set(GLES_OPTION ON) -endif() - # set our OS X deployment target # (needs to be set before first project() call and before prebuild.py) if (APPLE) @@ -151,6 +142,15 @@ endif() +# +# Overte build variables +# +# use OpenGL ES on Linux aarch64 and Android. +if ((CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") OR ANDROID) + set(OVERTE_RENDERING_BACKEND "GLES" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") +else() + set(OVERTE_RENDERING_BACKEND "OpenGL" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") +endif() # Use default time server if none defined in environment set_from_env(TIMESERVER_URL TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256") @@ -183,7 +183,6 @@ if (SERVER_ONLY) endif() if (ANDROID) - set(GLES_OPTION ON) set(PLATFORM_QT_COMPONENTS AndroidExtras WebView) add_definitions(-DHIFI_ANDROID_APP=\"${HIFI_ANDROID_APP}\") if ( @@ -227,7 +226,6 @@ option(BUILD_TESTS "Build tests" ${BUILD_TESTS_OPTION}) option(BUILD_MANUAL_TESTS "Build manual tests" ${BUILD_MANUAL_TESTS_OPTION}) option(BUILD_TOOLS "Build tools" ${BUILD_TOOLS_OPTION}) option(BUILD_INSTALLER "Build installer" ${BUILD_INSTALLER_OPTION}) -option(USE_GLES "Use OpenGL ES" ${GLES_OPTION}) option(USE_KHR_ROBUSTNESS "Use KHR_robustness" OFF) option(DISABLE_QML "Disable QML" ${DISABLE_QML_OPTION}) option(DISABLE_KTX_CACHE "Disable KTX Cache" OFF) @@ -243,13 +241,18 @@ if (USE_KHR_ROBUSTNESS) add_definitions(-DUSE_KHR_ROBUSTNESS) endif() -if (USE_GLES) - add_definitions(-DUSE_GLES) - add_definitions(-DGPU_POINTER_STORAGE_SHARED) - set(PLATFORM_GL_BACKEND gpu-gl-common gpu-gles) +if (OVERTE_RENDERING_BACKEND STREQUAL "GLES") + add_definitions(-DUSE_GLES) + add_definitions(-DGPU_POINTER_STORAGE_SHARED) + set(PLATFORM_GL_BACKEND gpu-gl-common gpu-gles) +elseif (OVERTE_RENDERING_BACKEND STREQUAL "OpenGL") + add_definitions(-DGPU_POINTER_STORAGE_RAW) + set(PLATFORM_GL_BACKEND gpu-gl-common gpu-gl) +elseif (OVERTE_RENDERING_BACKEND STREQUAL "Vulkan") + # TODO + message(FATAL_ERROR "Vulkan backend selected, but not implemented yet.") else() - add_definitions(-DGPU_POINTER_STORAGE_RAW) - set(PLATFORM_GL_BACKEND gpu-gl-common gpu-gl) + message(FATAL_ERROR "Invalid OVERTE_RENDERING_BACKEND set. Expected 'GLES', 'OpenGL', or 'Vulkan'. Got '${OVERTE_RENDERING_BACKEND}'") endif() foreach(PLATFORM_QT_COMPONENT ${PLATFORM_QT_COMPONENTS}) @@ -262,7 +265,7 @@ MESSAGE(STATUS "Build client: " ${BUILD_CLIENT}) MESSAGE(STATUS "Build tests: " ${BUILD_TESTS}) MESSAGE(STATUS "Build tools: " ${BUILD_TOOLS}) MESSAGE(STATUS "Build installer: " ${BUILD_INSTALLER}) -MESSAGE(STATUS "GL ES: " ${USE_GLES}) +message(STATUS "Rendering backend: " ${OVERTE_RENDERING_BACKEND}) MESSAGE(STATUS "DL serverless content: " ${DOWNLOAD_SERVERLESS_CONTENT}) if (DISABLE_QML) diff --git a/cmake/macros/AutoScribeShader.cmake b/cmake/macros/AutoScribeShader.cmake index ef72944a7e..a6f75a0567 100644 --- a/cmake/macros/AutoScribeShader.cmake +++ b/cmake/macros/AutoScribeShader.cmake @@ -128,11 +128,11 @@ macro(AUTOSCRIBE_SHADER) file(WRITE "${SHADER_SCRIBED}.name" "${SHADER_NAME}.${SHADER_TYPE}") AUTOSCRIBE_APPEND_QRC("${SHADER_COUNT}/name" "${SHADER_NAME_FILE}") - if (USE_GLES) + if (OVERTE_RENDERING_BACKEND STREQUAL "GLES") set(SPIRV_CROSS_ARGS --version 310es) AUTOSCRIBE_PLATFORM_SHADER("310es") AUTOSCRIBE_PLATFORM_SHADER("310es/stereo") - else() + else() # OpenGL set(SPIRV_CROSS_ARGS --version 410 --no-420pack-extension) AUTOSCRIBE_PLATFORM_SHADER("410") AUTOSCRIBE_PLATFORM_SHADER("410/stereo") diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 5e22dfc41d..40327132a3 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -1,7 +1,7 @@ # # Created by Bradley Austin Davis on 2015/10/25 # Copyright 2015 High Fidelity, Inc. -# Copyright 2023-2024 Overte e.V. +# Copyright 2023-2025 Overte e.V. # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -13,7 +13,7 @@ list(REMOVE_ITEM PLUGIN_SUBDIRS "CMakeFiles") # client-side plugins if (NOT SERVER_ONLY AND NOT ANDROID) - if (WIN32 AND (NOT USE_GLES)) + if (WIN32 AND (NOT OVERTE_RENDERING_BACKEND STREQUAL "GLES")) set(DIR "oculus") add_subdirectory(${DIR}) set(DIR "oculusLegacy") diff --git a/plugins/oculus/CMakeLists.txt b/plugins/oculus/CMakeLists.txt index 32b3d93238..f6fdfd5b73 100644 --- a/plugins/oculus/CMakeLists.txt +++ b/plugins/oculus/CMakeLists.txt @@ -1,14 +1,14 @@ # # Created by Bradley Austin Davis on 2015/10/25 # Copyright 2015 High Fidelity, Inc. -# Copyright 2023 Overte e.V. +# Copyright 2023-2025 Overte e.V. # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html # SPDX-License-Identifier: Apache-2.0 # -if (WIN32 AND (NOT USE_GLES)) +if (WIN32 AND (NOT OVERTE_RENDERING_BACKEND STREQUAL "GLES")) # if we were passed an Oculus App ID for entitlement checks, send that along if (DEFINED ENV{OCULUS_APP_ID}) diff --git a/plugins/openvr/CMakeLists.txt b/plugins/openvr/CMakeLists.txt index 2cb4035c10..0b24ad9582 100644 --- a/plugins/openvr/CMakeLists.txt +++ b/plugins/openvr/CMakeLists.txt @@ -2,14 +2,14 @@ # Created by Bradley Austin Davis on 2015/11/18 # Copyright 2015 High Fidelity, Inc. # Copyright 2020 Vircadia contributors. -# Copyright 2023 Overte e.V. +# Copyright 2023-2025 Overte e.V. # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html # SPDX-License-Identifier: Apache-2.0 # -if ((WIN32 OR UNIX AND NOT APPLE) AND NOT USE_GLES) +if ((WIN32 OR UNIX AND NOT APPLE) AND (NOT OVERTE_RENDERING_BACKEND STREQUAL "GLES")) set(TARGET_NAME openvr) setup_hifi_plugin(Gui Qml Multimedia) link_hifi_libraries(shared task gl qml networking controllers ui From 3b06290e469eb22144ee2565fb55e2fef8e2ae86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 15:09:01 +0200 Subject: [PATCH 07/44] Remove OVERTE_OPTIMIZE and OVERTE_CPU_ARCHITECTURE, replacing them with sane defaults. --- .github/workflows/linux_server_build.yml | 7 +-- .github/workflows/pr_build.yml | 12 ++-- BUILD.md | 6 -- BUILD_LINUX.md | 12 ---- BUILD_OSX.md | 13 ---- CMakeLists.txt | 77 +++++++++--------------- INSTALLER.md | 4 +- cmake/macros/MemoryDebugger.cmake | 5 +- 8 files changed, 40 insertions(+), 96 deletions(-) diff --git a/.github/workflows/linux_server_build.yml b/.github/workflows/linux_server_build.yml index 3217714683..4e907f241c 100644 --- a/.github/workflows/linux_server_build.yml +++ b/.github/workflows/linux_server_build.yml @@ -168,12 +168,7 @@ jobs: echo "OVERTE_USE_SYSTEM_QT=true" >> $GITHUB_ENV fi - # Architecture specific variables - if [[ "${{ matrix.arch }}" = "aarch64" ]]; then - echo "CMAKE_EXTRA=-DOVERTE_CPU_ARCHITECTURE= -DSERVER_ONLY=true -DBUILD_TOOLS=true" >> $GITHUB_ENV - else # amd64 - echo "CMAKE_EXTRA=-DOVERTE_CPU_ARCHITECTURE=-msse3 -DSERVER_ONLY=true -DBUILD_TOOLS=true" >> $GITHUB_ENV - fi + echo "CMAKE_EXTRA=-DSERVER_ONLY=true -DBUILD_TOOLS=true" >> $GITHUB_ENV # Configuration is broken into multiple steps because you can't set an env var and also reference it in the same step - name: Configure Build Environment 2 diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 9a8b87e200..b905cbb344 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -96,18 +96,18 @@ jobs: if [[ "${{ matrix.arch }}" = "aarch64" ]]; then if [ "${{ matrix.build_type }}" = "full" ]; then - echo "CMAKE_EXTRA=-DOVERTE_CPU_ARCHITECTURE= -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV else - echo "CMAKE_EXTRA=-DOVERTE_CPU_ARCHITECTURE= -DCLIENT_ONLY=1 -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV fi fi if [[ "${{ matrix.arch }}" = "amd64" ]]; then if [ "${{ matrix.build_type }}" = "full" ]; then - echo "CMAKE_EXTRA=-DOVERTE_CPU_ARCHITECTURE=-msse3 -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV else - echo "CMAKE_EXTRA=-DOVERTE_CPU_ARCHITECTURE=-msse3 -DCLIENT_ONLY=1 -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV fi fi fi @@ -118,9 +118,9 @@ jobs: echo "PYTHON_EXEC=python3" >> $GITHUB_ENV echo "INSTALLER_EXT=dmg" >> $GITHUB_ENV if [ "${{ matrix.build_type }}" = "full" ]; then - echo "CMAKE_EXTRA=-DOVERTE_CPU_ARCHITECTURE= -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV else - echo "CMAKE_EXTRA=-DOVERTE_CPU_ARCHITECTURE= -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCLIENT_ONLY=1 -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCLIENT_ONLY=1 -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV fi echo "APP_TARGET_NAME=Overte" >> $GITHUB_ENV echo "CONAN_PROFILE=default" >> $GITHUB_ENV diff --git a/BUILD.md b/BUILD.md index 18c6c40a75..a1bc4c0a75 100644 --- a/BUILD.md +++ b/BUILD.md @@ -131,12 +131,6 @@ The following build options can be used when running CMake * CLIENT_ONLY // Will package only the Interface * SERVER_ONLY // Will package only the Server -### Optimization build options - -* OVERTE_OPTIMIZE - This variable defaults to 1 if not set and enables compiler optimization flags on Linux and MacOS. Setting it to 0 will result in unoptimized build. -* OVERTE_CPU_ARCHITECTURE - This variable contains architecture specific compiler flags which are used if `OVERTE_OPTIMIZE` is true. If it is not set, it defaults to `-march=native -mtune=native`, which helps yield more performance for locally used build, but for packaging it needs to be set to different value for portability, for example `-msse3`. Setting `OVERTE_CPU_ARCHITECTURE` to empty string will use default compiler settings and yield -maximum compatibility. - ### Developer Build Options diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index fee387e4e6..ec0ee945c7 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -114,18 +114,6 @@ git fetch --tags git tag ``` -### Architecture support - -If the build is intended to be packaged for distribution, the `OVERTE_CPU_ARCHITECTURE` -CMake variable needs to be set to an architecture specific value. - -By default, it is set to `-march=native -mtune=native`, which yields builds optimized for a particular -machine, but these builds will not work on machines lacking same CPU instructions. - -For packaging, it is recommended to set it to a different value, for example `-msse3`. This will help ensure that the build will run on all reasonably modern CPUs. - -Setting `OVERTE_CPU_ARCHITECTURE` to an empty string will use the default compiler settings and yield maximum compatibility. - ### Prepare conan diff --git a/BUILD_OSX.md b/BUILD_OSX.md index b9de545b07..709f2bf94e 100644 --- a/BUILD_OSX.md +++ b/BUILD_OSX.md @@ -71,19 +71,6 @@ You can append `-j4` to assign more threads to build with. The number indicates To package the installation, you can simply run `make package` afterwards. -## Architecture Support - -If the build is intended to be packaged for distribution, the `OVERTE_CPU_ARCHITECTURE` -CMake variable needs to be set to an architecture specific value. - -By default, it is set to `-march=native -mtune=native`, which yields builds optimized for a particular -machine, but these builds will not work on machines lacking same CPU instructions. - -For packaging, it is recommended to set it to a different value, for example `-msse3`. This will help ensure that the build will run on all reasonably modern CPUs. - -Setting `OVERTE_CPU_ARCHITECTURE` to an empty string will use the default compiler settings and yield -maximum compatibility. - ## FAQ 1. **Problem:** Running the scheme `interface.app` from Xcode causes a crash for Interface related to `libgl`. diff --git a/CMakeLists.txt b/CMakeLists.txt index 1daf37d230..7bfe289d5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,58 +32,41 @@ if ((NOT "${RELEASE_TYPE}" STREQUAL "PRODUCTION") AND (NOT "${RELEASE_TYPE}" STR set(RELEASE_TYPE "DEV") endif() -# OVERTE_OPTIMIZE -# Variable determining Overte optimization. If not set, it defaults to true. -# Should be set to false to get completely unoptimized build for easier line-by-line debugging +# +# Default compiler flags +# +# Compiler flags need to be set before calling project(). if( NOT WIN32 ) - if(NOT DEFINED OVERTE_OPTIMIZE) - message("Enabling code optimization for Overte and compiled dependencies") - set(OVERTE_OPTIMIZE true CACHE BOOL "Enable code optimization for Overte and compiled dependencies") - endif() - - set(OVERTE_OPTIMIZE_FLAGS "") - - if(OVERTE_OPTIMIZE) - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - message("Clang compiler detected, adding -O3 -fPIC -g flags") - set(OVERTE_OPTIMIZE_FLAGS "-O3 -fPIC -g") - elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") - message("GCC compiler detected, adding -O3 -fPIC -ggdb flags") - set(OVERTE_OPTIMIZE_FLAGS "-O3 -fPIC -ggdb") - else() - message("No predefined optimization flags for compiler ${CMAKE_CXX_COMPILER_ID}") - endif() - endif() - MESSAGE(STATUS "OVERTE_OPTIMIZE: ${OVERTE_OPTIMIZE}") - - # OVERTE_CPU_ARCHITECTURE - # Variable determining CPU architecture for which Overte will be built. - # If defined, it's appended to CXXFLAGS and CFLAGS for Overte - - #Assume -march=native for compilers that allow it if architecture is not specified - if(NOT DEFINED OVERTE_CPU_ARCHITECTURE) - if(OVERTE_OPTIMIZE AND ( (CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU") ) ) - message("Optimization is enabled, but architecture is not specified. Assuming native build") - set(OVERTE_CPU_ARCHITECTURE "-march=native -mtune=native" CACHE STRING "Specify architecture dependent compiler flags here") - endif() - endif() - - if(DEFINED OVERTE_CPU_ARCHITECTURE) - set(OVERTE_OPTIMIZE_FLAGS "${OVERTE_OPTIMIZE_FLAGS} ${OVERTE_CPU_ARCHITECTURE}") - message("Adding CPU architecture flags: ${OVERTE_CPU_ARCHITECTURE}") - MESSAGE(STATUS "OVERTE_CPU_ARCHITECTURE: ${OVERTE_CPU_ARCHITECTURE}") - endif() - # Function alignment is necessary for V8. # SetAlignedPointerInInternalField requires at least 2 byte alignment and -falign-functions will set alignment # to machine specific value which should be greater than 2. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OVERTE_OPTIMIZE_FLAGS} -falign-functions") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OVERTE_OPTIMIZE_FLAGS} -falign-functions") - - set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} ${OVERTE_OPTIMIZE_FLAGS} -falign-functions") - set(ENV{CFLAGS} "$ENV{CFLAGS} ${OVERTE_OPTIMIZE_FLAGS} -falign-functions") - message($ENV{CXXFLAGS}) + if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(CMAKE_CXX_FLAGS "-falign-functions -fPIC -m64 -mss3" CACHE STRING "C++ compiler flags for all build types.") + set(CMAKE_C_FLAGS "-falign-functions -fPIC -m64 -mss3" CACHE STRING "C compiler flags for all build types.") + elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + # TODO: Find out which architecture optimizations to use on aarch64. + # We should probably target the 64bit version of the Raspberry Pi 2 as minimum. + set(CMAKE_CXX_FLAGS "-falign-functions -fPIC" CACHE STRING "C++ compiler flags for all build types.") + set(CMAKE_C_FLAGS "-falign-functions -fPIC" CACHE STRING "C++ compiler flags for all build types.") + endif() + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + message("Clang compiler detected, setting default flags.") + set(CMAKE_CXX_FLAGS_DEBUG "-Og -g" CACHE STRING "C++ compiler flags for Debug builds.") + set(CMAKE_C_FLAGS_DEBUG "-Og -g" CACHE STRING "C compiler flags for Debug builds.") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -DNDEBUG -g" CACHE STRING "C++ compiler flags for RelWithDebInfo builds.") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -DNDEBUG -g" CACHE STRING "C compiler flags for RelWithDebInfo builds.") + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "C++ compiler flags for Release builds.") + set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "C compiler flags for Release builds.") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + message("GCC compiler detected, setting default flags") + set(CMAKE_CXX_FLAGS_DEBUG "-Og -ggdb3" CACHE STRING "C++ compiler flags for Debug builds.") + set(CMAKE_C_FLAGS_DEBUG "-Og -ggdb3" CACHE STRING "C compiler flags for Debug builds.") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -DNDEBUG -ggdb2" CACHE STRING "C++ compiler flags for RelWithDebInfo builds.") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -DNDEBUG -ggdb2" CACHE STRING "C compiler flags for RelWithDebInfo builds.") + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "C++ compiler flags for Release builds.") + set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "C compiler flags for Release builds.") + endif() endif() diff --git a/INSTALLER.md b/INSTALLER.md index 352f9dfe53..cbc62b2c21 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -191,7 +191,7 @@ conan install . -s build_type=Release -b missing -pr:b=default -of build ``` Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. ```bash -cmake --preset conan-release -DOVERTE_CPU_ARCHITECTURE=-msse3 +cmake --preset conan-release ``` 4. Build @@ -223,7 +223,7 @@ conan install . -s build_type=Release -b missing -pr:b=default -of build ``` Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. ```bash -cmake --preset conan-release -DOVERTE_CPU_ARCHITECTURE=-msse3 -DSERVER_ONLY=true -DBUILD_TOOLS=true +cmake --preset conan-release -DSERVER_ONLY=true -DBUILD_TOOLS=true ``` 4. Build diff --git a/cmake/macros/MemoryDebugger.cmake b/cmake/macros/MemoryDebugger.cmake index 4bbae3d39e..dde55e26dd 100644 --- a/cmake/macros/MemoryDebugger.cmake +++ b/cmake/macros/MemoryDebugger.cmake @@ -2,7 +2,7 @@ # MemoryDebugger.cmake # # Copyright 2015 High Fidelity, Inc. -# Copyright 2023 Overte e.V. +# Copyright 2023-2025 Overte e.V. # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -15,9 +15,6 @@ if ("$ENV{OVERTE_MEMORY_DEBUGGING}") message(FATAL_ERROR "Thread debugging and memory debugging can't be enabled at the same time." ) endif() - if (OVERTE_OPTIMIZE) - message(WARNING "You should consider building without optimization by passing -DOVERTE_OPTIMIZE=false to CMake") - endif() if (NOT CMAKE_BUILD_TYPE MATCHES "Debug") message(WARNING "You should consider building with debugging enabled by passing -DCMAKE_BUILD_TYPE=Debug to CMake. Current type is ${CMAKE_BUILD_TYPE}") endif() From e3fd9cbc55be1e0094f2160edb785b3f52cc8603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 15:39:24 +0200 Subject: [PATCH 08/44] Replace MACOSX_DEPLOYMENT_TARGET environment variable with CMAKE_OSX_DEPLOYMENT_TARGET cache variable. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bfe289d5f..12239cef82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,9 +20,9 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) # set our OS X deployment target -# (needs to be set before first project() call and before prebuild.py) if (APPLE) - set(ENV{MACOSX_DEPLOYMENT_TARGET} 10.11) + # Needs to be set before the first project() call. + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Specifies the minimum version of the target platform (e.g. macOS or iOS) on which the target binaries are to be deployed.") endif() set(EXTERNAL_BUILD_ASSETS "https://build-deps.overte.org") From 018abbe4fc0c850b2f91ff447cc2c366b773f711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 15:43:11 +0200 Subject: [PATCH 09/44] Remove Visual Studio 2017 workaround. --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12239cef82..6dd1880288 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -306,11 +306,6 @@ add_definitions(-DGLM_FORCE_RADIANS) add_definitions(-DGLM_ENABLE_EXPERIMENTAL) add_definitions(-DGLM_FORCE_CTOR_INIT) -if (WIN32) - # Deal with fakakta Visual Studo 2017 bug - add_definitions(-DQT_NO_FLOAT16_OPERATORS -DWIN32) -endif() - if (HIFI_USE_OPTIMIZED_IK) MESSAGE(STATUS "SET THE USE IK DEFINITION ") add_definitions(-DHIFI_USE_OPTIMIZED_IK) From 0b20a901d3f7508c2146b29e4c76554a26f9e049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 15:45:17 +0200 Subject: [PATCH 10/44] Replace TIMESERVER_URL with OVERTE_TIMESERVER_URL. --- CMakeLists.txt | 3 +-- cmake/macros/OptionalWinExecutableSigning.cmake | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dd1880288..acb66023c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,9 +134,8 @@ if ((CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aar else() set(OVERTE_RENDERING_BACKEND "OpenGL" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") endif() +set(OVERTE_TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256" CACHE STRING "URL to timeserver used for signing executables.") -# Use default time server if none defined in environment -set_from_env(TIMESERVER_URL TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256") set(HIFI_USE_OPTIMIZED_IK_OPTION OFF) set(BUILD_CLIENT_OPTION ON) diff --git a/cmake/macros/OptionalWinExecutableSigning.cmake b/cmake/macros/OptionalWinExecutableSigning.cmake index 8f9fde672c..4d06c6791e 100644 --- a/cmake/macros/OptionalWinExecutableSigning.cmake +++ b/cmake/macros/OptionalWinExecutableSigning.cmake @@ -22,7 +22,7 @@ macro(optional_win_executable_signing) # setup a post build command to sign the executable add_custom_command( TARGET ${TARGET_NAME} POST_BUILD - COMMAND ${SIGNTOOL_EXECUTABLE} sign /fd sha256 /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr ${TIMESERVER_URL} /td SHA256 ${EXECUTABLE_PATH} + COMMAND ${SIGNTOOL_EXECUTABLE} sign /fd sha256 /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr ${OVERTE_TIMESERVER_URL} /td SHA256 ${EXECUTABLE_PATH} ) else () message(FATAL_ERROR "HF_PFX_PASSPHRASE must be set for executables to be signed.") From 96a55f0d9d74e639b51afb3249171298219b57a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 15:51:06 +0200 Subject: [PATCH 11/44] Replace EXTERNAL_BUILD_ASSETS with OVERTE_EXTERNAL_BUILD_ASSETS. --- CMakeLists.txt | 3 +-- launchers/qt/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index acb66023c7..ab141d9f98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,8 +25,6 @@ if (APPLE) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Specifies the minimum version of the target platform (e.g. macOS or iOS) on which the target binaries are to be deployed.") endif() -set(EXTERNAL_BUILD_ASSETS "https://build-deps.overte.org") - set(RELEASE_TYPE "$ENV{RELEASE_TYPE}") if ((NOT "${RELEASE_TYPE}" STREQUAL "PRODUCTION") AND (NOT "${RELEASE_TYPE}" STREQUAL "PR")) set(RELEASE_TYPE "DEV") @@ -134,6 +132,7 @@ if ((CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aar else() set(OVERTE_RENDERING_BACKEND "OpenGL" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") endif() +set(OVERTE_EXTERNAL_BUILD_ASSETS "https://build-deps.overte.org" CACHE INTERNAL "") set(OVERTE_TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256" CACHE STRING "URL to timeserver used for signing executables.") diff --git a/launchers/qt/CMakeLists.txt b/launchers/qt/CMakeLists.txt index 0e5ddd6990..209a062619 100644 --- a/launchers/qt/CMakeLists.txt +++ b/launchers/qt/CMakeLists.txt @@ -45,7 +45,7 @@ if (WIN32) ExternalProject_Add( qtlite - URL "${EXTERNAL_BUILD_ASSETS}/dependencies/qtlite/qt-lite-5.9.9-win-oct-15-2019.zip" + URL "${OVERTE_EXTERNAL_BUILD_ASSETS}/dependencies/qtlite/qt-lite-5.9.9-win-oct-15-2019.zip" URL_HASH MD5=0176277bca37d219e83738caf3a698eb CONFIGURE_COMMAND "" BUILD_COMMAND "" @@ -78,7 +78,7 @@ endif () if (APPLE) ExternalProject_Add( qtlite - URL "${EXTERNAL_BUILD_ASSETS}/dependencies/qtlite/qt-lite-5.9.9-mac.zip" + URL "${OVERTE_EXTERNAL_BUILD_ASSETS}/dependencies/qtlite/qt-lite-5.9.9-mac.zip" URL_HASH MD5=0cd78d40e5f539a7e314cf99b6cae0d0 CONFIGURE_COMMAND "" BUILD_COMMAND "" From 99cf96bed2f48cb69601c5f0bbb89dd8cd1e3bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 16:11:12 +0200 Subject: [PATCH 12/44] Replace BUILD_* and BUILD_*_OPTION with OVERTE_BUILD_* cache variables. --- .github/workflows/pr_build.yml | 8 ++-- BUILD.md | 8 ++-- CMakeLists.txt | 48 ++++++++----------- INSTALLER.md | 4 +- assignment-client/CMakeLists.txt | 6 +-- cmake/macros/GenerateInstallers.cmake | 4 +- .../macros/SetupHifiClientServerPlugin.cmake | 5 +- cmake/macros/SetupHifiPlugin.cmake | 2 +- plugins/opusCodec/CMakeLists.txt | 3 +- plugins/pcmCodec/CMakeLists.txt | 3 +- server-console/CMakeLists.txt | 4 +- tools/CMakeLists.txt | 4 +- 12 files changed, 48 insertions(+), 51 deletions(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index b905cbb344..4b64ed7216 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -96,18 +96,18 @@ jobs: if [[ "${{ matrix.arch }}" = "aarch64" ]]; then if [ "${{ matrix.build_type }}" = "full" ]; then - echo "CMAKE_EXTRA=-DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DOVERTE_BUILD_TOOLS=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV else - echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DOVERTE_BUILD_TOOLS=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV fi fi if [[ "${{ matrix.arch }}" = "amd64" ]]; then if [ "${{ matrix.build_type }}" = "full" ]; then - echo "CMAKE_EXTRA=-DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV else - echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DOVERTE_BUILD_TOOLS=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV fi fi fi diff --git a/BUILD.md b/BUILD.md index a1bc4c0a75..0a89ad5600 100644 --- a/BUILD.md +++ b/BUILD.md @@ -124,13 +124,13 @@ In the examples below the variable $NAME would be replaced by the name of the de The following build options can be used when running CMake -* BUILD_CLIENT -* BUILD_SERVER -* BUILD_TESTS -* BUILD_TOOLS * CLIENT_ONLY // Will package only the Interface * SERVER_ONLY // Will package only the Server +* OVERTE_BUILD_CLIENT +* OVERTE_BUILD_SERVER +* OVERTE_BUILD_TESTS +* OVERTE_BUILD_TOOLS ### Developer Build Options diff --git a/CMakeLists.txt b/CMakeLists.txt index ab141d9f98..2af1dcc450 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,6 +126,12 @@ endif() # # Overte build variables # +set(OVERTE_BUILD_CLIENT ON CACHE BOOL "Build Interface.") +set(OVERTE_BUILD_SERVER ON CACHE BOOL "Build domain-server, assignment-client, and ice-server.") +set(OVERTE_BUILD_TESTS OFF CACHE BOOL "Build tests.") +set(OVERTE_BUILD_MANUAL_TESTS OFF CACHE BOOL "Build manual tests.") +set(OVERTE_BUILD_TOOLS ON CACHE BOOL "Build tools. Includes Oven, which is used for some server functionality.") +set(OVERTE_BUILD_INSTALLER ON CACHE BOOL "Build installer.") # use OpenGL ES on Linux aarch64 and Android. if ((CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") OR ANDROID) set(OVERTE_RENDERING_BACKEND "GLES" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") @@ -137,21 +143,15 @@ set(OVERTE_TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256" CACHE STRING set(HIFI_USE_OPTIMIZED_IK_OPTION OFF) -set(BUILD_CLIENT_OPTION ON) -set(BUILD_SERVER_OPTION ON) -set(BUILD_TESTS_OPTION OFF) -set(BUILD_MANUAL_TESTS_OPTION ${BUILD_TESTS_OPTION}) -set(BUILD_TOOLS_OPTION ON) -set(BUILD_INSTALLER_OPTION ON) set(DISABLE_QML_OPTION OFF) set(DOWNLOAD_SERVERLESS_CONTENT_OPTION OFF) set(OVERTE_BACKTRACE_URL "" CACHE STRING "URL to an endpoint for uploading crash-dumps. For example Sentry.") set(OVERTE_BACKTRACE_TOKEN "" CACHE STRING "Token used to identify with release or build is uploading crash-dumps.") if (ANDROID OR UWP) - set(BUILD_SERVER_OPTION OFF) - set(BUILD_TOOLS_OPTION OFF) - set(BUILD_INSTALLER OFF) + set(OVERTE_BUILD_SERVER OFF CACHE BOOL FORCE "Overwritten (mobile build)") + set(OVERTE_BUILD_TOOLS OFF CACHE BOOL FORCE "Overwritten (mobile build)") + set(OVERTE_BUILD_INSTALLER OFF CACHE BOOL FORCE "Overwritten (mobile build)") endif() if (CLIENT_ONLY) @@ -201,12 +201,6 @@ if (USE_GLES AND (NOT ANDROID AND NOT UNIX)) endif() option(HIFI_USE_OPTIMIZED_IK "Use optimized IK" ${HIFI_USE_OPTIMIZED_IK_OPTION}) -option(BUILD_CLIENT "Build client components" ${BUILD_CLIENT_OPTION}) -option(BUILD_SERVER "Build server components" ${BUILD_SERVER_OPTION}) -option(BUILD_TESTS "Build tests" ${BUILD_TESTS_OPTION}) -option(BUILD_MANUAL_TESTS "Build manual tests" ${BUILD_MANUAL_TESTS_OPTION}) -option(BUILD_TOOLS "Build tools" ${BUILD_TOOLS_OPTION}) -option(BUILD_INSTALLER "Build installer" ${BUILD_INSTALLER_OPTION}) option(USE_KHR_ROBUSTNESS "Use KHR_robustness" OFF) option(DISABLE_QML "Disable QML" ${DISABLE_QML_OPTION}) option(DISABLE_KTX_CACHE "Disable KTX Cache" OFF) @@ -241,11 +235,11 @@ foreach(PLATFORM_QT_COMPONENT ${PLATFORM_QT_COMPONENTS}) endforeach() MESSAGE(STATUS "Use optimized IK: " ${HIFI_USE_OPTIMIZED_IK}) -MESSAGE(STATUS "Build server: " ${BUILD_SERVER}) -MESSAGE(STATUS "Build client: " ${BUILD_CLIENT}) -MESSAGE(STATUS "Build tests: " ${BUILD_TESTS}) -MESSAGE(STATUS "Build tools: " ${BUILD_TOOLS}) -MESSAGE(STATUS "Build installer: " ${BUILD_INSTALLER}) +message(STATUS "Build server: " ${OVERTE_BUILD_SERVER}) +message(STATUS "Build client: " ${OVERTE_BUILD_CLIENT}) +message(STATUS "Build tests: " ${OVERTE_BUILD_TESTS}) +message(STATUS "Build tools: " ${OVERTE_BUILD_TOOLS}) +message(STATUS "Build installer: " ${OVERTE_BUILD_INSTALLER}) message(STATUS "Rendering backend: " ${OVERTE_RENDERING_BACKEND}) MESSAGE(STATUS "DL serverless content: " ${DOWNLOAD_SERVERLESS_CONTENT}) @@ -327,11 +321,11 @@ if (BUILD_GPU_FRAME_PLAYER_ONLY) add_subdirectory(tools/gpu-frame-player) else() -# BUILD_TOOLS option will be handled inside the tools's CMakeLists.txt because 'scribe' tool is required for build anyway +# OVERTE_BUILD_TOOLS option will be handled inside the tools's CMakeLists.txt because 'scribe' tool is required for build anyway add_subdirectory(tools) # add subdirectories for all targets -if (BUILD_SERVER) +if (OVERTE_BUILD_SERVER) add_subdirectory(assignment-client) set_target_properties(assignment-client PROPERTIES FOLDER "Apps") add_subdirectory(domain-server) @@ -340,7 +334,7 @@ if (BUILD_SERVER) set_target_properties(ice-server PROPERTIES FOLDER "Apps") endif() -if (BUILD_CLIENT) +if (OVERTE_BUILD_CLIENT) add_subdirectory(interface) if (APPLE) set_target_properties(Overte PROPERTIES FOLDER "Apps") @@ -352,25 +346,25 @@ if (BUILD_CLIENT) option(USE_NEURON "Build Interface with Neuron library/plugin" OFF) endif() -if (BUILD_CLIENT OR BUILD_SERVER) +if (OVERTE_BUILD_CLIENT OR OVERTE_BUILD_SERVER) add_subdirectory(plugins) add_subdirectory(server-console) endif() endif() -if (BUILD_TESTS) +if (OVERTE_BUILD_TESTS) # Turn on testing so that add_test works # MUST be in the root cmake file for ctest to work include(CTest) enable_testing() add_subdirectory(tests) - if (BUILD_MANUAL_TESTS) + if (OVERTE_BUILD_MANUAL_TESTS) add_subdirectory(tests-manual) endif() endif() -if (BUILD_INSTALLER) +if (OVERTE_BUILD_INSTALLER) if (UNIX) install( DIRECTORY "${CMAKE_SOURCE_DIR}/scripts" diff --git a/INSTALLER.md b/INSTALLER.md index cbc62b2c21..3670630be3 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -191,7 +191,7 @@ conan install . -s build_type=Release -b missing -pr:b=default -of build ``` Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. ```bash -cmake --preset conan-release +cmake --preset conan-release -DOVERTE_BUILD_CLIENT=false -DOVERTE_BUILD_TOOLS=true ``` 4. Build @@ -223,7 +223,7 @@ conan install . -s build_type=Release -b missing -pr:b=default -of build ``` Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. ```bash -cmake --preset conan-release -DSERVER_ONLY=true -DBUILD_TOOLS=true +cmake --preset conan-release -DSERVER_ONLY=true -DOVERTE_BUILD_TOOLS=true ``` 4. Build diff --git a/assignment-client/CMakeLists.txt b/assignment-client/CMakeLists.txt index a0ae90ca4d..f8656670b6 100644 --- a/assignment-client/CMakeLists.txt +++ b/assignment-client/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright 2013-2019 High Fidelity, Inc. -# Copyright 2021-2022 Overte e.V. +# Copyright 2021-2025 Overte e.V. # SPDX-License-Identifier: Apache-2.0 set(TARGET_NAME assignment-client) @@ -27,7 +27,7 @@ include_hifi_library_headers(entities) add_crashpad() target_breakpad() -if (BUILD_TOOLS) +if (OVERTE_BUILD_TOOLS) add_dependencies(${TARGET_NAME} oven) if (WIN32) @@ -43,7 +43,7 @@ if (BUILD_TOOLS) $ $/oven) endif() -endif (BUILD_TOOLS) +endif() if (WIN32) package_libraries_for_deployment() diff --git a/cmake/macros/GenerateInstallers.cmake b/cmake/macros/GenerateInstallers.cmake index 9862ecc290..3b764c13da 100644 --- a/cmake/macros/GenerateInstallers.cmake +++ b/cmake/macros/GenerateInstallers.cmake @@ -136,11 +136,11 @@ macro(GENERATE_INSTALLERS) set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") - if (BUILD_CLIENT) + if (OVERTE_BUILD_CLIENT) cpack_add_component(${CLIENT_COMPONENT} DISPLAY_NAME "Overte Interface") endif () - if (BUILD_SERVER) + if (OVERTE_BUILD_SERVER) cpack_add_component(${SERVER_COMPONENT} DISPLAY_NAME "Overte Server") endif () diff --git a/cmake/macros/SetupHifiClientServerPlugin.cmake b/cmake/macros/SetupHifiClientServerPlugin.cmake index abf9f7ce06..bc4c65002a 100644 --- a/cmake/macros/SetupHifiClientServerPlugin.cmake +++ b/cmake/macros/SetupHifiClientServerPlugin.cmake @@ -1,6 +1,7 @@ # # Created by Brad Hefta-Gaub on 2016/07/07 # Copyright 2016 High Fidelity, Inc. +# Copyright 2025 Overte e.V. # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html @@ -10,7 +11,7 @@ macro(SETUP_HIFI_CLIENT_SERVER_PLUGIN) set(PLUGIN_SUBFOLDER ${ARGN}) setup_hifi_library() - if (BUILD_CLIENT) + if (OVERTE_BUILD_CLIENT) if (APPLE) add_dependencies(Overte ${TARGET_NAME}) else() @@ -18,7 +19,7 @@ macro(SETUP_HIFI_CLIENT_SERVER_PLUGIN) endif() endif() - if (BUILD_SERVER) + if (OVERTE_BUILD_SERVER) add_dependencies(assignment-client ${TARGET_NAME}) endif() diff --git a/cmake/macros/SetupHifiPlugin.cmake b/cmake/macros/SetupHifiPlugin.cmake index 376c0fe4a5..31fbac3588 100644 --- a/cmake/macros/SetupHifiPlugin.cmake +++ b/cmake/macros/SetupHifiPlugin.cmake @@ -8,7 +8,7 @@ macro(SETUP_HIFI_PLUGIN) set(${TARGET_NAME}_SHARED 1) setup_hifi_library(${ARGV}) - if (BUILD_CLIENT) + if (OVERTE_BUILD_CLIENT) if (APPLE) add_dependencies(Overte ${TARGET_NAME}) else() diff --git a/plugins/opusCodec/CMakeLists.txt b/plugins/opusCodec/CMakeLists.txt index 583aff85d6..982dd03160 100644 --- a/plugins/opusCodec/CMakeLists.txt +++ b/plugins/opusCodec/CMakeLists.txt @@ -1,6 +1,7 @@ # # Created by Michael Bailey on 12/20/2019 # Copyright 2019 Michael Bailey +# Copyright 2025 Overte e.V. # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html @@ -11,6 +12,6 @@ setup_hifi_client_server_plugin() link_hifi_libraries(shared audio plugins) target_opus() -if (BUILD_SERVER) +if (OVERTE_BUILD_SERVER) install_beside_console() endif () diff --git a/plugins/pcmCodec/CMakeLists.txt b/plugins/pcmCodec/CMakeLists.txt index 34e49d908b..900ae4d37e 100644 --- a/plugins/pcmCodec/CMakeLists.txt +++ b/plugins/pcmCodec/CMakeLists.txt @@ -1,6 +1,7 @@ # # Created by Brad Hefta-Gaub on 6/9/2016 # Copyright 2016 High Fidelity, Inc. +# Copyright 2025 Overte e.V. # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html @@ -10,6 +11,6 @@ set(TARGET_NAME pcmCodec) setup_hifi_client_server_plugin() link_hifi_libraries(shared audio plugins) -if (BUILD_SERVER) +if (OVERTE_BUILD_SERVER) install_beside_console() endif () diff --git a/server-console/CMakeLists.txt b/server-console/CMakeLists.txt index 045b5cb38b..c4922ec8b7 100644 --- a/server-console/CMakeLists.txt +++ b/server-console/CMakeLists.txt @@ -28,7 +28,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Server Console") set_target_properties(${TARGET_NAME}-npm-install PROPERTIES FOLDER "hidden/Server Console") # add a dependency from the package target to the server components -if (BUILD_CLIENT) +if (OVERTE_BUILD_CLIENT) if (APPLE) add_dependencies(${TARGET_NAME} Overte) else() @@ -36,7 +36,7 @@ if (BUILD_CLIENT) endif() endif() -if (BUILD_SERVER) +if (OVERTE_BUILD_SERVER) add_dependencies(${TARGET_NAME} assignment-client domain-server) endif() diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index ce1e8c4d71..0eb4b8d986 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -22,8 +22,8 @@ function(check_test name) set(BUILD_TOOL_RESULT ${RESULT} PARENT_SCOPE) endfunction() -if (BUILD_TOOLS) - set(ALL_TOOLS +if (OVERTE_BUILD_TOOLS) + set(ALL_TOOLS udt-test gpu-frame-player ice-client From c0397c35b77f983d36d2226a0a473e9ed240842e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 16:22:47 +0200 Subject: [PATCH 13/44] Remove SERVER_ONLY and CLIENT_ONLY environment variables. --- .github/workflows/linux_server_build.yml | 2 +- .github/workflows/master_build.yml | 6 ++---- .github/workflows/pr_build.yml | 4 ++-- .github/workflows/release_build.yml | 3 +-- BUILD.md | 3 --- CMakeLists.txt | 25 ++++++++--------------- INSTALLER.md | 4 ++-- cmake/macros/SetPackagingParameters.cmake | 6 +++--- plugins/CMakeLists.txt | 2 +- 9 files changed, 20 insertions(+), 35 deletions(-) diff --git a/.github/workflows/linux_server_build.yml b/.github/workflows/linux_server_build.yml index 4e907f241c..125b28a0b8 100644 --- a/.github/workflows/linux_server_build.yml +++ b/.github/workflows/linux_server_build.yml @@ -168,7 +168,7 @@ jobs: echo "OVERTE_USE_SYSTEM_QT=true" >> $GITHUB_ENV fi - echo "CMAKE_EXTRA=-DSERVER_ONLY=true -DBUILD_TOOLS=true" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DOVERTE_BUILD_SERVER=true -DOVERTE_BUILD_TOOLS=true -DOVERTE_BUILD_CLIENT=false" >> $GITHUB_ENV # Configuration is broken into multiple steps because you can't set an env var and also reference it in the same step - name: Configure Build Environment 2 diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index c79271a5c8..7f8eebb6b3 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -116,10 +116,8 @@ jobs: echo "GIT_COMMIT_SHORT=${{ steps.buildenv1.outputs.github_sha_short }}" >> $GITHUB_ENV # Build type variables if [ "${{ matrix.build_type }}" = "full" ]; then - echo "CLIENT_ONLY=FALSE" >> $GITHUB_ENV echo "INSTALLER=Overte-${{ github.event.number }}_${{ github.sha }}-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV else - echo "CLIENT_ONLY=TRUE" >> $GITHUB_ENV echo "INSTALLER=Overte-Interface-master$BUILD_NUMBER-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV fi @@ -214,13 +212,13 @@ jobs: if: startsWith(matrix.os, 'Windows') == false shell: bash # This syntax requires CMake 3.23 - run: cmake --preset conan-${BUILD_TYPE,,} -DCLIENT_ONLY:BOOLEAN=$CLIENT_ONLY -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA + run: cmake --preset conan-${BUILD_TYPE,,} -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA - name: Configure CMake (Windows) if: startsWith(matrix.os, 'Windows') shell: bash # This syntax requires CMake 3.23 - run: cmake --preset conan-default -DCLIENT_ONLY:BOOLEAN=$CLIENT_ONLY -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA + run: cmake --preset conan-default -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA - name: Build application shell: bash diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 4b64ed7216..f58ef79c29 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -98,7 +98,7 @@ jobs: if [ "${{ matrix.build_type }}" = "full" ]; then echo "CMAKE_EXTRA=-DOVERTE_BUILD_TOOLS=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV else - echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DOVERTE_BUILD_TOOLS=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DOVERTE_BUILD_SERVER=FALSE -DOVERTE_BUILD_TOOLS=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV fi fi @@ -107,7 +107,7 @@ jobs: if [ "${{ matrix.build_type }}" = "full" ]; then echo "CMAKE_EXTRA=-DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV else - echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DOVERTE_BUILD_TOOLS=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV + echo "CMAKE_EXTRA=-DOVERTE_BUILD_SERVER=FALSE -DOVERTE_BUILD_TOOLS=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV fi fi fi diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 7b780fa5e9..26aabda5af 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -82,7 +82,6 @@ jobs: echo "BUILD_NUMBER=$GIT_COMMIT_SHORT" >> $GITHUB_ENV echo "ARTIFACT_PATTERN=Overte-$RELEASE_NUMBER.$INSTALLER_EXT" >> $GITHUB_ENV - echo "CLIENT_ONLY=FALSE" >> $GITHUB_ENV - uses: actions/checkout@v4 with: @@ -130,7 +129,7 @@ jobs: - name: Configure CMake shell: bash # This syntax requires CMake 3.23 - run: cmake --preset conan-${BUILD_TYPE,,} -DJSDOC_ENABLED:BOOL=TRUE -DCLIENT_ONLY:BOOLEAN=$CLIENT_ONLY -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA + run: cmake --preset conan-${BUILD_TYPE,,} -DJSDOC_ENABLED:BOOL=TRUE -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA - name: Build application shell: bash diff --git a/BUILD.md b/BUILD.md index 0a89ad5600..7866bbbe7a 100644 --- a/BUILD.md +++ b/BUILD.md @@ -124,9 +124,6 @@ In the examples below the variable $NAME would be replaced by the name of the de The following build options can be used when running CMake -* CLIENT_ONLY // Will package only the Interface -* SERVER_ONLY // Will package only the Server - * OVERTE_BUILD_CLIENT * OVERTE_BUILD_SERVER * OVERTE_BUILD_TESTS diff --git a/CMakeLists.txt b/CMakeLists.txt index 2af1dcc450..e5290c88c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,14 +113,6 @@ project(overte) include("cmake/init.cmake") include("cmake/compiler.cmake") -if (NOT DEFINED CLIENT_ONLY) - set(CLIENT_ONLY 0) -endif() - -if (NOT DEFINED SERVER_ONLY) - set(SERVER_ONLY 0) -endif() - # @@ -154,15 +146,6 @@ if (ANDROID OR UWP) set(OVERTE_BUILD_INSTALLER OFF CACHE BOOL FORCE "Overwritten (mobile build)") endif() -if (CLIENT_ONLY) - set(BUILD_SERVER_OPTION OFF) -endif() - -if (SERVER_ONLY) - set(BUILD_CLIENT_OPTION OFF) - set(BUILD_TESTS_OPTION OFF) -endif() - if (ANDROID) set(PLATFORM_QT_COMPONENTS AndroidExtras WebView) add_definitions(-DHIFI_ANDROID_APP=\"${HIFI_ANDROID_APP}\") @@ -257,6 +240,14 @@ if (UNIX AND DEFINED ENV{HIFI_MEMORY_DEBUGGING}) MESSAGE(STATUS "Memory debugging is enabled") endif() +# Set SERVER_ONLY and CLIENT_ONLY for later packaging. +if ((NOT OVERTE_BUILD_CLIENT) AND OVERTE_BUILD_SERVER) + set(SERVER_ONLY ON CACHE BOOL INTERNAL "") +elseif ((NOT OVERTE_BUILD_SERVER) AND OVERTE_BUILD_CLIENT) + set(CLIENT_ONLY ON CACHE BOOL INTERNAL "") +endif() + + # # Helper projects # diff --git a/INSTALLER.md b/INSTALLER.md index 3670630be3..35e9686d62 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -109,7 +109,7 @@ For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PAS 1. Ensure you have all the prerequisites fulfilled from the [MacOS Build Guide](BUILD_OSX.md). 2. Perform a clean CMake in your build folder. e.g. ```bash - BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 RELEASE_BUILD=PRODUCTION BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" STABLE_BUILD=1 PRODUCTION_BUILD=1 RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" RELEASE_TYPE=PRODUCTION cmake -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DCLIENT_ONLY=1 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. + BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 RELEASE_BUILD=PRODUCTION BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" STABLE_BUILD=1 PRODUCTION_BUILD=1 RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" RELEASE_TYPE=PRODUCTION cmake -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. ``` 3. Pick a method to build and package your release. @@ -223,7 +223,7 @@ conan install . -s build_type=Release -b missing -pr:b=default -of build ``` Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. ```bash -cmake --preset conan-release -DSERVER_ONLY=true -DOVERTE_BUILD_TOOLS=true +cmake --preset conan-release -DOVERTE_BUILD_CLIENT=false -DOVERTE_BUILD_TOOLS=true ``` 4. Build diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 2adf65b236..25998b81e2 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -135,10 +135,10 @@ macro(SET_PACKAGING_PARAMETERS) set(INTERFACE_INSTALL_DIR ".") set(NITPICK_INSTALL_DIR ".") - if (CLIENT_ONLY) - set(CONSOLE_EXEC_NAME "Console.app") + if (NOT OVERTE_BUILD_SERVER) + set(CONSOLE_EXEC_NAME "Console.app") else () - set(CONSOLE_EXEC_NAME "Sandbox.app") + set(CONSOLE_EXEC_NAME "Sandbox.app") endif() set(CONSOLE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${CONSOLE_EXEC_NAME}") diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 40327132a3..fca001a37e 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -12,7 +12,7 @@ file(GLOB PLUGIN_SUBDIRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT list(REMOVE_ITEM PLUGIN_SUBDIRS "CMakeFiles") # client-side plugins -if (NOT SERVER_ONLY AND NOT ANDROID) +if (OVERTE_BUILD_CLIENT AND NOT ANDROID) if (WIN32 AND (NOT OVERTE_RENDERING_BACKEND STREQUAL "GLES")) set(DIR "oculus") add_subdirectory(${DIR}) From 42f65699129ce51cfd555e6eb672999a87536eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 16:30:34 +0200 Subject: [PATCH 14/44] Don't disable QML on Windows GLES by default. --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5290c88c1..adf8c81177 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,10 +177,6 @@ if (ANDROID) endif() else () set(PLATFORM_QT_COMPONENTS WebEngine Xml) -endif () - -if (USE_GLES AND (NOT ANDROID AND NOT UNIX)) - set(DISABLE_QML_OPTION ON) endif() option(HIFI_USE_OPTIMIZED_IK "Use optimized IK" ${HIFI_USE_OPTIMIZED_IK_OPTION}) From e8f977c12c6b12538868ab263bd31a6108a872d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 16:33:42 +0200 Subject: [PATCH 15/44] Replace DISABLE_QML_OPTION and DISABLE_QML with OVERTE_DISABLE_QML cache variable. --- BUILD.md | 2 +- CMakeLists.txt | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/BUILD.md b/BUILD.md index 7866bbbe7a..6231d5e585 100644 --- a/BUILD.md +++ b/BUILD.md @@ -132,7 +132,7 @@ The following build options can be used when running CMake ### Developer Build Options * OVERTE_RENDERING_BACKEND -* DISABLE_UI +* OVERTE_DISABLE_QML ### Devices diff --git a/CMakeLists.txt b/CMakeLists.txt index adf8c81177..c6dd99eee6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,7 @@ set(OVERTE_BUILD_TESTS OFF CACHE BOOL "Build tests.") set(OVERTE_BUILD_MANUAL_TESTS OFF CACHE BOOL "Build manual tests.") set(OVERTE_BUILD_TOOLS ON CACHE BOOL "Build tools. Includes Oven, which is used for some server functionality.") set(OVERTE_BUILD_INSTALLER ON CACHE BOOL "Build installer.") +set(OVERTE_DISABLE_QML OFF CACHE BOOL "Build without QML. (For graphics debugging.)") # use OpenGL ES on Linux aarch64 and Android. if ((CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") OR ANDROID) set(OVERTE_RENDERING_BACKEND "GLES" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") @@ -135,7 +136,6 @@ set(OVERTE_TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256" CACHE STRING set(HIFI_USE_OPTIMIZED_IK_OPTION OFF) -set(DISABLE_QML_OPTION OFF) set(DOWNLOAD_SERVERLESS_CONTENT_OPTION OFF) set(OVERTE_BACKTRACE_URL "" CACHE STRING "URL to an endpoint for uploading crash-dumps. For example Sentry.") set(OVERTE_BACKTRACE_TOKEN "" CACHE STRING "Token used to identify with release or build is uploading crash-dumps.") @@ -181,7 +181,6 @@ endif() option(HIFI_USE_OPTIMIZED_IK "Use optimized IK" ${HIFI_USE_OPTIMIZED_IK_OPTION}) option(USE_KHR_ROBUSTNESS "Use KHR_robustness" OFF) -option(DISABLE_QML "Disable QML" ${DISABLE_QML_OPTION}) option(DISABLE_KTX_CACHE "Disable KTX Cache" OFF) option( DOWNLOAD_SERVERLESS_CONTENT @@ -222,9 +221,9 @@ message(STATUS "Build installer: " ${OVERTE_BUILD_INSTALLER}) message(STATUS "Rendering backend: " ${OVERTE_RENDERING_BACKEND}) MESSAGE(STATUS "DL serverless content: " ${DOWNLOAD_SERVERLESS_CONTENT}) -if (DISABLE_QML) - MESSAGE(STATUS "QML disabled!") - add_definitions(-DDISABLE_QML) +if (OVERTE_DISABLE_QML) + message(STATUS "QML disabled!") + add_definitions(-DDISABLE_QML) endif() if (DISABLE_KTX_CACHE) From 6bab8c2cd10ab81e43f743fb67e376e3cb5f3ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 17:39:50 +0200 Subject: [PATCH 16/44] Remove DEPLOY_PACKAGE. We already set DOWNLOAD_SERVERLESS_CONTENT in our main CMakeLists.txt. --- cmake/macros/SetPackagingParameters.cmake | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 25998b81e2..bb5e7dad5b 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -5,6 +5,7 @@ # Created by Leonardo Murillo on 07/14/2015. # Copyright 2015 High Fidelity, Inc. # Copyright 2020 Vircadia contributors. +# Copyright 2025 Overte e.V. # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -44,7 +45,6 @@ macro(SET_PACKAGING_PARAMETERS) endif() if (RELEASE_TYPE STREQUAL "PRODUCTION") - set(DEPLOY_PACKAGE TRUE) set(PRODUCTION_BUILD 1) set(BUILD_VERSION ${RELEASE_NUMBER}) set(BUILD_ORGANIZATION "Overte") @@ -68,7 +68,6 @@ macro(SET_PACKAGING_PARAMETERS) endif () elseif (RELEASE_TYPE STREQUAL "PR") - set(DEPLOY_PACKAGE TRUE) set(PR_BUILD 1) set(BUILD_VERSION "PR${RELEASE_NUMBER}") set(BUILD_ORGANIZATION "Overte - PR${RELEASE_NUMBER}") @@ -115,14 +114,6 @@ macro(SET_PACKAGING_PARAMETERS) set(BUILD_NUMBER ${RELEASE_NUMBER}) endif () - if (DEPLOY_PACKAGE) - # For deployed packages we do not grab the serverless content any longer. - # Instead, we deploy just the serverless content that is in the interface/resources/serverless - # directory. If we ever move back to delivering serverless via a hosted .zip file, - # we can re-enable this. - set(DOWNLOAD_SERVERLESS_CONTENT OFF) - endif () - if (APPLE) set(DMG_SUBFOLDER_NAME "${BUILD_ORGANIZATION}") From a3fa85756ede46c316946ebeced47dd31d231cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 17:41:30 +0200 Subject: [PATCH 17/44] Replace DOWNLOAD_SERVERLESS_CONTENT with OVERTE_DOWNLOAD_SERVERLESS_CONTENT cache variable. --- CMakeLists.txt | 7 +------ interface/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c6dd99eee6..f57fbd2f33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,7 @@ set(OVERTE_BUILD_MANUAL_TESTS OFF CACHE BOOL "Build manual tests.") set(OVERTE_BUILD_TOOLS ON CACHE BOOL "Build tools. Includes Oven, which is used for some server functionality.") set(OVERTE_BUILD_INSTALLER ON CACHE BOOL "Build installer.") set(OVERTE_DISABLE_QML OFF CACHE BOOL "Build without QML. (For graphics debugging.)") +set(OVERTE_DOWNLOAD_SERVERLESS_CONTENT OFF CACHE BOOL "Download and setup default serverless content beside Interface.") # use OpenGL ES on Linux aarch64 and Android. if ((CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") OR ANDROID) set(OVERTE_RENDERING_BACKEND "GLES" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") @@ -136,7 +137,6 @@ set(OVERTE_TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256" CACHE STRING set(HIFI_USE_OPTIMIZED_IK_OPTION OFF) -set(DOWNLOAD_SERVERLESS_CONTENT_OPTION OFF) set(OVERTE_BACKTRACE_URL "" CACHE STRING "URL to an endpoint for uploading crash-dumps. For example Sentry.") set(OVERTE_BACKTRACE_TOKEN "" CACHE STRING "Token used to identify with release or build is uploading crash-dumps.") @@ -182,11 +182,6 @@ endif() option(HIFI_USE_OPTIMIZED_IK "Use optimized IK" ${HIFI_USE_OPTIMIZED_IK_OPTION}) option(USE_KHR_ROBUSTNESS "Use KHR_robustness" OFF) option(DISABLE_KTX_CACHE "Disable KTX Cache" OFF) -option( - DOWNLOAD_SERVERLESS_CONTENT - "Download and setup default serverless content beside Interface" - ${DOWNLOAD_SERVERLESS_CONTENT_OPTION} -) set(PLATFORM_QT_GL OpenGL) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 6390745c74..6596a3bfd9 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -435,7 +435,7 @@ if (SCRIPTS_INSTALL_DIR) ) endif() -if (DOWNLOAD_SERVERLESS_CONTENT) +if (OVERTE_DOWNLOAD_SERVERLESS_CONTENT) add_dependency_external_projects(serverless-content) ExternalProject_Get_Property(serverless-content SOURCE_DIR) From 97978d4a4aa24595f41a6a6156860407284cea7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 17:42:56 +0200 Subject: [PATCH 18/44] Replace USE_NSIGHT with OVERTE_USE_NSIGHT. --- CMakeLists.txt | 2 +- cmake/macros/TargetNsight.cmake | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f57fbd2f33..cf876b4a61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -289,7 +289,7 @@ set(EXTERNAL_PROJECT_PREFIX "project") set_property(DIRECTORY PROPERTY EP_PREFIX ${EXTERNAL_PROJECT_PREFIX}) setup_externals_binary_dir() -option(USE_NSIGHT "Attempt to find the nSight libraries" 1) +set(OVERTE_USE_NSIGHT ON CACHE BOOL "Attempt to find the Nvidia nSight libraries.") # FIXME hack to work on the proper Android toolchain if (ANDROID) diff --git a/cmake/macros/TargetNsight.cmake b/cmake/macros/TargetNsight.cmake index 44ca4eecbf..7f22fcbb6c 100644 --- a/cmake/macros/TargetNsight.cmake +++ b/cmake/macros/TargetNsight.cmake @@ -1,13 +1,14 @@ # # Copyright 2015 High Fidelity, Inc. +# Copyright 2025 Overte e.V. # Created by Bradley Austin Davis on 2015/10/10 # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # macro(TARGET_NSIGHT) - if (WIN32 AND USE_NSIGHT) - + if (WIN32 AND OVERTE_USE_NSIGHT) + # grab the global CHECKED_FOR_NSIGHT_ONCE property get_property(NSIGHT_UNAVAILABLE GLOBAL PROPERTY CHECKED_FOR_NSIGHT_ONCE) From a9ce8d70e7bfc0450c927ae82abba103ea460c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 17:43:29 +0200 Subject: [PATCH 19/44] Remove unused set(PLATFORM_QT_GL OpenGL) --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cf876b4a61..b01ab0b402 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -183,8 +183,6 @@ option(HIFI_USE_OPTIMIZED_IK "Use optimized IK" ${HIFI_USE_OPTIMIZED_IK_OPTION}) option(USE_KHR_ROBUSTNESS "Use KHR_robustness" OFF) option(DISABLE_KTX_CACHE "Disable KTX Cache" OFF) -set(PLATFORM_QT_GL OpenGL) - if (USE_KHR_ROBUSTNESS) add_definitions(-DUSE_KHR_ROBUSTNESS) endif() From 47eb86e22dd55f75a8ae592ee13a0658504455bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 17:44:30 +0200 Subject: [PATCH 20/44] Replace USE_KHR_ROBUSTNESS with OVERTE_USE_KHR_ROBUSTNESS. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b01ab0b402..b6b8b0d16b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,7 @@ else() endif() set(OVERTE_EXTERNAL_BUILD_ASSETS "https://build-deps.overte.org" CACHE INTERNAL "") set(OVERTE_TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256" CACHE STRING "URL to timeserver used for signing executables.") +set(OVERTE_USE_KHR_ROBUSTNESS OFF CACHE BOOL "Use KHR_robustness.") set(HIFI_USE_OPTIMIZED_IK_OPTION OFF) @@ -180,10 +181,9 @@ else () endif() option(HIFI_USE_OPTIMIZED_IK "Use optimized IK" ${HIFI_USE_OPTIMIZED_IK_OPTION}) -option(USE_KHR_ROBUSTNESS "Use KHR_robustness" OFF) option(DISABLE_KTX_CACHE "Disable KTX Cache" OFF) -if (USE_KHR_ROBUSTNESS) +if (OVERTE_USE_KHR_ROBUSTNESS) add_definitions(-DUSE_KHR_ROBUSTNESS) endif() From e1c6ad7eedfc56f12a3d6c2da3f79a8b527a6d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 17:46:22 +0200 Subject: [PATCH 21/44] Replace HIFI_USE_OPTIMIZED_IK with OVERTE_USE_OPTIMIZED_IK. --- CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b6b8b0d16b..c0c79c988c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,10 +134,9 @@ else() endif() set(OVERTE_EXTERNAL_BUILD_ASSETS "https://build-deps.overte.org" CACHE INTERNAL "") set(OVERTE_TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256" CACHE STRING "URL to timeserver used for signing executables.") +set(OVERTE_USE_OPTIMIZED_IK OFF CACHE BOOL "Use optimized IK.") set(OVERTE_USE_KHR_ROBUSTNESS OFF CACHE BOOL "Use KHR_robustness.") - -set(HIFI_USE_OPTIMIZED_IK_OPTION OFF) set(OVERTE_BACKTRACE_URL "" CACHE STRING "URL to an endpoint for uploading crash-dumps. For example Sentry.") set(OVERTE_BACKTRACE_TOKEN "" CACHE STRING "Token used to identify with release or build is uploading crash-dumps.") @@ -180,7 +179,6 @@ else () set(PLATFORM_QT_COMPONENTS WebEngine Xml) endif() -option(HIFI_USE_OPTIMIZED_IK "Use optimized IK" ${HIFI_USE_OPTIMIZED_IK_OPTION}) option(DISABLE_KTX_CACHE "Disable KTX Cache" OFF) if (OVERTE_USE_KHR_ROBUSTNESS) @@ -277,9 +275,9 @@ add_definitions(-DGLM_FORCE_RADIANS) add_definitions(-DGLM_ENABLE_EXPERIMENTAL) add_definitions(-DGLM_FORCE_CTOR_INIT) -if (HIFI_USE_OPTIMIZED_IK) - MESSAGE(STATUS "SET THE USE IK DEFINITION ") - add_definitions(-DHIFI_USE_OPTIMIZED_IK) +if (OVERTE_USE_OPTIMIZED_IK) + message(STATUS "Setting definition for using optimized inverse kinematics.") + add_definitions(-DHIFI_USE_OPTIMIZED_IK) endif() set(HIFI_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libraries") From 4e80443e3308cc9bbadc8b93481382aa4ab03df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 17:49:29 +0200 Subject: [PATCH 22/44] Replace DISABLE_KTX_CACHE with OVERTE_DISABLE_KTX_CACHE. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c0c79c988c..548ffef4ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,7 @@ endif() set(OVERTE_EXTERNAL_BUILD_ASSETS "https://build-deps.overte.org" CACHE INTERNAL "") set(OVERTE_TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256" CACHE STRING "URL to timeserver used for signing executables.") set(OVERTE_USE_OPTIMIZED_IK OFF CACHE BOOL "Use optimized IK.") +set(OVERTE_DISABLE_KTX_CACHE OFF CACHE BOOL "Disable KTX Cache.") set(OVERTE_USE_KHR_ROBUSTNESS OFF CACHE BOOL "Use KHR_robustness.") set(OVERTE_BACKTRACE_URL "" CACHE STRING "URL to an endpoint for uploading crash-dumps. For example Sentry.") @@ -179,7 +180,6 @@ else () set(PLATFORM_QT_COMPONENTS WebEngine Xml) endif() -option(DISABLE_KTX_CACHE "Disable KTX Cache" OFF) if (OVERTE_USE_KHR_ROBUSTNESS) add_definitions(-DUSE_KHR_ROBUSTNESS) @@ -217,9 +217,9 @@ if (OVERTE_DISABLE_QML) add_definitions(-DDISABLE_QML) endif() -if (DISABLE_KTX_CACHE) - MESSAGE(STATUS "KTX cache disabled!") - add_definitions(-DDISABLE_KTX_CACHE) +if (OVERTE_DISABLE_KTX_CACHE) + message(STATUS "KTX cache disabled!") + add_definitions(-DDISABLE_KTX_CACHE) endif() if (UNIX AND DEFINED ENV{HIFI_MEMORY_DEBUGGING}) From e7e8b2a2ed57b6393cad4c1beafa19a7e1b02a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 17:50:48 +0200 Subject: [PATCH 23/44] Remove trailing whitespaces and convert tabs to spaces in INSTALLER.md. --- INSTALLER.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/INSTALLER.md b/INSTALLER.md index 35e9686d62..f9c2394c79 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -13,7 +13,7 @@ Follow the [build guide](BUILD.md) to figure out how to build Overte for your pl During generation, CMake should produce an `install` target and a `package` target. -The `install` target will copy the Overte targets and their dependencies to your `CMAKE_INSTALL_PREFIX`. +The `install` target will copy the Overte targets and their dependencies to your `CMAKE_INSTALL_PREFIX`. This variable is set by the `project(hifi)` command in `CMakeLists.txt` to `C:/Program Files/hifi` and stored in `build/CMakeCache.txt` ## Packaging @@ -26,9 +26,9 @@ To produce an installer, run the `package` target. However you will want to foll To produce an executable installer on Windows, the following are required: -1. [7-zip]() +1. [7-zip]() -1. [Nullsoft Scriptable Install System](http://nsis.sourceforge.net/Download) - 3.04 +1. [Nullsoft Scriptable Install System](http://nsis.sourceforge.net/Download) - 3.04 Install using defaults (will install to `C:\Program Files (x86)\NSIS`) 1. [NSIS Plugins](https://build-deps.overte.org/conan/nsis-overte-plugins/NSIS-hifi-plugins-1.0.zip) Copy contents to `C:\Program Files (x86)\NSIS\`. @@ -38,39 +38,39 @@ To produce an executable installer on Windows, the following are required: 1. Copy `UAC.nsh` to `C:\Program Files (x86)\NSIS\Include\` 1. Copy `Plugins\x86-ansi\UAC.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-ansi\` 1. Copy `Plugins\x86-unicode\UAC.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-unicode\` - + 1. [nsProcess Plug-in for Nullsoft](http://nsis.sourceforge.net/NsProcess_plugin) - 1.6 (use the link marked **nsProcess_1_6.7z**) 1. Extract Zip 1. Copy `Include\nsProcess.nsh` to `C:\Program Files (x86)\NSIS\Include\` 1. Copy `Plugins\nsProcess.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-ansi\` 1. Copy `Plugins\nsProcessW.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-unicode\` - + 1. [InetC Plug-in for Nullsoft](http://nsis.sourceforge.net/Inetc_plug-in) - 1.0 1. Extract Zip 1. Copy `Plugin\x86-ansi\InetC.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-ansi\` 1. Copy `Plugin\x86-unicode\InetC.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-unicode\` - + 1. [NSISpcre Plug-in for Nullsoft](http://nsis.sourceforge.net/NSISpcre_plug-in) - 1.0 1. Extract Zip 1. Copy `NSISpre.nsh` to `C:\Program Files (x86)\NSIS\Include\` 1. Copy `NSISpre.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-ansi\` - + 1. [nsisSlideshow Plug-in for Nullsoft]() - 1.7 1. Extract Zip 1. Copy `bin\nsisSlideshow.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-ansi\` 1. Copy `bin\nsisSlideshowW.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-unicode\` - + 1. [Nsisunz plug-in for Nullsoft](http://nsis.sourceforge.net/Nsisunz_plug-in) 1. Download both Zips and unzip 1. Copy `nsisunz\Release\nsisunz.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-ansi\` 1. Copy `NSISunzU\Plugin unicode\nsisunz.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-unicode\` - + 1. [ApplicationID plug-in for Nullsoft]() - 1.0 1. Download [`Pre-built DLLs`]() 1. Extract Zip 1. Copy `Release\ApplicationID.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-ansi\` 1. Copy `ReleaseUnicode\ApplicationID.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-unicode\` - + 1. [Node.JS and NPM](https://nodejs.org/en/download/) 1. Install version 10.15.0 LTS (or greater) #### Code Signing (optional) @@ -78,15 +78,15 @@ To produce an executable installer on Windows, the following are required: For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PASSPHRASE` environment variables to be present during CMake runtime and globally as we proceed to package the installer. #### Creating the Installer - + 1. Perform a clean cmake from a new terminal. 1. Open the `overte.sln` solution with elevated (administrator) permissions on Visual Studio and select the **Release** configuration. 1. Build the solution. 1. Build `packaged-server-console-npm-install` (found under **hidden/Server Console**) -1. Build `packaged-server-console` (found under **Server Console**) - This will add 2 folders to `build\server-console\` - +1. Build `packaged-server-console` (found under **Server Console**) + This will add 2 folders to `build\server-console\` - `server-console-win32-x64` and `x64` -1. Build CMakeTargets->PACKAGE +1. Build CMakeTargets->PACKAGE The installer is now available in `build\_CPack_Packages\win64\NSIS` #### Create an MSIX Package @@ -116,8 +116,8 @@ For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PAS #### Option A: Use Xcode GUI 1. Perform a Release build of ALL_BUILD -2. Perform a Release build of `packaged-server-console` - This will add a folder to `build\server-console\` - +2. Perform a Release build of `packaged-server-console` + This will add a folder to `build\server-console\` - Sandbox-darwin-x64 3. Perform a Release build of `package` Installer is now available in `build/_CPack_Packages/Darwin/DragNDrop` @@ -180,7 +180,7 @@ Overte Interface AppImages are built using [linuxdeploy](https://github.com/linu 1. Build Docker image as instructed in the relevant Dockerfile in [tools/ci-scripts/deb_package/](tools/ci-scripts/deb_package/) 2. Create/Start container - Example: `docker run -v $(pwd)/../../..:/overte -it overte/overte-server-build:0.1.2-debian-11-amd64` + Example: `docker run -v $(pwd)/../../..:/overte -it overte/overte-server-build:0.1.2-debian-11-amd64` 3. Prepare build environment ```bash @@ -212,7 +212,7 @@ DEBVERSION="1-experimental-debian-11" DEBEMAIL="julian.gro@overte.org" DEBFULLNA 1. Build Docker image as instructed in the relevant Dockerfile in [tools/ci-scripts/rpm_package/](tools/ci-scripts/rpm_package/) 2. Create/Start container - Example: `docker run -v $(pwd)/../../..:/overte -it overte/overte-server-build:0.1.2-fedora-36-amd64` + Example: `docker run -v $(pwd)/../../..:/overte -it overte/overte-server-build:0.1.2-fedora-36-amd64` 3. Prepare build environment ```bash From 1d0011cfb8b6f744067479f225651f558055e188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:04:40 +0200 Subject: [PATCH 24/44] Replace RELEASE_TYPE environment variable with OVERTE_RELEASE_TYPE cache variable. --- .github/workflows/linux_server_build.yml | 5 ++++- .github/workflows/master_build.yml | 18 ++++++++---------- .github/workflows/pr_build.yml | 5 ++--- .github/workflows/release_build.yml | 3 +-- BUILD.md | 6 +++--- CMakeLists.txt | 5 ----- INSTALLER.md | 2 +- cmake/macros/FixupInterface.cmake | 3 ++- cmake/macros/FixupNitpick.cmake | 3 ++- cmake/macros/SetPackagingParameters.cmake | 10 +++++----- cmake/templates/console-build-info.json.in | 2 +- tools/nitpick/CMakeLists.txt | 2 +- 12 files changed, 30 insertions(+), 34 deletions(-) diff --git a/.github/workflows/linux_server_build.yml b/.github/workflows/linux_server_build.yml index 125b28a0b8..10d35ceded 100644 --- a/.github/workflows/linux_server_build.yml +++ b/.github/workflows/linux_server_build.yml @@ -159,6 +159,9 @@ jobs: # Tagged builds. E.g. release or release candidate builds. if [ "${{github.ref_type}}" == "tag" ]; then echo "PRODUCTION_BUILD=true" >> $GITHUB_ENV + echo "OVERTE_RELEASE_TYPE=PRODUCTION" >> $GITHUB_ENV + else + echo "OVERTE_RELEASE_TYPE=PR" >> $GITHUB_ENV fi # Systems requiring our prebuilt Qt package @@ -252,7 +255,7 @@ jobs: - name: Configure CMake shell: bash # This syntax requires CMake 3.23 - run: cmake --preset conan-${BUILD_TYPE,,} $CMAKE_EXTRA + run: cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=$OVERTE_RELEASE_TYPE $CMAKE_EXTRA - name: Build Domain Server working-directory: build diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index 7f8eebb6b3..0bdecf43d2 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -15,7 +15,6 @@ env: BUILD_TYPE: Release BUILD_NUMBER: ${{ github.event.number }}_${{ github.sha }} GIT_COMMIT: ${{ github.sha }} - RELEASE_TYPE: PRODUCTION RELEASE_NUMBER: ${{ github.event.number }}_${{ github.sha }} STABLE_BUILD: 0 UPLOAD_BUCKET: overte-public @@ -209,16 +208,15 @@ jobs: shell: bash - name: Configure CMake - if: startsWith(matrix.os, 'Windows') == false shell: bash - # This syntax requires CMake 3.23 - run: cmake --preset conan-${BUILD_TYPE,,} -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA - - - name: Configure CMake (Windows) - if: startsWith(matrix.os, 'Windows') - shell: bash - # This syntax requires CMake 3.23 - run: cmake --preset conan-default -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA + run: | + if [[ "${{ matrix.os }}" =~ "Windows" ]]; then + # This syntax requires CMake 3.23 + cmake --preset conan-default -DOVERTE_RELEASE_TYPE=PRODUCTION $CMAKE_EXTRA + else + # This syntax requires CMake 3.23 + cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=PRODUCTION $CMAKE_EXTRA + fi - name: Build application shell: bash diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index f58ef79c29..940de986c4 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -14,7 +14,6 @@ env: APP_NAME: interface BUILD_TYPE: Release GIT_COMMIT: ${{ github.event.pull_request.head.sha }} - RELEASE_TYPE: PR RELEASE_NUMBER: ${{ github.event.number }} VERSION_CODE: ${{ github.event.number }} @@ -255,10 +254,10 @@ jobs: run: | if [[ "${{ matrix.os }}" =~ "Windows" ]]; then # This syntax requires CMake 3.23 - cmake --preset conan-default $CMAKE_EXTRA # Why does Conan not provide the preset we tell it to on Windows? + cmake --preset conan-default -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA else # This syntax requires CMake 3.23 - cmake --preset conan-${BUILD_TYPE,,} $CMAKE_EXTRA + cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA fi - name: Build Application diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 26aabda5af..fa7eb35f33 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -17,7 +17,6 @@ env: BUILD_TYPE: Release GIT_COMMIT: ${{ github.sha }} PRODUCTION_BUILD: true - RELEASE_TYPE: PRODUCTION RELEASE_NUMBER: ${{ github.ref_name }} STABLE_BUILD: 1 UPLOAD_BUCKET: overte-public @@ -129,7 +128,7 @@ jobs: - name: Configure CMake shell: bash # This syntax requires CMake 3.23 - run: cmake --preset conan-${BUILD_TYPE,,} -DJSDOC_ENABLED:BOOL=TRUE -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA + run: cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_BUILD_TYPE=PRODUCTION -DJSDOC_ENABLED:BOOL=TRUE $CMAKE_EXTRA - name: Build application shell: bash diff --git a/BUILD.md b/BUILD.md index 6231d5e585..8c775dfedd 100644 --- a/BUILD.md +++ b/BUILD.md @@ -65,9 +65,6 @@ RELEASE_NUMBER // The build commit, e.g., use a Git hash for the most recent commit in the branch - fd6973b. BUILD_NUMBER -// The type of release. -RELEASE_TYPE=PRODUCTION|PR|DEV - // The Interface will have a custom default home and startup location. PRELOADED_STARTUP_LOCATION=Location/IP/URL // The Interface will have a custom default script whitelist, comma separated, no spaces. @@ -95,6 +92,9 @@ BUILD_GLOBAL_SERVICES=STABLE OVERTE_BACKTRACE_URL // The identifying tag of the release. OVERTE_BACKTRACE_TOKEN + +// The type of release. +OVERTE_RELEASE_TYPE=PRODUCTION|PR|DEV ``` #### Generate Files diff --git a/CMakeLists.txt b/CMakeLists.txt index 548ffef4ad..4a601af655 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,11 +25,6 @@ if (APPLE) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Specifies the minimum version of the target platform (e.g. macOS or iOS) on which the target binaries are to be deployed.") endif() -set(RELEASE_TYPE "$ENV{RELEASE_TYPE}") -if ((NOT "${RELEASE_TYPE}" STREQUAL "PRODUCTION") AND (NOT "${RELEASE_TYPE}" STREQUAL "PR")) - set(RELEASE_TYPE "DEV") -endif() - # # Default compiler flags diff --git a/INSTALLER.md b/INSTALLER.md index f9c2394c79..85aacee8b2 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -109,7 +109,7 @@ For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PAS 1. Ensure you have all the prerequisites fulfilled from the [MacOS Build Guide](BUILD_OSX.md). 2. Perform a clean CMake in your build folder. e.g. ```bash - BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 RELEASE_BUILD=PRODUCTION BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" STABLE_BUILD=1 PRODUCTION_BUILD=1 RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" RELEASE_TYPE=PRODUCTION cmake -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. + BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" STABLE_BUILD=1 PRODUCTION_BUILD=1 RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" cmake -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. ``` 3. Pick a method to build and package your release. diff --git a/cmake/macros/FixupInterface.cmake b/cmake/macros/FixupInterface.cmake index 0bfc1cb39c..77c6a539cd 100644 --- a/cmake/macros/FixupInterface.cmake +++ b/cmake/macros/FixupInterface.cmake @@ -3,6 +3,7 @@ # cmake/macros # # Copyright 2016 High Fidelity, Inc. +# Copyright 2025 Overte e.V. # Created by Stephen Birarda on January 6th, 2016 # # Distributed under the Apache License, Version 2.0. @@ -24,7 +25,7 @@ macro(fixup_interface) ") endif () - if (RELEASE_TYPE STREQUAL "DEV") + if (OVERTE_RELEASE_TYPE STREQUAL "DEV") install(CODE " execute_process(COMMAND ${MACDEPLOYQT_COMMAND}\ \${CMAKE_INSTALL_PREFIX}/${_INTERFACE_INSTALL_PATH}/\ diff --git a/cmake/macros/FixupNitpick.cmake b/cmake/macros/FixupNitpick.cmake index db96fec724..ff6281e899 100644 --- a/cmake/macros/FixupNitpick.cmake +++ b/cmake/macros/FixupNitpick.cmake @@ -3,6 +3,7 @@ # cmake/macros # # Copyright 2019 High Fidelity, Inc. +# Copyright 2025 Overte e.V. # Created by Nissim Hadar on January 14th, 2016 # # Distributed under the Apache License, Version 2.0. @@ -24,7 +25,7 @@ macro(fixup_nitpick) ") endif () - if (RELEASE_TYPE STREQUAL "DEV") + if (OVERTE_RELEASE_TYPE STREQUAL "DEV") install(CODE " execute_process(COMMAND ${MACDEPLOYQT_COMMAND}\ \${CMAKE_INSTALL_PREFIX}/${_NITPICK_INSTALL_PATH}/\ diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index bb5e7dad5b..7525cbe440 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -22,16 +22,16 @@ macro(SET_PACKAGING_PARAMETERS) set(BUILD_NUMBER 0) set(APP_USER_MODEL_ID "com.highfidelity.console-dev") - set_from_env(RELEASE_TYPE RELEASE_TYPE "DEV") set_from_env(RELEASE_NUMBER RELEASE_NUMBER "") set_from_env(STABLE_BUILD STABLE_BUILD 0) + set(OVERTE_RELEASE_TYPE "DEV" CACHE STRING "Valid options are: 'PRODUCTION', 'PR', and 'DEV'.") set_from_env(PRELOADED_STARTUP_LOCATION PRELOADED_STARTUP_LOCATION "") set_from_env(PRELOADED_SCRIPT_ALLOWLIST PRELOADED_SCRIPT_ALLOWLIST "") set_from_env(BYPASS_SIGNING BYPASS_SIGNING 0) - message(STATUS "The RELEASE_TYPE variable is: ${RELEASE_TYPE}") + message(STATUS "The OVERTE_RELEASE_TYPE variable is: ${OVERTE_RELEASE_TYPE}") # setup component categories for installer set(DDE_COMPONENT dde) @@ -44,7 +44,7 @@ macro(SET_PACKAGING_PARAMETERS) set(INTERFACE_BUNDLE_NAME "interface") endif() - if (RELEASE_TYPE STREQUAL "PRODUCTION") + if (OVERTE_RELEASE_TYPE STREQUAL "PRODUCTION") set(PRODUCTION_BUILD 1) set(BUILD_VERSION ${RELEASE_NUMBER}) set(BUILD_ORGANIZATION "Overte") @@ -67,7 +67,7 @@ macro(SET_PACKAGING_PARAMETERS) set(BYPASS_SIGNING 0) endif () - elseif (RELEASE_TYPE STREQUAL "PR") + elseif (OVERTE_RELEASE_TYPE STREQUAL "PR") set(PR_BUILD 1) set(BUILD_VERSION "PR${RELEASE_NUMBER}") set(BUILD_ORGANIZATION "Overte - PR${RELEASE_NUMBER}") @@ -86,7 +86,7 @@ macro(SET_PACKAGING_PARAMETERS) endif () set(NITPICK_BUNDLE_NAME "nitpick") - if (RELEASE_TYPE STREQUAL "PRODUCTION") + if (PRODUCTION_BUILD) set(NITPICK_ICON_PREFIX "nitpick") else () set(NITPICK_ICON_PREFIX "nitpick-beta") diff --git a/cmake/templates/console-build-info.json.in b/cmake/templates/console-build-info.json.in index a68df664c6..5ea15a5b50 100644 --- a/cmake/templates/console-build-info.json.in +++ b/cmake/templates/console-build-info.json.in @@ -1,6 +1,6 @@ { - "releaseType": "@RELEASE_TYPE@", "buildNumber": "@BUILD_NUMBER@", + "releaseType": "@OVERTE_RELEASE_TYPE@", "stableBuild": "@STABLE_BUILD@", "buildIdentifier": "@BUILD_VERSION@", "organization": "@BUILD_ORGANIZATION@", diff --git a/tools/nitpick/CMakeLists.txt b/tools/nitpick/CMakeLists.txt index fa87a1c69c..a9b2ab634c 100644 --- a/tools/nitpick/CMakeLists.txt +++ b/tools/nitpick/CMakeLists.txt @@ -147,7 +147,7 @@ if (WIN32) COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/AppDataHighFidelity" "$/AppDataHighFidelity" ) - if (RELEASE_TYPE STREQUAL "DEV") + if (OVERTE_RELEASE_TYPE STREQUAL "DEV") # This to enable running from the IDE add_custom_command( TARGET ${TARGET_NAME} From f0842177c3a9b598d25f173fe5b4b349a8dc8443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:08:00 +0200 Subject: [PATCH 25/44] Throw error on malformed OVERTE_RELEASE_TYPE. --- cmake/macros/SetPackagingParameters.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 7525cbe440..c9a16c18ff 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -75,7 +75,8 @@ macro(SET_PACKAGING_PARAMETERS) # add definition for this release type add_definitions(-DPR_BUILD) - else () + + elseif (OVERTE_RELEASE_TYPE STREQUAL "DEV") set(DEV_BUILD 1) set(BUILD_VERSION "dev") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") @@ -83,7 +84,10 @@ macro(SET_PACKAGING_PARAMETERS) # add definition for this release type add_definitions(-DDEV_BUILD) - endif () + + else() + message(FATAL_ERROR "OVERTE_RELEASE_TYPE invalid. Expected: 'RELEASE', 'PR', or 'DEV'. Got: '${OVERTE_RELEASE_TYPE}'") + endif() set(NITPICK_BUNDLE_NAME "nitpick") if (PRODUCTION_BUILD) From 45143a1c66d3ba29110a30c1d0cfa0c718a34868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:10:52 +0200 Subject: [PATCH 26/44] Replace BUILD_TIME with BUILD_DATE and switch to ISO date format. --- cmake/macros/SetPackagingParameters.cmake | 10 +++++----- cmake/templates/BuildInfo.h.in | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index c9a16c18ff..5ee4f535b1 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -28,7 +28,7 @@ macro(SET_PACKAGING_PARAMETERS) set_from_env(PRELOADED_STARTUP_LOCATION PRELOADED_STARTUP_LOCATION "") set_from_env(PRELOADED_SCRIPT_ALLOWLIST PRELOADED_SCRIPT_ALLOWLIST "") - + set_from_env(BYPASS_SIGNING BYPASS_SIGNING 0) message(STATUS "The OVERTE_RELEASE_TYPE variable is: ${OVERTE_RELEASE_TYPE}") @@ -44,6 +44,8 @@ macro(SET_PACKAGING_PARAMETERS) set(INTERFACE_BUNDLE_NAME "interface") endif() + string(TIMESTAMP BUILD_DATE "%Y-%m-%d" UTC) + if (OVERTE_RELEASE_TYPE STREQUAL "PRODUCTION") set(PRODUCTION_BUILD 1) set(BUILD_VERSION ${RELEASE_NUMBER}) @@ -96,8 +98,6 @@ macro(SET_PACKAGING_PARAMETERS) set(NITPICK_ICON_PREFIX "nitpick-beta") endif () - string(TIMESTAMP BUILD_TIME "%d/%m/%Y") - # if STABLE_BUILD is 1, PRODUCTION_BUILD must be 1 and # DEV_BUILD and PR_BUILD must be 0 if (STABLE_BUILD) @@ -141,7 +141,7 @@ macro(SET_PACKAGING_PARAMETERS) set(COMPONENT_APP_PATH "${CONSOLE_APP_CONTENTS}/MacOS/Components.app") set(COMPONENT_INSTALL_DIR "${COMPONENT_APP_PATH}/Contents/MacOS") set(CONSOLE_PLUGIN_INSTALL_DIR "${COMPONENT_APP_PATH}/Contents/PlugIns") - + set(INTERFACE_INSTALL_APP_PATH "${INTERFACE_INSTALL_DIR}/${INTERFACE_BUNDLE_NAME}.app") set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_PREFIX}.icns") set(NITPICK_ICON_FILENAME "${NITPICK_ICON_PREFIX}.icns") @@ -183,7 +183,7 @@ macro(SET_PACKAGING_PARAMETERS) set(INTERFACE_HF_SHORTCUT_NAME "${INTERFACE_SHORTCUT_NAME}") set(CONSOLE_HF_SHORTCUT_NAME "Overte ${CONSOLE_SHORTCUT_NAME}") set(SANDBOX_HF_SHORTCUT_NAME "Overte ${SANDBOX_SHORTCUT_NAME}") - + set(PRE_SANDBOX_INTERFACE_SHORTCUT_NAME "Overte") set(PRE_SANDBOX_CONSOLE_SHORTCUT_NAME "Server Console") diff --git a/cmake/templates/BuildInfo.h.in b/cmake/templates/BuildInfo.h.in index 132664c99a..eb1a09d793 100644 --- a/cmake/templates/BuildInfo.h.in +++ b/cmake/templates/BuildInfo.h.in @@ -27,7 +27,7 @@ namespace BuildInfo { const QString VERSION = "@BUILD_VERSION@"; const QString BUILD_NUMBER = "@BUILD_NUMBER@"; const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@"; - const QString BUILD_TIME = "@BUILD_TIME@"; + const QString BUILD_TIME = "@BUILD_DATE@"; const QString PRELOADED_STARTUP_LOCATION = "@PRELOADED_STARTUP_LOCATION@"; const QString PRELOADED_SCRIPT_ALLOWLIST = "@PRELOADED_SCRIPT_ALLOWLIST@"; From ca42d217b01cf24d0bdb4d119a1484c8e00c7d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:24:05 +0200 Subject: [PATCH 27/44] Replace RELEASE_NUMBER environment variable with OVERTE_RELEASE_NUMBER cache variable. --- .github/workflows/linux_server_build.yml | 2 +- .github/workflows/master_build.yml | 1 - .github/workflows/pr_build.yml | 6 +++--- .github/workflows/release_build.yml | 5 ++--- BUILD.md | 5 +++-- INSTALLER.md | 2 +- cmake/macros/SetPackagingParameters.cmake | 8 ++++---- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/linux_server_build.yml b/.github/workflows/linux_server_build.yml index 10d35ceded..ce53071b64 100644 --- a/.github/workflows/linux_server_build.yml +++ b/.github/workflows/linux_server_build.yml @@ -255,7 +255,7 @@ jobs: - name: Configure CMake shell: bash # This syntax requires CMake 3.23 - run: cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=$OVERTE_RELEASE_TYPE $CMAKE_EXTRA + run: cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=$OVERTE_RELEASE_TYPE -DOVERTE_RELEASE_NUMBER=$RELEASE_NUMBER $CMAKE_EXTRA - name: Build Domain Server working-directory: build diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index 0bdecf43d2..91f06b07b7 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -15,7 +15,6 @@ env: BUILD_TYPE: Release BUILD_NUMBER: ${{ github.event.number }}_${{ github.sha }} GIT_COMMIT: ${{ github.sha }} - RELEASE_NUMBER: ${{ github.event.number }}_${{ github.sha }} STABLE_BUILD: 0 UPLOAD_BUCKET: overte-public UPLOAD_REGION: fra1 diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 940de986c4..fc135e1992 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -14,7 +14,7 @@ env: APP_NAME: interface BUILD_TYPE: Release GIT_COMMIT: ${{ github.event.pull_request.head.sha }} - RELEASE_NUMBER: ${{ github.event.number }} + # Android VERSION_CODE: ${{ github.event.number }} UPLOAD_BUCKET: overte-public @@ -254,10 +254,10 @@ jobs: run: | if [[ "${{ matrix.os }}" =~ "Windows" ]]; then # This syntax requires CMake 3.23 - cmake --preset conan-default -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA + cmake --preset conan-default -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA else # This syntax requires CMake 3.23 - cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA + cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA fi - name: Build Application diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index fa7eb35f33..2fd854443e 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -17,7 +17,6 @@ env: BUILD_TYPE: Release GIT_COMMIT: ${{ github.sha }} PRODUCTION_BUILD: true - RELEASE_NUMBER: ${{ github.ref_name }} STABLE_BUILD: 1 UPLOAD_BUCKET: overte-public UPLOAD_REGION: fra1 @@ -80,7 +79,7 @@ jobs: run: | echo "BUILD_NUMBER=$GIT_COMMIT_SHORT" >> $GITHUB_ENV - echo "ARTIFACT_PATTERN=Overte-$RELEASE_NUMBER.$INSTALLER_EXT" >> $GITHUB_ENV + echo "ARTIFACT_PATTERN=Overte-${{ github.ref_name }}.$INSTALLER_EXT" >> $GITHUB_ENV - uses: actions/checkout@v4 with: @@ -128,7 +127,7 @@ jobs: - name: Configure CMake shell: bash # This syntax requires CMake 3.23 - run: cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_BUILD_TYPE=PRODUCTION -DJSDOC_ENABLED:BOOL=TRUE $CMAKE_EXTRA + run: cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_NUMBER=${{ github.ref_name }} -DOVERTE_BUILD_TYPE=PRODUCTION -DJSDOC_ENABLED:BOOL=TRUE $CMAKE_EXTRA - name: Build application shell: bash diff --git a/BUILD.md b/BUILD.md index 8c775dfedd..55ad34e081 100644 --- a/BUILD.md +++ b/BUILD.md @@ -60,8 +60,6 @@ Where `/path/to/directory` is the path to a directory where you wish the build f #### Possible Environment Variables ```text -// The release version, e.g., 2021.3.2. -RELEASE_NUMBER // The build commit, e.g., use a Git hash for the most recent commit in the branch - fd6973b. BUILD_NUMBER @@ -93,6 +91,9 @@ OVERTE_BACKTRACE_URL // The identifying tag of the release. OVERTE_BACKTRACE_TOKEN +// The release version, e.g., 2021.3.2. For PR builds the PR number, e.g. 577. +// Not used for nightlies and development builds. +OVERTE_RELEASE_NUMBER // The type of release. OVERTE_RELEASE_TYPE=PRODUCTION|PR|DEV ``` diff --git a/INSTALLER.md b/INSTALLER.md index 85aacee8b2..a995be6939 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -109,7 +109,7 @@ For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PAS 1. Ensure you have all the prerequisites fulfilled from the [MacOS Build Guide](BUILD_OSX.md). 2. Perform a clean CMake in your build folder. e.g. ```bash - BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" STABLE_BUILD=1 PRODUCTION_BUILD=1 RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" cmake -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. + BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" STABLE_BUILD=1 PRODUCTION_BUILD=1 cmake -DOVERTE_RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. ``` 3. Pick a method to build and package your release. diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 5ee4f535b1..44d88fd813 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -22,9 +22,9 @@ macro(SET_PACKAGING_PARAMETERS) set(BUILD_NUMBER 0) set(APP_USER_MODEL_ID "com.highfidelity.console-dev") - set_from_env(RELEASE_NUMBER RELEASE_NUMBER "") set_from_env(STABLE_BUILD STABLE_BUILD 0) set(OVERTE_RELEASE_TYPE "DEV" CACHE STRING "Valid options are: 'PRODUCTION', 'PR', and 'DEV'.") + set(OVERTE_RELEASE_NUMBER "0000.00.0" CACHE STRING "Release version number. E.g. 2025.05.1-rc1 for the first release candidate of the first release in May 2025.") set_from_env(PRELOADED_STARTUP_LOCATION PRELOADED_STARTUP_LOCATION "") set_from_env(PRELOADED_SCRIPT_ALLOWLIST PRELOADED_SCRIPT_ALLOWLIST "") @@ -48,7 +48,7 @@ macro(SET_PACKAGING_PARAMETERS) if (OVERTE_RELEASE_TYPE STREQUAL "PRODUCTION") set(PRODUCTION_BUILD 1) - set(BUILD_VERSION ${RELEASE_NUMBER}) + set(BUILD_VERSION ${OVERTE_RELEASE_NUMBER}) set(BUILD_ORGANIZATION "Overte") set(HIGH_FIDELITY_PROTOCOL "hifi") set(HIGH_FIDELITY_APP_PROTOCOL "hifiapp") @@ -71,8 +71,8 @@ macro(SET_PACKAGING_PARAMETERS) elseif (OVERTE_RELEASE_TYPE STREQUAL "PR") set(PR_BUILD 1) - set(BUILD_VERSION "PR${RELEASE_NUMBER}") set(BUILD_ORGANIZATION "Overte - PR${RELEASE_NUMBER}") + set(BUILD_VERSION "PR${OVERTE_RELEASE_NUMBER}") set(INTERFACE_ICON_PREFIX "interface-beta") # add definition for this release type @@ -115,7 +115,7 @@ macro(SET_PACKAGING_PARAMETERS) # pass along a release number without the SHA in case somebody # wants to compare master or PR builds as integers - set(BUILD_NUMBER ${RELEASE_NUMBER}) + set(BUILD_NUMBER ${OVERTE_RELEASE_NUMBER}) endif () if (APPLE) From c1aa0b369cd65c819b07bb5e50c63c05933a97c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:30:04 +0200 Subject: [PATCH 28/44] Add BUILD_DATE to BUILD_VERSION. This way we can tell how old experimental/testing builds are. --- cmake/macros/SetPackagingParameters.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 44d88fd813..87054f83db 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -72,7 +72,7 @@ macro(SET_PACKAGING_PARAMETERS) elseif (OVERTE_RELEASE_TYPE STREQUAL "PR") set(PR_BUILD 1) set(BUILD_ORGANIZATION "Overte - PR${RELEASE_NUMBER}") - set(BUILD_VERSION "PR${OVERTE_RELEASE_NUMBER}") + set(BUILD_VERSION "PR${OVERTE_RELEASE_NUMBER}-${BUILD_DATE}") set(INTERFACE_ICON_PREFIX "interface-beta") # add definition for this release type @@ -80,7 +80,7 @@ macro(SET_PACKAGING_PARAMETERS) elseif (OVERTE_RELEASE_TYPE STREQUAL "DEV") set(DEV_BUILD 1) - set(BUILD_VERSION "dev") + set(BUILD_VERSION "Dev-${BUILD_DATE}") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") From 893370ddc0f905538ca6896ded6b6f0bdba4053e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:33:42 +0200 Subject: [PATCH 29/44] Add NIGHTLY release type for master builds. --- .github/workflows/master_build.yml | 4 ++-- BUILD.md | 2 +- cmake/macros/SetPackagingParameters.cmake | 15 ++++++++++++--- cmake/templates/BuildInfo.h.in | 9 ++++++--- interface/src/Application_Setup.cpp | 4 ++-- interface/src/CrashRecoveryHandler.cpp | 3 ++- libraries/auto-updater/src/AutoUpdater.cpp | 10 +++++----- 7 files changed, 30 insertions(+), 17 deletions(-) diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index 91f06b07b7..91e2098132 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -211,10 +211,10 @@ jobs: run: | if [[ "${{ matrix.os }}" =~ "Windows" ]]; then # This syntax requires CMake 3.23 - cmake --preset conan-default -DOVERTE_RELEASE_TYPE=PRODUCTION $CMAKE_EXTRA + cmake --preset conan-default -DOVERTE_RELEASE_TYPE=NIGHTLY $CMAKE_EXTRA else # This syntax requires CMake 3.23 - cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=PRODUCTION $CMAKE_EXTRA + cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=NIGHTLY $CMAKE_EXTRA fi - name: Build application diff --git a/BUILD.md b/BUILD.md index 55ad34e081..c2fe7daed6 100644 --- a/BUILD.md +++ b/BUILD.md @@ -95,7 +95,7 @@ OVERTE_BACKTRACE_TOKEN // Not used for nightlies and development builds. OVERTE_RELEASE_NUMBER // The type of release. -OVERTE_RELEASE_TYPE=PRODUCTION|PR|DEV +OVERTE_RELEASE_TYPE=PRODUCTION|PR|NIGHTLY|DEV ``` #### Generate Files diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 87054f83db..3ac1f02c04 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -23,7 +23,7 @@ macro(SET_PACKAGING_PARAMETERS) set(APP_USER_MODEL_ID "com.highfidelity.console-dev") set_from_env(STABLE_BUILD STABLE_BUILD 0) - set(OVERTE_RELEASE_TYPE "DEV" CACHE STRING "Valid options are: 'PRODUCTION', 'PR', and 'DEV'.") + set(OVERTE_RELEASE_TYPE "DEV" CACHE STRING "Valid options are: 'PRODUCTION', 'PR', 'NIGHTLY', and 'DEV'.") set(OVERTE_RELEASE_NUMBER "0000.00.0" CACHE STRING "Release version number. E.g. 2025.05.1-rc1 for the first release candidate of the first release in May 2025.") set_from_env(PRELOADED_STARTUP_LOCATION PRELOADED_STARTUP_LOCATION "") @@ -71,8 +71,17 @@ macro(SET_PACKAGING_PARAMETERS) elseif (OVERTE_RELEASE_TYPE STREQUAL "PR") set(PR_BUILD 1) - set(BUILD_ORGANIZATION "Overte - PR${RELEASE_NUMBER}") set(BUILD_VERSION "PR${OVERTE_RELEASE_NUMBER}-${BUILD_DATE}") + set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") + set(INTERFACE_ICON_PREFIX "interface-beta") + + # add definition for this release type + add_definitions(-DPR_BUILD) + + elseif (OVERTE_RELEASE_TYPE STREQUAL "NIGHTLY") + set(NIGHTLY_BUILD 1) + set(BUILD_VERSION "Nightly-${BUILD_DATE}") + set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") # add definition for this release type @@ -88,7 +97,7 @@ macro(SET_PACKAGING_PARAMETERS) add_definitions(-DDEV_BUILD) else() - message(FATAL_ERROR "OVERTE_RELEASE_TYPE invalid. Expected: 'RELEASE', 'PR', or 'DEV'. Got: '${OVERTE_RELEASE_TYPE}'") + message(FATAL_ERROR "OVERTE_RELEASE_TYPE invalid. Expected: 'RELEASE', 'PR', 'NIGHTLY', or 'DEV'. Got: '${OVERTE_RELEASE_TYPE}'") endif() set(NITPICK_BUNDLE_NAME "nitpick") diff --git a/cmake/templates/BuildInfo.h.in b/cmake/templates/BuildInfo.h.in index eb1a09d793..19c15d5652 100644 --- a/cmake/templates/BuildInfo.h.in +++ b/cmake/templates/BuildInfo.h.in @@ -34,7 +34,7 @@ namespace BuildInfo { enum BuildType { Dev, PR, - Master, + Nightly, Stable }; @@ -42,8 +42,11 @@ namespace BuildInfo { const BuildType BUILD_TYPE = PR; const QString BUILD_TYPE_STRING = "pr"; #elif defined(PRODUCTION_BUILD) - const BuildType BUILD_TYPE = @STABLE_BUILD@ ? Stable : Master; - const QString BUILD_TYPE_STRING = @STABLE_BUILD@ ? "stable" : "master"; + const BuildType BUILD_TYPE = Stable; + const QString BUILD_TYPE_STRING = "stable"; +#elif defined(NIGHTLY_BUILD) + const BuildType BUILD_TYPE = Nightly; + const QString BUILD_TYPE_STRING = "nightly"; #else const BuildType BUILD_TYPE = Dev; const QString BUILD_TYPE_STRING = "dev"; diff --git a/interface/src/Application_Setup.cpp b/interface/src/Application_Setup.cpp index 356ddd00c7..dffd24762a 100644 --- a/interface/src/Application_Setup.cpp +++ b/interface/src/Application_Setup.cpp @@ -6,7 +6,7 @@ // Created by Andrzej Kapolka on 5/10/13. // Copyright 2013 High Fidelity, Inc. // Copyright 2020 Vircadia contributors. -// Copyright 2022-2023 Overte e.V. +// Copyright 2022-2025 Overte e.V. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -597,7 +597,7 @@ void Application::initialize(const QCommandLineParser &parser) { // If launched from Steam, let it handle updates bool buildCanUpdate = BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Stable - || BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Master; + || BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Nightly; if (!parser.isSet("no-updater") && buildCanUpdate) { constexpr auto INSTALLER_TYPE_CLIENT_ONLY = "client_only"; diff --git a/interface/src/CrashRecoveryHandler.cpp b/interface/src/CrashRecoveryHandler.cpp index 46aa86771e..179116c9ef 100644 --- a/interface/src/CrashRecoveryHandler.cpp +++ b/interface/src/CrashRecoveryHandler.cpp @@ -4,6 +4,7 @@ // // Created by David Rowe on 24 Aug 2015. // Copyright 2015 High Fidelity, Inc. +// Copyright 2025 Overte e.V. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -103,7 +104,7 @@ bool CrashRecoveryHandler::suggestCrashReporting() { "and not yet part of the official code. We'd highly appreciate it if you enabled\n" "crash reporting to help us test this potential addition."; break; - case BuildInfo::BuildType::Master: + case BuildInfo::BuildType::Nightly: explainText = "You're running a pre-release version. This is an official release, but the code\n" "is not yet considered to be fully stable. We'd highly appreciate it if you enabled\n" "crash reporting to help us test the upcoming release."; diff --git a/libraries/auto-updater/src/AutoUpdater.cpp b/libraries/auto-updater/src/AutoUpdater.cpp index b118902353..01c4f212e5 100644 --- a/libraries/auto-updater/src/AutoUpdater.cpp +++ b/libraries/auto-updater/src/AutoUpdater.cpp @@ -4,7 +4,7 @@ // // Created by Leonardo Murillo on 6/1/2015. // Copyright 2015 High Fidelity, Inc. -// Copyright 2023 Overte e.V. +// Copyright 2023-2025 Overte e.V. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -46,10 +46,10 @@ void AutoUpdater::getLatestVersionData() { if (BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Stable) { buildsURL = NetworkingConstants::BUILDS_XML_URL; - } else if (BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Master) { + } else if (BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Nightly) { buildsURL = NetworkingConstants::MASTER_BUILDS_XML_URL; } - + QNetworkRequest latestVersionRequest(buildsURL); latestVersionRequest.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy); @@ -82,10 +82,10 @@ void AutoUpdater::parseLatestVersionData() { // master builds look at the version node (build number) if (BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Stable) { versionKey = "stable_version"; - } else if (BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Master) { + } else if (BuildInfo::BUILD_TYPE == BuildInfo::BuildType::Nightly) { versionKey = "version"; } - + while (xml.readNextStartElement()) { if (xml.name() == "projects") { while (xml.readNextStartElement()) { From 28c005b85cba0d960c7510a33d61326f39c939f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:40:45 +0200 Subject: [PATCH 30/44] Replace BUILD_NUMBER with OVERTE_GIT_COMMIT_SHORT cache variable to be more descriptive. --- .github/workflows/linux_server_build.yml | 4 +--- .github/workflows/master_build.yml | 15 ++++----------- .github/workflows/pr_build.yml | 4 ++-- .github/workflows/release_build.yml | 2 -- BUILD.md | 6 +++--- INSTALLER.md | 2 +- cmake/macros/SetPackagingParameters.cmake | 16 ++++++---------- cmake/templates/BuildInfo.h.in | 3 ++- cmake/templates/console-build-info.json.in | 2 +- 9 files changed, 20 insertions(+), 34 deletions(-) diff --git a/.github/workflows/linux_server_build.yml b/.github/workflows/linux_server_build.yml index ce53071b64..17b5d802aa 100644 --- a/.github/workflows/linux_server_build.yml +++ b/.github/workflows/linux_server_build.yml @@ -203,8 +203,6 @@ jobs: fi fi - echo "BUILD_NUMBER=$GIT_COMMIT_SHORT" >> $GITHUB_ENV - - name: Configure Build Environment 3 shell: bash run: | @@ -255,7 +253,7 @@ jobs: - name: Configure CMake shell: bash # This syntax requires CMake 3.23 - run: cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=$OVERTE_RELEASE_TYPE -DOVERTE_RELEASE_NUMBER=$RELEASE_NUMBER $CMAKE_EXTRA + run: cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=$OVERTE_RELEASE_TYPE -DOVERTE_RELEASE_NUMBER=$RELEASE_NUMBER -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT $CMAKE_EXTRA - name: Build Domain Server working-directory: build diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index 91e2098132..08cc132837 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -13,7 +13,6 @@ on: env: APP_NAME: interface BUILD_TYPE: Release - BUILD_NUMBER: ${{ github.event.number }}_${{ github.sha }} GIT_COMMIT: ${{ github.sha }} STABLE_BUILD: 0 UPLOAD_BUCKET: overte-public @@ -51,12 +50,6 @@ jobs: fail-fast: false runs-on: ${{matrix.os}} steps: - - name: Report Build Number - shell: bash - run: | - - echo "Build number: $BUILD_NUMBER" - - name: Configure build environment 1 shell: bash id: buildenv1 @@ -116,7 +109,7 @@ jobs: if [ "${{ matrix.build_type }}" = "full" ]; then echo "INSTALLER=Overte-${{ github.event.number }}_${{ github.sha }}-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV else - echo "INSTALLER=Overte-Interface-master$BUILD_NUMBER-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV + echo "INSTALLER=Overte-Interface-master-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV fi - name: Clear Working Directories @@ -211,10 +204,10 @@ jobs: run: | if [[ "${{ matrix.os }}" =~ "Windows" ]]; then # This syntax requires CMake 3.23 - cmake --preset conan-default -DOVERTE_RELEASE_TYPE=NIGHTLY $CMAKE_EXTRA + cmake --preset conan-default -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT -DOVERTE_RELEASE_TYPE=NIGHTLY $CMAKE_EXTRA else # This syntax requires CMake 3.23 - cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=NIGHTLY $CMAKE_EXTRA + cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT -DOVERTE_RELEASE_TYPE=NIGHTLY $CMAKE_EXTRA fi - name: Build application @@ -283,7 +276,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.INSTALLER }} - path: build/${{ env.INSTALLER }} + path: build/Overte-* if-no-files-found: error #- name: Archive symbols diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index fc135e1992..ec262802c8 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -254,10 +254,10 @@ jobs: run: | if [[ "${{ matrix.os }}" =~ "Windows" ]]; then # This syntax requires CMake 3.23 - cmake --preset conan-default -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA + cmake --preset conan-default -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA else # This syntax requires CMake 3.23 - cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA + cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA fi - name: Build Application diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 2fd854443e..771b97eb67 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -77,8 +77,6 @@ jobs: - name: Configure build environment 2 shell: bash run: | - - echo "BUILD_NUMBER=$GIT_COMMIT_SHORT" >> $GITHUB_ENV echo "ARTIFACT_PATTERN=Overte-${{ github.ref_name }}.$INSTALLER_EXT" >> $GITHUB_ENV - uses: actions/checkout@v4 diff --git a/BUILD.md b/BUILD.md index c2fe7daed6..580535be7a 100644 --- a/BUILD.md +++ b/BUILD.md @@ -60,9 +60,6 @@ Where `/path/to/directory` is the path to a directory where you wish the build f #### Possible Environment Variables ```text -// The build commit, e.g., use a Git hash for the most recent commit in the branch - fd6973b. -BUILD_NUMBER - // The Interface will have a custom default home and startup location. PRELOADED_STARTUP_LOCATION=Location/IP/URL // The Interface will have a custom default script whitelist, comma separated, no spaces. @@ -94,6 +91,9 @@ OVERTE_BACKTRACE_TOKEN // The release version, e.g., 2021.3.2. For PR builds the PR number, e.g. 577. // Not used for nightlies and development builds. OVERTE_RELEASE_NUMBER +// The build commit, e.g., use a Git hash for the most recent commit in the branch - fd6973b. +OVERTE_GIT_COMMIT_SHORT + // The type of release. OVERTE_RELEASE_TYPE=PRODUCTION|PR|NIGHTLY|DEV ``` diff --git a/INSTALLER.md b/INSTALLER.md index a995be6939..b9ab0b2024 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -109,7 +109,7 @@ For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PAS 1. Ensure you have all the prerequisites fulfilled from the [MacOS Build Guide](BUILD_OSX.md). 2. Perform a clean CMake in your build folder. e.g. ```bash - BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" STABLE_BUILD=1 PRODUCTION_BUILD=1 cmake -DOVERTE_RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. + BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 STABLE_BUILD=1 PRODUCTION_BUILD=1 cmake -DOVERTE_GIT_COMMIT_SHORT="Insert short hash of your last Git commit" -DOVERTE_RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. ``` 3. Pick a method to build and package your release. diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 3ac1f02c04..e7fa79657c 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -19,7 +19,8 @@ macro(SET_PACKAGING_PARAMETERS) set(DEV_BUILD 0) set(BUILD_GLOBAL_SERVICES "DEVELOPMENT") set(USE_STABLE_GLOBAL_SERVICES 0) - set(BUILD_NUMBER 0) + set(OVERTE_GIT_COMMIT_SHORT 0 CACHE STRING "Short Git commit hash to use for versioning.") + set(APP_USER_MODEL_ID "com.highfidelity.console-dev") set_from_env(STABLE_BUILD STABLE_BUILD 0) @@ -115,16 +116,11 @@ macro(SET_PACKAGING_PARAMETERS) endif () endif () - if ((PRODUCTION_BUILD OR PR_BUILD) AND NOT STABLE_BUILD) - set(GIT_COMMIT_SHORT $ENV{GIT_COMMIT_SHORT}) + set(BUILD_VERSION_NO_SHA ${BUILD_VERSION}) + if (NOT PRODUCTION_BUILD) # append the abbreviated commit SHA to the build version - # since this is a PR build or master/nightly builds - set(BUILD_VERSION_NO_SHA ${BUILD_VERSION}) - set(BUILD_VERSION "${BUILD_VERSION}-${GIT_COMMIT_SHORT}") - - # pass along a release number without the SHA in case somebody - # wants to compare master or PR builds as integers - set(BUILD_NUMBER ${OVERTE_RELEASE_NUMBER}) + # since this is a PR build or master/nightly build + set(BUILD_VERSION "${BUILD_VERSION}-${OVERTE_GIT_COMMIT_SHORT}") endif () if (APPLE) diff --git a/cmake/templates/BuildInfo.h.in b/cmake/templates/BuildInfo.h.in index 19c15d5652..a047cdfaf2 100644 --- a/cmake/templates/BuildInfo.h.in +++ b/cmake/templates/BuildInfo.h.in @@ -5,6 +5,7 @@ // Created by Stephen Birarda on 1/14/16. // Copyright 2015 High Fidelity, Inc. // Copyright 2021 Vircadia contributors. +// Copyright 2025 Overte e.V. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -25,7 +26,7 @@ namespace BuildInfo { const QString MODIFIED_ORGANIZATION = "@BUILD_ORGANIZATION@"; const QString ORGANIZATION_DOMAIN = "overte.org"; const QString VERSION = "@BUILD_VERSION@"; - const QString BUILD_NUMBER = "@BUILD_NUMBER@"; + const QString BUILD_NUMBER = "@BUILD_VERSION_NO_SHA@"; const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@"; const QString BUILD_TIME = "@BUILD_DATE@"; const QString PRELOADED_STARTUP_LOCATION = "@PRELOADED_STARTUP_LOCATION@"; diff --git a/cmake/templates/console-build-info.json.in b/cmake/templates/console-build-info.json.in index 5ea15a5b50..30638d1304 100644 --- a/cmake/templates/console-build-info.json.in +++ b/cmake/templates/console-build-info.json.in @@ -1,6 +1,6 @@ { - "buildNumber": "@BUILD_NUMBER@", "releaseType": "@OVERTE_RELEASE_TYPE@", + "buildNumber": "@OVERTE_GIT_COMMIT_SHORT@", "stableBuild": "@STABLE_BUILD@", "buildIdentifier": "@BUILD_VERSION@", "organization": "@BUILD_ORGANIZATION@", From 1eb2e8ae7722ff8a0cd3f51245e828453b6039e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:43:17 +0200 Subject: [PATCH 31/44] Remove OVERTE_USE_SYSTEM_QT straggler. (It was replaced with qt_source through the switch to Conan.) --- .github/workflows/linux_server_build.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/linux_server_build.yml b/.github/workflows/linux_server_build.yml index 17b5d802aa..be12fab133 100644 --- a/.github/workflows/linux_server_build.yml +++ b/.github/workflows/linux_server_build.yml @@ -164,13 +164,6 @@ jobs: echo "OVERTE_RELEASE_TYPE=PR" >> $GITHUB_ENV fi - # Systems requiring our prebuilt Qt package - if [[ "${{ matrix.os }}" = "ubuntu-18.04" || "${{ matrix.os }}" = "ubuntu-20.04" ]]; then - echo # false - else - echo "OVERTE_USE_SYSTEM_QT=true" >> $GITHUB_ENV - fi - echo "CMAKE_EXTRA=-DOVERTE_BUILD_SERVER=true -DOVERTE_BUILD_TOOLS=true -DOVERTE_BUILD_CLIENT=false" >> $GITHUB_ENV # Configuration is broken into multiple steps because you can't set an env var and also reference it in the same step From 08da32b71a3bbff1aec8ea15c81f17e1a4f9fa98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:51:26 +0200 Subject: [PATCH 32/44] Refactor PRODUCTION_BUILD, PR_BUILD, and STABLE_BUILD. We stop exposing them since they are already set automatically, and limit their usage. --- .github/workflows/linux_server_build.yml | 1 - .github/workflows/master_build.yml | 1 - .github/workflows/release_build.yml | 2 -- BUILD.md | 5 ----- INSTALLER.md | 8 +------- cmake/macros/SetPackagingParameters.cmake | 16 ++-------------- 6 files changed, 3 insertions(+), 30 deletions(-) diff --git a/.github/workflows/linux_server_build.yml b/.github/workflows/linux_server_build.yml index be12fab133..4e91ad4854 100644 --- a/.github/workflows/linux_server_build.yml +++ b/.github/workflows/linux_server_build.yml @@ -158,7 +158,6 @@ jobs: # Tagged builds. E.g. release or release candidate builds. if [ "${{github.ref_type}}" == "tag" ]; then - echo "PRODUCTION_BUILD=true" >> $GITHUB_ENV echo "OVERTE_RELEASE_TYPE=PRODUCTION" >> $GITHUB_ENV else echo "OVERTE_RELEASE_TYPE=PR" >> $GITHUB_ENV diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index 08cc132837..2c6916102b 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -14,7 +14,6 @@ env: APP_NAME: interface BUILD_TYPE: Release GIT_COMMIT: ${{ github.sha }} - STABLE_BUILD: 0 UPLOAD_BUCKET: overte-public UPLOAD_REGION: fra1 UPLOAD_ENDPOINT: "https://fra1.digitaloceanspaces.com" diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 771b97eb67..8e3705991f 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -16,8 +16,6 @@ env: APP_NAME: interface BUILD_TYPE: Release GIT_COMMIT: ${{ github.sha }} - PRODUCTION_BUILD: true - STABLE_BUILD: 1 UPLOAD_BUCKET: overte-public UPLOAD_REGION: fra1 UPLOAD_ENDPOINT: "https://fra1.digitaloceanspaces.com" diff --git a/BUILD.md b/BUILD.md index 580535be7a..c6ff29c10b 100644 --- a/BUILD.md +++ b/BUILD.md @@ -70,11 +70,6 @@ PRELOADED_SCRIPT_WHITELIST=ListOfEntries HF_PFX_FILE=Path to certificate HF_PFX_PASSPHRASE=Passphrase for certificate -// Determine the build type -PRODUCTION_BUILD=0|1 -PR_BUILD=0|1 -STABLE_BUILD=0|1 - // Determine if to utilize testing or stable directory services URLs USE_STABLE_GLOBAL_SERVICES=1 BUILD_GLOBAL_SERVICES=STABLE diff --git a/INSTALLER.md b/INSTALLER.md index b9ab0b2024..1e3e875331 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -109,7 +109,7 @@ For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PAS 1. Ensure you have all the prerequisites fulfilled from the [MacOS Build Guide](BUILD_OSX.md). 2. Perform a clean CMake in your build folder. e.g. ```bash - BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 STABLE_BUILD=1 PRODUCTION_BUILD=1 cmake -DOVERTE_GIT_COMMIT_SHORT="Insert short hash of your last Git commit" -DOVERTE_RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. + BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 cmake -DOVERTE_GIT_COMMIT_SHORT="Insert short hash of your last Git commit" -DOVERTE_RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. ``` 3. Pick a method to build and package your release. @@ -188,9 +188,6 @@ cd overte mkdir build rm -rf build/* conan install . -s build_type=Release -b missing -pr:b=default -of build -``` -Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. -```bash cmake --preset conan-release -DOVERTE_BUILD_CLIENT=false -DOVERTE_BUILD_TOOLS=true ``` @@ -220,9 +217,6 @@ cd overte mkdir build rm -rf build/* conan install . -s build_type=Release -b missing -pr:b=default -of build -``` -Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. -```bash cmake --preset conan-release -DOVERTE_BUILD_CLIENT=false -DOVERTE_BUILD_TOOLS=true ``` diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index e7fa79657c..fc7028ac27 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -14,16 +14,12 @@ # and decides how targets should be packaged. macro(SET_PACKAGING_PARAMETERS) - set(PR_BUILD 0) - set(PRODUCTION_BUILD 0) - set(DEV_BUILD 0) set(BUILD_GLOBAL_SERVICES "DEVELOPMENT") set(USE_STABLE_GLOBAL_SERVICES 0) set(OVERTE_GIT_COMMIT_SHORT 0 CACHE STRING "Short Git commit hash to use for versioning.") set(APP_USER_MODEL_ID "com.highfidelity.console-dev") - set_from_env(STABLE_BUILD STABLE_BUILD 0) set(OVERTE_RELEASE_TYPE "DEV" CACHE STRING "Valid options are: 'PRODUCTION', 'PR', 'NIGHTLY', and 'DEV'.") set(OVERTE_RELEASE_NUMBER "0000.00.0" CACHE STRING "Release version number. E.g. 2025.05.1-rc1 for the first release candidate of the first release in May 2025.") @@ -67,8 +63,8 @@ macro(SET_PACKAGING_PARAMETERS) endif () if (NOT BYPASS_SIGNING) - set(BYPASS_SIGNING 0) - endif () + set(BYPASS_SIGNING 0) + endif() elseif (OVERTE_RELEASE_TYPE STREQUAL "PR") set(PR_BUILD 1) @@ -108,14 +104,6 @@ macro(SET_PACKAGING_PARAMETERS) set(NITPICK_ICON_PREFIX "nitpick-beta") endif () - # if STABLE_BUILD is 1, PRODUCTION_BUILD must be 1 and - # DEV_BUILD and PR_BUILD must be 0 - if (STABLE_BUILD) - if ((NOT PRODUCTION_BUILD) OR PR_BUILD OR DEV_BUILD) - message(FATAL_ERROR "Cannot produce STABLE_BUILD without PRODUCTION_BUILD") - endif () - endif () - set(BUILD_VERSION_NO_SHA ${BUILD_VERSION}) if (NOT PRODUCTION_BUILD) # append the abbreviated commit SHA to the build version From 4e433548bb07df62a027447763d66eea2de09d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:51:55 +0200 Subject: [PATCH 33/44] Remove OVERTE_CPU_ARCHITECTURE straggler. --- INSTALLER.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALLER.md b/INSTALLER.md index 1e3e875331..03a3eeeae5 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -140,9 +140,9 @@ Overte Interface AppImages are built using [linuxdeploy](https://github.com/linu 1. Prepare build environment Follow the [Linux build guide](BUILD_LINUX.md). -2. Configure Interface (**Make sure that OVERTE_CPU_ARCHITECTURE is set to an empty string or `-msse3` depending on target CPU architecture!**) +2. Configure Interface ```bash - cmake --preset conan-release -DOVERTE_CPU_ARCHITECTURE=-msse3 + cmake --preset conan-release ``` 3. Create AppImage From 4afc038ac316f0cb371e9bc06c6e2efda8a392f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:54:52 +0200 Subject: [PATCH 34/44] Always use STABLE_GLOBAL_SERVICES. I assume we will eventually get rid of this completely, since we want the Directory service to be federated and switchable during runtime. --- INSTALLER.md | 2 +- cmake/macros/SetPackagingParameters.cmake | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/INSTALLER.md b/INSTALLER.md index 03a3eeeae5..94b1fe207f 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -109,7 +109,7 @@ For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PAS 1. Ensure you have all the prerequisites fulfilled from the [MacOS Build Guide](BUILD_OSX.md). 2. Perform a clean CMake in your build folder. e.g. ```bash - BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 cmake -DOVERTE_GIT_COMMIT_SHORT="Insert short hash of your last Git commit" -DOVERTE_RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. + cmake -DOVERTE_GIT_COMMIT_SHORT="Insert short hash of your last Git commit" -DOVERTE_RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. ``` 3. Pick a method to build and package your release. diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index fc7028ac27..e07545ac81 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -54,13 +54,9 @@ macro(SET_PACKAGING_PARAMETERS) # add definition for this release type add_definitions(-DPRODUCTION_BUILD) - # if the build is a PRODUCTION_BUILD from the "stable" branch - # then use the STABLE gobal services - if (STABLE_BUILD) - message(STATUS "The RELEASE_TYPE is PRODUCTION and STABLE_BUILD is 1") - set(BUILD_GLOBAL_SERVICES "STABLE") - set(USE_STABLE_GLOBAL_SERVICES 1) - endif () + set(BUILD_GLOBAL_SERVICES "STABLE") + set(USE_STABLE_GLOBAL_SERVICES 1) + if (NOT BYPASS_SIGNING) set(BYPASS_SIGNING 0) From a64e700d728ca64d53c1d8ca5cc4bd30eba02702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 18:57:50 +0200 Subject: [PATCH 35/44] HIFI_USE_OPTIMIZED_IK and DOWNLOAD_SERVERLESS_CONTENT straggler. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a601af655..0077f4e3bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,14 +198,14 @@ foreach(PLATFORM_QT_COMPONENT ${PLATFORM_QT_COMPONENTS}) list(APPEND PLATFORM_QT_LIBRARIES "Qt5::${PLATFORM_QT_COMPONENT}") endforeach() -MESSAGE(STATUS "Use optimized IK: " ${HIFI_USE_OPTIMIZED_IK}) +message(STATUS "Use optimized IK: " ${OVERTE_USE_OPTIMIZED_IK}) message(STATUS "Build server: " ${OVERTE_BUILD_SERVER}) message(STATUS "Build client: " ${OVERTE_BUILD_CLIENT}) message(STATUS "Build tests: " ${OVERTE_BUILD_TESTS}) message(STATUS "Build tools: " ${OVERTE_BUILD_TOOLS}) message(STATUS "Build installer: " ${OVERTE_BUILD_INSTALLER}) message(STATUS "Rendering backend: " ${OVERTE_RENDERING_BACKEND}) -MESSAGE(STATUS "DL serverless content: " ${DOWNLOAD_SERVERLESS_CONTENT}) +message(STATUS "DL serverless content: " ${OVERTE_DOWNLOAD_SERVERLESS_CONTENT}) if (OVERTE_DISABLE_QML) message(STATUS "QML disabled!") From 5d4de1f274a5f5b45d187f8cd64828ecd762502b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 20:19:11 +0200 Subject: [PATCH 36/44] Bump C++ standard to fix build errors on webrtc-audio-processing. --- cmake/compiler.cmake | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index f7bbf11471..f6da685e9f 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -1,10 +1,6 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") -if (WIN32) - # Building with webrtc-audio-processing on Windows fails on cppstd 14. - set(CMAKE_CXX_STANDARD 17) -else () - set(CMAKE_CXX_STANDARD 14) -endif () +# Building with webrtc-audio-processing fails on cppstd 14. +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) if (NOT "${CMAKE_SIZEOF_VOID_P}" EQUAL "8") From 761db8a2c3f1bf9d1aafc38eb531383394c612bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 21:21:20 +0200 Subject: [PATCH 37/44] BUILD_TOOLS -> OVERTE_BUILD_TOOLS stragglers. --- interface/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 6596a3bfd9..fd7e3d9532 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -32,10 +32,10 @@ find_package( ) -if (BUILD_TOOLS AND JSDOC_ENABLED) - message(STATUS "JSDoc enabled, depending on jsdoc") - add_custom_qrc_path(CUSTOM_INTERFACE_QRC_PATHS "${CMAKE_BINARY_DIR}/tools/jsdoc/out/hifiJSDoc.json" "auto-complete/hifiJSDoc.json") -endif () +if (OVERTE_BUILD_TOOLS AND JSDOC_ENABLED) + message(STATUS "JSDoc enabled, depending on jsdoc") + add_custom_qrc_path(CUSTOM_INTERFACE_QRC_PATHS "${CMAKE_BINARY_DIR}/tools/jsdoc/out/hifiJSDoc.json" "auto-complete/hifiJSDoc.json") +endif() set(RESOURCES_QRC ${CMAKE_CURRENT_BINARY_DIR}/resources.qrc) set(RESOURCES_RCC ${CMAKE_CURRENT_BINARY_DIR}/resources.rcc) @@ -48,8 +48,8 @@ else () qt5_add_binary_resources(resources "${RESOURCES_QRC}" DESTINATION "${RESOURCES_RCC}") endif() -if (BUILD_TOOLS AND JSDOC_ENABLED) - add_dependencies(resources jsdoc) +if (OVERTE_BUILD_TOOLS AND JSDOC_ENABLED) + add_dependencies(resources jsdoc) endif() list(APPEND GENERATE_QRC_DEPENDS ${RESOURCES_RCC}) From c7a2ce2b3a7bae1e84ce20db82d5d8596a65cf01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 21:28:39 +0200 Subject: [PATCH 38/44] Don't use OpenGL ES backend for now, as it fails to build. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0077f4e3bc..0c236f114c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,9 @@ set(OVERTE_DISABLE_QML OFF CACHE BOOL "Build without QML. (For graphics debuggin set(OVERTE_DOWNLOAD_SERVERLESS_CONTENT OFF CACHE BOOL "Download and setup default serverless content beside Interface.") # use OpenGL ES on Linux aarch64 and Android. if ((CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") OR ANDROID) - set(OVERTE_RENDERING_BACKEND "GLES" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") + # TODO: Change to GLES on aarch64 once GLES builds again. + #set(OVERTE_RENDERING_BACKEND "GLES" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") + set(OVERTE_RENDERING_BACKEND "OpenGL" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") else() set(OVERTE_RENDERING_BACKEND "OpenGL" CACHE STRING "Which rendering backend to compile with. Valid options are: 'OpenGL', 'GLES', and 'Vulkan'.") endif() From 6368155aab1d9387fbda5bc345c12fc1147e9c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 22:06:55 +0200 Subject: [PATCH 39/44] Use wildcards for uploading artifacts. --- .github/workflows/pr_build.yml | 12 +++++------- .github/workflows/release_build.yml | 2 +- tools/ci-scripts/upload.py | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index ec262802c8..94bd133c9f 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -156,14 +156,12 @@ jobs: echo "${{ steps.buildenv1.outputs.symbols_archive }}" if [ "${{ matrix.build_type }}" = "full" ]; then if [[ "${{ matrix.os }}" = "Ubuntu"* ]]; then - echo "ARTIFACT_PATTERN=Overte-PR${{ github.event.number }}-${GIT_COMMIT_SHORT}-$(uname -m).$INSTALLER_EXT" >> $GITHUB_ENV + echo "ARTIFACT_NAME=Overte-PR${{ github.event.number }}-${GIT_COMMIT_SHORT}-$(uname -m).$INSTALLER_EXT" >> $GITHUB_ENV else - echo "ARTIFACT_PATTERN=Overte-PR${{ github.event.number }}-${GIT_COMMIT_SHORT}.$INSTALLER_EXT" >> $GITHUB_ENV - echo "INSTALLER=Overte-$RELEASE_NUMBER-${GIT_COMMIT_SHORT}.$INSTALLER_EXT" >> $GITHUB_ENV + echo "ARTIFACT_NAME=Overte-PR${{ github.event.number }}-${GIT_COMMIT_SHORT}.$INSTALLER_EXT" >> $GITHUB_ENV fi else - echo "ARTIFACT_PATTERN=Overte-Interface-PR${{ github.event.number }}-${GIT_COMMIT_SHORT}.$INSTALLER_EXT" >> $GITHUB_ENV - echo "INSTALLER=Overte-Interface-$RELEASE_NUMBER-${GIT_COMMIT_SHORT}.$INSTALLER_EXT" >> $GITHUB_ENV + echo "ARTIFACT_NAME=Overte-Interface-PR${{ github.event.number }}-${GIT_COMMIT_SHORT}.$INSTALLER_EXT" >> $GITHUB_ENV fi - uses: actions/checkout@v4 @@ -348,6 +346,6 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACT_PATTERN }} - path: ./build/${{ env.ARTIFACT_PATTERN }} + name: ${{ env.ARTIFACT_NAME }} + path: ./build/Overte-* if-no-files-found: error diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 8e3705991f..c73e53dc46 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -199,7 +199,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.ARTIFACT_PATTERN }} - path: build/${{ env.ARTIFACT_PATTERN }} + path: build/Overte-* if-no-files-found: error - name: Archive symbols diff --git a/tools/ci-scripts/upload.py b/tools/ci-scripts/upload.py index 0a88efecf3..d73363f15a 100644 --- a/tools/ci-scripts/upload.py +++ b/tools/ci-scripts/upload.py @@ -1,6 +1,6 @@ # Copyright 2013-2019 High Fidelity, Inc. # Copyright 2020 Vircadia contributors. -# Copyright 2022 Overte e.V. +# Copyright 2022-2025 Overte e.V. # SPDX-License-Identifier: Apache-2.0 # Post build script @@ -18,7 +18,7 @@ def main(): release_number = os.environ['RELEASE_NUMBER'] full_prefix = upload_prefix + release_number S3 = boto3.client('s3', region_name=os.environ['UPLOAD_REGION'], endpoint_url=os.environ['UPLOAD_ENDPOINT']) - path = os.path.join(os.getcwd(), os.environ['ARTIFACT_PATTERN']) + path = os.path.join(os.getcwd(), "Overte-*") print("Checking for files to upload in {}..".format(path)) files = glob.glob(path, recursive=False) for archiveFile in files: From 5fda2fbe4a552f934c0b70feb0e664a034e575a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sat, 31 May 2025 22:33:19 +0200 Subject: [PATCH 40/44] Change PRODUCTION_BUILD et cetera to be cache variables, so that they can be accessed by other CMake files. --- cmake/macros/SetPackagingParameters.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index e07545ac81..bc87ec1b52 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -44,7 +44,7 @@ macro(SET_PACKAGING_PARAMETERS) string(TIMESTAMP BUILD_DATE "%Y-%m-%d" UTC) if (OVERTE_RELEASE_TYPE STREQUAL "PRODUCTION") - set(PRODUCTION_BUILD 1) + set(PRODUCTION_BUILD ON CACHE BOOL INTERNAL "") set(BUILD_VERSION ${OVERTE_RELEASE_NUMBER}) set(BUILD_ORGANIZATION "Overte") set(HIGH_FIDELITY_PROTOCOL "hifi") @@ -63,7 +63,7 @@ macro(SET_PACKAGING_PARAMETERS) endif() elseif (OVERTE_RELEASE_TYPE STREQUAL "PR") - set(PR_BUILD 1) + set(PR_BUILD ON CACHE BOOL INTERNAL "") set(BUILD_VERSION "PR${OVERTE_RELEASE_NUMBER}-${BUILD_DATE}") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") @@ -72,7 +72,7 @@ macro(SET_PACKAGING_PARAMETERS) add_definitions(-DPR_BUILD) elseif (OVERTE_RELEASE_TYPE STREQUAL "NIGHTLY") - set(NIGHTLY_BUILD 1) + set(NIGHTLY_BUILD ON CACHE BOOL INTERNAL "") set(BUILD_VERSION "Nightly-${BUILD_DATE}") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") @@ -81,7 +81,7 @@ macro(SET_PACKAGING_PARAMETERS) add_definitions(-DPR_BUILD) elseif (OVERTE_RELEASE_TYPE STREQUAL "DEV") - set(DEV_BUILD 1) + set(DEV_BUILD ON CACHE BOOL INTERNAL "") set(BUILD_VERSION "Dev-${BUILD_DATE}") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") From eb16e5871e4bab22a390c6ab1c05d321b78b87fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sun, 1 Jun 2025 00:04:05 +0200 Subject: [PATCH 41/44] Use numbers for variables like PRODUCTION_BUILD. NSIS, which later consumes these variables, isn't as flexible when it comes to boolean variables as CMake. --- cmake/macros/SetPackagingParameters.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index bc87ec1b52..2a9eed8f0f 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -44,7 +44,8 @@ macro(SET_PACKAGING_PARAMETERS) string(TIMESTAMP BUILD_DATE "%Y-%m-%d" UTC) if (OVERTE_RELEASE_TYPE STREQUAL "PRODUCTION") - set(PRODUCTION_BUILD ON CACHE BOOL INTERNAL "") + # To not break our NSIS later down the line, we use `1` here instead of `ON`. + set(PRODUCTION_BUILD 1 CACHE BOOL INTERNAL "") set(BUILD_VERSION ${OVERTE_RELEASE_NUMBER}) set(BUILD_ORGANIZATION "Overte") set(HIGH_FIDELITY_PROTOCOL "hifi") @@ -63,7 +64,8 @@ macro(SET_PACKAGING_PARAMETERS) endif() elseif (OVERTE_RELEASE_TYPE STREQUAL "PR") - set(PR_BUILD ON CACHE BOOL INTERNAL "") + # To not break our NSIS later down the line, we use `1` here instead of `ON`. + set(PR_BUILD 1 CACHE BOOL INTERNAL "") set(BUILD_VERSION "PR${OVERTE_RELEASE_NUMBER}-${BUILD_DATE}") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") @@ -72,7 +74,8 @@ macro(SET_PACKAGING_PARAMETERS) add_definitions(-DPR_BUILD) elseif (OVERTE_RELEASE_TYPE STREQUAL "NIGHTLY") - set(NIGHTLY_BUILD ON CACHE BOOL INTERNAL "") + # To not break our NSIS later down the line, we use `1` here instead of `ON`. + set(NIGHTLY_BUILD 1 CACHE BOOL INTERNAL "") set(BUILD_VERSION "Nightly-${BUILD_DATE}") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") @@ -81,7 +84,8 @@ macro(SET_PACKAGING_PARAMETERS) add_definitions(-DPR_BUILD) elseif (OVERTE_RELEASE_TYPE STREQUAL "DEV") - set(DEV_BUILD ON CACHE BOOL INTERNAL "") + # To not break our NSIS later down the line, we use `1` here instead of `ON`. + set(DEV_BUILD 1 CACHE BOOL INTERNAL "") set(BUILD_VERSION "Dev-${BUILD_DATE}") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") From b00a865e3efd7527cf895a4c3a8e0bd578b93eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Sun, 1 Jun 2025 21:50:42 +0200 Subject: [PATCH 42/44] Apparently INTERNAL is its own datatype, so it is mutually exclusive to BOOL. --- cmake/macros/SetPackagingParameters.cmake | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 2a9eed8f0f..371a7128d7 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -43,9 +43,16 @@ macro(SET_PACKAGING_PARAMETERS) string(TIMESTAMP BUILD_DATE "%Y-%m-%d" UTC) + # To not break our NSIS later down the line, we use `1` here instead of `ON`. + set(PRODUCTION_BUILD 0 CACHE INTERNAL "") + set(PR_BUILD 0 CACHE INTERNAL "") + set(NIGHTLY_BUILD 0 CACHE INTERNAL "") + set(DEV_BUILD 0 CACHE INTERNAL "") + if (OVERTE_RELEASE_TYPE STREQUAL "PRODUCTION") # To not break our NSIS later down the line, we use `1` here instead of `ON`. - set(PRODUCTION_BUILD 1 CACHE BOOL INTERNAL "") + # INTERNAL implies FORCE and breaks if FORCE is added. + set(PRODUCTION_BUILD 1 CACHE INTERNAL "") set(BUILD_VERSION ${OVERTE_RELEASE_NUMBER}) set(BUILD_ORGANIZATION "Overte") set(HIGH_FIDELITY_PROTOCOL "hifi") @@ -65,7 +72,7 @@ macro(SET_PACKAGING_PARAMETERS) elseif (OVERTE_RELEASE_TYPE STREQUAL "PR") # To not break our NSIS later down the line, we use `1` here instead of `ON`. - set(PR_BUILD 1 CACHE BOOL INTERNAL "") + set(PR_BUILD 1 CACHE INTERNAL "") set(BUILD_VERSION "PR${OVERTE_RELEASE_NUMBER}-${BUILD_DATE}") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") @@ -75,7 +82,7 @@ macro(SET_PACKAGING_PARAMETERS) elseif (OVERTE_RELEASE_TYPE STREQUAL "NIGHTLY") # To not break our NSIS later down the line, we use `1` here instead of `ON`. - set(NIGHTLY_BUILD 1 CACHE BOOL INTERNAL "") + set(NIGHTLY_BUILD 1 CACHE INTERNAL "") set(BUILD_VERSION "Nightly-${BUILD_DATE}") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") @@ -85,7 +92,7 @@ macro(SET_PACKAGING_PARAMETERS) elseif (OVERTE_RELEASE_TYPE STREQUAL "DEV") # To not break our NSIS later down the line, we use `1` here instead of `ON`. - set(DEV_BUILD 1 CACHE BOOL INTERNAL "") + set(DEV_BUILD 1 CACHE INTERNAL "") set(BUILD_VERSION "Dev-${BUILD_DATE}") set(BUILD_ORGANIZATION "Overte - ${BUILD_VERSION}") set(INTERFACE_ICON_PREFIX "interface-beta") From f58368faabc2738c53237bae6b8caab192769931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Tue, 10 Jun 2025 12:09:53 +0200 Subject: [PATCH 43/44] Update CMakeLists.txt Co-authored-by: HifiExperiments <53453710+HifiExperiments@users.noreply.github.com> --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c236f114c..f0aa0d2e62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,7 +136,7 @@ set(OVERTE_DISABLE_KTX_CACHE OFF CACHE BOOL "Disable KTX Cache.") set(OVERTE_USE_KHR_ROBUSTNESS OFF CACHE BOOL "Use KHR_robustness.") set(OVERTE_BACKTRACE_URL "" CACHE STRING "URL to an endpoint for uploading crash-dumps. For example Sentry.") -set(OVERTE_BACKTRACE_TOKEN "" CACHE STRING "Token used to identify with release or build is uploading crash-dumps.") +set(OVERTE_BACKTRACE_TOKEN "" CACHE STRING "Token used to identify this build, for use in uploading crash-dumps.") if (ANDROID OR UWP) set(OVERTE_BUILD_SERVER OFF CACHE BOOL FORCE "Overwritten (mobile build)") From b1aa068800674dbe28ceb18745cc79f00fb2d67c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Gro=C3=9F?= Date: Wed, 11 Jun 2025 11:15:46 +0200 Subject: [PATCH 44/44] Fix misspelled `-msse3` --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0aa0d2e62..8f7a7ef360 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,8 +35,8 @@ if( NOT WIN32 ) # SetAlignedPointerInInternalField requires at least 2 byte alignment and -falign-functions will set alignment # to machine specific value which should be greater than 2. if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - set(CMAKE_CXX_FLAGS "-falign-functions -fPIC -m64 -mss3" CACHE STRING "C++ compiler flags for all build types.") - set(CMAKE_C_FLAGS "-falign-functions -fPIC -m64 -mss3" CACHE STRING "C compiler flags for all build types.") + set(CMAKE_CXX_FLAGS "-falign-functions -fPIC -m64 -msse3" CACHE STRING "C++ compiler flags for all build types.") + set(CMAKE_C_FLAGS "-falign-functions -fPIC -m64 -msse3" CACHE STRING "C compiler flags for all build types.") elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") # TODO: Find out which architecture optimizations to use on aarch64. # We should probably target the 64bit version of the Raspberry Pi 2 as minimum.