Initial Import
This commit is contained in:
15
Unreal/PS_Dinkey/.vsconfig
Normal file
15
Unreal/PS_Dinkey/.vsconfig
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"components": [
|
||||
"Microsoft.Net.Component.4.6.2.TargetingPack",
|
||||
"Microsoft.VisualStudio.Component.Unreal.Workspace",
|
||||
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL",
|
||||
"Microsoft.VisualStudio.Component.VC.14.38.17.8.x86.x64",
|
||||
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
||||
"Microsoft.VisualStudio.Component.Windows11SDK.22621",
|
||||
"Microsoft.VisualStudio.Workload.CoreEditor",
|
||||
"Microsoft.VisualStudio.Workload.ManagedDesktop",
|
||||
"Microsoft.VisualStudio.Workload.NativeDesktop",
|
||||
"Microsoft.VisualStudio.Workload.NativeGame"
|
||||
]
|
||||
}
|
||||
0
Unreal/PS_Dinkey/Config/DefaultEditor.ini
Normal file
0
Unreal/PS_Dinkey/Config/DefaultEditor.ini
Normal file
92
Unreal/PS_Dinkey/Config/DefaultEngine.ini
Normal file
92
Unreal/PS_Dinkey/Config/DefaultEngine.ini
Normal file
@@ -0,0 +1,92 @@
|
||||
|
||||
|
||||
[/Script/EngineSettings.GameMapsSettings]
|
||||
GameDefaultMap=/Engine/Maps/Templates/OpenWorld
|
||||
|
||||
[/Script/Engine.RendererSettings]
|
||||
r.AllowStaticLighting=False
|
||||
|
||||
r.GenerateMeshDistanceFields=True
|
||||
|
||||
r.DynamicGlobalIlluminationMethod=1
|
||||
|
||||
r.ReflectionMethod=1
|
||||
|
||||
r.SkinCache.CompileShaders=True
|
||||
|
||||
r.RayTracing=True
|
||||
|
||||
r.Shadow.Virtual.Enable=1
|
||||
|
||||
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True
|
||||
|
||||
r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8
|
||||
|
||||
r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8
|
||||
|
||||
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
|
||||
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12
|
||||
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12
|
||||
-D3D12TargetedShaderFormats=PCD3D_SM5
|
||||
+D3D12TargetedShaderFormats=PCD3D_SM6
|
||||
-D3D11TargetedShaderFormats=PCD3D_SM5
|
||||
+D3D11TargetedShaderFormats=PCD3D_SM5
|
||||
Compiler=Default
|
||||
AudioSampleRate=48000
|
||||
AudioCallbackBufferFrameSize=1024
|
||||
AudioNumBuffersToEnqueue=1
|
||||
AudioMaxChannels=0
|
||||
AudioNumSourceWorkers=4
|
||||
SpatializationPlugin=
|
||||
SourceDataOverridePlugin=
|
||||
ReverbPlugin=
|
||||
OcclusionPlugin=
|
||||
CompressionOverrides=(bOverrideCompressionTimes=False,DurationThreshold=5.000000,MaxNumRandomBranches=0,SoundCueQualityIndex=0)
|
||||
CacheSizeKB=65536
|
||||
MaxChunkSizeOverrideKB=0
|
||||
bResampleForDevice=False
|
||||
MaxSampleRate=48000.000000
|
||||
HighSampleRate=32000.000000
|
||||
MedSampleRate=24000.000000
|
||||
LowSampleRate=12000.000000
|
||||
MinSampleRate=8000.000000
|
||||
CompressionQualityModifier=1.000000
|
||||
AutoStreamingThreshold=0.000000
|
||||
SoundCueCookQualityIndex=-1
|
||||
|
||||
[/Script/LinuxTargetPlatform.LinuxTargetSettings]
|
||||
-TargetedRHIs=SF_VULKAN_SM5
|
||||
+TargetedRHIs=SF_VULKAN_SM6
|
||||
|
||||
[/Script/HardwareTargeting.HardwareTargetingSettings]
|
||||
TargetedHardwareClass=Desktop
|
||||
AppliedTargetedHardwareClass=Desktop
|
||||
DefaultGraphicsPerformance=Maximum
|
||||
AppliedDefaultGraphicsPerformance=Maximum
|
||||
|
||||
[/Script/WorldPartitionEditor.WorldPartitionEditorSettings]
|
||||
CommandletClass=Class'/Script/UnrealEd.WorldPartitionConvertCommandlet'
|
||||
|
||||
[/Script/Engine.UserInterfaceSettings]
|
||||
bAuthorizeAutomaticWidgetVariableCreation=False
|
||||
FontDPIPreset=Standard
|
||||
FontDPI=72
|
||||
|
||||
[/Script/Engine.Engine]
|
||||
+ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/PS_Dinkey")
|
||||
+ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/PS_Dinkey")
|
||||
|
||||
[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings]
|
||||
bEnablePlugin=True
|
||||
bAllowNetworkConnection=True
|
||||
SecurityToken=6A5B3A4C42990ADCE0E7A898CDEA4BE9
|
||||
bIncludeInShipping=False
|
||||
bAllowExternalStartInShipping=False
|
||||
bCompileAFSProject=False
|
||||
bUseCompression=False
|
||||
bLogFiles=False
|
||||
bReportStats=False
|
||||
ConnectionType=USBOnly
|
||||
bUseManualIPAddress=False
|
||||
ManualIPAddress=
|
||||
|
||||
3
Unreal/PS_Dinkey/Config/DefaultGame.ini
Normal file
3
Unreal/PS_Dinkey/Config/DefaultGame.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
[/Script/EngineSettings.GeneralProjectSettings]
|
||||
ProjectID=E96372B2417DD72498B0189823AF9570
|
||||
84
Unreal/PS_Dinkey/Config/DefaultInput.ini
Normal file
84
Unreal/PS_Dinkey/Config/DefaultInput.ini
Normal file
@@ -0,0 +1,84 @@
|
||||
[/Script/Engine.InputSettings]
|
||||
-AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
|
||||
-AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
|
||||
-AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
|
||||
-AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
|
||||
-AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
|
||||
-AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
|
||||
-AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MouseWheelAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_LeftTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_RightTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_Special_Left_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_Special_Left_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
bAltEnterTogglesFullscreen=True
|
||||
bF11TogglesFullscreen=True
|
||||
bUseMouseForTouch=False
|
||||
bEnableMouseSmoothing=True
|
||||
bEnableFOVScaling=True
|
||||
bCaptureMouseOnLaunch=True
|
||||
bEnableLegacyInputScales=True
|
||||
bEnableMotionControls=True
|
||||
bFilterInputByPlatformUser=False
|
||||
bShouldFlushPressedKeysOnViewportFocusLost=True
|
||||
bAlwaysShowTouchInterface=False
|
||||
bShowConsoleOnFourFingerTap=True
|
||||
bEnableGestureRecognizer=False
|
||||
bUseAutocorrect=False
|
||||
DefaultViewportMouseCaptureMode=CapturePermanently_IncludingInitialMouseDown
|
||||
DefaultViewportMouseLockMode=LockOnCapture
|
||||
FOVScale=0.011110
|
||||
DoubleClickTime=0.200000
|
||||
DefaultPlayerInputClass=/Script/EnhancedInput.EnhancedPlayerInput
|
||||
DefaultInputComponentClass=/Script/EnhancedInput.EnhancedInputComponent
|
||||
DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks
|
||||
-ConsoleKeys=Tilde
|
||||
+ConsoleKeys=Tilde
|
||||
|
||||
1795
Unreal/PS_Dinkey/PS_Dinkey.sln
Normal file
1795
Unreal/PS_Dinkey/PS_Dinkey.sln
Normal file
File diff suppressed because it is too large
Load Diff
22
Unreal/PS_Dinkey/PS_Dinkey.uproject
Normal file
22
Unreal/PS_Dinkey/PS_Dinkey.uproject
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"FileVersion": 3,
|
||||
"EngineAssociation": "5.5",
|
||||
"Category": "",
|
||||
"Description": "",
|
||||
"Modules": [
|
||||
{
|
||||
"Name": "PS_Dinkey",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default"
|
||||
}
|
||||
],
|
||||
"Plugins": [
|
||||
{
|
||||
"Name": "ModelingToolsEditorMode",
|
||||
"Enabled": true,
|
||||
"TargetAllowList": [
|
||||
"Editor"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
25
Unreal/PS_Dinkey/Plugins/PS_Dinkey/DinkeyPlugin.uplugin
Normal file
25
Unreal/PS_Dinkey/Plugins/PS_Dinkey/DinkeyPlugin.uplugin
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"FileVersion": 3,
|
||||
"Version": 1,
|
||||
"VersionName": "1.0",
|
||||
"FriendlyName": "Polymorph Dinkey Plugin",
|
||||
"Description": "Plugin implementing Dinkey software protection.",
|
||||
"Category": "Dinkey",
|
||||
"CreatedBy": "Polymorph (greg)",
|
||||
"CreatedByURL": "http://www.polymorph.fr",
|
||||
"DocsURL": "",
|
||||
"MarketplaceURL": "",
|
||||
"SupportURL": "",
|
||||
"EnabledByDefault": true,
|
||||
"CanContainContent": false,
|
||||
"IsBetaVersion": false,
|
||||
"Installed": false,
|
||||
"Modules": [
|
||||
{
|
||||
"Name": "DinkeyPlugin",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"WhitelistPlatforms" : [ "Win64"]
|
||||
}
|
||||
]
|
||||
}
|
||||
33
Unreal/PS_Dinkey/Plugins/PS_Dinkey/ReadMe.md
Normal file
33
Unreal/PS_Dinkey/Plugins/PS_Dinkey/ReadMe.md
Normal file
@@ -0,0 +1,33 @@
|
||||
Installation
|
||||
-------------
|
||||
Unzip the package into the Plugins directory of your game. To add it as an engine plugin you will need to unzip the module into the plugin directory under where you installed UE4.
|
||||
|
||||
Dinkey protection - Pre-requisites
|
||||
. Configure the Dinkey Pro USB dongle according to the expected license protection
|
||||
|
||||
Usage
|
||||
. C++ project package integration
|
||||
Right click on your project file <project>.uproject and Generate Visual Studio project files, the Dinkey plugin will be added and
|
||||
you will be able to recompile it with the whole project.
|
||||
Note : If necessary, edit your project build script Source\<project>\<project>.Build.cs and add the Dinkey plugin to the list of private dependency modules
|
||||
PrivateDependencyModuleNames.AddRange(new string[] { "DinkeyPlugin" });
|
||||
. Blueprint-only project package integration
|
||||
Close your project, deploy the plugin into the Plugins folder.
|
||||
Edit the Plugins\DinkeyPlugin\DinkeyPlugin.uplugin config file and set the EnabledByDefault attribute to false.
|
||||
Open your project.
|
||||
Note : If you want to update the Dinkey plugin with Visual Studio, you have to convert your blueprint-only project to a C++ project by adding 1 new C++ empty class
|
||||
. DON T forget to package your project before trying to use the Launch button (build + run a specific platform target) in order to cook all assets and
|
||||
perform the UnrealBuildTool onto the Dinkey plugin
|
||||
. In the Unreal blueprint editor
|
||||
Add a call to Dinkey protection check static function to check the license
|
||||
. Logs/Traces
|
||||
Edit your project config file Config\DefaultEngine.ini and add the Dinkey plugin dedicated log category line :
|
||||
[Core.Log]
|
||||
LogDinkeyPlugin=Error Warning Log
|
||||
To avoid logs about all receive packets just remove the Log level
|
||||
On built package you have to edit the config file <project>\Saved\Config\WindowsNoEditor\Engine.ini
|
||||
Note : if you notice Unreal engine is resetting these files on application exit then set the readonly attribute on them.
|
||||
|
||||
Contact
|
||||
-------------
|
||||
If you have any Questions, Comments, Bug reports or feature requests for this plugin, or you wish to contact me you can and should email me - @polymorph.fr
|
||||
BIN
Unreal/PS_Dinkey/Plugins/PS_Dinkey/Resources/Icon128.png
Normal file
BIN
Unreal/PS_Dinkey/Plugins/PS_Dinkey/Resources/Icon128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,33 @@
|
||||
// Copyright 2017 Polymorph. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||
#include "Dinkey.generated.h"
|
||||
|
||||
DECLARE_LOG_CATEGORY_EXTERN(LogDinkeyPlugin, Log, All);
|
||||
|
||||
typedef struct DRIS;
|
||||
|
||||
UCLASS()
|
||||
class UDinkey : public UObject
|
||||
{
|
||||
GENERATED_UCLASS_BODY()
|
||||
|
||||
public:
|
||||
#if DINKEY_DYNAMIC_LINKAGE
|
||||
static void *dpWinDllHandle;
|
||||
typedef int(*_DDProtCheck)(DRIS *dris, BYTE *data);
|
||||
static _DDProtCheck DDProtCheck;
|
||||
|
||||
static void Initialize();
|
||||
static void Finalize();
|
||||
#endif
|
||||
UFUNCTION(BlueprintCallable, Category = "Dinkey")
|
||||
static int ProtCheck(); // a standard protection check
|
||||
|
||||
private:
|
||||
static void random_set(void *buffer, int length);
|
||||
static void DisplayError(int ret_code, int extended_error);
|
||||
};
|
||||
@@ -0,0 +1,107 @@
|
||||
// Copyright 2017 Polymorph. All Rights Reserved.
|
||||
#define DYNAMIC_LINKAGE
|
||||
|
||||
using System.IO;
|
||||
using UnrealBuildTool;
|
||||
|
||||
public class DinkeyPlugin : ModuleRules
|
||||
{
|
||||
private string ModulePath { get { return ModuleDirectory; } }
|
||||
private string ThirdPartyPath { get { return Path.GetFullPath(Path.Combine(ModulePath, "../../../../Dependencies")); } }
|
||||
|
||||
public DinkeyPlugin(ReadOnlyTargetRules Target) : base(Target)
|
||||
{
|
||||
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
// ... add other public dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"Slate",
|
||||
"SlateCore",
|
||||
// ... add private dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
DynamicallyLoadedModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
// ... add any modules that your module loads dynamically here ...
|
||||
}
|
||||
);
|
||||
|
||||
#if DYNAMIC_LINKAGE
|
||||
PublicDefinitions.Add("DINKEY_DYNAMIC_LINKAGE=1");
|
||||
#endif
|
||||
// Dinkey dependencies
|
||||
string dinkeyPlatformString = (Target.Platform == UnrealTargetPlatform.Win64 ? "64" : "32");
|
||||
//string dinkeySDKPath = Path.Combine(ThirdPartyPath, "DinkeyPro/Dinkey Pro 7.2.0/Samples/C");
|
||||
string dinkeySDKPath = Path.Combine(ThirdPartyPath, "DinkeyPro/Dinkey Pro 7.6.1/Samples/C");
|
||||
|
||||
// Compile/Link dependencies
|
||||
PublicIncludePaths.Add(dinkeySDKPath);
|
||||
#if DYNAMIC_LINKAGE
|
||||
string dpwinDLLName = string.Format("dpwin{0}.dll", dinkeyPlatformString);
|
||||
//string dinkeyDLLsPath = Path.Combine(ThirdPartyPath, string.Format("DinkeyPro/Dinkey Pro 7.2.0/Modules/{0}bit", dinkeyPlatformString));
|
||||
//string dinkeyDLLsPath = Path.Combine(ThirdPartyPath, string.Format("DinkeyPro/Dinkey Pro 7.6.1/Modules/{0}bit", dinkeyPlatformString));
|
||||
//string dpwinDLLPath = Path.Combine(dinkeyDLLsPath, dpwinDLLName);
|
||||
// Runtime dependencies (DLLs)
|
||||
PublicDelayLoadDLLs.Add(dpwinDLLName);
|
||||
|
||||
// RuntimeDependencies.Add(string.Format("$(EngineDir)/Binaries/ThirdParty/DinkeyPro/Win{0}/{1}", dinkeyPlatformString, dpwinDLLName));
|
||||
|
||||
if (Target.Type == TargetRules.TargetType.Editor) {
|
||||
string srcPath = Path.Combine(ModulePath, "../../ThirdParty/Win64/dpwin64.dll");
|
||||
string destPath = Path.Combine(ModulePath, "../../../../Binaries/Win64/dpwin64.dll");
|
||||
|
||||
// Only copy if destination is missing or source is newer
|
||||
bool needCopy = !File.Exists(destPath);
|
||||
if (!needCopy)
|
||||
{
|
||||
var srcInfo = new FileInfo(srcPath);
|
||||
var destInfo = new FileInfo(destPath);
|
||||
needCopy = srcInfo.LastWriteTimeUtc > destInfo.LastWriteTimeUtc
|
||||
|| srcInfo.Length != destInfo.Length;
|
||||
}
|
||||
|
||||
if (needCopy)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Copy(srcPath, destPath, true);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
// DLL is locked by a running process (e.g. editor during Live Coding) — skip copy.
|
||||
// The existing DLL is already in place and will be used as-is.
|
||||
System.Console.WriteLine("DinkeyPlugin: Could not copy dpwin64.dll (file locked). Using existing copy.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RuntimeDependencies.Add(string.Format("$(ProjectDir)/Binaries/Win{0}/{1}", dinkeyPlatformString, dpwinDLLName));
|
||||
|
||||
|
||||
/* if (Target.Type == TargetRules.TargetType.Editor) {
|
||||
// Copy DLLs into Project Binaries Engine folders
|
||||
string dinkeyUnrealEngineThirdPartyPath = Path.Combine(Target.RelativeEnginePath, string.Format("Binaries/ThirdParty/DinkeyPro/Win{0}", dinkeyPlatformString));
|
||||
Directory.CreateDirectory(dinkeyUnrealEngineThirdPartyPath);
|
||||
File.Copy(string.Format("$(ProjectDir)/Binaries/Win{0}/{1}", dinkeyPlatformString, dpwinDLLName), Path.Combine(dinkeyUnrealEngineThirdPartyPath, dpwinDLLName), true);
|
||||
}*/
|
||||
#else
|
||||
// PublicAdditionalLibraries.Add(Path.Combine(dinkeySDKPath, string.Format("import_libs/dpwin{0}{1}.lib", dinkeyPlatformString, dinkeyConfigurationString)));
|
||||
PublicAdditionalLibraries.Add(Path.Combine(dinkeySDKPath, string.Format("object_modules/dpwin{0}.obj", dinkeyPlatformString)));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
// Copyright 2017 Polymorph. All Rights Reserved.
|
||||
|
||||
#include "Dinkey.h"
|
||||
|
||||
DEFINE_LOG_CATEGORY(LogDinkeyPlugin);
|
||||
|
||||
#include "dris.h" // for DRIS definition
|
||||
|
||||
#define DISABLE_PROTECTION 0
|
||||
|
||||
#define ASTERION_PS 13290
|
||||
#define MY_PRODCODE "PROSERVE" // Dongle Product Code
|
||||
|
||||
#ifdef DINKEY_DYNAMIC_LINKAGE
|
||||
void *UDinkey::dpWinDllHandle = NULL;
|
||||
UDinkey::_DDProtCheck UDinkey::DDProtCheck = NULL;
|
||||
|
||||
void UDinkey::Initialize() {
|
||||
UE_LOG(LogDinkeyPlugin, Log, TEXT("UDinkey::Initialize()"));
|
||||
|
||||
// Load the Dinkey dynamic library
|
||||
#if PLATFORM_64BITS
|
||||
FString Platform = TEXT("64");
|
||||
#else
|
||||
FString Platform = TEXT("32");
|
||||
#endif
|
||||
//FString dpwinDLLFilename = FPaths::EngineDir() / FString::Printf(TEXT("Binaries/ThirdParty/DinkeyPro/Win%s/dpwin%s.dll"), *Platform, *Platform);
|
||||
FString dpwinDLLFilename = FPaths::ProjectDir() / FString::Printf(TEXT("Binaries/Win%s/dpwin%s.dll"), *Platform, *Platform);
|
||||
|
||||
if (FPaths::FileExists(dpwinDLLFilename)) {
|
||||
dpWinDllHandle = FPlatformProcess::GetDllHandle(*dpwinDLLFilename);
|
||||
}
|
||||
|
||||
if (dpWinDllHandle != NULL) {
|
||||
DDProtCheck = NULL;
|
||||
DDProtCheck = (_DDProtCheck)FPlatformProcess::GetDllExport(dpWinDllHandle, TEXT("DDProtCheck"));
|
||||
}
|
||||
|
||||
if (dpWinDllHandle == NULL || DDProtCheck == NULL) {
|
||||
UE_LOG(LogDinkeyPlugin, Fatal, TEXT("Unable to load Dinkey Library : "));
|
||||
}
|
||||
}
|
||||
|
||||
void UDinkey::Finalize() {
|
||||
UE_LOG(LogDinkeyPlugin, Log, TEXT("UDinkey::Finalize()"));
|
||||
|
||||
// Unload the Dinkey dynamic library
|
||||
if (dpWinDllHandle != NULL) {
|
||||
DDProtCheck = NULL;
|
||||
FPlatformProcess::FreeDllHandle(dpWinDllHandle);
|
||||
dpWinDllHandle = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
UDinkey::UDinkey(const FObjectInitializer& ObjectInitializer)
|
||||
: Super(ObjectInitializer) {
|
||||
}
|
||||
|
||||
int UDinkey::ProtCheck() {
|
||||
DRIS dris;
|
||||
int ret_code = 0;
|
||||
|
||||
// set the DRIS to have random values
|
||||
random_set(&dris, sizeof(DRIS));
|
||||
// then set the values we want to use
|
||||
memcpy(dris.header, "DRIS", 4);
|
||||
dris.size = sizeof(DRIS);
|
||||
dris.function = PROTECTION_CHECK; // standard protection check
|
||||
dris.flags = 0; // no extra flags, but you may want to specify some if you want to start a network user or decrement execs,...
|
||||
|
||||
#ifdef DINKEY_DYNAMIC_LINKAGE
|
||||
if (DDProtCheck == NULL) {
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Dinkey library not correctly loaded !"));
|
||||
#if DISABLE_PROTECTION || WITH_EDITOR
|
||||
return 0;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
ret_code = DDProtCheck(&dris, NULL);
|
||||
|
||||
if (ret_code != 0) {
|
||||
DisplayError(ret_code, dris.ext_err); // display messages for any errors that have occurred
|
||||
#if DISABLE_PROTECTION || WITH_EDITOR
|
||||
ret_code = 0;
|
||||
#endif
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
// later in your code you can check other values in the DRIS...
|
||||
|
||||
if (dris.sdsn != ASTERION_PS ) {
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Incorrect SDSN (%d) !"), dris.sdsn);
|
||||
#if DISABLE_PROTECTION || WITH_EDITOR
|
||||
return 0;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (strcmp(dris.prodcode, MY_PRODCODE) != 0) {
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Incorrect Product Code (%s) !"), ANSI_TO_TCHAR(dris.prodcode));
|
||||
#if DISABLE_PROTECTION || WITH_EDITOR
|
||||
return 0;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
// later on in your program you can check the return code again
|
||||
if (dris.ret_code != 0) {
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Dinkey Dongle protection error (%d) !"), dris.ret_code);
|
||||
#if DISABLE_PROTECTION || WITH_EDITOR
|
||||
return 0;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
UE_LOG(LogDinkeyPlugin, Log, TEXT("License check suceeded."));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ************* useful routines that are called from our functions **********
|
||||
|
||||
// fills the buffer with length bytes of random data
|
||||
// NB there are better ways of doing this (for example with the Windows Crypto API calls)
|
||||
void UDinkey::random_set(void *buffer, int length) {
|
||||
int i;
|
||||
|
||||
// srand(GetTickCount());
|
||||
|
||||
for (i = 0; i<length; i++)
|
||||
((unsigned char *)buffer)[i] = (unsigned char)rand();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// displays messages for the most common errors. You will want to change this for your code
|
||||
void UDinkey::DisplayError(int ret_code, int extended_error) {
|
||||
switch (ret_code) {
|
||||
case 401:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! No dongles detected!"));
|
||||
break;
|
||||
|
||||
case 403:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! The dongle detected has a different type to the one specified in DinkeyAdd."));
|
||||
break;
|
||||
|
||||
case 404:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! The dongle detected has a different model to those specified in DinkeyAdd."));
|
||||
break;
|
||||
|
||||
case 409:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! The dongle detected has not been programmed by DinkeyAdd."));
|
||||
break;
|
||||
|
||||
case 410:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! The dongle detected has a different Product Code to the one specified in DinkeyAdd."));
|
||||
break;
|
||||
|
||||
case 411:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! The dongle detected does not contain the licence associated with this program."));
|
||||
break;
|
||||
|
||||
case 413:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! This program has not been protected by DinkeyAdd. For guidance please read the DinkeyAdd chapter of the Dinkey manual."));
|
||||
break;
|
||||
|
||||
case 417:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! One or more of the parameters set in the DRIS is incorrect. This could be caused if you are encrypting the DRIS in your code but did not specify DRIS encryption in DinkeyAdd - or vice versa."));
|
||||
break;
|
||||
|
||||
case 423:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! The number of network users has been exceeded."));
|
||||
break;
|
||||
|
||||
case 435:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! DinkeyServer has not been detected on the network."));
|
||||
break;
|
||||
|
||||
case 922:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("Error! The Software Key has expired."));
|
||||
break;
|
||||
|
||||
default:
|
||||
UE_LOG(LogDinkeyPlugin, Error, TEXT("An error occurred checking the dongle.\nError: %d, Extended Error: %d"), ret_code, extended_error);
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Copyright 2017 Polymorph. All Rights Reserved.
|
||||
|
||||
#include "DinkeyPlugin.h"
|
||||
#include "Dinkey.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FDinkeyPluginModule"
|
||||
|
||||
void FDinkeyPluginModule::StartupModule()
|
||||
{
|
||||
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
|
||||
|
||||
UDinkey::Initialize();
|
||||
}
|
||||
|
||||
void FDinkeyPluginModule::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.
|
||||
|
||||
UDinkey::Finalize();
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
IMPLEMENT_MODULE(FDinkeyPluginModule, DinkeyPlugin)
|
||||
@@ -0,0 +1,15 @@
|
||||
// Copyright 2017 Polymorph. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
class FDinkeyPluginModule : public IModuleInterface
|
||||
{
|
||||
public:
|
||||
|
||||
/** IModuleInterface implementation */
|
||||
virtual void StartupModule() override;
|
||||
virtual void ShutdownModule() override;
|
||||
};
|
||||
BIN
Unreal/PS_Dinkey/Plugins/PS_Dinkey/ThirdParty/Win64/dpwin64.dll
vendored
Normal file
BIN
Unreal/PS_Dinkey/Plugins/PS_Dinkey/ThirdParty/Win64/dpwin64.dll
vendored
Normal file
Binary file not shown.
15
Unreal/PS_Dinkey/Source/PS_Dinkey.Target.cs
Normal file
15
Unreal/PS_Dinkey/Source/PS_Dinkey.Target.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
using UnrealBuildTool;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class PS_DinkeyTarget : TargetRules
|
||||
{
|
||||
public PS_DinkeyTarget(TargetInfo Target) : base(Target)
|
||||
{
|
||||
Type = TargetType.Game;
|
||||
DefaultBuildSettings = BuildSettingsVersion.V5;
|
||||
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_5;
|
||||
ExtraModuleNames.Add("PS_Dinkey");
|
||||
}
|
||||
}
|
||||
23
Unreal/PS_Dinkey/Source/PS_Dinkey/PS_Dinkey.Build.cs
Normal file
23
Unreal/PS_Dinkey/Source/PS_Dinkey/PS_Dinkey.Build.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
using UnrealBuildTool;
|
||||
|
||||
public class PS_Dinkey : ModuleRules
|
||||
{
|
||||
public PS_Dinkey(ReadOnlyTargetRules Target) : base(Target)
|
||||
{
|
||||
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput" });
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(new string[] { });
|
||||
|
||||
// Uncomment if you are using Slate UI
|
||||
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
|
||||
|
||||
// Uncomment if you are using online features
|
||||
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
|
||||
|
||||
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
|
||||
}
|
||||
}
|
||||
6
Unreal/PS_Dinkey/Source/PS_Dinkey/PS_Dinkey.cpp
Normal file
6
Unreal/PS_Dinkey/Source/PS_Dinkey/PS_Dinkey.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "PS_Dinkey.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, PS_Dinkey, "PS_Dinkey" );
|
||||
6
Unreal/PS_Dinkey/Source/PS_Dinkey/PS_Dinkey.h
Normal file
6
Unreal/PS_Dinkey/Source/PS_Dinkey/PS_Dinkey.h
Normal file
@@ -0,0 +1,6 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
|
||||
15
Unreal/PS_Dinkey/Source/PS_DinkeyEditor.Target.cs
Normal file
15
Unreal/PS_Dinkey/Source/PS_DinkeyEditor.Target.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
using UnrealBuildTool;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class PS_DinkeyEditorTarget : TargetRules
|
||||
{
|
||||
public PS_DinkeyEditorTarget( TargetInfo Target) : base(Target)
|
||||
{
|
||||
Type = TargetType.Editor;
|
||||
DefaultBuildSettings = BuildSettingsVersion.V5;
|
||||
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_5;
|
||||
ExtraModuleNames.Add("PS_Dinkey");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user