Skip to content

Commit

Permalink
marketplace fixes (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavrax authored Sep 11, 2024
1 parent f2ea4c1 commit f46cdfa
Show file tree
Hide file tree
Showing 26 changed files with 253 additions and 240 deletions.
8 changes: 8 additions & 0 deletions Config/FilterPlugin.ini
Original file line number Diff line number Diff line change
@@ -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
60 changes: 30 additions & 30 deletions PubnubLibrary.uplugin
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"FileVersion": 3,
"Version": 2,
"VersionName": "0.1.1",
"FriendlyName": "Pubnub Unreal SDK",
"Description": "Quickly add interactive features to your game that scale without building your backend infrastructure.",
"Category": "Code",
"CreatedBy": "PubNub Inc.",
"CreatedByURL": "https://www.pubnub.com/",
"DocsURL": "https://www.pubnub.com/docs/sdks/unreal",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/f19f329bb0f54385a0af714cfdf27bfc",
"SupportURL": "",
"CanContainContent": true,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"SupportedTargetPlatforms": [
"Win64",
"Mac"
],
"Modules": [
{
"Name": "PubnubLibrary",
"Type": "Runtime",
"LoadingPhase": "Default",
"PlatformAllowList": [
"Win64",
"Mac"
]
}
]
"FileVersion": 3,
"Version": 2,
"VersionName": "0.1.1",
"FriendlyName": "Pubnub Unreal SDK",
"Description": "Quickly add interactive features to your game that scale without building your backend infrastructure.",
"Category": "Code",
"CreatedBy": "PubNub Inc.",
"CreatedByURL": "https://www.pubnub.com/",
"DocsURL": "https://www.pubnub.com/docs/sdks/unreal",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/f19f329bb0f54385a0af714cfdf27bfc",
"SupportURL": "",
"CanContainContent": true,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"SupportedTargetPlatforms": [
"Win64",
"Mac"
],
"Modules": [
{
"Name": "PubnubLibrary",
"Type": "Runtime",
"LoadingPhase": "Default",
"PlatformAllowList": [
"Win64",
"Mac"
]
}
]
}
5 changes: 4 additions & 1 deletion Source/PubnubLibrary/Private/Config/PubnubSettings.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2024 PubNub Inc. All Rights Reserved.


#include "Config/PubnubSettings.h"

UPubnubSettings::UPubnubSettings()
{
CategoryName = "Plugins";
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// Copyright 2024 PubNub Inc. All Rights Reserved.


#include "FunctionLibraries/PubnubUtilities.h"
#include "Json.h"

FString UPubnubUtilities::JsonObjectToString(TSharedPtr<FJsonObject> JsonObject)
{
Expand Down
23 changes: 4 additions & 19 deletions Source/PubnubLibrary/Private/PubnubLibrary.cpp
Original file line number Diff line number Diff line change
@@ -1,34 +1,19 @@
// Copyright 2024 PubNub Inc. All Rights Reserved.

#include "PubnubLibrary.h"
#include "Core.h"
#include "Interfaces/IPluginManager.h"
#include "Kismet/KismetSystemLibrary.h"

#define LOCTEXT_NAMESPACE "FPubnubLibraryModule"

void FPubnubLibraryModule::StartupModule()
{
#if PLATFORM_MAC
FString BaseDir = IPluginManager::Get().FindPlugin("PubnubChat")->GetBaseDir();
FString LibraryPath;
LibraryPath = FPaths::Combine(*BaseDir, TEXT("Source/ThirdParty/sdk/lib/macos/libpubnub-chat.dylib"));


PubnubLibraryHandle = !LibraryPath.IsEmpty() ? FPlatformProcess::GetDllHandle(*LibraryPath) : nullptr;

if (!PubnubLibraryHandle)
{
FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("ChatSDKModuleHandle", "Failed to load pubnub third party library"));
}
#endif
}

void FPubnubLibraryModule::ShutdownModule()
{
#if PLATFORM_MAC
FPlatformProcess::FreeDllHandle(PubnubLibraryHandle);
PubnubLibraryHandle = nullptr;
#endif
}

#undef LOCTEXT_NAMESPACE

IMPLEMENT_MODULE(FPubnubLibraryModule, PubnubLibrary)
IMPLEMENT_MODULE(FPubnubLibraryModule, PubnubLibrary)
Loading

0 comments on commit f46cdfa

Please sign in to comment.