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
+3 -3
View File
@@ -7,6 +7,7 @@
#include "browser/tab_manager.h"
#include "cef/browser_client.h"
#include "platform/types.h"
#include "window/nebula_window.h"
namespace nebula::app {
@@ -15,7 +16,7 @@ class NebulaController final : public nebula::window::WindowDelegate,
public nebula::browser::TabObserver,
public nebula::cef::BrowserClientDelegate {
public:
NebulaController(HINSTANCE instance, std::string initial_url, int show_command);
NebulaController(nebula::platform::AppStartup startup, std::string initial_url);
~NebulaController() override;
bool Create();
@@ -60,9 +61,8 @@ private:
void PersistSession() const;
void MaybeFinishShutdown();
HINSTANCE instance_ = nullptr;
nebula::platform::AppStartup startup_;
std::string initial_url_;
int show_command_ = SW_SHOWDEFAULT;
bool closing_ = false;
bool chrome_ready_ = false;
bool content_fullscreen_ = false;