[ui] Add auto-mount on first launch functionality #52

This commit is contained in:
2025-09-06 18:19:41 -05:00
parent f4a7e0e187
commit f473d5c855
8 changed files with 131 additions and 100 deletions

View File

@@ -51,7 +51,9 @@ template <typename thread_t>
#endif // defined(__APPLE__)
#if defined(__linux__)
[[nodiscard]] auto create_autostart_entry(create_autostart_opts opts) -> bool;
[[nodiscard]] auto create_autostart_entry(create_autostart_opts opts,
bool overwrite_existing = true)
-> bool;
#endif // defined(__linux__)
[[nodiscard]] auto get_last_error_code() -> int;

View File

@@ -42,12 +42,16 @@ void free_console();
[[nodiscard]] auto run_process_elevated(std::vector<const char *> args) -> int;
struct shortcut_cfg final {
std::wstring arguments;
std::wstring exe_path;
std::wstring location{get_startup_folder()};
std::wstring shortcut_name;
std::wstring working_directory;
};
[[nodiscard]]
auto create_shortcut(const std::wstring &exe_path,
const std::wstring &arguments,
const std::wstring &working_directory,
const std::wstring &shortcut_name = L"",
const std::wstring &location = get_startup_folder())
auto create_shortcut(const shortcut_cfg &cfg, bool overwrite_existing = true)
-> bool;
[[nodiscard]] auto