Skip to content

Commit 8784df5

Browse files
committed
Fix mbedtls include attempt 3
1 parent dc12301 commit 8784df5

6 files changed

Lines changed: 34 additions & 5 deletions

File tree

.idea/runConfigurations/linux_exports_generator__32_.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/steamworks_downloader__prompt_.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.24)
22

3-
project(SmokeAPI VERSION 4.1.0)
3+
project(SmokeAPI VERSION 4.1.1)
44

55
include(KoalaBox/cmake/KoalaBox.cmake)
66
add_subdirectory(KoalaBox)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,8 @@ This project makes use of the following open source projects:
431431
- [p-ranav/glob](https://github.com/p-ranav/glob)
432432
- [pantor/inja](https://github.com/pantor/inja)
433433
- [jarro2783/cxxopts](https://github.com/jarro2783/cxxopts)
434-
- [serge1/ELFIO](https://github.com/serge1/ELFIO)
434+
- [serge1/ELFIO](https://github.com/serge1/ELFIO)
435+
- [Mbed-TLS/mbedtls](https://github.com/Mbed-TLS/mbedtls)
435436
- [bshoshany/thread-pool](https://github.com/bshoshany/thread-pool)
436437
- [batterycenter/embed](https://github.com/batterycenter/embed)
437438

src/smoke_api/smoke_api.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <koalabox/config.hpp>
88
#include <koalabox/globals.hpp>
99
#include <koalabox/hook.hpp>
10+
#include <koalabox/http_client.hpp>
1011
#include <koalabox/lib.hpp>
1112
#include <koalabox/lib_monitor.hpp>
1213
#include <koalabox/logger.hpp>
@@ -57,6 +58,27 @@ namespace {
5758
void* original_steamapi_handle = nullptr;
5859
bool is_hook_mode;
5960

61+
void check_for_updates() {
62+
const auto latest_release_url = std::format(
63+
"https://api.github.com/repos/acidicoala/{}/releases/latest",
64+
PROJECT_NAME
65+
);
66+
const auto res = kb::http_client::get_json(latest_release_url);
67+
const auto latest_tag = res["tag_name"].get<std::string>();
68+
const auto current_tag = std::format("v{}", PROJECT_VERSION);
69+
70+
if(current_tag == latest_tag) {
71+
LOG_DEBUG("Running the latest version");
72+
} else {
73+
const auto release_page = std::format(
74+
"https://github.com/acidicoala/{}/releases/{}",
75+
PROJECT_NAME, latest_tag
76+
);
77+
78+
LOG_WARN("New version {} available: {}", latest_tag, release_page);
79+
}
80+
}
81+
6082
std::set<std::string> find_steamclient_versions(void* steamapi_handle) {
6183
if(!steamapi_handle) {
6284
kb::util::panic("Invalid state. steamapi_handle is null.");
@@ -255,6 +277,12 @@ namespace smoke_api {
255277
kb::win::check_self_duplicates();
256278
#endif
257279

280+
#ifdef KB_DEBUG
281+
// TODO: Add config option to toggle this and show native OS notification
282+
// The real reason behind this is for automatic testing of HTTPs dependencies
283+
std::thread(check_for_updates).detach();
284+
#endif
285+
258286
// We need to hook functions in either mode
259287
kb::hook::init(true);
260288

0 commit comments

Comments
 (0)