aboutsummaryrefslogtreecommitdiff
path: root/src/frontend_common
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2026-02-15 20:51:05 +0100
committercrueter <crueter@eden-emu.dev>2026-02-15 20:51:05 +0100
commitf4e7fc91ba8d12dada247139a61e9ac1b8195276 (patch)
tree65a8cb85c59216c45ce28d078307ea648e1ef0d9 /src/frontend_common
parent45c9f9bbb31ed06976bfacbc7bbf8851191ffb84 (diff)
[cmake, frontend] Fix update checker and move to self-hosted Git (#3558)
httplib doesn't like when you include the protocol, as it would seem Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3558 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/frontend_common')
-rw-r--r--src/frontend_common/CMakeLists.txt2
-rw-r--r--src/frontend_common/update_checker.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/frontend_common/CMakeLists.txt b/src/frontend_common/CMakeLists.txt
index 5c248ea337..82993e45b6 100644
--- a/src/frontend_common/CMakeLists.txt
+++ b/src/frontend_common/CMakeLists.txt
@@ -24,7 +24,7 @@ if (ENABLE_UPDATE_CHECKER)
update_checker.h)
if (ENABLE_OPENSSL)
- target_compile_definitions(frontend_common PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
+ target_compile_definitions(frontend_common PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT)
target_link_libraries(frontend_common PRIVATE OpenSSL::SSL OpenSSL::Crypto)
endif()
diff --git a/src/frontend_common/update_checker.cpp b/src/frontend_common/update_checker.cpp
index c12595185a..6b1fde720c 100644
--- a/src/frontend_common/update_checker.cpp
+++ b/src/frontend_common/update_checker.cpp
@@ -82,8 +82,8 @@ std::optional<std::string> UpdateChecker::GetResponse(std::string url, std::stri
std::optional<UpdateChecker::Update> UpdateChecker::GetLatestRelease(bool include_prereleases) {
const auto update_check_url = std::string{Common::g_build_auto_update_api};
- std::string update_check_path = fmt::format("/repos/{}",
- std::string{Common::g_build_auto_update_repo});
+ auto update_check_path = fmt::format("{}{}", std::string{Common::g_build_auto_update_api_path},
+ std::string{Common::g_build_auto_update_repo});
try {
if (include_prereleases) { // This can return either a prerelease or a stable release,
// whichever is more recent.
@@ -124,14 +124,14 @@ std::optional<UpdateChecker::Update> UpdateChecker::GetLatestRelease(bool includ
return Update{latest_tag, latest_name};
}
- } catch (nlohmann::detail::out_of_range &) {
+ } catch (nlohmann::detail::out_of_range&) {
LOG_ERROR(Frontend,
"Parsing JSON response from {}{} failed during update check: "
"nlohmann::detail::out_of_range",
update_check_url,
update_check_path);
return {};
- } catch (nlohmann::detail::type_error &) {
+ } catch (nlohmann::detail::type_error&) {
LOG_ERROR(Frontend,
"Parsing JSON response from {}{} failed during update check: "
"nlohmann::detail::type_error",