Revamp: Transition HarmonyLink to C++ with DLL support
This transformative commit marks the evolution of HarmonyLink from a Rust-based server-side application to a C++ implemented, C-compatible dynamic link library (DLL). We've restructured the codebase to streamline integration into games, eliminating the need for a server setup by end-users. Key Changes: - Introduced .gitattributes and .gitmodules to manage new dependencies and collaborations. - Replaced the GitHub workflow files with CMake configurations to support the new C++ build system. - Introduced a comprehensive set of header and implementation files defining the core functionality, platform-specific utilities, and cross-platform compatibility layers. - Removed all Rust-specific files (Cargo.toml, Cargo.lock, etc.) and references to ensure a clean transition to the C++ environment. - Implemented new testing mechanisms within HarmonyLinkTest to ensure robustness and reliability of the DLL. - Excised previous server-side components and models to focus on the DLL's direct integration into consumer applications. This update is a direct response to community feedback, showcasing our commitment to adaptability and innovation. HarmonyLink 2.0 is now more accessible, efficient, and tailored for diverse gaming environments, providing developers with an unparalleled level of hardware-software harmony. Please refer to the updated README for more details on the new structure and how to integrate HarmonyLink 2.0 into your projects.
This commit is contained in:
parent
d13fc728df
commit
6bf68eb298
60 changed files with 1629 additions and 2389 deletions
44
HarmonyLinkLib/include/HarmonyLinkLib.h
Normal file
44
HarmonyLinkLib/include/HarmonyLinkLib.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
// Copyright (C) 2023 Jordon Brooks
|
||||
|
||||
|
||||
/**
|
||||
* IMPORTANT REMINDER:
|
||||
* Do NOT use standard output functions like std::cout and printf anywhere in this codebase.
|
||||
*
|
||||
* Reason:
|
||||
* Unreal Engine 5's packaging tool encounters issues with these functions, leading to
|
||||
* packaging failures. The engine sets stdout to UTF-8, which can cause conflicts with
|
||||
* these standard functions, resulting in a "SECURE CRT: Invalid parameter detected" error
|
||||
* during packaging.
|
||||
*
|
||||
* This issue once required an extensive debugging effort that lasted over 8 hours.
|
||||
* To prevent similar issues in the future and ensure smooth packaging, always use
|
||||
* wide-character versions of these functions, such as wprintf and std::wcout, when working
|
||||
* within the DLL. These functions are compatible with the UTF-8 setting in Unreal Engine 5.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Core.h"
|
||||
#include "Structs/FBattery.h"
|
||||
#include "Structs/FCPUInfo.h"
|
||||
#include "Structs/FDevice.h"
|
||||
#include "Structs/FOSVerInfo.h"
|
||||
|
||||
|
||||
class IPlatformUtilities;
|
||||
|
||||
namespace HarmonyLinkLib
|
||||
{
|
||||
extern "C" HARMONYLINKLIB_API bool get_is_wine();
|
||||
|
||||
extern "C" HARMONYLINKLIB_API FCPUInfo* get_cpu_info();
|
||||
|
||||
extern "C" HARMONYLINKLIB_API FDevice* get_device_info();
|
||||
|
||||
extern "C" HARMONYLINKLIB_API FOSVerInfo* get_os_version();
|
||||
|
||||
extern "C" HARMONYLINKLIB_API FBattery* get_battery_status();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue