Change the sentry dsn to be build time defined
We ultimately don't want people running personal builds to turn on sentry and start sending us crash logs we can't decipher
This commit is contained in:
parent
f2403804db
commit
87513b4a04
|
@ -996,6 +996,11 @@ endif()
|
|||
|
||||
|
||||
if( KICAD_USE_SENTRY )
|
||||
set( KICAD_SENTRY_DSN "" CACHE string "The sentry DSN used with sentry integration" )
|
||||
if ( KICAD_SENTRY_DSN STREQUAL "")
|
||||
message( FATAL_ERROR "Sentry DSN must be configured with KICAD_USE_SENTRY" )
|
||||
endif()
|
||||
|
||||
set( CRASHPAD_WER_ENABLED ON )
|
||||
add_subdirectory( thirdparty/sentry-native )
|
||||
add_compile_definitions( KICAD_USE_SENTRY )
|
||||
|
|
|
@ -417,6 +417,9 @@ if( TRUE OR NOT USE_KIWAY_DLLS )
|
|||
# We DO NOT want pgm_base.cpp linked into the KIFACE, only into the KIWAY.
|
||||
# Check the map files to verify eda_pgm.o not being linked in.
|
||||
list( APPEND COMMON_SRCS pgm_base.cpp )
|
||||
if( KICAD_USE_SENTRY )
|
||||
set_property(SOURCE pgm_base.cpp APPEND PROPERTY COMPILE_DEFINITIONS KICAD_SENTRY_DSN="${KICAD_SENTRY_DSN}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( NOT HAVE_STRTOKR )
|
||||
|
|
|
@ -328,6 +328,10 @@ void PGM_BASE::sentryInit()
|
|||
|
||||
sentry_options_t* options = sentry_options_new();
|
||||
|
||||
#ifndef KICAD_SENTRY_DSN
|
||||
# error "Project configuration error, missing KICAD_SENTRY_DSN"
|
||||
#endif
|
||||
|
||||
sentry_options_set_dsn(
|
||||
options,
|
||||
"https://463925e689c34632b5172436ffb76de5@sentry-relay.kicad.org/6266565" );
|
||||
|
|
|
@ -486,6 +486,11 @@ add_executable( eeschema WIN32 MACOSX_BUNDLE
|
|||
${CMAKE_SOURCE_DIR}/common/pgm_base.cpp
|
||||
${EESCHEMA_RESOURCES}
|
||||
)
|
||||
|
||||
if( KICAD_USE_SENTRY )
|
||||
set_property(SOURCE ${CMAKE_SOURCE_DIR}/common/pgm_base.cpp APPEND PROPERTY COMPILE_DEFINITIONS KICAD_SENTRY_DSN="${KICAD_SENTRY_DSN}")
|
||||
endif()
|
||||
|
||||
set_source_files_properties( ${CMAKE_SOURCE_DIR}/common/single_top.cpp PROPERTIES
|
||||
COMPILE_DEFINITIONS "TOP_FRAME=FRAME_SCH;PGM_DATA_FILE_EXT=\"kicad_sch\";BUILD_KIWAY_DLL"
|
||||
)
|
||||
|
|
|
@ -104,6 +104,11 @@ add_executable( gerbview WIN32 MACOSX_BUNDLE
|
|||
${CMAKE_SOURCE_DIR}/common/pgm_base.cpp
|
||||
${GERBVIEW_RESOURCES}
|
||||
)
|
||||
|
||||
if( KICAD_USE_SENTRY )
|
||||
set_property(SOURCE ${CMAKE_SOURCE_DIR}/common/pgm_base.cpp APPEND PROPERTY COMPILE_DEFINITIONS KICAD_SENTRY_DSN="${KICAD_SENTRY_DSN}")
|
||||
endif()
|
||||
|
||||
set_source_files_properties( ${CMAKE_SOURCE_DIR}/common/single_top.cpp PROPERTIES
|
||||
COMPILE_DEFINITIONS "TOP_FRAME=FRAME_GERBER;BUILD_KIWAY_DLL"
|
||||
)
|
||||
|
|
|
@ -77,6 +77,11 @@ add_executable( pl_editor WIN32 MACOSX_BUNDLE
|
|||
${CMAKE_SOURCE_DIR}/common/pgm_base.cpp
|
||||
${PL_EDITOR_RESOURCES}
|
||||
)
|
||||
|
||||
if( KICAD_USE_SENTRY )
|
||||
set_property(SOURCE ${CMAKE_SOURCE_DIR}/common/pgm_base.cpp APPEND PROPERTY COMPILE_DEFINITIONS KICAD_SENTRY_DSN="${KICAD_SENTRY_DSN}")
|
||||
endif()
|
||||
|
||||
set_source_files_properties( ${CMAKE_SOURCE_DIR}/common/single_top.cpp PROPERTIES
|
||||
COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PL_EDITOR;PGM_DATA_FILE_EXT=\"kicad_wks\";BUILD_KIWAY_DLL"
|
||||
)
|
||||
|
|
|
@ -91,6 +91,11 @@ add_executable( pcb_calculator WIN32 MACOSX_BUNDLE
|
|||
${CMAKE_SOURCE_DIR}/common/pgm_base.cpp
|
||||
${PCB_CALCULATOR_RESOURCES}
|
||||
)
|
||||
|
||||
if( KICAD_USE_SENTRY )
|
||||
set_property(SOURCE ${CMAKE_SOURCE_DIR}/common/pgm_base.cpp APPEND PROPERTY COMPILE_DEFINITIONS KICAD_SENTRY_DSN="${KICAD_SENTRY_DSN}")
|
||||
endif()
|
||||
|
||||
set_source_files_properties( ${CMAKE_SOURCE_DIR}/common/single_top.cpp PROPERTIES
|
||||
COMPILE_DEFINITIONS "TOP_FRAME=FRAME_CALC;BUILD_KIWAY_DLL"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue