mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Turn Dalamud Injector into a console app (#811)
This commit is contained in:
parent
8c6b599a07
commit
4d7b3bca9c
6 changed files with 1125 additions and 161 deletions
|
|
@ -6,16 +6,8 @@
|
|||
#include "..\lib\CoreCLR\CoreCLR.h"
|
||||
#include "..\lib\CoreCLR\boot.h"
|
||||
|
||||
int wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nShowCmd)
|
||||
int wmain(int argc, wchar_t** argv)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
ConsoleSetup(L"Dalamud.Injector");
|
||||
#endif
|
||||
|
||||
int argc = 0;
|
||||
LPWSTR* argv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||
//ShowWindow(GetConsoleWindow(), SW_HIDE);
|
||||
|
||||
printf("Dalamud.Injector, (c) 2021 XIVLauncher Contributors\nBuilt at: %s@%s\n\n", __DATE__, __TIME__);
|
||||
|
||||
wchar_t _module_path[MAX_PATH];
|
||||
|
|
@ -42,18 +34,9 @@ int wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LP
|
|||
typedef void (CORECLR_DELEGATE_CALLTYPE* custom_component_entry_point_fn)(int, wchar_t**);
|
||||
custom_component_entry_point_fn entrypoint_fn = reinterpret_cast<custom_component_entry_point_fn>(entrypoint_vfn);
|
||||
|
||||
printf("Running Dalamud Injector... ");
|
||||
printf("Running Dalamud Injector...\n");
|
||||
entrypoint_fn(argc, argv);
|
||||
printf("Done!\n");
|
||||
|
||||
// =========================================================================== //
|
||||
|
||||
#ifndef NDEBUG
|
||||
fclose(stdin);
|
||||
fclose(stdout);
|
||||
fclose(stderr);
|
||||
FreeConsole();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue