win32 fixes
All checks were successful
BlockStorage/repertory_mac/pipeline/head This commit looks good
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2025-09-07 11:57:26 -07:00
parent 7fd518a1e5
commit 68ca817fd7
7 changed files with 33 additions and 12 deletions

View File

@@ -53,6 +53,10 @@
#include <csignal>
#endif // defined(__APPLE__)
#if defined(_WIN32)
#include "utils/com_init_wrapper.hpp"
#endif // defined(_WIN32)
namespace {
#if defined(PROJECT_ENABLE_CURL)
bool curl_initialized{false};
@@ -65,6 +69,10 @@ bool spdlog_initialized{false};
#if defined(PROJECT_ENABLE_SQLITE)
bool sqlite3_initialized{false};
#endif // defined(PROJECT_ENABLE_SQLITE)
#if defined(_WIN32)
[[maybe_unused]] const repertory::utils::com_init_wrapper wrapper;
#endif // defined(_WIN32)
} // namespace
namespace repertory {

View File

@@ -40,7 +40,6 @@
#include "drives/winfsp/remotewinfsp/remote_client.hpp"
#include "drives/winfsp/remotewinfsp/remote_winfsp_drive.hpp"
#include "drives/winfsp/winfsp_drive.hpp"
#include "utils/com_init_wrapper.hpp"
using repertory_drive = repertory::winfsp_drive;
using remote_client = repertory::remote_winfsp::remote_client;

View File

@@ -99,7 +99,6 @@ mount(std::vector<const char *> args, std::string data_directory,
#if defined(_WIN32)
if (config.get_enable_mount_manager() && not utils::is_process_elevated()) {
utils::com_init_wrapper wrapper;
if (not lock.set_mount_state(true, "elevating", -1)) {
std::cerr << "failed to set mount state" << std::endl;
}

View File

@@ -39,7 +39,7 @@ private:
utils::atomic<std::string> api_password_{"repertory"};
std::atomic<std::uint16_t> api_port_{default_ui_mgmt_port};
utils::atomic<std::string> api_user_{"repertory"};
std::atomic<bool> auto_start_{false};
std::atomic<bool> auto_start_{true};
std::unordered_map<provider_type,
std::unordered_map<std::string, std::string>>
locations_;

View File

@@ -261,7 +261,7 @@ void mgmt_app_config::set_auto_start(bool auto_start) {
#if defined(_WIN32)
if (auto_start) {
utils::shortcut_cfg cfg{};
cfg.arguments = {L"-ui", L"-lo"};
cfg.arguments = L"-ui -lo";
cfg.exe_path = utils::path::combine(L".", {L"repertory"});
cfg.icon_path = utils::path::combine(L".", {L"icon.ico"});
cfg.shortcut_name = L"repertory";