2021-06-27 21:25:29 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: Entrypoint.cpp
|
|
|
|
Date: 2021-5-13
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#include <AuroraCommon.hpp>
|
|
|
|
#include <AuroraRuntime.hpp>
|
|
|
|
#include "RuntimeInternal.hpp"
|
|
|
|
#include "Crypto.hpp"
|
|
|
|
#include "Processes/Processes.hpp"
|
|
|
|
#include "RNG/RNG.hpp"
|
|
|
|
#include "Locale/Locale.hpp"
|
|
|
|
#include "Console/Console.hpp"
|
|
|
|
#include "IO/FS/FS.hpp"
|
|
|
|
#include "Hashing/Hashing.hpp"
|
|
|
|
#include "Debug/Debug.hpp"
|
2021-06-27 22:53:04 +00:00
|
|
|
#include "Async/Async.hpp"
|
2021-07-01 10:42:48 +00:00
|
|
|
#if defined(AURORA_PLATFORM_WIN32)
|
|
|
|
#include "Extensions/Win32/DarkTheme.hpp"
|
|
|
|
#endif
|
2021-06-27 22:53:04 +00:00
|
|
|
|
2021-06-27 21:25:29 +00:00
|
|
|
static void Init()
|
|
|
|
{
|
2021-07-01 10:42:48 +00:00
|
|
|
#if defined(AURORA_PLATFORM_WIN32)
|
|
|
|
Aurora::Extensions::Win32::InitDarkMode();
|
|
|
|
#endif
|
|
|
|
|
2021-06-27 21:25:29 +00:00
|
|
|
Crypto::InitCrypto();
|
|
|
|
Aurora::Console::Init();
|
|
|
|
Aurora::IO::FS::InitResources();
|
|
|
|
Aurora::Console::Init2();
|
|
|
|
Aurora::Debug::InitDebug();
|
|
|
|
Aurora::Locale::Init();
|
|
|
|
Aurora::Processes::Init();
|
|
|
|
Aurora::RNG::Init();
|
|
|
|
Aurora::Hashing::InitHashing();
|
2021-06-27 22:53:04 +00:00
|
|
|
Aurora::Async::InitAsync();
|
2021-06-27 21:25:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void Pump()
|
|
|
|
{
|
|
|
|
Aurora::Console::Pump();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void Deinit()
|
|
|
|
{
|
|
|
|
Aurora::RNG::Release();
|
2021-07-01 09:18:42 +00:00
|
|
|
Aurora::Async::ShutdownAsync();
|
2021-07-01 10:42:48 +00:00
|
|
|
Aurora::Console::Exit();
|
2021-06-27 21:25:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace Aurora
|
|
|
|
{
|
|
|
|
AUKN_SYM void RuntimeStart(const RuntimeStartInfo &info)
|
|
|
|
{
|
|
|
|
gRuntimeConfig = info;
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
AUKN_SYM void RuntimeShutdown()
|
|
|
|
{
|
|
|
|
Deinit();
|
|
|
|
}
|
|
|
|
|
|
|
|
AUKN_SYM void RuntimeSysPump()
|
|
|
|
{
|
|
|
|
Pump();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(AURORA_PLATFORM_WIN32)
|
|
|
|
|
|
|
|
BOOL WINAPI DllMain(
|
|
|
|
HINSTANCE hinstDLL,
|
|
|
|
DWORD fdwReason,
|
|
|
|
LPVOID lpReserved)
|
|
|
|
{
|
|
|
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
|
|
|
{
|
|
|
|
DisableThreadLibraryCalls(hinstDLL);
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|