43 lines
1.5 KiB
C++
43 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <expected>
|
|
#include <filesystem>
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
namespace Echoion::Standalone
|
|
{
|
|
[[nodiscard]] std::expected<std::filesystem::path, std::string>
|
|
runningExecutablePath();
|
|
|
|
[[nodiscard]] std::filesystem::path deriveInstallRoot(
|
|
const std::filesystem::path& executablePath,
|
|
const std::optional<std::filesystem::path>& homeOverride =
|
|
std::nullopt);
|
|
|
|
[[nodiscard]] std::filesystem::path resolveCorePath(
|
|
const std::filesystem::path& installRoot,
|
|
const std::filesystem::path& executableDirectory,
|
|
const std::optional<std::filesystem::path>& coreOverride =
|
|
std::nullopt);
|
|
|
|
[[nodiscard]] std::filesystem::path resolveStateDirectory(
|
|
const std::optional<std::filesystem::path>& commandLineOverride,
|
|
const std::optional<std::filesystem::path>& environmentOverride,
|
|
const std::optional<std::filesystem::path>& xdgStateHome,
|
|
const std::optional<std::filesystem::path>& userHome,
|
|
const std::filesystem::path& fallback);
|
|
|
|
[[nodiscard]] std::optional<std::filesystem::path> runtimeWorkingDirectory(
|
|
const std::filesystem::path& installRoot,
|
|
const std::filesystem::path& executableDirectory);
|
|
|
|
[[nodiscard]] std::optional<std::filesystem::path>
|
|
bundledCertificateBundle(const std::filesystem::path& installRoot);
|
|
|
|
[[nodiscard]] std::expected<std::filesystem::path, std::string>
|
|
resolveAvatarCacheDirectory(
|
|
const std::filesystem::path& configuredDirectory,
|
|
const std::filesystem::path& requestedDirectory = {});
|
|
} // namespace Echoion::Standalone
|