integrate sensglove libraries v2.301.0-c70bce637 and the required refactor to make it build/work
This commit is contained in:
@@ -104,6 +104,8 @@ Welcom to the SenseGlove Unreal Engine Handbook!
|
|||||||
- [SenseGlove SDK License](license/senseglove-sdk.md)
|
- [SenseGlove SDK License](license/senseglove-sdk.md)
|
||||||
- [SGBLE and SGBLExx Rust Dependencies Licenses](license/sgble-sgblexx-rust-dependencies.md)
|
- [SGBLE and SGBLExx Rust Dependencies Licenses](license/sgble-sgblexx-rust-dependencies.md)
|
||||||
- [Boost C++ Libraries License](license/boost-cpp-libraries.md)
|
- [Boost C++ Libraries License](license/boost-cpp-libraries.md)
|
||||||
|
- [{fmt} Formatting Library License](license/fmt-formatting-library.md)
|
||||||
|
- [Loguru Logging Library License](license/loguru-loggin-library.md)
|
||||||
- [Serial Communication Library License](license/serial-communication-library.md)
|
- [Serial Communication Library License](license/serial-communication-library.md)
|
||||||
|
|
||||||
-----------
|
-----------
|
||||||
|
|||||||
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
This minor release focuses on delivering performance improvements, made possible by major optimizations in the underlying proprietary SenseGlove libraries, while also introducing some breaking changes.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added prebuilt binaries for third-party library [{fmt} Formatting Library](https://github.com/fmtlib/fmt) on all supported platforms. This third-party library is a required dependency of SenseGlove libraries >= `v2.300.0`.
|
||||||
|
- Added prebuilt binaries for third-party library: [Loguru Logging Library](https://github.com/emilk/loguru) on all supported platforms. This third-party library is a required dependency of SenseGlove libraries >= `v2.300.0`.
|
||||||
|
- Added third-party module `SGCommonThirdPartyLibs`.
|
||||||
|
- Added third-party module `SGConnectShmThirdPartyLibs`.
|
||||||
|
- Added third-party module `SGCoreShmThirdPartyLibs`.
|
||||||
|
- Added third-party module `SGFmtThirdPartyLibs`.
|
||||||
|
- Added third-party module `SGLogThirdPartyLibs`.
|
||||||
|
- Added third-party module `SGLoguruThirdPartyLibs`.
|
||||||
|
- Added third-party module `SGWjwwoodSerialThirdPartyLibs` to replace `SGSerialThirdPartyLibs` while retaining `SGSerialThirdPartyLibs` for a different purpose. See the relevant comment in the Changed section below.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix a typo in the function name `SGDeviceList::SenseCommRunning()`. This fix breaks ABI and API compatibility with previous versions of the plugin and affects both C++ and Blueprint code.
|
- Fix a typo in the function name `SGDeviceList::SenseCommRunning()`. This fix breaks ABI and API compatibility with previous versions of the plugin and affects both C++ and Blueprint code.
|
||||||
@@ -14,7 +28,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- `SGDeviceList::SenseCommRunning()` has been renamed to `SGDeviceList::SenseComRunning()` due to a typo. This change breaks ABI and API compatibility with previous versions of the plugin and affects both C++ and Blueprint code.
|
- `SGDeviceList::SenseCommRunning()` has been renamed to `SGDeviceList::SenseComRunning()` due to a typo. This change breaks ABI and API compatibility with previous versions of the plugin and affects both C++ and Blueprint code.
|
||||||
- Bumped the SenseGlove libraries to `v2.205.1-cb26979ed`.
|
- Bumped the SenseGlove libraries to `v2.301.0-c70bce637`. This release of the SenseGlove libraries disables RTTI/Exceptions for the most parts and isolates it to a minor portion of the code base, which yields noticable performance gains. Futhermore, some optiomizations are done in the multi-threaded code, such as replacing Spinlocks with Adaptive Mutexes (a hybrid Mutex/Spinlock).
|
||||||
|
- As a result of SenseGlove libraries >= `v2.300.0` changing it's directory structure, the `ThirdParty` folder's directory structure has been revamped.
|
||||||
|
- Renamed third-party module `SGSerialThirdPartyLibs` to `SGWjwwoodSerialThirdPartyLibs` since SenseGlove libraries >= `v2.300.0` ships a new static library named `sgserial`. Thus, to avoid confusion and naming conflicts the third-party `serial` static library is now provided by the `SGWjwwoodSerialThirdPartyLibs` module and `sgserial` is provided by the `SGSerialThirdPartyLibs` module.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
@@ -24,6 +40,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Cleaned up remnants of the long-removed Unreal Engine `5.2` from `SenseGlove.Build.cs`, `SenseGloveKismet.Build.cs`, `SenseGloveTracking.Build.cs`, files.
|
- Cleaned up remnants of the long-removed Unreal Engine `5.2` from `SenseGlove.Build.cs`, `SenseGloveKismet.Build.cs`, `SenseGloveTracking.Build.cs`, files.
|
||||||
- Cleaned up remnants of the long-removed Unreal Engine `5.2` from `SenseGloveTracking` module.
|
- Cleaned up remnants of the long-removed Unreal Engine `5.2` from `SenseGloveTracking` module.
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
- Added [{fmt} Formatting Library License](../license/fmt-formatting-library.html) section.
|
||||||
|
- Added [Loguru Logging Library License](../license/loguru-loggin-library.html) section.
|
||||||
|
|
||||||
## [2.6.3] - 2025-06-27
|
## [2.6.3] - 2025-06-27
|
||||||
|
|
||||||
This patch release contains no changes to the plugin code. It includes only documentation updates and improvements.
|
This patch release contains no changes to the plugin code. It includes only documentation updates and improvements.
|
||||||
@@ -1032,4 +1053,4 @@ This is a minor release focusing on adherence to the Unreal Engine Marketplace G
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Initial public release of the SenseGlove haptic API for Unreal Engine with support for Microsoft Windows and GNU/Linux.
|
- Initial public release of the SenseGlove haptic API for Unreal Engine with support for Microsoft Windows and GNU/Linux.
|
||||||
@@ -69,17 +69,17 @@
|
|||||||
│
|
│
|
||||||
├── include (header files)
|
├── include (header files)
|
||||||
│ │
|
│ │
|
||||||
│ ├── boost
|
│ └── SenseGlove
|
||||||
│ │
|
│ │
|
||||||
│ ├── SenseGlove
|
│ ├── BLE (SGBLE headers)
|
||||||
│ │ │
|
│ │
|
||||||
│ │ ├── BLE (SGBLE headers)
|
│ ├── Common (SGCommon headers)
|
||||||
│ │ │
|
│ │
|
||||||
│ │ ├── Connect (SGConnect headers)
|
│ ├── Connect (SGConnect headers)
|
||||||
│ │ │
|
│ │
|
||||||
│ │ └── Core (SGCoreCpp headers)
|
│ ├── Core (SGCore headers)
|
||||||
│ │
|
│ │
|
||||||
│ └── serial
|
│ └── Log (SGLog headers)
|
||||||
│
|
│
|
||||||
├── lib (platform-specific pre-built binary dependencies)
|
├── lib (platform-specific pre-built binary dependencies)
|
||||||
│ │
|
│ │
|
||||||
@@ -87,13 +87,13 @@
|
|||||||
│ │ │
|
│ │ │
|
||||||
│ │ └── r25b (Android NDK r25b dependencies for UE 5.1+)
|
│ │ └── r25b (Android NDK r25b dependencies for UE 5.1+)
|
||||||
│ │ │
|
│ │ │
|
||||||
│ │ ├── arm64 (64-bit ARM variant of Android)
|
│ │ ├── aarch64 (64-bit ARM variant of Android)
|
||||||
│ │ │ │
|
│ │ │ │
|
||||||
│ │ │ ├── debug
|
│ │ │ ├── debug
|
||||||
│ │ │ │
|
│ │ │ │
|
||||||
│ │ │ └── release
|
│ │ │ └── release
|
||||||
│ │ │
|
│ │ │
|
||||||
│ │ └── x64 (64-bit x86-64 variant of Android)
|
│ │ └── x86-64 (64-bit x86-64 variant of Android)
|
||||||
│ │ │
|
│ │ │
|
||||||
│ │ ├── debug
|
│ │ ├── debug
|
||||||
│ │ │
|
│ │ │
|
||||||
@@ -157,19 +157,23 @@
|
|||||||
│ │ │
|
│ │ │
|
||||||
│ │ └── release
|
│ │ └── release
|
||||||
│ │
|
│ │
|
||||||
│ └── win64
|
│ └── windows
|
||||||
│ │
|
│ │
|
||||||
│ ├── msvc143 (Microsoft Visual Studio 2022 dependencies)
|
│ ├── v143 (Microsoft Visual Studio 2022 dependencies)
|
||||||
│ │ │
|
│ │ │
|
||||||
│ │ ├── debug
|
│ │ └── x86-64 (dependencies targeting Microsoft Windows x86-64 architecture)
|
||||||
│ │ │
|
│ │ │
|
||||||
│ │ └── release
|
│ │ ├── debug
|
||||||
|
│ │ │
|
||||||
|
│ │ └── release
|
||||||
│ │
|
│ │
|
||||||
│ └── rustc (Microsoft Windows binary dependencies built with Rust)
|
│ └── rustc (Microsoft Windows binary dependencies built with Rust)
|
||||||
│ │
|
│ │
|
||||||
│ ├── debug
|
│ └── x86-64 (dependencies targeting Microsoft Windows x86-64 architecture)
|
||||||
│ │
|
│ │
|
||||||
│ └── release
|
│ ├── debug
|
||||||
|
│ │
|
||||||
|
│ └── release
|
||||||
│
|
│
|
||||||
├── SGBleThirdPartyLibs (Third-party module providing SGBLE headers and libraries)
|
├── SGBleThirdPartyLibs (Third-party module providing SGBLE headers and libraries)
|
||||||
│
|
│
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# {fmt} Formatting Library License
|
||||||
|
|
||||||
|
```
|
||||||
|
Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
--- Optional exception to the license ---
|
||||||
|
|
||||||
|
As an exception, if, as a result of your compiling your source code, portions
|
||||||
|
of this Software are embedded into a machine-executable object form of such
|
||||||
|
source code, you may redistribute such embedded portions in such object form
|
||||||
|
without including the above copyright and permission notices.
|
||||||
|
```
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# Loguru Logging Library License
|
||||||
|
|
||||||
|
```
|
||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <https://unlicense.org>
|
||||||
|
```
|
||||||
@@ -7,6 +7,8 @@ The following third-party software are used and shipped with the SenseGlove Unre
|
|||||||
- [The SenseGlove SDK (a.k.a. SenseGlove Backend Libraries, or SenseGlove Core Libraries)](senseglove-sdk.md)
|
- [The SenseGlove SDK (a.k.a. SenseGlove Backend Libraries, or SenseGlove Core Libraries)](senseglove-sdk.md)
|
||||||
- [SGBLE and SGBLExx Rust Dependencies](sgble-sgblexx-rust-dependencies.md)
|
- [SGBLE and SGBLExx Rust Dependencies](sgble-sgblexx-rust-dependencies.md)
|
||||||
- [The Boost C++ Libraries](boost-cpp-libraries.md)
|
- [The Boost C++ Libraries](boost-cpp-libraries.md)
|
||||||
|
- [The {fmt} Formatting Library](fmt-formatting-library.md)
|
||||||
|
- [The Loguru Logging Library License](loguru-loggin-library.md)
|
||||||
- [The Serial Communication Library](serial-communication-library.md)
|
- [The Serial Communication Library](serial-communication-library.md)
|
||||||
|
|
||||||
For more information consult their own respective open-source licenses, please.
|
For more information consult their own respective open-source licenses, please.
|
||||||
|
|||||||
@@ -110,4 +110,6 @@ The appendix contains various extra useful information:
|
|||||||
- [SenseGlove SDK License](../license/senseglove-sdk.md)
|
- [SenseGlove SDK License](../license/senseglove-sdk.md)
|
||||||
- [SGBLE and SGBLExx Rust Dependencies Licenses](../license/sgble-sgblexx-rust-dependencies.md)
|
- [SGBLE and SGBLExx Rust Dependencies Licenses](../license/sgble-sgblexx-rust-dependencies.md)
|
||||||
- [Boost C++ Libraries License](../license/boost-cpp-libraries.md)
|
- [Boost C++ Libraries License](../license/boost-cpp-libraries.md)
|
||||||
|
- [{fmt} Formatting Library License](../license/fmt-formatting-library.md)
|
||||||
|
- [Loguru Logging Library License](../license/loguru-loggin-library.md)
|
||||||
- [Serial Communication Library License](../license/serial-communication-library.md)
|
- [Serial Communication Library License](../license/serial-communication-library.md)
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ public class SenseGloveConnectImpl : ModuleRules
|
|||||||
{
|
{
|
||||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
|
||||||
bEnableExceptions = true;
|
bEnableExceptions = false;
|
||||||
bUseRTTI = true;
|
bUseRTTI = false;
|
||||||
|
|
||||||
PrivateDependencyModuleNames.AddRange(
|
PrivateDependencyModuleNames.AddRange(
|
||||||
new string[]
|
new string[]
|
||||||
@@ -58,8 +58,13 @@ public class SenseGloveConnectImpl : ModuleRules
|
|||||||
new string[]
|
new string[]
|
||||||
{
|
{
|
||||||
"SGBleThirdPartyLibs",
|
"SGBleThirdPartyLibs",
|
||||||
|
"SGCommonThirdPartyLibs",
|
||||||
|
"SGConnectShmThirdPartyLibs",
|
||||||
"SGConnectThirdPartyLibs",
|
"SGConnectThirdPartyLibs",
|
||||||
"SGSerialThirdPartyLibs",
|
"SGSerialThirdPartyLibs",
|
||||||
|
"SGFmtThirdPartyLibs",
|
||||||
|
"SGLoguruThirdPartyLibs",
|
||||||
|
"SGWjwwoodSerialThirdPartyLibs",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
#include "SGCoreImpl/SGBetaDeviceImpl.h"
|
#include "SGCoreImpl/SGBetaDeviceImpl.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "Containers/StringConv.h"
|
#include "Containers/StringConv.h"
|
||||||
#include "Misc/AssertionMacros.h"
|
#include "Misc/AssertionMacros.h"
|
||||||
|
|
||||||
@@ -70,7 +72,7 @@ TSharedRef<FSGBetaDeviceImpl> FSGBetaDeviceImpl::Parse(const FString& String)
|
|||||||
FSGDevicePtrType SGDevicePtr{FBetaDeviceType::Parse(TCHAR_TO_UTF8(*String))};
|
FSGDevicePtrType SGDevicePtr{FBetaDeviceType::Parse(TCHAR_TO_UTF8(*String))};
|
||||||
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
|
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
|
||||||
const TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl{
|
const TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl{
|
||||||
MakeShared<FSGBetaDeviceImpl>(std::dynamic_pointer_cast<FBetaDeviceType>(MoveTemp(SGDevicePtr)))
|
MakeShared<FSGBetaDeviceImpl>(std::static_pointer_cast<FBetaDeviceType>(MoveTemp(SGDevicePtr)))
|
||||||
};
|
};
|
||||||
return BetaDeviceImpl;
|
return BetaDeviceImpl;
|
||||||
}
|
}
|
||||||
@@ -133,12 +135,12 @@ FSGBetaDeviceImpl::FBetaDeviceType FSGBetaDeviceImpl::ToBetaDevice() const
|
|||||||
|
|
||||||
FSGBetaDeviceImpl::FBetaDevicePtrType FSGBetaDeviceImpl::ToBetaDevicePtr() const
|
FSGBetaDeviceImpl::FBetaDevicePtrType FSGBetaDeviceImpl::ToBetaDevicePtr() const
|
||||||
{
|
{
|
||||||
return std::dynamic_pointer_cast<FBetaDeviceType>(ToSGDevicePtr());
|
return std::static_pointer_cast<FBetaDeviceType>(ToSGDevicePtr());
|
||||||
}
|
}
|
||||||
|
|
||||||
FSGBetaDeviceImpl::FBetaDevicePtrType FSGBetaDeviceImpl::ToBetaDevicePtrChecked() const
|
FSGBetaDeviceImpl::FBetaDevicePtrType FSGBetaDeviceImpl::ToBetaDevicePtrChecked() const
|
||||||
{
|
{
|
||||||
FBetaDevicePtrType BetaDevice = std::dynamic_pointer_cast<FBetaDeviceType>(ToSGDevicePtr());
|
FBetaDevicePtrType BetaDevice = std::static_pointer_cast<FBetaDeviceType>(ToSGDevicePtr());
|
||||||
ensureAlwaysMsgf(BetaDevice.get(), TEXT("Invalid BetaDevice"));
|
ensureAlwaysMsgf(BetaDevice.get(), TEXT("Invalid BetaDevice"));
|
||||||
return BetaDevice;
|
return BetaDevice;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "SGCoreImpl/SGDeviceImpl.h"
|
#include "SGCoreImpl/SGDeviceImpl.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "Containers/StringConv.h"
|
#include "Containers/StringConv.h"
|
||||||
@@ -157,35 +158,35 @@ TSharedRef<FSGDeviceImpl> FSGDeviceImpl::ToSGDeviceImplRef()
|
|||||||
|
|
||||||
TSharedRef<FSGBetaDeviceImpl> FSGDeviceImpl::ToBetaDeviceImplRef()
|
TSharedRef<FSGBetaDeviceImpl> FSGDeviceImpl::ToBetaDeviceImplRef()
|
||||||
{
|
{
|
||||||
FSGBetaDeviceImpl* BetaDevice{dynamic_cast<FSGBetaDeviceImpl*>(this)};
|
FSGBetaDeviceImpl* BetaDevice{static_cast<FSGBetaDeviceImpl*>(this)};
|
||||||
ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!"));
|
ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!"));
|
||||||
return SharedThis(BetaDevice);
|
return SharedThis(BetaDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
TSharedRef<FSGHapticGloveImpl> FSGDeviceImpl::ToHapticGloveImplRef()
|
TSharedRef<FSGHapticGloveImpl> FSGDeviceImpl::ToHapticGloveImplRef()
|
||||||
{
|
{
|
||||||
FSGHapticGloveImpl* HapticGlove{dynamic_cast<FSGHapticGloveImpl*>(this)};
|
FSGHapticGloveImpl* HapticGlove{static_cast<FSGHapticGloveImpl*>(this)};
|
||||||
ensureAlwaysMsgf(HapticGlove, TEXT("Invalid HapticGlove!"));
|
ensureAlwaysMsgf(HapticGlove, TEXT("Invalid HapticGlove!"));
|
||||||
return SharedThis(HapticGlove);
|
return SharedThis(HapticGlove);
|
||||||
}
|
}
|
||||||
|
|
||||||
TSharedRef<FSGNova2GloveImpl> FSGDeviceImpl::ToNova2GloveImplRef()
|
TSharedRef<FSGNova2GloveImpl> FSGDeviceImpl::ToNova2GloveImplRef()
|
||||||
{
|
{
|
||||||
FSGNova2GloveImpl* Nova2Glove{dynamic_cast<FSGNova2GloveImpl*>(this)};
|
FSGNova2GloveImpl* Nova2Glove{static_cast<FSGNova2GloveImpl*>(this)};
|
||||||
ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove!"));
|
ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove!"));
|
||||||
return SharedThis(Nova2Glove);
|
return SharedThis(Nova2Glove);
|
||||||
}
|
}
|
||||||
|
|
||||||
TSharedRef<FSGNovaGloveImpl> FSGDeviceImpl::ToNovaGloveImplRef()
|
TSharedRef<FSGNovaGloveImpl> FSGDeviceImpl::ToNovaGloveImplRef()
|
||||||
{
|
{
|
||||||
FSGNovaGloveImpl* NovaGlove{dynamic_cast<FSGNovaGloveImpl*>(this)};
|
FSGNovaGloveImpl* NovaGlove{static_cast<FSGNovaGloveImpl*>(this)};
|
||||||
ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove!"));
|
ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove!"));
|
||||||
return SharedThis(NovaGlove);
|
return SharedThis(NovaGlove);
|
||||||
}
|
}
|
||||||
|
|
||||||
TSharedRef<FSGSenseGloveImpl> FSGDeviceImpl::ToSenseGloveImplRef()
|
TSharedRef<FSGSenseGloveImpl> FSGDeviceImpl::ToSenseGloveImplRef()
|
||||||
{
|
{
|
||||||
FSGSenseGloveImpl* SenseGlove{dynamic_cast<FSGSenseGloveImpl*>(this)};
|
FSGSenseGloveImpl* SenseGlove{static_cast<FSGSenseGloveImpl*>(this)};
|
||||||
ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove!"));
|
ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove!"));
|
||||||
return SharedThis(SenseGlove);
|
return SharedThis(SenseGlove);
|
||||||
}
|
}
|
||||||
@@ -193,7 +194,7 @@ TSharedRef<FSGSenseGloveImpl> FSGDeviceImpl::ToSenseGloveImplRef()
|
|||||||
bool FSGDeviceImpl::IsABetaDevice() const
|
bool FSGDeviceImpl::IsABetaDevice() const
|
||||||
{
|
{
|
||||||
const FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice{
|
const FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice{
|
||||||
std::dynamic_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(ToSGDevicePtr())
|
std::static_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(ToSGDevicePtr())
|
||||||
};
|
};
|
||||||
return BetaDevice != nullptr;
|
return BetaDevice != nullptr;
|
||||||
}
|
}
|
||||||
@@ -201,7 +202,7 @@ bool FSGDeviceImpl::IsABetaDevice() const
|
|||||||
bool FSGDeviceImpl::IsAHapticGlove() const
|
bool FSGDeviceImpl::IsAHapticGlove() const
|
||||||
{
|
{
|
||||||
const FSGHapticGloveImpl::FHapticGlovePtrType HapticGlove{
|
const FSGHapticGloveImpl::FHapticGlovePtrType HapticGlove{
|
||||||
std::dynamic_pointer_cast<FSGHapticGloveImpl::FHapticGloveType>(ToSGDevicePtr())
|
std::static_pointer_cast<FSGHapticGloveImpl::FHapticGloveType>(ToSGDevicePtr())
|
||||||
};
|
};
|
||||||
return HapticGlove != nullptr;
|
return HapticGlove != nullptr;
|
||||||
}
|
}
|
||||||
@@ -209,7 +210,7 @@ bool FSGDeviceImpl::IsAHapticGlove() const
|
|||||||
bool FSGDeviceImpl::IsANova2Glove() const
|
bool FSGDeviceImpl::IsANova2Glove() const
|
||||||
{
|
{
|
||||||
const FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove{
|
const FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove{
|
||||||
std::dynamic_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(ToSGDevicePtr())
|
std::static_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(ToSGDevicePtr())
|
||||||
};
|
};
|
||||||
return Nova2Glove != nullptr;
|
return Nova2Glove != nullptr;
|
||||||
}
|
}
|
||||||
@@ -217,7 +218,7 @@ bool FSGDeviceImpl::IsANova2Glove() const
|
|||||||
bool FSGDeviceImpl::IsANovaGlove() const
|
bool FSGDeviceImpl::IsANovaGlove() const
|
||||||
{
|
{
|
||||||
const FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove{
|
const FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove{
|
||||||
std::dynamic_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(ToSGDevicePtr())
|
std::static_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(ToSGDevicePtr())
|
||||||
};
|
};
|
||||||
return NovaGlove != nullptr;
|
return NovaGlove != nullptr;
|
||||||
}
|
}
|
||||||
@@ -225,7 +226,7 @@ bool FSGDeviceImpl::IsANovaGlove() const
|
|||||||
bool FSGDeviceImpl::IsASenseGlove() const
|
bool FSGDeviceImpl::IsASenseGlove() const
|
||||||
{
|
{
|
||||||
const FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{
|
const FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{
|
||||||
std::dynamic_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(ToSGDevicePtr())
|
std::static_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(ToSGDevicePtr())
|
||||||
};
|
};
|
||||||
return SenseGlove != nullptr;
|
return SenseGlove != nullptr;
|
||||||
}
|
}
|
||||||
@@ -233,7 +234,7 @@ bool FSGDeviceImpl::IsASenseGlove() const
|
|||||||
TSharedPtr<FSGBetaDeviceImpl> FSGDeviceImpl::AsBetaDevice() const
|
TSharedPtr<FSGBetaDeviceImpl> FSGDeviceImpl::AsBetaDevice() const
|
||||||
{
|
{
|
||||||
const FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice{
|
const FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice{
|
||||||
std::dynamic_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(ToSGDevicePtr())
|
std::static_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(ToSGDevicePtr())
|
||||||
};
|
};
|
||||||
ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!"));
|
ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!"));
|
||||||
return MakeShared<FSGBetaDeviceImpl>(BetaDevice);
|
return MakeShared<FSGBetaDeviceImpl>(BetaDevice);
|
||||||
@@ -242,7 +243,7 @@ TSharedPtr<FSGBetaDeviceImpl> FSGDeviceImpl::AsBetaDevice() const
|
|||||||
TSharedPtr<FSGHapticGloveImpl> FSGDeviceImpl::AsHapticGlove() const
|
TSharedPtr<FSGHapticGloveImpl> FSGDeviceImpl::AsHapticGlove() const
|
||||||
{
|
{
|
||||||
const FSGHapticGloveImpl::FHapticGlovePtrType HapticGlove{
|
const FSGHapticGloveImpl::FHapticGlovePtrType HapticGlove{
|
||||||
std::dynamic_pointer_cast<FSGHapticGloveImpl::FHapticGloveType>(ToSGDevicePtr())
|
std::static_pointer_cast<FSGHapticGloveImpl::FHapticGloveType>(ToSGDevicePtr())
|
||||||
};
|
};
|
||||||
ensureAlwaysMsgf(HapticGlove, TEXT("Invalid HapticGlove!"));
|
ensureAlwaysMsgf(HapticGlove, TEXT("Invalid HapticGlove!"));
|
||||||
return MakeShared<FSGHapticGloveImpl>(HapticGlove);
|
return MakeShared<FSGHapticGloveImpl>(HapticGlove);
|
||||||
@@ -251,7 +252,7 @@ TSharedPtr<FSGHapticGloveImpl> FSGDeviceImpl::AsHapticGlove() const
|
|||||||
TSharedPtr<FSGNova2GloveImpl> FSGDeviceImpl::AsNova2Glove() const
|
TSharedPtr<FSGNova2GloveImpl> FSGDeviceImpl::AsNova2Glove() const
|
||||||
{
|
{
|
||||||
const FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove{
|
const FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove{
|
||||||
std::dynamic_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(ToSGDevicePtr())
|
std::static_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(ToSGDevicePtr())
|
||||||
};
|
};
|
||||||
ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove!"));
|
ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove!"));
|
||||||
return MakeShared<FSGNova2GloveImpl>(Nova2Glove);
|
return MakeShared<FSGNova2GloveImpl>(Nova2Glove);
|
||||||
@@ -260,7 +261,7 @@ TSharedPtr<FSGNova2GloveImpl> FSGDeviceImpl::AsNova2Glove() const
|
|||||||
TSharedPtr<FSGNovaGloveImpl> FSGDeviceImpl::AsNovaGlove() const
|
TSharedPtr<FSGNovaGloveImpl> FSGDeviceImpl::AsNovaGlove() const
|
||||||
{
|
{
|
||||||
const FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove{
|
const FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove{
|
||||||
std::dynamic_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(ToSGDevicePtr())
|
std::static_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(ToSGDevicePtr())
|
||||||
};
|
};
|
||||||
ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove!"));
|
ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove!"));
|
||||||
return MakeShared<FSGNovaGloveImpl>(NovaGlove);
|
return MakeShared<FSGNovaGloveImpl>(NovaGlove);
|
||||||
@@ -269,7 +270,7 @@ TSharedPtr<FSGNovaGloveImpl> FSGDeviceImpl::AsNovaGlove() const
|
|||||||
TSharedPtr<FSGSenseGloveImpl> FSGDeviceImpl::AsSenseGlove() const
|
TSharedPtr<FSGSenseGloveImpl> FSGDeviceImpl::AsSenseGlove() const
|
||||||
{
|
{
|
||||||
const FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{
|
const FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{
|
||||||
std::dynamic_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(ToSGDevicePtr())
|
std::static_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(ToSGDevicePtr())
|
||||||
};
|
};
|
||||||
ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove!"));
|
ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove!"));
|
||||||
return MakeShared<FSGSenseGloveImpl>(SenseGlove);
|
return MakeShared<FSGSenseGloveImpl>(SenseGlove);
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "SGCoreImpl/SGDeviceListImpl.h"
|
#include "SGCoreImpl/SGDeviceListImpl.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "Containers/StringConv.h"
|
#include "Containers/StringConv.h"
|
||||||
@@ -83,7 +84,7 @@ TArray<TSharedRef<FSGDeviceImpl>> FSGDeviceListImpl::GetDevices()
|
|||||||
case ESGDeviceType::BetaDevice:
|
case ESGDeviceType::BetaDevice:
|
||||||
{
|
{
|
||||||
FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice =
|
FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice =
|
||||||
std::dynamic_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(Device);
|
std::static_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(Device);
|
||||||
if (ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!")))
|
if (ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!")))
|
||||||
{
|
{
|
||||||
TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl{
|
TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl{
|
||||||
@@ -97,7 +98,7 @@ TArray<TSharedRef<FSGDeviceImpl>> FSGDeviceListImpl::GetDevices()
|
|||||||
case ESGDeviceType::Nova2:
|
case ESGDeviceType::Nova2:
|
||||||
{
|
{
|
||||||
FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove =
|
FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove =
|
||||||
std::dynamic_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(Device);
|
std::static_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(Device);
|
||||||
if (ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove device!")))
|
if (ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove device!")))
|
||||||
{
|
{
|
||||||
TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl{MakeShared<FSGNova2GloveImpl>(Nova2Glove)};
|
TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl{MakeShared<FSGNova2GloveImpl>(Nova2Glove)};
|
||||||
@@ -109,7 +110,7 @@ TArray<TSharedRef<FSGDeviceImpl>> FSGDeviceListImpl::GetDevices()
|
|||||||
case ESGDeviceType::Nova:
|
case ESGDeviceType::Nova:
|
||||||
{
|
{
|
||||||
FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove =
|
FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove =
|
||||||
std::dynamic_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(Device);
|
std::static_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(Device);
|
||||||
if (ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove device!")))
|
if (ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove device!")))
|
||||||
{
|
{
|
||||||
TSharedRef<FSGNovaGloveImpl> NovaGloveImpl{MakeShared<FSGNovaGloveImpl>(NovaGlove)};
|
TSharedRef<FSGNovaGloveImpl> NovaGloveImpl{MakeShared<FSGNovaGloveImpl>(NovaGlove)};
|
||||||
@@ -121,7 +122,7 @@ TArray<TSharedRef<FSGDeviceImpl>> FSGDeviceListImpl::GetDevices()
|
|||||||
case ESGDeviceType::SenseGlove:
|
case ESGDeviceType::SenseGlove:
|
||||||
{
|
{
|
||||||
FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{
|
FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{
|
||||||
std::dynamic_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(Device)};
|
std::static_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(Device)};
|
||||||
if (ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove device!")))
|
if (ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove device!")))
|
||||||
{
|
{
|
||||||
TSharedRef<FSGSenseGloveImpl> SenseGloveImpl{
|
TSharedRef<FSGSenseGloveImpl> SenseGloveImpl{
|
||||||
@@ -134,7 +135,7 @@ TArray<TSharedRef<FSGDeviceImpl>> FSGDeviceListImpl::GetDevices()
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
SGLOG_WARNING(
|
SGLOG_WARNING(
|
||||||
FString::Printf(TEXT("Unknown SenseGlove device '%s'!"), UTF8_TO_TCHAR(typeid(Device).name())),
|
FString::Printf(TEXT("Unknown SenseGlove device '%s'!"), *UEnum::GetValueAsString(FSGCoreEnumCast::ToESGDeviceType(Device->GetDeviceType()))),
|
||||||
FString::Printf(TEXT("Device ID: '%s'!"), UTF8_TO_TCHAR(Device->GetDeviceId().c_str())),
|
FString::Printf(TEXT("Device ID: '%s'!"), UTF8_TO_TCHAR(Device->GetDeviceId().c_str())),
|
||||||
FString::Printf(TEXT("Hardware Version: '%s'!"), UTF8_TO_TCHAR(Device->GetHardwareVersion().c_str())),
|
FString::Printf(TEXT("Hardware Version: '%s'!"), UTF8_TO_TCHAR(Device->GetHardwareVersion().c_str())),
|
||||||
FString::Printf(TEXT("Firmware Version: '%d'!"), Device->GetFirmwareVersion()),
|
FString::Printf(TEXT("Firmware Version: '%d'!"), Device->GetFirmwareVersion()),
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ FSGHapticGloveImpl::FSGHapticGloveImpl()
|
|||||||
}
|
}
|
||||||
|
|
||||||
FSGHapticGloveImpl::FSGHapticGloveImpl(const FHapticGlovePtrType HapticGlove)
|
FSGHapticGloveImpl::FSGHapticGloveImpl(const FHapticGlovePtrType HapticGlove)
|
||||||
: FSGDeviceImpl(std::dynamic_pointer_cast<FSGDeviceType>(HapticGlove)),
|
: FSGDeviceImpl(std::static_pointer_cast<FSGDeviceType>(HapticGlove)),
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -168,12 +168,12 @@ FSGHapticGloveImpl& FSGHapticGloveImpl::operator=(FSGHapticGloveImpl&& Rhs) SG_N
|
|||||||
|
|
||||||
FSGHapticGloveImpl::FHapticGlovePtrType FSGHapticGloveImpl::ToHapticGlovePtr() const
|
FSGHapticGloveImpl::FHapticGlovePtrType FSGHapticGloveImpl::ToHapticGlovePtr() const
|
||||||
{
|
{
|
||||||
return std::dynamic_pointer_cast<FHapticGloveType>(ToSGDevicePtr());
|
return std::static_pointer_cast<FHapticGloveType>(ToSGDevicePtr());
|
||||||
}
|
}
|
||||||
|
|
||||||
FSGHapticGloveImpl::FHapticGlovePtrType FSGHapticGloveImpl::ToHapticGlovePtrChecked() const
|
FSGHapticGloveImpl::FHapticGlovePtrType FSGHapticGloveImpl::ToHapticGlovePtrChecked() const
|
||||||
{
|
{
|
||||||
FHapticGlovePtrType HapticGlove = std::dynamic_pointer_cast<FHapticGloveType>(ToSGDevicePtr());
|
FHapticGlovePtrType HapticGlove = std::static_pointer_cast<FHapticGloveType>(ToSGDevicePtr());
|
||||||
ensureAlwaysMsgf(HapticGlove.get(), TEXT("Invalid HapticGlove"));
|
ensureAlwaysMsgf(HapticGlove.get(), TEXT("Invalid HapticGlove"));
|
||||||
return HapticGlove;
|
return HapticGlove;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ TSharedRef<FSGDeviceImpl> FSGNova2GloveImpl::Parse(const FString& ConstantsStrin
|
|||||||
FSGDevicePtrType SGDevicePtr{FNova2GloveType::Parse(MoveTemp(ConstantsStdString))};
|
FSGDevicePtrType SGDevicePtr{FNova2GloveType::Parse(MoveTemp(ConstantsStdString))};
|
||||||
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
|
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
|
||||||
const TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl{
|
const TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl{
|
||||||
MakeShared<FSGNova2GloveImpl>(std::dynamic_pointer_cast<FNova2GloveType>(MoveTemp(SGDevicePtr)))
|
MakeShared<FSGNova2GloveImpl>(std::static_pointer_cast<FNova2GloveType>(MoveTemp(SGDevicePtr)))
|
||||||
};
|
};
|
||||||
return Nova2GloveImpl;
|
return Nova2GloveImpl;
|
||||||
}
|
}
|
||||||
@@ -275,12 +275,12 @@ const FSGNova2GloveImpl::FNova2GloveType& FSGNova2GloveImpl::ToNova2Glove() cons
|
|||||||
|
|
||||||
FSGNova2GloveImpl::FNova2GlovePtrType FSGNova2GloveImpl::ToNova2GlovePtr() const
|
FSGNova2GloveImpl::FNova2GlovePtrType FSGNova2GloveImpl::ToNova2GlovePtr() const
|
||||||
{
|
{
|
||||||
return std::dynamic_pointer_cast<FNova2GloveType>(ToSGDevicePtr());
|
return std::static_pointer_cast<FNova2GloveType>(ToSGDevicePtr());
|
||||||
}
|
}
|
||||||
|
|
||||||
FSGNova2GloveImpl::FNova2GlovePtrType FSGNova2GloveImpl::ToNova2GlovePtrChecked() const
|
FSGNova2GloveImpl::FNova2GlovePtrType FSGNova2GloveImpl::ToNova2GlovePtrChecked() const
|
||||||
{
|
{
|
||||||
FNova2GlovePtrType Nova2Glove = std::dynamic_pointer_cast<FNova2GloveType>(ToSGDevicePtr());
|
FNova2GlovePtrType Nova2Glove = std::static_pointer_cast<FNova2GloveType>(ToSGDevicePtr());
|
||||||
ensureAlwaysMsgf(Nova2Glove.get(), TEXT("Invalid Nova2Glove"));
|
ensureAlwaysMsgf(Nova2Glove.get(), TEXT("Invalid Nova2Glove"));
|
||||||
return Nova2Glove;
|
return Nova2Glove;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ TSharedRef<FSGDeviceImpl> FSGNovaGloveImpl::Parse(const FString& ConstantsString
|
|||||||
FSGDevicePtrType SGDevicePtr{FNovaGloveType::Parse(MoveTemp(ConstantsStdString))};
|
FSGDevicePtrType SGDevicePtr{FNovaGloveType::Parse(MoveTemp(ConstantsStdString))};
|
||||||
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
|
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
|
||||||
const TSharedRef<FSGNovaGloveImpl> NovaGloveImpl{MakeShared<FSGNovaGloveImpl>(
|
const TSharedRef<FSGNovaGloveImpl> NovaGloveImpl{MakeShared<FSGNovaGloveImpl>(
|
||||||
std::dynamic_pointer_cast<FNovaGloveType>(MoveTemp(SGDevicePtr)))};
|
std::static_pointer_cast<FNovaGloveType>(MoveTemp(SGDevicePtr)))};
|
||||||
return NovaGloveImpl;
|
return NovaGloveImpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,12 +288,12 @@ const FSGNovaGloveImpl::FNovaGloveType& FSGNovaGloveImpl::ToNovaGlove() const
|
|||||||
|
|
||||||
FSGNovaGloveImpl::FNovaGlovePtrType FSGNovaGloveImpl::ToNovaGlovePtr() const
|
FSGNovaGloveImpl::FNovaGlovePtrType FSGNovaGloveImpl::ToNovaGlovePtr() const
|
||||||
{
|
{
|
||||||
return std::dynamic_pointer_cast<FNovaGloveType>(ToSGDevicePtr());
|
return std::static_pointer_cast<FNovaGloveType>(ToSGDevicePtr());
|
||||||
}
|
}
|
||||||
|
|
||||||
FSGNovaGloveImpl::FNovaGlovePtrType FSGNovaGloveImpl::ToNovaGlovePtrChecked() const
|
FSGNovaGloveImpl::FNovaGlovePtrType FSGNovaGloveImpl::ToNovaGlovePtrChecked() const
|
||||||
{
|
{
|
||||||
FNovaGlovePtrType NovaGlove{std::dynamic_pointer_cast<FNovaGloveType>(ToSGDevicePtr())};
|
FNovaGlovePtrType NovaGlove{std::static_pointer_cast<FNovaGloveType>(ToSGDevicePtr())};
|
||||||
ensureAlwaysMsgf(NovaGlove.get(), TEXT("Invalid NovaGlove"));
|
ensureAlwaysMsgf(NovaGlove.get(), TEXT("Invalid NovaGlove"));
|
||||||
return NovaGlove;
|
return NovaGlove;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ TSharedRef<FSGDeviceImpl> FSGSenseGloveImpl::Parse(const FString& ConstantsStrin
|
|||||||
FSGDevicePtrType SGDevicePtr{FSenseGloveType::Parse(MoveTemp(ConstantsStdString))};
|
FSGDevicePtrType SGDevicePtr{FSenseGloveType::Parse(MoveTemp(ConstantsStdString))};
|
||||||
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
|
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
|
||||||
const TSharedRef<FSGSenseGloveImpl> SenseGloveImpl{
|
const TSharedRef<FSGSenseGloveImpl> SenseGloveImpl{
|
||||||
MakeShared<FSGSenseGloveImpl>(std::dynamic_pointer_cast<FSenseGloveType>(MoveTemp(SGDevicePtr)))
|
MakeShared<FSGSenseGloveImpl>(std::static_pointer_cast<FSenseGloveType>(MoveTemp(SGDevicePtr)))
|
||||||
};
|
};
|
||||||
return SenseGloveImpl;
|
return SenseGloveImpl;
|
||||||
}
|
}
|
||||||
@@ -277,7 +277,7 @@ FSGSenseGloveImpl::FSGSenseGloveImpl(const FSenseGloveType SenseGlove)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FSGSenseGloveImpl::FSGSenseGloveImpl(const FSenseGlovePtrType SenseGlove)
|
FSGSenseGloveImpl::FSGSenseGloveImpl(const FSenseGlovePtrType SenseGlove)
|
||||||
: FSGHapticGloveImpl(std::dynamic_pointer_cast<FHapticGloveType>(SenseGlove)),
|
: FSGHapticGloveImpl(std::static_pointer_cast<FHapticGloveType>(SenseGlove)),
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -310,12 +310,12 @@ const FSGSenseGloveImpl::FSenseGloveType& FSGSenseGloveImpl::ToSenseGlove() cons
|
|||||||
|
|
||||||
FSGSenseGloveImpl::FSenseGlovePtrType FSGSenseGloveImpl::ToSenseGlovePtr() const
|
FSGSenseGloveImpl::FSenseGlovePtrType FSGSenseGloveImpl::ToSenseGlovePtr() const
|
||||||
{
|
{
|
||||||
return std::dynamic_pointer_cast<FSenseGloveType>(ToSGDevicePtr());
|
return std::static_pointer_cast<FSenseGloveType>(ToSGDevicePtr());
|
||||||
}
|
}
|
||||||
|
|
||||||
FSGSenseGloveImpl::FSenseGlovePtrType FSGSenseGloveImpl::ToSenseGlovePtrChecked() const
|
FSGSenseGloveImpl::FSenseGlovePtrType FSGSenseGloveImpl::ToSenseGlovePtrChecked() const
|
||||||
{
|
{
|
||||||
FSenseGlovePtrType SenseGlove = std::dynamic_pointer_cast<FSenseGloveType>(ToSGDevicePtr());
|
FSenseGlovePtrType SenseGlove = std::static_pointer_cast<FSenseGloveType>(ToSGDevicePtr());
|
||||||
ensureAlwaysMsgf(SenseGlove.get(), TEXT("Invalid SenseGlove"));
|
ensureAlwaysMsgf(SenseGlove.get(), TEXT("Invalid SenseGlove"));
|
||||||
return SenseGlove;
|
return SenseGlove;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,15 +64,35 @@ public:
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
static TArray<TSharedRef<FSGDeviceImpl>> GetDevices()
|
static TArray<TSharedRef<FSGDeviceImpl>> GetDevices()
|
||||||
{
|
{
|
||||||
const std::type_info& TType = typeid(T);
|
ESGDeviceType TargetType = ESGDeviceType::Unknown;
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<T, FSGNova2GloveImpl>)
|
||||||
|
{
|
||||||
|
TargetType = ESGDeviceType::Nova2;
|
||||||
|
}
|
||||||
|
else if constexpr (std::is_same_v<T, FSGNovaGloveImpl>)
|
||||||
|
{
|
||||||
|
TargetType = ESGDeviceType::Nova;
|
||||||
|
}
|
||||||
|
else if constexpr (std::is_same_v<T, FSGSenseGloveImpl>)
|
||||||
|
{
|
||||||
|
TargetType = ESGDeviceType::SenseGlove;
|
||||||
|
}
|
||||||
|
else if constexpr (std::is_same_v<T, FSGBetaDeviceImpl>)
|
||||||
|
{
|
||||||
|
TargetType = ESGDeviceType::BetaDevice;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
static_assert(!sizeof(T), "Unsupported device type in GetDevices<T>()");
|
||||||
|
}
|
||||||
|
|
||||||
const TArray<TSharedRef<FSGDeviceImpl>> CurrentDevices = GetDevices();
|
const TArray<TSharedRef<FSGDeviceImpl>> CurrentDevices = GetDevices();
|
||||||
TArray<TSharedRef<FSGDeviceImpl>> Devices;
|
TArray<TSharedRef<FSGDeviceImpl>> Devices;
|
||||||
|
|
||||||
for (TSharedRef<FSGDeviceImpl> Device : CurrentDevices)
|
for (TSharedRef<FSGDeviceImpl> Device : CurrentDevices)
|
||||||
{
|
{
|
||||||
auto &d = Device.Get();
|
if (Device->GetDeviceType() == TargetType)
|
||||||
const std::type_info& DType = typeid(d);
|
|
||||||
if (DType.hash_code() == TType.hash_code())
|
|
||||||
{
|
{
|
||||||
Devices.Push(Device);
|
Devices.Push(Device);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ public class SenseGloveCoreImpl : ModuleRules
|
|||||||
{
|
{
|
||||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
|
||||||
bEnableExceptions = true;
|
bEnableExceptions = false;
|
||||||
bUseRTTI = true;
|
bUseRTTI = false;
|
||||||
|
|
||||||
PrivateDependencyModuleNames.AddRange(
|
PrivateDependencyModuleNames.AddRange(
|
||||||
new string[]
|
new string[]
|
||||||
@@ -57,7 +57,12 @@ public class SenseGloveCoreImpl : ModuleRules
|
|||||||
PrivateDependencyModuleNames.AddRange(
|
PrivateDependencyModuleNames.AddRange(
|
||||||
new string[]
|
new string[]
|
||||||
{
|
{
|
||||||
|
"SGCommonThirdPartyLibs",
|
||||||
|
"SGCoreShmThirdPartyLibs",
|
||||||
"SGCoreThirdPartyLibs",
|
"SGCoreThirdPartyLibs",
|
||||||
|
"SGLogThirdPartyLibs",
|
||||||
|
"SGFmtThirdPartyLibs",
|
||||||
|
"SGLoguruThirdPartyLibs",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ public class SGBleThirdPartyLibs : ModuleRules
|
|||||||
|
|
||||||
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
string LibraryPathAnroidArm64 = "";
|
string LibraryPathAnroidAArch64 = "";
|
||||||
string LibraryPathAnroidx64 = "";
|
string LibraryPathAnroidX64 = "";
|
||||||
string LibraryName = "sgble";
|
string LibraryName = "sgble";
|
||||||
|
|
||||||
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
||||||
@@ -63,8 +63,8 @@ public class SGBleThirdPartyLibs : ModuleRules
|
|||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
}
|
}
|
||||||
@@ -86,8 +86,9 @@ public class SGBleThirdPartyLibs : ModuleRules
|
|||||||
}
|
}
|
||||||
else if (bIsWin64)
|
else if (bIsWin64)
|
||||||
{
|
{
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "win64"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "rustc"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "rustc"));
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
LibraryName = string.Format("{0}.lib", LibraryName);
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
}
|
}
|
||||||
@@ -103,20 +104,20 @@ public class SGBleThirdPartyLibs : ModuleRules
|
|||||||
{
|
{
|
||||||
if (bIsDebugBuild)
|
if (bIsDebugBuild)
|
||||||
{
|
{
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
|
||||||
}
|
}
|
||||||
|
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
|
||||||
|
|
||||||
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
|
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,166 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||||
|
*
|
||||||
|
* @section LICENSE
|
||||||
|
*
|
||||||
|
* (The MIT License)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 - 2025 SenseGlove
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*
|
||||||
|
* @section DESCRIPTION
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class SGCommonThirdPartyLibs : ModuleRules
|
||||||
|
{
|
||||||
|
public SGCommonThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
Type = ModuleType.External;
|
||||||
|
|
||||||
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
|
string LibraryPathAnroidAArch64 = "";
|
||||||
|
string LibraryPathAnroidX64 = "";
|
||||||
|
string LibraryName = "sgcommon";
|
||||||
|
|
||||||
|
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
||||||
|
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
|
||||||
|
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
|
||||||
|
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
|
||||||
|
Target.WindowsPlatform.Architecture == UnrealArch.X64;
|
||||||
|
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinux)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinuxArm64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsWin64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
|
switch (Target.WindowsPlatform.Compiler)
|
||||||
|
{
|
||||||
|
case WindowsCompiler.VisualStudio2022:
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Assert(false, "Unsupported platform!");
|
||||||
|
}
|
||||||
|
|
||||||
|
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||||
|
PrivateIncludePaths.Add(IncludePath);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
|
||||||
|
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+166
@@ -0,0 +1,166 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||||
|
*
|
||||||
|
* @section LICENSE
|
||||||
|
*
|
||||||
|
* (The MIT License)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 - 2025 SenseGlove
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*
|
||||||
|
* @section DESCRIPTION
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class SGConnectShmThirdPartyLibs : ModuleRules
|
||||||
|
{
|
||||||
|
public SGConnectShmThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
Type = ModuleType.External;
|
||||||
|
|
||||||
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
|
string LibraryPathAnroidAArch64 = "";
|
||||||
|
string LibraryPathAnroidX64 = "";
|
||||||
|
string LibraryName = "sgconnectshm";
|
||||||
|
|
||||||
|
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
||||||
|
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
|
||||||
|
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
|
||||||
|
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
|
||||||
|
Target.WindowsPlatform.Architecture == UnrealArch.X64;
|
||||||
|
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinux)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinuxArm64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsWin64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
|
switch (Target.WindowsPlatform.Compiler)
|
||||||
|
{
|
||||||
|
case WindowsCompiler.VisualStudio2022:
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Assert(false, "Unsupported platform!");
|
||||||
|
}
|
||||||
|
|
||||||
|
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||||
|
PrivateIncludePaths.Add(IncludePath);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
|
||||||
|
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+15
-11
@@ -47,7 +47,7 @@ public class SGConnectThirdPartyLibs : ModuleRules
|
|||||||
|
|
||||||
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
string LibraryPathAnroidArm64 = "";
|
string LibraryPathAnroidAArch64 = "";
|
||||||
string LibraryPathAnroidx64 = "";
|
string LibraryPathAnroidx64 = "";
|
||||||
string LibraryName = "sgconnect";
|
string LibraryName = "sgconnect";
|
||||||
|
|
||||||
@@ -63,15 +63,14 @@ public class SGConnectThirdPartyLibs : ModuleRules
|
|||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
|
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
}
|
}
|
||||||
else if (bIsLinux)
|
else if (bIsLinux)
|
||||||
{
|
{
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
|
||||||
|
|
||||||
#if UE_5_6_OR_LATER
|
#if UE_5_6_OR_LATER
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
@@ -84,11 +83,12 @@ public class SGConnectThirdPartyLibs : ModuleRules
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
}
|
}
|
||||||
else if (bIsLinuxArm64)
|
else if (bIsLinuxArm64)
|
||||||
{
|
{
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
|
||||||
|
|
||||||
#if UE_5_6_OR_LATER
|
#if UE_5_6_OR_LATER
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
@@ -101,20 +101,24 @@ public class SGConnectThirdPartyLibs : ModuleRules
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
}
|
}
|
||||||
else if (bIsWin64)
|
else if (bIsWin64)
|
||||||
{
|
{
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "win64"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
switch (Target.WindowsPlatform.Compiler)
|
switch (Target.WindowsPlatform.Compiler)
|
||||||
{
|
{
|
||||||
case WindowsCompiler.VisualStudio2022:
|
case WindowsCompiler.VisualStudio2022:
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc143"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Debug.Assert(false, "Unsupported engine version or compiler!");
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
LibraryName = string.Format("{0}.lib", LibraryName);
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -129,19 +133,19 @@ public class SGConnectThirdPartyLibs : ModuleRules
|
|||||||
{
|
{
|
||||||
if (bIsDebugBuild)
|
if (bIsDebugBuild)
|
||||||
{
|
{
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
|
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
|
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
|
||||||
}
|
}
|
||||||
|
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
|
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
|
||||||
|
|
||||||
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
|
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -0,0 +1,166 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||||
|
*
|
||||||
|
* @section LICENSE
|
||||||
|
*
|
||||||
|
* (The MIT License)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 - 2025 SenseGlove
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*
|
||||||
|
* @section DESCRIPTION
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class SGCoreShmThirdPartyLibs : ModuleRules
|
||||||
|
{
|
||||||
|
public SGCoreShmThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
Type = ModuleType.External;
|
||||||
|
|
||||||
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
|
string LibraryPathAnroidAArch64 = "";
|
||||||
|
string LibraryPathAnroidX64 = "";
|
||||||
|
string LibraryName = "sgcoreshm";
|
||||||
|
|
||||||
|
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
||||||
|
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
|
||||||
|
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
|
||||||
|
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
|
||||||
|
Target.WindowsPlatform.Architecture == UnrealArch.X64;
|
||||||
|
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinux)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinuxArm64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsWin64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
|
switch (Target.WindowsPlatform.Compiler)
|
||||||
|
{
|
||||||
|
case WindowsCompiler.VisualStudio2022:
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Assert(false, "Unsupported platform!");
|
||||||
|
}
|
||||||
|
|
||||||
|
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||||
|
PrivateIncludePaths.Add(IncludePath);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
|
||||||
|
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,8 +47,8 @@ public class SGCoreThirdPartyLibs : ModuleRules
|
|||||||
|
|
||||||
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
string LibraryPathAnroidArm64 = "";
|
string LibraryPathAnroidAArch64 = "";
|
||||||
string LibraryPathAnroidx64 = "";
|
string LibraryPathAnroidX64 = "";
|
||||||
string LibraryName = "sgcore";
|
string LibraryName = "sgcore";
|
||||||
|
|
||||||
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
||||||
@@ -63,15 +63,14 @@ public class SGCoreThirdPartyLibs : ModuleRules
|
|||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
}
|
}
|
||||||
else if (bIsLinux)
|
else if (bIsLinux)
|
||||||
{
|
{
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
|
||||||
|
|
||||||
#if UE_5_6_OR_LATER
|
#if UE_5_6_OR_LATER
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
@@ -84,11 +83,12 @@ public class SGCoreThirdPartyLibs : ModuleRules
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
}
|
}
|
||||||
else if (bIsLinuxArm64)
|
else if (bIsLinuxArm64)
|
||||||
{
|
{
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
|
||||||
|
|
||||||
#if UE_5_6_OR_LATER
|
#if UE_5_6_OR_LATER
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
@@ -101,20 +101,24 @@ public class SGCoreThirdPartyLibs : ModuleRules
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
}
|
}
|
||||||
else if (bIsWin64)
|
else if (bIsWin64)
|
||||||
{
|
{
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "win64"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
switch (Target.WindowsPlatform.Compiler)
|
switch (Target.WindowsPlatform.Compiler)
|
||||||
{
|
{
|
||||||
case WindowsCompiler.VisualStudio2022:
|
case WindowsCompiler.VisualStudio2022:
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc143"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Debug.Assert(false, "Unsupported engine version or compiler!");
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
LibraryName = string.Format("{0}.lib", LibraryName);
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -129,20 +133,20 @@ public class SGCoreThirdPartyLibs : ModuleRules
|
|||||||
{
|
{
|
||||||
if (bIsDebugBuild)
|
if (bIsDebugBuild)
|
||||||
{
|
{
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
|
||||||
}
|
}
|
||||||
|
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
|
||||||
|
|
||||||
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
|
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,171 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||||
|
*
|
||||||
|
* @section LICENSE
|
||||||
|
*
|
||||||
|
* (The MIT License)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 - 2025 SenseGlove
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*
|
||||||
|
* @section DESCRIPTION
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class SGFmtThirdPartyLibs : ModuleRules
|
||||||
|
{
|
||||||
|
public SGFmtThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
Type = ModuleType.External;
|
||||||
|
|
||||||
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
|
string LibraryPathAnroidAArch64 = "";
|
||||||
|
string LibraryPathAnroidX64 = "";
|
||||||
|
string LibraryName = "fmt";
|
||||||
|
|
||||||
|
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
||||||
|
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
|
||||||
|
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
|
||||||
|
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
|
||||||
|
Target.WindowsPlatform.Architecture == UnrealArch.X64;
|
||||||
|
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
|
||||||
|
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryName += "d";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinux)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinuxArm64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsWin64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
|
switch (Target.WindowsPlatform.Compiler)
|
||||||
|
{
|
||||||
|
case WindowsCompiler.VisualStudio2022:
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Assert(false, "Unsupported platform!");
|
||||||
|
}
|
||||||
|
|
||||||
|
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||||
|
PrivateIncludePaths.Add(IncludePath);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
|
||||||
|
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||||
|
*
|
||||||
|
* @section LICENSE
|
||||||
|
*
|
||||||
|
* (The MIT License)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 - 2025 SenseGlove
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*
|
||||||
|
* @section DESCRIPTION
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class SGLogThirdPartyLibs : ModuleRules
|
||||||
|
{
|
||||||
|
public SGLogThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
Type = ModuleType.External;
|
||||||
|
|
||||||
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
|
string LibraryPathAnroidAArch64 = "";
|
||||||
|
string LibraryPathAnroidX64 = "";
|
||||||
|
string LibraryName = "sglog";
|
||||||
|
|
||||||
|
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
||||||
|
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
|
||||||
|
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
|
||||||
|
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
|
||||||
|
Target.WindowsPlatform.Architecture == UnrealArch.X64;
|
||||||
|
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinux)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinuxArm64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsWin64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
|
switch (Target.WindowsPlatform.Compiler)
|
||||||
|
{
|
||||||
|
case WindowsCompiler.VisualStudio2022:
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Assert(false, "Unsupported platform!");
|
||||||
|
}
|
||||||
|
|
||||||
|
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||||
|
PrivateIncludePaths.Add(IncludePath);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
|
||||||
|
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,171 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||||
|
*
|
||||||
|
* @section LICENSE
|
||||||
|
*
|
||||||
|
* (The MIT License)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 - 2025 SenseGlove
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*
|
||||||
|
* @section DESCRIPTION
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class SGLoguruThirdPartyLibs : ModuleRules
|
||||||
|
{
|
||||||
|
public SGLoguruThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
Type = ModuleType.External;
|
||||||
|
|
||||||
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
|
string LibraryPathAnroidAArch64 = "";
|
||||||
|
string LibraryPathAnroidX64 = "";
|
||||||
|
string LibraryName = "loguru";
|
||||||
|
|
||||||
|
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
||||||
|
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
|
||||||
|
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
|
||||||
|
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
|
||||||
|
Target.WindowsPlatform.Architecture == UnrealArch.X64;
|
||||||
|
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
|
||||||
|
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryName += "d";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinux)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinuxArm64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsWin64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
|
switch (Target.WindowsPlatform.Compiler)
|
||||||
|
{
|
||||||
|
case WindowsCompiler.VisualStudio2022:
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Assert(false, "Unsupported platform!");
|
||||||
|
}
|
||||||
|
|
||||||
|
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||||
|
PrivateIncludePaths.Add(IncludePath);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
|
||||||
|
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,9 +47,9 @@ public class SGSerialThirdPartyLibs : ModuleRules
|
|||||||
|
|
||||||
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
string LibraryPathAnroidArm64 = "";
|
string LibraryPathAnroidAArch64 = "";
|
||||||
string LibraryPathAnroidx64 = "";
|
string LibraryPathAnroidX64 = "";
|
||||||
string LibraryName = "serial";
|
string LibraryName = "sgserial";
|
||||||
|
|
||||||
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
||||||
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
|
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
|
||||||
@@ -63,15 +63,14 @@ public class SGSerialThirdPartyLibs : ModuleRules
|
|||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
}
|
}
|
||||||
else if (bIsLinux)
|
else if (bIsLinux)
|
||||||
{
|
{
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
|
||||||
|
|
||||||
#if UE_5_6_OR_LATER
|
#if UE_5_6_OR_LATER
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
@@ -84,11 +83,12 @@ public class SGSerialThirdPartyLibs : ModuleRules
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
}
|
}
|
||||||
else if (bIsLinuxArm64)
|
else if (bIsLinuxArm64)
|
||||||
{
|
{
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
|
||||||
|
|
||||||
#if UE_5_6_OR_LATER
|
#if UE_5_6_OR_LATER
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
@@ -101,20 +101,24 @@ public class SGSerialThirdPartyLibs : ModuleRules
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
}
|
}
|
||||||
else if (bIsWin64)
|
else if (bIsWin64)
|
||||||
{
|
{
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "win64"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
switch (Target.WindowsPlatform.Compiler)
|
switch (Target.WindowsPlatform.Compiler)
|
||||||
{
|
{
|
||||||
case WindowsCompiler.VisualStudio2022:
|
case WindowsCompiler.VisualStudio2022:
|
||||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc143"));
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Debug.Assert(false, "Unsupported engine version or compiler!");
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
LibraryName = string.Format("{0}.lib", LibraryName);
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -129,20 +133,20 @@ public class SGSerialThirdPartyLibs : ModuleRules
|
|||||||
{
|
{
|
||||||
if (bIsDebugBuild)
|
if (bIsDebugBuild)
|
||||||
{
|
{
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
|
||||||
}
|
}
|
||||||
|
|
||||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
|
||||||
|
|
||||||
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
|
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
+166
@@ -0,0 +1,166 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||||
|
*
|
||||||
|
* @section LICENSE
|
||||||
|
*
|
||||||
|
* (The MIT License)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 - 2025 SenseGlove
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*
|
||||||
|
* @section DESCRIPTION
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class SGWjwwoodSerialThirdPartyLibs : ModuleRules
|
||||||
|
{
|
||||||
|
public SGWjwwoodSerialThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
Type = ModuleType.External;
|
||||||
|
|
||||||
|
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
|
||||||
|
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||||
|
string LibraryPathAnroidAArch64 = "";
|
||||||
|
string LibraryPathAnroidX64 = "";
|
||||||
|
string LibraryName = "serial";
|
||||||
|
|
||||||
|
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
|
||||||
|
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
|
||||||
|
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
|
||||||
|
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
|
||||||
|
Target.WindowsPlatform.Architecture == UnrealArch.X64;
|
||||||
|
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinux)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsLinuxArm64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
|
||||||
|
|
||||||
|
#if UE_5_6_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
|
||||||
|
#elif UE_5_5_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
|
||||||
|
#elif UE_5_4_OR_LATER
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
|
||||||
|
#else
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||||
|
}
|
||||||
|
else if (bIsWin64)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
|
||||||
|
switch (Target.WindowsPlatform.Compiler)
|
||||||
|
{
|
||||||
|
case WindowsCompiler.VisualStudio2022:
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Debug.Assert(false, "Unsupported engine version or compiler!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
|
||||||
|
|
||||||
|
LibraryName = string.Format("{0}.lib", LibraryName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Assert(false, "Unsupported platform!");
|
||||||
|
}
|
||||||
|
|
||||||
|
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||||
|
PrivateIncludePaths.Add(IncludePath);
|
||||||
|
|
||||||
|
if (bIsAndroid)
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
|
||||||
|
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
|
||||||
|
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (bIsDebugBuild)
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||||
|
}
|
||||||
|
|
||||||
|
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||||
|
PublicAdditionalLibraries.Add(LibraryPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user