Add platform abstraction & cross-platform ports
Introduce a cross-platform platform layer and port scaffolding for macOS and Linux. CMakeLists.txt refactored to select platform sources, set executable type per OS, and use CEF helper macros for runtime deployment. Add platform/types.h, startup/paths/browser_host APIs and implementations for Windows, macOS, and Linux (many are stubs for mac/linux). Refactor app entry and lifetime to use nebula::platform::AppStartup (app/main, run.{h,cpp}), move window/browser host logic into platform/browser_host.*, and update NebulaController to use platform APIs (native handles, sizing, visibility, cache-busting token, etc.). Add README and detailed docs/cross-platform.md describing build layout and porting status.
This commit is contained in:
+12
-3
@@ -1,6 +1,8 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include "app/run.h"
|
||||
#include "platform/types.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
|
||||
int APIENTRY wWinMain(HINSTANCE instance,
|
||||
HINSTANCE previous_instance,
|
||||
@@ -9,5 +11,12 @@ int APIENTRY wWinMain(HINSTANCE instance,
|
||||
UNREFERENCED_PARAMETER(previous_instance);
|
||||
UNREFERENCED_PARAMETER(command_line);
|
||||
|
||||
return nebula::app::RunNebula(instance, show_command);
|
||||
const nebula::platform::AppStartup startup{instance, show_command};
|
||||
return nebula::app::RunNebula(startup);
|
||||
}
|
||||
#else
|
||||
int main(int argc, char* argv[]) {
|
||||
const nebula::platform::AppStartup startup{argc, argv};
|
||||
return nebula::app::RunNebula(startup);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user