Compare commits

...

2 commits

Author SHA1 Message Date
a06b940892 suckl 2 2025-03-01 21:16:35 -05:00
57da656da5 suckl 2025-03-01 20:19:51 -05:00
4 changed files with 21 additions and 11 deletions

View file

@ -5,7 +5,7 @@ project(
default_options: [
'default_library=static',
'warning_level=everything',
'buildtype=release',
'buildtype=debugoptimized',
'cpp_args=-fvisibility=hidden',
],
)
@ -128,17 +128,23 @@ endif
deps += ftxui_dep
reflectcpp_proj = cmake.subproject('reflectcpp')
reflectcpp_dep = reflectcpp_proj.dependency('reflectcpp')
cmake_opts = cmake.subproject_options()
cmake_opts.add_cmake_defines({
'CMAKE_CXX_FLAGS': '-Wno-everything',
})
cmake_opts.append_compile_args('cpp', '-Wno-everything')
reflectcpp_proj = cmake.subproject('reflectcpp', options: cmake_opts)
reflectcpp_dep = reflectcpp_proj.dependency('reflectcpp', include_type: 'system')
deps += reflectcpp_dep
objc_args = []
link_args = []
link_args = ['-static-libgcc', '-static-libstdc++', '-static']
if host_machine.system() == 'darwin'
objc_args += ['-fobjc-arc']
elif host_machine.system() == 'linux'
link_args += ['-static-libgcc', '-static-libstdc++']
endif
executable(

View file

@ -1,7 +1,9 @@
#ifdef __WIN32__
#include <iostream>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <wincrypt.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Media.Control.h>
#include <winrt/base.h>
@ -39,6 +41,7 @@ namespace {
}
RegCloseKey(key);
// Remove null terminator if present
if (!value.empty() && value.back() == '\0')
value.pop_back();
@ -50,6 +53,7 @@ namespace {
fn GetRunningProcesses() -> std::vector<string> {
std::vector<string> processes;
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hSnapshot == INVALID_HANDLE_VALUE)
return processes;
@ -61,7 +65,7 @@ namespace {
return processes;
}
while (Process32Next(hSnapshot, &pe32)) { processes.emplace_back(pe32.szExeFile); }
while (Process32Next(hSnapshot, &pe32)) processes.emplace_back(pe32.szExeFile);
CloseHandle(hSnapshot);
return processes;
@ -158,8 +162,10 @@ fn GetKernelVersion() -> string {
if (ntdllHandle) {
auto rtlGetVersion = std::bit_cast<RtlGetVersionPtr>(GetProcAddress(ntdllHandle, "RtlGetVersion"));
if (rtlGetVersion) {
RTL_OSVERSIONINFOW osInfo = {};
RTL_OSVERSIONINFOW osInfo = {};
osInfo.dwOSVersionInfoSize = sizeof(osInfo);
if (rtlGetVersion(&osInfo) == 0)
versionStream << osInfo.dwMajorVersion << "." << osInfo.dwMinorVersion << "." << osInfo.dwBuildNumber << "."
<< osInfo.dwPlatformId;
@ -225,6 +231,7 @@ fn GetDesktopEnvironment() -> optional<string> {
if (build >= 9600)
return "Metro (Windows 8.1)";
return "Metro (Windows 8)";
}

@ -1 +0,0 @@
Subproject commit 48ea775531523ac290abec91107c628f00156543

View file

@ -1,2 +0,0 @@
[wrap-redirect]
filename = SQLiteCpp-3.3.2/subprojects/sqlite3.wrap