Added marketplace stuff

This commit is contained in:
Jordon Brooks 2024-01-08 16:53:13 +00:00
parent 56aa126e8e
commit fb8a01915e
No known key found for this signature in database
GPG key ID: 83964894E5D98D57
16 changed files with 131 additions and 61 deletions

8
Config/FilterPlugin.ini Normal file
View file

@ -0,0 +1,8 @@
[FilterPlugin]
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
;
; Examples:
; /README.txt
; /Extras/...
; /Binaries/ThirdParty/*.dll

View file

@ -3,22 +3,23 @@
"Version": 1, "Version": 1,
"VersionName": "1.0", "VersionName": "1.0",
"FriendlyName": "HarmonyLink", "FriendlyName": "HarmonyLink",
"Description": "", "Description": "Revolutionize handheld gaming with adaptive game settings. Optimize graphics and gameplay experience based on real-time system metrics. Open-source project empowering developers to enhance games on portable devices",
"Category": "Other", "Category": "Handheld",
"CreatedBy": "Jordon Brooks", "CreatedBy": "Jordon Brooks",
"CreatedByURL": "https://jordongamedev.co.uk", "CreatedByURL": "https://jordongamedev.co.uk",
"DocsURL": "", "DocsURL": "https://github.com/Jordonbc/HarmonyLink",
"MarketplaceURL": "", "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/92fd511971274d1f955abb7197485041",
"SupportURL": "", "SupportURL": "",
"CanContainContent": true, "CanContainContent": true,
"IsBetaVersion": true, "IsBetaVersion": false,
"IsExperimentalVersion": true, "IsExperimentalVersion": false,
"Installed": false, "Installed": false,
"Modules": [ "Modules": [
{ {
"Name": "HarmonyLink", "Name": "HarmonyLink",
"Type": "Runtime", "Type": "Runtime",
"LoadingPhase": "Default" "LoadingPhase": "Default",
"WhitelistPlatforms": ["Win64", "Linux"]
} }
] ]
} }

View file

@ -30,7 +30,6 @@ public class HarmonyLink : ModuleRules
"Core", "Core",
"CoreUObject", "CoreUObject",
"Engine", "Engine",
"Projects"
// ... add other public dependencies that you statically link with here ... // ... add other public dependencies that you statically link with here ...
} }
); );
@ -51,9 +50,23 @@ public class HarmonyLink : ModuleRules
} }
); );
PublicAdditionalLibraries.Add(Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/bin/Win64/HarmonyLinkLib.lib")); // Platform-specific settings
if (Target.Platform == UnrealTargetPlatform.Win64)
{
RuntimeDependencies.Add("$(BinaryOutputDir)/HarmonyLinkLib.dll", Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/bin/Win64/HarmonyLinkLib.dll")); PublicAdditionalLibraries.Add(Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/bin/Win64/HarmonyLinkLib.lib"));
RuntimeDependencies.Add("$(BinaryOutputDir)/HarmonyLinkLib.dll", Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/bin/Win64/HarmonyLinkLib.dll"));
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
{
PublicAdditionalLibraries.Add(Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/bin/Linux/libHarmonyLinkLib.so"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libHarmonyLinkLib.so", Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/bin/Linux/libHarmonyLinkLib.so"));
}
// I shall include this if anyone wishes to provide Mac binaries of HarmonyLink but these are not included by default as I don't own one.
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
PublicAdditionalLibraries.Add(Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/bin/Mac/HarmonyLinkLib.dylib"));
RuntimeDependencies.Add("$(BinaryOutputDir)/HarmonyLinkLib.dylib", Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/bin/Mac/HarmonyLinkLib.dylib"));
}
} }
} }

View file

@ -1,5 +1,4 @@
// Copyright (C) 2023 Jordon Brooks // Copyright (C) 2024 Jordon Brooks
#include "HarmonyLinkLibrary.h" #include "HarmonyLinkLibrary.h"

View file

@ -1,4 +1,4 @@
// Copyright (C) 2023 Jordon Brooks // Copyright (C) 2024 Jordon Brooks
#include "Structs/Battery.h" #include "Structs/Battery.h"

View file

@ -1,4 +1,4 @@
// Copyright (C) 2023 Jordon Brooks // Copyright (C) 2024 Jordon Brooks
#include "Structs/CPUInfo.h" #include "Structs/CPUInfo.h"

View file

@ -1,4 +1,6 @@
#include "Structs/Device.h" // Copyright (C) 2024 Jordon Brooks
#include "Structs/Device.h"
#include <Structs/FDevice.h> #include <Structs/FDevice.h>

View file

@ -1,4 +1,6 @@
#include "Structs/OSVerInfo.h" // Copyright (C) 2024 Jordon Brooks
#include "Structs/OSVerInfo.h"
FOSVerInfo::FOSVerInfo(HarmonyLinkLib::FOSVerInfo* oldInfo) FOSVerInfo::FOSVerInfo(HarmonyLinkLib::FOSVerInfo* oldInfo)
{ {

View file

@ -1,10 +1,12 @@
#pragma once // Copyright (C) 2024 Jordon Brooks
#pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "DeviceEnum.generated.h" #include "DeviceEnum.generated.h"
/** /*
* * Enum representing different operating system platforms.
*/ */
UENUM(BlueprintType) UENUM(BlueprintType)
enum class EDeviceEnum : uint8 enum class EDeviceEnum : uint8

View file

@ -1,10 +1,12 @@
#pragma once // Copyright (C) 2024 Jordon Brooks
#pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "Platform.generated.h" #include "Platform.generated.h"
/** /*
* * Enum representing different operating system platforms.
*/ */
UENUM(BlueprintType) UENUM(BlueprintType)
enum class EPlatform : uint8 enum class EPlatform : uint8

View file

@ -1,41 +1,50 @@
// Copyright (C) 2023 Jordon Brooks // Copyright (C) 2024 Jordon Brooks
#pragma once #pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Structs/Battery.h" #include "Structs/Battery.h"
#include "Structs/CPUInfo.h" #include "Structs/CPUInfo.h"
#include "Structs/Device.h" #include "Structs/Device.h"
#include "Structs/OSVerInfo.h" #include "Structs/OSVerInfo.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "HarmonyLinkLibrary.generated.h" #include "HarmonyLinkLibrary.generated.h"
/** /**
* * Library of static functions for accessing various system information, particularly for the HarmonyLink project.
*/ */
UCLASS() UCLASS()
class HARMONYLINK_API UHarmonyLinkLibrary : public UBlueprintFunctionLibrary class HARMONYLINK_API UHarmonyLinkLibrary : public UBlueprintFunctionLibrary
{ {
GENERATED_BODY() GENERATED_BODY()
// Checks if the game is running under Wine.
UFUNCTION(BlueprintCallable, Category="HarmonyLink") UFUNCTION(BlueprintCallable, Category="HarmonyLink")
static bool IsWine(); static bool IsWine();
// Checks if the operating system is Linux.
UFUNCTION(BlueprintCallable, Category="HarmonyLink") UFUNCTION(BlueprintCallable, Category="HarmonyLink")
static bool IsLinux(); static bool IsLinux();
// Checks if the game is running on a Steam Deck.
UFUNCTION(BlueprintCallable, Category="HarmonyLink") UFUNCTION(BlueprintCallable, Category="HarmonyLink")
static bool IsSteamDeck(); static bool IsSteamDeck();
// Retrieves information about the CPU of the current device.
UFUNCTION(BlueprintCallable, Category="HarmonyLink") UFUNCTION(BlueprintCallable, Category="HarmonyLink")
static FCPUInfo GetCPUInfo(); static FCPUInfo GetCPUInfo();
// Retrieves information about the current device.
UFUNCTION(BlueprintCallable, Category="HarmonyLink") UFUNCTION(BlueprintCallable, Category="HarmonyLink")
static FDevice GetDeviceInfo(); static FDevice GetDeviceInfo();
// Retrieves information about the operating system of the current device.
UFUNCTION(BlueprintCallable, Category="HarmonyLink") UFUNCTION(BlueprintCallable, Category="HarmonyLink")
static FOSVerInfo GetOSInfo(); static FOSVerInfo GetOSInfo();
// Retrieves the current battery status of the device.
UFUNCTION(BlueprintCallable, Category="HarmonyLink") UFUNCTION(BlueprintCallable, Category="HarmonyLink")
static FBattery GetBatteryStatus(); static FBattery GetBatteryStatus();
}; };

View file

@ -1,4 +1,4 @@
// Copyright (C) 2023 Jordon Brooks // Copyright (C) 2024 Jordon Brooks
#pragma once #pragma once
#include <HarmonyLinkLib.h> #include <HarmonyLinkLib.h>
@ -6,8 +6,8 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "Battery.generated.h" #include "Battery.generated.h"
/** /*
* * Represents the battery status and information of a device.
*/ */
USTRUCT(BlueprintType) USTRUCT(BlueprintType)
struct FBattery struct FBattery
@ -16,14 +16,19 @@ struct FBattery
FBattery() {} FBattery() {}
UPROPERTY(BlueprintReadWrite, EditAnywhere) // Indicates whether the device has a battery.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
bool HasBattery = false; bool HasBattery = false;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // Indicates whether the device is connected to AC power.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
bool IsACConnected = false; bool IsACConnected = false;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // The current battery percentage of the device.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
int32 BatteryPercent = 0; int32 BatteryPercent = 0;
// Constructor that initializes the struct with information from an external battery source.
// @param battery Pointer to an external FBattery structure to copy data from.
FBattery(HarmonyLinkLib::FBattery* battery); FBattery(HarmonyLinkLib::FBattery* battery);
}; };

View file

@ -1,4 +1,4 @@
// Copyright (C) 2023 Jordon Brooks // Copyright (C) 2024 Jordon Brooks
#pragma once #pragma once
@ -7,8 +7,8 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "CPUInfo.generated.h" #include "CPUInfo.generated.h"
/** /*
* * Represents information about the CPU of a device.
*/ */
USTRUCT(BlueprintType) USTRUCT(BlueprintType)
struct FCPUInfo struct FCPUInfo
@ -17,20 +17,27 @@ struct FCPUInfo
FCPUInfo() {} FCPUInfo() {}
UPROPERTY(BlueprintReadWrite, EditAnywhere) // The vendor identifier for the CPU.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
FString VendorID; FString VendorID;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // The model name of the CPU.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
FString ModelName; FString ModelName;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // The number of physical cores in the CPU.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
int32 PhysicalCores = 0; int32 PhysicalCores = 0;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // The number of logical cores in the CPU (may be different from physical cores).
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
int32 LogicalCores = 0; int32 LogicalCores = 0;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // A set of flags representing various features or capabilities of the CPU.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
TSet<FString> Flags; TSet<FString> Flags;
// Constructor that initializes the struct with information from an external CPU info source.
// @param cpu_info Pointer to an external FCPUInfo structure to copy data from.
FCPUInfo(HarmonyLinkLib::FCPUInfo* cpu_info); FCPUInfo(HarmonyLinkLib::FCPUInfo* cpu_info);
}; };

View file

@ -1,4 +1,6 @@
#pragma once // Copyright (C) 2024 Jordon Brooks
#pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "Enums/DeviceEnum.h" #include "Enums/DeviceEnum.h"
@ -7,9 +9,7 @@
#include "Device.generated.h" #include "Device.generated.h"
/** // Represents information about a specific device.
*
*/
USTRUCT(BlueprintType) USTRUCT(BlueprintType)
struct FDevice struct FDevice
{ {
@ -17,14 +17,28 @@ struct FDevice
FDevice() {} FDevice() {}
UPROPERTY(BlueprintReadWrite, EditAnywhere) // The platform on which the device operates. Note: This can differ from the build platform.
// For example, if the device is identified as running on Wine, this will show Linux,
// regardless of the build being an executable for Windows.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
EPlatform Platform = EPlatform::WINDOWS; EPlatform Platform = EPlatform::WINDOWS;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // The type of the device.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
EDeviceEnum Device = EDeviceEnum::DESKTOP; EDeviceEnum Device = EDeviceEnum::DESKTOP;
// Constructor that initializes the struct with information from an external source.
// @param oldDevice Pointer to an external FDevice structure to copy data from.
FDevice(HarmonyLinkLib::FDevice* oldDevice); FDevice(HarmonyLinkLib::FDevice* oldDevice);
private:
// Converts an external device enum to the internal EDeviceEnum type.
// @param Device External device enum to convert.
// @returns Converted EDeviceEnum value.
static EDeviceEnum Convert(HarmonyLinkLib::EDevice Device); static EDeviceEnum Convert(HarmonyLinkLib::EDevice Device);
// Converts an external platform enum to the internal EPlatform type.
// @param Platform External platform enum to convert.
// @returns Converted EPlatform value.
static EPlatform Convert(HarmonyLinkLib::EPlatform Platform); static EPlatform Convert(HarmonyLinkLib::EPlatform Platform);
}; };

View file

@ -1,15 +1,12 @@
// Copyright (C) 2023 Jordon Brooks // Copyright (C) 2024 Jordon Brooks
#pragma once #pragma once
#include <HarmonyLinkLib.h>
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include <HarmonyLinkLib.h>
#include "OSVerInfo.generated.h" #include "OSVerInfo.generated.h"
/** // Represents information about an operating system version.
*
*/
USTRUCT(BlueprintType) USTRUCT(BlueprintType)
struct FOSVerInfo struct FOSVerInfo
{ {
@ -17,26 +14,35 @@ struct FOSVerInfo
FOSVerInfo() {} FOSVerInfo() {}
UPROPERTY(BlueprintReadWrite, EditAnywhere) // The name of the operating system.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
FString Name; FString Name;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // Numerical version of the operating system.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
int32 Version = 0; int32 Version = 0;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // Unique identifier for the operating system.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
FString ID; FString ID;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // Identifier for the specific version of the operating system.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
FString VersionID; FString VersionID;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // Codename for the operating system version.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
FString VersionCodename; FString VersionCodename;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // User-friendly name for the operating system version.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
FString PrettyName; FString PrettyName;
UPROPERTY(BlueprintReadWrite, EditAnywhere) // Variant identifier of the operating system.
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="HarmonyLink")
FString VariantID; FString VariantID;
// Constructor that initializes the struct with information from an external source.
// @param oldInfo Pointer to an external FOSVerInfo structure to copy data from.
FOSVerInfo(HarmonyLinkLib::FOSVerInfo* oldInfo); FOSVerInfo(HarmonyLinkLib::FOSVerInfo* oldInfo);
}; };