From 70cd486e1359c5ab81a0eee1c11286c0ac8c8586 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Wed, 9 Aug 2017 14:00:17 -0700 Subject: [PATCH] Start on a Discord rpc unreal plugin --- .../Plugins/discordrpc/Resources/Icon128.png | Bin 0 -> 9834 bytes .../Plugins/discordrpc/Resources/discord.png | Bin 0 -> 9834 bytes .../discordrpcLibrary.Build.cs | 26 ++++++++ .../Source/discordrpc/Private/discordrpc.cpp | 53 ++++++++++++++++ .../Source/discordrpc/Public/discordrpc.h | 18 ++++++ .../Source/discordrpc/discordrpc.Build.cs | 60 ++++++++++++++++++ .../Plugins/discordrpc/discordrpc.uplugin | 23 +++++++ 7 files changed, 180 insertions(+) create mode 100644 examples/unrealstatus/Plugins/discordrpc/Resources/Icon128.png create mode 100644 examples/unrealstatus/Plugins/discordrpc/Resources/discord.png create mode 100644 examples/unrealstatus/Plugins/discordrpc/Source/ThirdParty/discordrpcLibrary/discordrpcLibrary.Build.cs create mode 100644 examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp create mode 100644 examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h create mode 100644 examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/discordrpc.Build.cs create mode 100644 examples/unrealstatus/Plugins/discordrpc/discordrpc.uplugin diff --git a/examples/unrealstatus/Plugins/discordrpc/Resources/Icon128.png b/examples/unrealstatus/Plugins/discordrpc/Resources/Icon128.png new file mode 100644 index 0000000000000000000000000000000000000000..8b7f8e1c6a2c71c9e20d4e9e819455056c43d75e GIT binary patch literal 9834 zcmZu%c{o&G+`ltsVv;3$S%wN_iIQE6R7hEh$S!MHhLFMFT0*5np+ZC|J7r(SOqR($ zDofU}Yb0YI#+Y}0@ALlo{&DYl&N?x-Q+U2Ii@MLmvPtlR5WY;H*Bv-{?*t0C2bd_dtl~&u*;2V?kGJf^MNbf+*0;nsu4E%H_JeOe{<$al;={`$Qa4`y zxz1zUppCf42c0l@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_y{!H1c9nMrF}JI)MmM`oCU;e>2W>!Onc zs>6MJW4Y%XbB{E4l)1?472iZBClMkcm>~0sD=l4+y445&>NX~$Bi{W@3pTcH7Q!Dw ze~Wsuak(pAY)d0R5M=_&##C}Ca!&vW+9E=c-}SBW{7l5+Cnr34*L5iQw_Zo2BCwsU zNbt?l_G2!-@-y2U$4c1`j!|K|LCyy7fIl0p>ENh|Uf= z(ElIoO3ZdL<5Bx~2<`axu~W29$jRS@v#uA_R7apRd?s|$OYcAIPAnb5oEH)DUjf{} zt=9~SL9WtWWizO=rS^6T;=44YZFgZI_tEkQ@$F<5C<vV}P|C(eiE)Co10 zOF|lCPvI*<=^=jM)D*);tp6`IG@*qLZls`S=Yvp2%s@Ks9F2+!0fgZj(g z+1JlMcC=?8AZ3*HSAc(jDcn<#xi;#JZlY%-D>2EHj+(ZBm?pVGg+)@07s6kH@QRGY zl+nzXJ8Oc)k;5ykKDcMx(Sh8oCBC(%1D-YkMdF{Hw}dlW`myQ58ncP{2`r-i+%*Bn zUUXW<`R4-uBZ==%u$F6j&F9=iEOg!1mhc`Q`jpAv{ohdT{4%qati~E*IZ&N2T3i>(=4 literal 0 HcmV?d00001 diff --git a/examples/unrealstatus/Plugins/discordrpc/Resources/discord.png b/examples/unrealstatus/Plugins/discordrpc/Resources/discord.png new file mode 100644 index 0000000000000000000000000000000000000000..8b7f8e1c6a2c71c9e20d4e9e819455056c43d75e GIT binary patch literal 9834 zcmZu%c{o&G+`ltsVv;3$S%wN_iIQE6R7hEh$S!MHhLFMFT0*5np+ZC|J7r(SOqR($ zDofU}Yb0YI#+Y}0@ALlo{&DYl&N?x-Q+U2Ii@MLmvPtlR5WY;H*Bv-{?*t0C2bd_dtl~&u*;2V?kGJf^MNbf+*0;nsu4E%H_JeOe{<$al;={`$Qa4`y zxz1zUppCf42c0l@t9;#v20Ytd?t5|6&_1h{y&{=cg3g_qvD1ByXTl>=EwC6xnY?fB}?$tHsO>fVFrAyuOXs6+J`o@sin_Siv6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bi{W@3pTcH7Q!Dw ze~Wsuak(pAY)d0R5M=_&##C}Ca!&vW+9E=c-}SBW{7l5+Cnr34*L5iQw_Zo2BCwsU zNbt?l_G2!-@-y2U$4c1`j!|K|LCyy7fIl0p>ENh|Uf= z(ElIoO3ZdL<5Bx~2<`axu~W29$jRS@v#uA_R7apRd?s|$OYcAIPAnb5oEH)DUjf{} zt=9~SL9WtWWizO=rS^6T;=44YZFgZI_tEkQ@$F<5C<vV}P|C(eiE)Co10 zOF|lCPvI*<=^=jM)D*);tp6`IG@*qLZls`S=Yvp2%s@Ks9F2+!0fgZj(g z+1JlMcC=?8AZ3*HSAc(jDcn<#xi;#JZlY%-D>2EHj+(ZBm?pVGg+)@07s6kH@QRGY zl+nzXJ8Oc)k;5ykKDcMx(Sh8oCBC(%1D-YkMdF{Hw}dlW`myQ58ncP{2`r-i+%*Bn zUUXW<`R4-uBZ==%u$F6j&F9=iEOg!1mhc`Q`jpAv{ohdT{4%qati~E*IZ&N2T3i>(=4 literal 0 HcmV?d00001 diff --git a/examples/unrealstatus/Plugins/discordrpc/Source/ThirdParty/discordrpcLibrary/discordrpcLibrary.Build.cs b/examples/unrealstatus/Plugins/discordrpc/Source/ThirdParty/discordrpcLibrary/discordrpcLibrary.Build.cs new file mode 100644 index 0000000..0e0159a --- /dev/null +++ b/examples/unrealstatus/Plugins/discordrpc/Source/ThirdParty/discordrpcLibrary/discordrpcLibrary.Build.cs @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +using System.IO; +using UnrealBuildTool; + +public class discordrpcLibrary : ModuleRules +{ + public discordrpcLibrary(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + if (Target.Platform == UnrealTargetPlatform.Win64) + { + // Add the import library + PublicLibraryPaths.Add(Path.Combine(ModuleDirectory, "x64", "Release")); + PublicAdditionalLibraries.Add("discord-rpc.lib"); + + // Delay-load the DLL, so we can load it from the right place first + PublicDelayLoadDLLs.Add("discord-rpc.dll"); + } + else if (Target.Platform == UnrealTargetPlatform.Mac) + { + PublicDelayLoadDLLs.Add(Path.Combine(ModuleDirectory, "Mac", "Release", "libdiscord-rpc.dylib")); + } + } +} diff --git a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp new file mode 100644 index 0000000..7721f7f --- /dev/null +++ b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp @@ -0,0 +1,53 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#include "discordrpc.h" +#include "Core.h" +#include "ModuleManager.h" +#include "IPluginManager.h" + +#define DISCORD_DYNAMIC_LIB +//#include "../../../../../../../include/discord-rpc.h" +#include "discord-rpc.h" + +#define LOCTEXT_NAMESPACE "FdiscordrpcModule" + +void FdiscordrpcModule::StartupModule() +{ + // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module + + // Get the base directory of this plugin + FString BaseDir = IPluginManager::Get().FindPlugin("discordrpc")->GetBaseDir(); + + // Add on the relative location of the third party dll and load it + FString LibraryPath; +#if PLATFORM_WINDOWS + LibraryPath = FPaths::Combine(*BaseDir, TEXT("Binaries/ThirdParty/discordrpcLibrary/Win64/discord-rpc.dll")); +#elif PLATFORM_MAC + LibraryPath = FPaths::Combine(*BaseDir, TEXT("Source/ThirdParty/discordrpcLibrary/Mac/Release/libdiscord-rpc.dylib")); +#endif // PLATFORM_WINDOWS + + ExampleLibraryHandle = !LibraryPath.IsEmpty() ? FPlatformProcess::GetDllHandle(*LibraryPath) : nullptr; + + if (ExampleLibraryHandle) + { + Discord_Initialize("344609418631053312", nullptr, false); + } + else + { + FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("ThirdPartyLibraryError", "Failed to load example third party library")); + } +} + +void FdiscordrpcModule::ShutdownModule() +{ + // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, + // we call this function before unloading the module. + + // Free the dll handle + FPlatformProcess::FreeDllHandle(ExampleLibraryHandle); + ExampleLibraryHandle = nullptr; +} + +#undef LOCTEXT_NAMESPACE + +IMPLEMENT_MODULE(FdiscordrpcModule, discordrpc) \ No newline at end of file diff --git a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h new file mode 100644 index 0000000..f9a7af3 --- /dev/null +++ b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h @@ -0,0 +1,18 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "ModuleManager.h" + +class FdiscordrpcModule : public IModuleInterface +{ +public: + + /** IModuleInterface implementation */ + virtual void StartupModule() override; + virtual void ShutdownModule() override; + +private: + /** Handle to the test dll we will load */ + void* ExampleLibraryHandle; +}; \ No newline at end of file diff --git a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/discordrpc.Build.cs b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/discordrpc.Build.cs new file mode 100644 index 0000000..698b809 --- /dev/null +++ b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/discordrpc.Build.cs @@ -0,0 +1,60 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +using UnrealBuildTool; + +public class discordrpc : ModuleRules +{ + public discordrpc(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PublicIncludePaths.AddRange( + new string[] { + "discordrpc/Public" + // ... add public include paths required here ... + } + ); + + + PrivateIncludePaths.AddRange( + new string[] { + "discordrpc/Private", + "../../../../../include" + // ... add other private include paths required here ... + } + ); + + PublicLibraryPaths.AddRange( + new string[] { + "Binaries/ThirdParty/discordrpcLibrary/Win64", + } + ); + + + PublicDependencyModuleNames.AddRange( + new string[] + { + "Core", + "discordrpcLibrary", + "Projects" + // ... add other public dependencies that you statically link with here ... + } + ); + + + PrivateDependencyModuleNames.AddRange( + new string[] + { + // ... add private dependencies that you statically link with here ... + } + ); + + + DynamicallyLoadedModuleNames.AddRange( + new string[] + { + // ... add any modules that your module loads dynamically here ... + } + ); + } +} diff --git a/examples/unrealstatus/Plugins/discordrpc/discordrpc.uplugin b/examples/unrealstatus/Plugins/discordrpc/discordrpc.uplugin new file mode 100644 index 0000000..ca77578 --- /dev/null +++ b/examples/unrealstatus/Plugins/discordrpc/discordrpc.uplugin @@ -0,0 +1,23 @@ +{ + "FileVersion": 3, + "Version": 1, + "VersionName": "1.0", + "FriendlyName": "Discord RPC", + "Description": "Wrap the Discord RPC library.", + "Category": "Messaging", + "CreatedBy": "Chris Marsh ", + "CreatedByURL": "https://discordapp.com/", + "DocsURL": "", + "MarketplaceURL": "", + "SupportURL": "", + "CanContainContent": true, + "IsBetaVersion": true, + "Installed": false, + "Modules": [ + { + "Name": "discordrpc", + "Type": "Developer", + "LoadingPhase": "Default" + } + ] +} \ No newline at end of file