Initialize AWS SDK

This commit is contained in:
Dan Paulat 2022-04-22 09:24:58 -05:00
parent c0145f1abd
commit bd68f1adbd
2 changed files with 18 additions and 2 deletions

View file

@ -4,6 +4,7 @@
#include <scwx/qt/manager/settings_manager.hpp>
#include <scwx/util/logger.hpp>
#include <aws/core/Aws.h>
#include <spdlog/spdlog.h>
#include <QApplication>
@ -14,6 +15,9 @@ int main(int argc, char* argv[])
QCoreApplication::setApplicationName("Supercell Wx");
Aws::SDKOptions awsSdkOptions;
Aws::InitAPI(awsSdkOptions);
scwx::qt::config::RadarSite::Initialize();
scwx::qt::manager::SettingsManager::Initialize();
scwx::qt::manager::ResourceManager::PreLoad();
@ -21,5 +25,9 @@ int main(int argc, char* argv[])
QApplication a(argc, argv);
scwx::qt::main::MainWindow w;
w.show();
return a.exec();
int result = a.exec();
Aws::ShutdownAPI(awsSdkOptions);
return result;
}

View file

@ -1,5 +1,6 @@
#include <scwx/util/logger.hpp>
#include <aws/core/Aws.h>
#include <gtest/gtest.h>
#include <spdlog/spdlog.h>
@ -8,6 +9,13 @@ int main(int argc, char** argv)
scwx::util::Logger::Initialize();
spdlog::set_level(spdlog::level::debug);
Aws::SDKOptions awsSdkOptions;
Aws::InitAPI(awsSdkOptions);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
int result = RUN_ALL_TESTS();
Aws::ShutdownAPI(awsSdkOptions);
return result;
}