diff --git a/docs/cross-platform.md b/docs/cross-platform.md index 43c1a94..d884b8f 100644 --- a/docs/cross-platform.md +++ b/docs/cross-platform.md @@ -169,6 +169,8 @@ Shared logic in `src/ui/paths.cpp` writes under: | macOS | `~/Library/Application Support/Nebula/User Data` | | Linux | `$XDG_DATA_HOME/Nebula/User Data` or `~/.local/share/Nebula/User Data` | +Unpacked extensions load from `/extensions/` on every OS (`GetExtensionsDirectory()`). Settings → Plugins shows the live path. + Platform-specific discovery lives in `src/platform/*/paths_*.cpp`. ## GPU / Chromium flags diff --git a/examples/extensions/hello-nebula/README.txt b/examples/extensions/hello-nebula/README.txt index ff68662..6c1ab80 100644 --- a/examples/extensions/hello-nebula/README.txt +++ b/examples/extensions/hello-nebula/README.txt @@ -1,8 +1,13 @@ Copy this folder into Nebula's extensions directory to install: - %LOCALAPPDATA%\Nebula\User Data\extensions\hello-nebula\ + Windows: %LOCALAPPDATA%\Nebula\User Data\extensions\hello-nebula\ + macOS: ~/Library/Application Support/Nebula/User Data/extensions/hello-nebula/ + Linux: ~/.local/share/Nebula/User Data/extensions/hello-nebula/ + (or $XDG_DATA_HOME/Nebula/User Data/extensions/hello-nebula/) -Then open Settings > Plugins and click Reload Plugins (or restart Nebula). +Or open Settings > Plugins — the install path is shown there. + +Then click Reload Plugins (or restart Nebula). manifest.json fields: id, name, version, description, enabled diff --git a/examples/extensions/return-youtube-dislike/README.txt b/examples/extensions/return-youtube-dislike/README.txt index 348dd83..473e9f9 100644 --- a/examples/extensions/return-youtube-dislike/README.txt +++ b/examples/extensions/return-youtube-dislike/README.txt @@ -20,7 +20,12 @@ Install ------- Copy this folder to: - %LOCALAPPDATA%\Nebula\User Data\extensions\return-youtube-dislike\ + Windows: %LOCALAPPDATA%\Nebula\User Data\extensions\return-youtube-dislike\ + macOS: ~/Library/Application Support/Nebula/User Data/extensions/return-youtube-dislike/ + Linux: ~/.local/share/Nebula/User Data/extensions/return-youtube-dislike/ + (or $XDG_DATA_HOME/Nebula/User Data/extensions/return-youtube-dislike/) + +Or open Settings > Plugins — the install path is shown there. Open Settings > Plugins > Reload Plugins, then open a YouTube video. diff --git a/src/app/nebula_controller.cpp b/src/app/nebula_controller.cpp index a5a0407..e0762e0 100644 --- a/src/app/nebula_controller.cpp +++ b/src/app/nebula_controller.cpp @@ -28,7 +28,7 @@ constexpr size_t kMaxSiteHistoryEntries = 200; std::filesystem::path GetSiteHistoryPath() { const auto user_data = nebula::ui::GetUserDataDirectory(); - return user_data.empty() ? std::filesystem::path{} : user_data / L"site_history.txt"; + return user_data.empty() ? std::filesystem::path{} : user_data / "site_history.txt"; } std::string ToLowerAscii(std::string value) { diff --git a/src/extensions/extension_manager.cpp b/src/extensions/extension_manager.cpp index 0360979..13c1641 100644 --- a/src/extensions/extension_manager.cpp +++ b/src/extensions/extension_manager.cpp @@ -274,10 +274,17 @@ void WriteInstallReadme(const std::filesystem::path& extensions_dir) { return; } + const std::string dir_utf8 = nebula::platform::PathToUtf8(extensions_dir); output << "Nebula Extensions\n" << "=================\n\n" + << "This machine's install directory:\n" + << " " << dir_utf8 << "\n\n" << "Drop an unpacked extension folder here (or copy/paste it into this directory).\n" << "Each folder must contain a manifest.json file.\n\n" + << "Typical locations by OS:\n" + << " Windows: %LOCALAPPDATA%\\Nebula\\User Data\\extensions\\\n" + << " macOS: ~/Library/Application Support/Nebula/User Data/extensions/\n" + << " Linux: ~/.local/share/Nebula/User Data/extensions/\n\n" << "Example layout:\n" << " extensions/\n" << " my-extension/\n"