feat: Added statistics and crash log uploading (#1149)

Co-authored-by: Justus Garbe <gihihoh@gmail.com>
This commit is contained in:
Nik
2023-06-20 11:55:56 +02:00
committed by GitHub
parent 54061c56bf
commit f703b15165
23 changed files with 401 additions and 94 deletions

View File

@@ -39,9 +39,9 @@ int main(int argc, char **argv, char **envp) {
{
Window::initNative();
hex::log::info("Welcome to ImHex {}!", IMHEX_VERSION);
log::info("Welcome to ImHex {}!", IMHEX_VERSION);
#if defined(GIT_BRANCH) && defined(GIT_COMMIT_HASH_SHORT)
hex::log::info("Compiled using commit {}@{}", GIT_BRANCH, GIT_COMMIT_HASH_SHORT);
log::info("Compiled using commit {}@{}", GIT_BRANCH, GIT_COMMIT_HASH_SHORT);
#endif
init::WindowSplash splashWindow;
@@ -56,13 +56,18 @@ int main(int argc, char **argv, char **envp) {
ImHexApi::System::getInitArguments().insert({ "tasks-failed", {} });
}
log::info("Running on {} {} ({})", ImHexApi::System::getOSName(), ImHexApi::System::getOSVersion(), ImHexApi::System::getArchitecture());
log::info("Using '{}' GPU", ImHexApi::System::getGPUVendor());
// Clean up everything after the main window is closed
ON_SCOPE_EXIT {
auto exitHandler = [](auto){
for (const auto &[name, task, async] : init::getExitTasks())
task();
TaskManager::exit();
};
ON_SCOPE_EXIT { exitHandler(0); };
// Main window
{
Window window;