|
LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
|
Namespaces | |
| namespace | anonymous_namespace{PortableMode.cpp} |
Functions | |
| std::filesystem::path | ExecutableDir () |
| Directory containing the running executable (empty if it cannot be found). | |
| bool | IsPortable () |
| True when the marker file exists next to the executable. | |
| std::filesystem::path | DataDir () |
<executable dir>/data in portable mode, empty otherwise. Not created here. | |
| void | OverrideExecutableDirForTesting (const std::filesystem::path &dir) |
Tests: pretend the executable lives in dir. Empty path restores the real one. | |
Variables | |
| constexpr const char * | kMarkerFile = "portable.txt" |
| constexpr const char * | kDataDirName = "data" |
| std::filesystem::path util::portable::DataDir | ( | ) |
<executable dir>/data in portable mode, empty otherwise. Not created here.


| std::filesystem::path util::portable::ExecutableDir | ( | ) |
Directory containing the running executable (empty if it cannot be found).

| bool util::portable::IsPortable | ( | ) |
True when the marker file exists next to the executable.


| void util::portable::OverrideExecutableDirForTesting | ( | const std::filesystem::path & | dir | ) |
Tests: pretend the executable lives in dir. Empty path restores the real one.
|
inlineconstexpr |
|
inlineconstexpr |
Portable mode keeps every user file (config, themes, plugins, session, logs, QSettings) in a data/ folder next to the executable instead of the per-user profile (APPDATA%, ~/Library, ~/.config, registry). It is switched on by an empty marker file named portable.txt next to the executable, so an unzipped copy can run from a USB stick and leaves nothing behind.