mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:19:05 +02:00
Replace CMAKE_BACKTRACE_URL and CMAKE_BACKTRACE_TOKEN environment variables with OVERTE_BACKTRACE_URL and OVERTE_BACKTRACE_TOKEN CMake cache variables.
This commit is contained in:
parent
19a8f75654
commit
cee546cfe0
9 changed files with 27 additions and 44 deletions
10
.github/workflows/linux_server_build.yml
vendored
10
.github/workflows/linux_server_build.yml
vendored
|
@ -207,16 +207,6 @@ jobs:
|
||||||
|
|
||||||
echo "BUILD_NUMBER=$GIT_COMMIT_SHORT" >> $GITHUB_ENV
|
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
|
- name: Configure Build Environment 3
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
3
.github/workflows/master_build.yml
vendored
3
.github/workflows/master_build.yml
vendored
|
@ -21,9 +21,6 @@ env:
|
||||||
UPLOAD_BUCKET: overte-public
|
UPLOAD_BUCKET: overte-public
|
||||||
UPLOAD_REGION: fra1
|
UPLOAD_REGION: fra1
|
||||||
UPLOAD_ENDPOINT: "https://fra1.digitaloceanspaces.com"
|
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
|
# OSX-specific variables
|
||||||
DEVELOPER_DIR: /Applications/Xcode_11.2.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode_11.2.app/Contents/Developer
|
||||||
|
|
5
.github/workflows/pr_build.yml
vendored
5
.github/workflows/pr_build.yml
vendored
|
@ -17,11 +17,6 @@ env:
|
||||||
RELEASE_TYPE: PR
|
RELEASE_TYPE: PR
|
||||||
RELEASE_NUMBER: ${{ github.event.number }}
|
RELEASE_NUMBER: ${{ github.event.number }}
|
||||||
VERSION_CODE: ${{ 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_BUCKET: overte-public
|
||||||
UPLOAD_REGION: fra1
|
UPLOAD_REGION: fra1
|
||||||
|
|
3
.github/workflows/release_build.yml
vendored
3
.github/workflows/release_build.yml
vendored
|
@ -23,9 +23,6 @@ env:
|
||||||
UPLOAD_BUCKET: overte-public
|
UPLOAD_BUCKET: overte-public
|
||||||
UPLOAD_REGION: fra1
|
UPLOAD_REGION: fra1
|
||||||
UPLOAD_ENDPOINT: "https://fra1.digitaloceanspaces.com"
|
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
|
# WIN-specific variables
|
||||||
PreferredToolArchitecture: X64
|
PreferredToolArchitecture: X64
|
||||||
|
|
14
BUILD.md
14
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
|
#### Possible Environment Variables
|
||||||
|
|
||||||
```text
|
```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.
|
// The release version, e.g., 2021.3.2.
|
||||||
RELEASE_NUMBER
|
RELEASE_NUMBER
|
||||||
// The build commit, e.g., use a Git hash for the most recent commit in the branch - fd6973b.
|
// 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
|
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
|
#### Generate Files
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -169,6 +169,8 @@ set(BUILD_TOOLS_OPTION ON)
|
||||||
set(BUILD_INSTALLER_OPTION ON)
|
set(BUILD_INSTALLER_OPTION ON)
|
||||||
set(DISABLE_QML_OPTION OFF)
|
set(DISABLE_QML_OPTION OFF)
|
||||||
set(DOWNLOAD_SERVERLESS_CONTENT_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)
|
if (ANDROID OR UWP)
|
||||||
set(BUILD_SERVER_OPTION OFF)
|
set(BUILD_SERVER_OPTION OFF)
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#
|
#
|
||||||
# Created by Clement Brisset on 01/19/18.
|
# Created by Clement Brisset on 01/19/18.
|
||||||
# Copyright 2018 High Fidelity, Inc.
|
# Copyright 2018 High Fidelity, Inc.
|
||||||
|
# Copyright 2025 Overte e.V.
|
||||||
#
|
#
|
||||||
# Distributed under the Apache License, Version 2.0.
|
# Distributed under the Apache License, Version 2.0.
|
||||||
# See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html
|
# 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)
|
set (USE_CRASHPAD TRUE)
|
||||||
message(STATUS "Checking crashpad config")
|
message(STATUS "Checking crashpad config")
|
||||||
|
|
||||||
if ("$ENV{CMAKE_BACKTRACE_URL}" STREQUAL "")
|
if (OVERTE_BACKTRACE_URL STREQUAL "")
|
||||||
message(STATUS "Checking crashpad config - CMAKE_BACKTRACE_URL is not set, disabled.")
|
message(STATUS "Checking crashpad config - -DOVERTE_BACKTRACE_URL is empty, disabled.")
|
||||||
set(USE_CRASHPAD FALSE)
|
set(USE_CRASHPAD FALSE)
|
||||||
else()
|
|
||||||
set(CMAKE_BACKTRACE_URL $ENV{CMAKE_BACKTRACE_URL})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ("$ENV{CMAKE_BACKTRACE_TOKEN}" STREQUAL "")
|
if (OVERTE_BACKTRACE_TOKEN STREQUAL "")
|
||||||
message(STATUS "Checking crashpad config - CMAKE_BACKTRACE_TOKEN is not set, disabled.")
|
message(STATUS "Checking crashpad config - -DOVERTE_BACKTRACE_TOKEN is empty, disabled.")
|
||||||
set(USE_CRASHPAD FALSE)
|
set(USE_CRASHPAD FALSE)
|
||||||
else()
|
|
||||||
set(CMAKE_BACKTRACE_TOKEN $ENV{CMAKE_BACKTRACE_TOKEN})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||||
|
@ -42,8 +39,8 @@ macro(add_crashpad)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-DHAS_CRASHPAD)
|
add_definitions(-DHAS_CRASHPAD)
|
||||||
add_definitions(-DCMAKE_BACKTRACE_URL=\"${CMAKE_BACKTRACE_URL}\")
|
add_definitions(-DOVERTE_BACKTRACE_URL=\"${OVERTE_BACKTRACE_URL}\")
|
||||||
add_definitions(-DCMAKE_BACKTRACE_TOKEN=\"${CMAKE_BACKTRACE_TOKEN}\")
|
add_definitions(-DOVERTE_BACKTRACE_TOKEN=\"${OVERTE_BACKTRACE_TOKEN}\")
|
||||||
|
|
||||||
target_include_directories(${TARGET_NAME} PRIVATE ${CRASHPAD_INCLUDE_DIRS})
|
target_include_directories(${TARGET_NAME} PRIVATE ${CRASHPAD_INCLUDE_DIRS})
|
||||||
target_link_libraries(${TARGET_NAME} ${CRASHPAD_LIBRARY} ${CRASHPAD_UTIL_LIBRARY} ${CRASHPAD_BASE_LIBRARY})
|
target_link_libraries(${TARGET_NAME} ${CRASHPAD_LIBRARY} ${CRASHPAD_UTIL_LIBRARY} ${CRASHPAD_BASE_LIBRARY})
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Created by Dale Glass on 25/06/2023.
|
// 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.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// 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:
|
* Reasons for it failing to start include:
|
||||||
*
|
*
|
||||||
* * Not having a crash reporter for the platform
|
* * 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
|
* * Crash reporter is present and configured, but failed to initialize for some reason
|
||||||
*
|
*
|
||||||
* @return true Crash reporter is present, configured and working.
|
* @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
|
* 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.
|
* 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
|
* @return false Crashes will not be reported
|
||||||
*/
|
*/
|
||||||
bool isEnabled() const { return _crashReportingEnabled; }
|
bool isEnabled() const { return _crashReportingEnabled; }
|
||||||
|
@ -126,7 +126,7 @@ public slots:
|
||||||
/**
|
/**
|
||||||
* @brief Set whether we want to submit crash reports to the report server
|
* @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.
|
* Emits crashReportingEnabledChanged signal.
|
||||||
*
|
*
|
||||||
* @note This automatically calls start(), so it should be called after setPath(), setUrl() and setToken()
|
* @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
|
* @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.
|
* will be used.
|
||||||
*
|
*
|
||||||
* @param url URL
|
* @param url URL
|
||||||
|
@ -150,7 +150,7 @@ public slots:
|
||||||
* This is an identifier in the crash collection service, such as Sentry, and may contain
|
* This is an identifier in the crash collection service, such as Sentry, and may contain
|
||||||
* a branch name or a version number.
|
* 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.
|
* will be used.
|
||||||
*
|
*
|
||||||
* @param token Token
|
* @param token Token
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
//
|
//
|
||||||
// Created by Clement Brisset on 01/19/18.
|
// Created by Clement Brisset on 01/19/18.
|
||||||
// Copyright 2018 High Fidelity, Inc.
|
// Copyright 2018 High Fidelity, Inc.
|
||||||
|
// Copyright 2025 Overte e.V.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// 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_URL{ OVERTE_BACKTRACE_URL };
|
||||||
static const std::string BACKTRACE_TOKEN{ CMAKE_BACKTRACE_TOKEN };
|
static const std::string BACKTRACE_TOKEN{ OVERTE_BACKTRACE_TOKEN };
|
||||||
|
|
||||||
std::string custom_backtrace_url;
|
std::string custom_backtrace_url;
|
||||||
std::string custom_backtrace_token;
|
std::string custom_backtrace_token;
|
||||||
|
|
Loading…
Reference in a new issue