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:
Andrew Zambazos
2026-05-18 17:25:04 +12:00
parent 18bc607d93
commit e51594a010
28 changed files with 1461 additions and 508 deletions
+7
View File
@@ -76,8 +76,15 @@ void NebulaApp::OnBeforeCommandLineProcessing(const CefString& process_type,
// can prevent WebGL shared contexts from initializing on some drivers.
command_line->AppendSwitch("ignore-gpu-blocklist");
command_line->AppendSwitch("enable-accelerated-video-decode");
#if defined(_WIN32)
command_line->AppendSwitchWithValue("use-gl", "angle");
command_line->AppendSwitchWithValue("use-angle", "d3d11");
#elif defined(__APPLE__)
command_line->AppendSwitchWithValue("use-angle", "metal");
#else
command_line->AppendSwitchWithValue("use-gl", "egl");
#endif
}
void NebulaApp::OnContextCreated(CefRefPtr<CefBrowser> browser,