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:
Lion Kortlepel
2021-08-19 15:41:27 +02:00
committed by Lion
parent 7d137eb496
commit fe36191baf
4 changed files with 14 additions and 7 deletions

View File

@@ -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()) {