From f78c7cf82726324fcee6b738e3d670bee02ad3ff Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Tue, 21 Nov 2023 16:10:08 -0500 Subject: autotools no more cmake! --- src/142bot_config.h.in | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/bot.cpp | 2 +- src/main.cpp | 8 +++++-- 3 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 src/142bot_config.h.in (limited to 'src') diff --git a/src/142bot_config.h.in b/src/142bot_config.h.in new file mode 100644 index 0000000..035955f --- /dev/null +++ b/src/142bot_config.h.in @@ -0,0 +1,63 @@ +/* src/142bot_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION diff --git a/src/bot.cpp b/src/bot.cpp index d3bd6b7..35592a0 100644 --- a/src/bot.cpp +++ b/src/bot.cpp @@ -352,4 +352,4 @@ void Bot::onSlashCommand(const dpp::slashcommand_t &event) { void Bot::onFormSubmit(const dpp::form_submit_t &event) { FOREACH_MOD(I_OnFormSubmit, OnFormSubmit(event)); -} \ No newline at end of file +} diff --git a/src/main.cpp b/src/main.cpp index 6ce5858..b22460c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,13 +1,16 @@ +#include #include #include #include <142bot/bot.hpp> #include <142bot/db.hpp> +#include #include #include #include #include #include +#include #include @@ -23,15 +26,16 @@ int main(int argc, char const *argv[]) { std::ifstream f("config.json"); json cfg = json::parse(f); + curl_global_init(CURL_GLOBAL_ALL); string token = cfg.value("token", "bad-token"); sentry_options_t *options = sentry_options_new(); sentry_options_set_dsn(options, cfg.value("sentry_dsn", "").c_str()); // This is also the default-path. For further information and recommendations: // https://docs.sentry.io/platforms/native/configuration/options/#database-path sentry_options_set_database_path(options, ".sentry-native"); - sentry_options_set_release(options, "142bot@" + onefortytwobot_VERSION_MAJOR + '.' + onefortytwobot_VERSION_MINOR); + sentry_options_set_release(options, fmt::format("142bot@{}", PACKAGE_VERSION).c_str()); sentry_options_set_debug(options, 0); - sentry_options_set_environment(options, onefortytwobot_env); + sentry_options_set_environment(options, "production"); sentry_options_set_symbolize_stacktraces(options, 1); sentry_init(options); dpp::cluster bot(token, dpp::intents::i_all_intents); -- cgit v1.2.3