9#include "path_location_intf.hpp"
10#include "../metadata/metadata.hpp"
11#include "../telemetry/telemetry.hpp"
12#include "../utility/utility.hpp"
13#include "../char_maps/char_maps.hpp"
14#include "../macros.hpp"
19hi_export_module(hikogui.path.path_location : impl);
34 hi_log_fatal(
"Could not get known folder path.");
36 auto const d = defer{[&] {
40 return std::filesystem::path{
wpath} /
"";
45 if (
auto path = win32_GetModuleFileName()) {
48 hi_log_fatal(
"Could not get executable-file. {}", make_error_code(path.error()).
message());
57 return local_app_data / get_application_vendor() / get_application_name() /
"";
69 return data_dir() /
"preferences.json";
89 co_yield data_dir() /
"resources" /
"";
Rules for working with win32 headers.
std::filesystem::path executable_file() noexcept
Get the full path to this executable.
std::filesystem::path log_dir() noexcept
Get the full path to the directory where the application should store its log files.
std::filesystem::path data_dir() noexcept
Get the full path to the directory where the application should store its data.
std::filesystem::path preferences_file() noexcept
Get the full path to application preferences file.
hi_inline std::filesystem::path executable_dir() noexcept
Get the full path to the directory when this executable is located.
Definition path_location_intf.hpp:67
hi_inline generator< std::filesystem::path > resource_dirs() noexcept
The directories to search for resource files.
hi_inline std::optional< std::filesystem::path > source_dir() noexcept
Get the full path to source code of this executable.
Definition path_location_intf.hpp:150
hi_inline std::optional< std::filesystem::path > library_install_dir() noexcept
The full path where HikoGUI is installed during compilation of the application.
Definition path_location_intf.hpp:171
hi_inline generator< std::filesystem::path > system_font_dirs() noexcept
The directories to search for system font files.
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
hi_export hi_inline std::filesystem::path get_path_by_id(const KNOWNFOLDERID &folder_id) noexcept
Convenience function for SHGetKnownFolderPath().
Definition path_location_win32_impl.hpp:30
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:378