Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions Engine/Source/Applications/Editor/Private/Launch.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
// RavenStorm Copyright @ 2025-2025

#if defined(CORVUS_MODE_DEBUG) || defined(CORVUS_MODE_DEVELOPMENT)
int main()
#else
#include <Windows.h>
#include "Launch/Launch.hpp"

int APIENTRY WinMain(HINSTANCE Instance, HINSTANCE PreviousInstance, PSTR CommandLine, int ShowCommand)
#endif
{
return 0;
}
LAUNCH_ENGINE()
3 changes: 1 addition & 2 deletions Engine/Source/Applications/Editor/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
local module_name = 'Editor'

corvus_application_target(module_name)
add_deps('Core')
add_deps('Platform')
add_deps('Launch')
corvus_target_end()
29 changes: 29 additions & 0 deletions Engine/Source/Runtime/Launch/Private/Launch/Launch.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// RavenStorm Copyright @ 2025-2025

#include "Launch/Launch.hpp"

#include "Core/Assertion/ExceptionHandler.hpp"
#include "Core/Logging/LogManager.hpp"
#include "Platform/Platform.hpp"

#include <Windows.h>

void GuardedMain()
{
}

int32 LaunchEngine()
{
FLogManager::Initialize();
FPlatform::Initialize();
TRY
{
GuardedMain();
}
CATCH()
{
}
FPlatform::Shutdown();
FLogManager::Shutdown();
return FExceptionHandler::GetExitCode();
}
19 changes: 19 additions & 0 deletions Engine/Source/Runtime/Launch/Public/Launch/Launch.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// RavenStorm Copyright @ 2025-2025

#pragma once

#if defined(CORVUS_MODE_DEBUG) || defined(CORVUS_MODE_DEVELOPMENT)
# define ENTRY_POINT_SIGNATURE() int main()
#else
#include <Windows.h>

# define ENTRY_POINT_SIGNATURE() int APIENTRY WinMain(HINSTANCE Instance, HINSTANCE PreviousInstance, PSTR CommandLine, int ShowCommand)
#endif

LAUNCH_API int32 LaunchEngine();

#define LAUNCH_ENGINE() \
ENTRY_POINT_SIGNATURE() \
{ \
return LaunchEngine(); \
}
13 changes: 13 additions & 0 deletions Engine/Source/Runtime/Launch/Public/LaunchAPI.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// RavenStorm Copyright @ 2025-2025

#pragma once

#ifdef CORVUS_BUILD_MODULAR
# ifdef CORVUS_BUILD_LAUNCH
# define LAUNCH_API __declspec(dllexport)
# else
# define LAUNCH_API __declspec(dllimport)
# endif
#else
# define LAUNCH_API
#endif
6 changes: 6 additions & 0 deletions Engine/Source/Runtime/Launch/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
local module_name = 'Launch'

corvus_engine_target(module_name)
add_deps('Core', { public = true })
add_deps('Platform', { public = true })
corvus_target_end()
Loading