mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-04 06:46:23 +00:00
fix github actions
Possible fix for sentry url not showing up in windows build possible fix for sentry, again add static_assert in attempt to fix issue with sentry use target_compile_definitions instead of add_compile_definitions
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -36,6 +36,10 @@ void UnixSignalHandler(int sig) {
|
||||
}
|
||||
#endif // __unix
|
||||
|
||||
int constexpr length(const char* str) {
|
||||
return *str ? 1 + length(str + 1) : 0;
|
||||
}
|
||||
|
||||
// this is provided by the build system, leave empty for source builds
|
||||
// global, yes, this is ugly, no, it cant be done another way
|
||||
TSentry Sentry { SECRET_SENTRY_URL };
|
||||
@@ -55,6 +59,8 @@ int main(int argc, char** argv) try {
|
||||
#endif // __unix
|
||||
setlocale(LC_ALL, "C");
|
||||
|
||||
static_assert(length(SECRET_SENTRY_URL) != 0);
|
||||
|
||||
bool Shutdown = false;
|
||||
Application::RegisterShutdownHandler([&Shutdown] { Shutdown = true; });
|
||||
|
||||
@@ -66,9 +72,9 @@ int main(int argc, char** argv) try {
|
||||
Assert(!Application::IsOutdated(std::array<int, 3> { 2, 0, 0 }, std::array<int, 3> { 1, 0, 1 }));
|
||||
|
||||
TServer Server(argc, argv);
|
||||
|
||||
|
||||
Application::CheckForUpdates();
|
||||
|
||||
|
||||
TConfig Config;
|
||||
|
||||
if (Config.Failed()) {
|
||||
|
||||
Reference in New Issue
Block a user