Skip to content

Commit

Permalink
2023.3
Browse files Browse the repository at this point in the history
* EGS authentication is now supported
* ModioCreateModLibrary members are now public
* New "Getting Started" screen added with links to Discord, documentation and more
* NativeSDK updated
  • Loading branch information
stephenwhittle committed Mar 31, 2023
1 parent 86dfc83 commit 0695a86
Show file tree
Hide file tree
Showing 45 changed files with 620 additions and 56 deletions.
Binary file modified Content/GettingStarted/OnboardingGuideWidget.uasset
Binary file not shown.
Binary file added Content/GettingStarted/T_api_D.uasset
Binary file not shown.
Binary file added Content/GettingStarted/T_cog_D.uasset
Binary file not shown.
Binary file added Content/GettingStarted/T_discord_D.uasset
Binary file not shown.
Binary file added Content/GettingStarted/T_documentation_D.uasset
Binary file not shown.
Binary file added Content/GettingStarted/T_github_D.uasset
Binary file not shown.
Binary file added Content/GettingStarted/T_modbrowser_D.uasset
Binary file not shown.
Binary file added Content/GettingStarted/T_tutorials_D.uasset
Binary file not shown.
Binary file added Content/Tutorials/ModioAsyncCalls.uasset
Binary file not shown.
Binary file added Content/Tutorials/ModioBrowsingMods.uasset
Binary file not shown.
Binary file not shown.
Binary file added Content/Tutorials/ModioInitialization.uasset
Binary file not shown.
Binary file added Content/Tutorials/ModioModManagement.uasset
Binary file not shown.
Binary file added Content/Tutorials/TutorialBP.uasset
Binary file not shown.
332 changes: 285 additions & 47 deletions Doc/documentation.html

Large diffs are not rendered by default.

Binary file added Doc/img/nd_img_HideModBrowserUI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_RoundNumberString.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_SetChangelogString.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_SetDescription.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_SetHomepageURL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_SetInitialVisibility.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_SetMarkAsActiveRelease.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_SetMetadataBlob.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_SetModFileMetadataBlob.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_SetModfilePlatforms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_SetVersionString.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_ShowErrorDialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions Modio.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
"WhitelistPlatforms": [
"Linux"
]
},
{
"Name": "ModioEditor",
"Type": "Editor",
"LoadingPhase": "PostEngineInit"
}
],
"LocalizationTargets": [
Expand Down
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ To begin using the Plugin, either from Blueprint or from C++, please read our li
* link:Doc/getting-started.adoc#plugin-quick-start-browsing-available-mods[Mod Browsing]
* link:Doc/getting-started.adoc#plugin-quick-start-mod-subscriptions-and-management[Mod Subscription Management]

== Example Projects
== Sample

We provide an example Blueprint implementation of the plugin in a simple demonstration project. You can find the example project https://github.com/modio/modio-ue4-sample[here].
A UE4.26 and UE4.27-compatible sample is available at link:https://go.mod.io/ue-samples[this location].

== Large studios and Publishers
A private white label option is available to license, if you want a fully featured mod-platform that you can control and host in-house. mailto:developers@mod.io[Contact us,Whitelabel Inquiry] to discuss.
Expand Down
3 changes: 2 additions & 1 deletion Source/MSDFSupportEditor/MSDFSupportEditor.build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ public void CopyCommonGeneratedHeaders(string GeneratedHeaderPath)
foreach (string HeaderFile in HeaderFiles)
{
//Add the original file in our upstream repository as a dependency, so if a user edits it we will copy it over
ExternalDependencies.Add(HeaderFile);
//Causes spurious rebuilds for some reason, disabling the dependency for now
//ExternalDependencies.Add(HeaderFile);
//Preserve subdirectory structure (msdfgen includes headers via relative paths in a few places, grumble grumble)
string RelativeDestinationPath = HeaderFile.Replace(Path.Combine(ModuleDirectory, "../ThirdParty/msdfgen/"), "");
string DestinationPath = Path.Combine(GeneratedHeaderPath, RelativeDestinationPath);
Expand Down
5 changes: 5 additions & 0 deletions Source/Modio/Private/Internal/Convert/AuthParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ FORCEINLINE Modio::AuthenticationProvider ToModio(EModioAuthenticationProvider P
return Modio::AuthenticationProvider::Discord;
case EModioAuthenticationProvider::PSN:
return Modio::AuthenticationProvider::PSN;
case EModioAuthenticationProvider::Epic:
return Modio::AuthenticationProvider::Epic;
case EModioAuthenticationProvider::Oculus:
return Modio::AuthenticationProvider::Oculus;
}

return Modio::AuthenticationProvider::Steam;
Expand All @@ -53,6 +57,7 @@ FORCEINLINE Modio::AuthenticationParams ToModio(const FModioAuthenticationParams
? Modio::Optional<std::string>(ToModio(UnrealParams.UserEmail))
: Modio::Optional<std::string>();
Params.bUserHasAcceptedTerms = UnrealParams.bUserHasAcceptedTerms;
Params.ExtendedParameters = ToModio(UnrealParams.ExtendedParameters);

return Params;
}
10 changes: 10 additions & 0 deletions Source/Modio/Private/Internal/ModioConvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ std::vector<std::string> ToModio(const TArray<FString>& StringArray)
return Result;
}

std::map<std::string, std::string> ToModio(const TMap<FString, FString>& StringMap)
{
std::map<std::string, std::string> Result;
for (const TPair<FString, FString>& It : StringMap)
{
Result.emplace(std::make_pair(ToModio(It.Key), ToModio(It.Value)));
}
return Result;
}

std::chrono::system_clock::time_point ToModioDateTime(FDateTime Time)
{
return std::chrono::system_clock::time_point(std::chrono::system_clock::duration(Time.ToUnixTimestamp()));
Expand Down
1 change: 1 addition & 0 deletions Source/Modio/Private/Internal/ModioConvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct FModioUnsigned64 ToUnreal(const Modio::FileSize& In);

std::string ToModio(const FString& String);
std::vector<std::string> ToModio(const TArray<FString>& StringArray);
std::map<std::string, std::string> ToModio(const TMap<FString, FString>& StringMap);
std::chrono::system_clock::time_point ToModioDateTime(FDateTime Time);
Modio::ApiKey ToModio(const FModioApiKey& In);
Modio::EmailAddress ToModio(const FModioEmailAddress& In);
Expand Down
4 changes: 2 additions & 2 deletions Source/Modio/Public/Libraries/ModioCreateModLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ UCLASS()
class MODIO_API UModioCreateModLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()

public:
UFUNCTION(BlueprintCallable, Category = "mod.io|Create Mod Params")
static void SetInitialVisibility(UPARAM(ref) FModioCreateModParams& In, bool InitialVisibility);

Expand Down Expand Up @@ -55,5 +55,5 @@ class MODIO_API UModioCreateModLibrary : public UBlueprintFunctionLibrary

UFUNCTION(BlueprintCallable, Category = "mod.io|Create Mod File Params")
static void SetModfilePlatforms(UPARAM(ref) FModioCreateModFileParams& In,
UPARAM(ref) TArray<EModioModfilePlatform>& Platforms);
UPARAM(ref) TArray<EModioModfilePlatform>& Platforms);
};
10 changes: 9 additions & 1 deletion Source/Modio/Public/Types/ModioAuthenticationParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ enum class EModioAuthenticationProvider : uint8
Itch,
Switch,
Discord,
PSN
PSN,
Epic,
Oculus
};

/** @brief Simple struct to encapsulate data passed to external authentication systems */
Expand All @@ -51,4 +53,10 @@ struct MODIO_API FModioAuthenticationParams
**/
UPROPERTY(BlueprintReadWrite, EditInstanceOnly, Category = "mod.io|Authentication")
bool bUserHasAcceptedTerms = false;

/**
* Stored property of extended parameters required by some providers.
**/
UPROPERTY(BlueprintReadWrite, EditInstanceOnly, Category = "mod.io|Authentication")
TMap<FString, FString> ExtendedParameters;
};
25 changes: 25 additions & 0 deletions Source/ModioEditor/ModioEditor.build.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (C) 2021 mod.io Pty Ltd. <https://mod.io>
*
* This file is part of the mod.io UE4 Plugin.
*
* Distributed under the MIT License. (See accompanying file LICENSE or
* view online at <https://github.com/modio/modio-ue4/blob/main/LICENSE>)
*
*/

using UnrealBuildTool;
using System.IO;

public class ModioEditor : ModuleRules
{
public ModioEditor(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "UnrealEd", "Blutility", "LevelEditor", "UMGEditor", "UMG", "MainFrame"});

PublicIncludePaths.AddRange(new string[] { Path.Combine(ModuleDirectory, "Public") });
PrivateIncludePaths.AddRange(new string[] { Path.Combine(ModuleDirectory, "Private") });
}
}
76 changes: 76 additions & 0 deletions Source/ModioEditor/Private/ModioEditor.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#include "ModioEditor.h"
#include "ModioEditorSettings.h"

#if WITH_EDITOR
#include "ISettingsModule.h"
#include "Modules/ModuleManager.h"
#include "EditorUtilityWidgetBlueprint.h"
#include "Editor.h"
#include "Interfaces/IMainFrameModule.h"
#include "EditorUtilitySubsystem.h"
#endif

DEFINE_LOG_CATEGORY(ModioEditor);

#define LOCTEXT_NAMESPACE "FModioEditor"

void FModioEditor::StartupModule()
{
#if WITH_EDITOR
if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
{
SettingsModule->RegisterSettings(
"Project", "Plugins", "mod.io Editor", LOCTEXT("EditorSettingsName", "mod.io Editor"),
LOCTEXT("EditorSettingsDescription", "Configure the mod.io plugin's editor-specific behaviour"),
GetMutableDefault<UModioEditorSettings>());
}
if (GetMutableDefault<UModioEditorSettings>()->bShowGettingStartedOnStartup)
{
IMainFrameModule& MainFrameModule = IMainFrameModule::Get();
if (MainFrameModule.IsWindowInitialized())
{
DisplayGettingStarted();
}
else
{
MainFrameModule.OnMainFrameCreationFinished().AddStatic(&FModioEditor::DisplayGettingStarted_PostMainFrame);
}
}
#endif
}

void FModioEditor::ShutdownModule()
{
#if WITH_EDITOR
if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
{
SettingsModule->UnregisterSettings("Project", "Plugins", "mod.io Editor");
}
#endif // WITH_EDITOR
}

void FModioEditor::DisplayGettingStarted_PostMainFrame(TSharedPtr<SWindow>, bool)
{
DisplayGettingStarted();
}

void FModioEditor::DisplayGettingStarted()
{
#if WITH_EDITOR

UEditorUtilityWidgetBlueprint* Blueprint =
GetMutableDefault<UModioEditorSettings>()->GettingStartedWidget.LoadSynchronous();

if (Blueprint)
{
if (UEditorUtilitySubsystem* Subsystem = GEditor->GetEditorSubsystem<UEditorUtilitySubsystem>())
{
Subsystem->SpawnAndRegisterTab(Blueprint);
}
}
#endif
}

#undef LOCTEXT_NAMESPACE

IMPLEMENT_MODULE(FModioEditor, ModioEditor)
17 changes: 17 additions & 0 deletions Source/ModioEditor/Private/ModioEditorSettings.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (C) 2021 mod.io Pty Ltd. <https://mod.io>
*
* This file is part of the mod.io UE4 Plugin.
*
* Distributed under the MIT License. (See accompanying file LICENSE or
* view online at <https://github.com/modio/modio-ue4/blob/main/LICENSE>)
*
*/

#include "ModioEditorSettings.h"

UModioEditorSettings::UModioEditorSettings(const FObjectInitializer& Initializer) : Super(Initializer)
{
GettingStartedWidget = TSoftObjectPtr<UEditorUtilityWidgetBlueprint>(
FSoftObjectPath("/Modio/GettingStarted/OnboardingGuideWidget.OnboardingGuideWidget"));
}
50 changes: 50 additions & 0 deletions Source/ModioEditor/Private/ModioEditorUtilityFunctions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "ModioEditorUtilityFunctions.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "CoreGlobals.h"
#include "Editor.h"
#include "Modules/ModuleManager.h"
#include "Templates/UnrealTemplate.h"
#include "ModioEditorSettings.h"
#include "LevelEditor.h"

void UModioEditorUtilityFunctions::SelectAssetsInContentBrowser(const TArray<FString>& AssetPaths)
{
TGuardValue<bool> UnattendedScriptGuard(GIsRunningUnattendedScript, true);

if (GEditor)
{
TArray<FAssetData> Assets;
for (const FString& AssetPath : AssetPaths)
{
FString FailureReason;
FAssetRegistryModule& AssetRegistryModule =
FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry");
FAssetData Asset = AssetRegistryModule.Get().GetAssetByObjectPath(*AssetPath);
if (Asset.IsValid())
{
Assets.Add(Asset);
}
}
if (Assets.Num() > 0)
{
GEditor->SyncBrowserToObjects(Assets);
}
}
}

void UModioEditorUtilityFunctions::SetDisplayGettingStartedWidgetOnStartup(bool bNewValue)
{
if (UModioEditorSettings* EditorSettings = GetMutableDefault<UModioEditorSettings>())
{
EditorSettings->bShowGettingStartedOnStartup = bNewValue;
EditorSettings->SaveConfig();
}
}

void UModioEditorUtilityFunctions::OpenTutorialBrowser()
{
FLevelEditorModule& LevelEditorModule = FModuleManager::GetModuleChecked<FLevelEditorModule>(TEXT("LevelEditor"));
LevelEditorModule.GetLevelEditorTabManager()->TryInvokeTab(FTabId("TutorialsBrowser"));
}
21 changes: 21 additions & 0 deletions Source/ModioEditor/Public/ModioEditor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once
#include "Widgets/SWindow.h"
#include "Templates/SharedPointer.h"

#include "Modules/ModuleManager.h"

DECLARE_LOG_CATEGORY_EXTERN(ModioEditor, All, All);

class FModioEditor : public IModuleInterface
{
public:

/* Called when the module is loaded */
virtual void StartupModule() override;

/* Called when the module is unloaded */
virtual void ShutdownModule() override;
static void DisplayGettingStarted_PostMainFrame(TSharedPtr<SWindow>, bool);

static void DisplayGettingStarted();
};
28 changes: 28 additions & 0 deletions Source/ModioEditor/Public/ModioEditorSettings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (C) 2021 mod.io Pty Ltd. <https://mod.io>
*
* This file is part of the mod.io UE4 Plugin.
*
* Distributed under the MIT License. (See accompanying file LICENSE or
* view online at <https://github.com/modio/modio-ue4/blob/main/LICENSE>)
*
*/

#pragma once

#include "ModioEditorSettings.generated.h"

UCLASS(Config = Editor, defaultconfig)
class UModioEditorSettings : public UObject
{
GENERATED_BODY()
public:
UModioEditorSettings(const FObjectInitializer& Initializer);

UPROPERTY(BlueprintReadOnly, EditAnywhere, Config, Category = "modio Editor")
bool bShowGettingStartedOnStartup = true;

UPROPERTY(BlueprintReadOnly, EditAnywhere, Config, Category = "modio Editor")
TSoftObjectPtr<class UEditorUtilityWidgetBlueprint> GettingStartedWidget;
};

25 changes: 25 additions & 0 deletions Source/ModioEditor/Public/ModioEditorUtilityFunctions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "EditorUtilityLibrary.h"
#include "ModioEditorUtilityFunctions.generated.h"

/**
*
*/
UCLASS()
class MODIOEDITOR_API UModioEditorUtilityFunctions : public UEditorUtilityLibrary
{
GENERATED_BODY()

UFUNCTION(BlueprintCallable, Category = "Modio|EditorUtilities")
static void SelectAssetsInContentBrowser(const TArray<FString>& AssetPaths);

UFUNCTION(BlueprintCallable, Category = "Modio|EditorUtilities")
static void SetDisplayGettingStartedWidgetOnStartup(bool bNewValue);

UFUNCTION(BlueprintCallable, Category = "Modio|EditorUtilities")
static void OpenTutorialBrowser();
};
2 changes: 1 addition & 1 deletion Source/ThirdParty/NativeSDK
Submodule NativeSDK updated 61 files
+1 −1 .modio
+1 −1 CMakeLists.txt
+1 −1 doc/getting-started.adoc
+917 −508 doc/modio_sdk_documentation.html
+166 −0 examples/01_Initialization.cpp
+396 −0 examples/02_ModQueries.cpp
+241 −0 examples/03_Authentication.cpp
+502 −0 examples/04_SubscriptionManagement.cpp
+403 −0 examples/05_ForceUninstall.cpp
+153 −0 examples/06_ReportMod.cpp
+35 −0 examples/CMakeLists.txt
+1 −1 ext/asio
+6 −3 modio/CMakeLists.txt
+9 −1 modio/modio/core/ModioCoreTypes.h
+11 −0 modio/modio/core/ModioDefaultRequestParameters.h
+27 −1 modio/modio/core/ModioErrorCode.h
+2 −0 modio/modio/core/ModioErrorCondition.h
+3 −1 modio/modio/core/ModioLogEnum.h
+3 −0 modio/modio/core/ModioModCollectionEntry.ipp
+122 −0 modio/modio/core/entities/ModioToken.h
+4 −0 modio/modio/core/entities/ModioUser.h
+10 −2 modio/modio/detail/FilesystemWrapper.h
+18 −10 modio/modio/detail/FmtWrapper.h
+9 −1 modio/modio/detail/HedleyWrapper.h
+4 −0 modio/modio/detail/ModioConstants.h
+24 −0 modio/modio/detail/ModioExtInitParamStub.h
+7 −0 modio/modio/detail/ModioOperationQueue.h
+8 −1 modio/modio/detail/ModioSDKSessionData.ipp
+1 −1 modio/modio/detail/compression/zip/ZipStructures.h
+14 −14 modio/modio/detail/compression/zlib/detail/inflate_stream.ipp
+9 −0 modio/modio/detail/ops/DownloadFileOp.h
+11 −0 modio/modio/detail/ops/ServiceInitializationOp.h
+18 −20 modio/modio/detail/ops/auth/AuthenticateUserByEpic.h
+39 −0 modio/modio/detail/ops/auth/AuthenticateUserByOculus.h
+10 −1 modio/modio/detail/ops/auth/AuthenticateUserByPSN.h
+7 −0 modio/modio/detail/ops/compression/CompressFolderOp.h
+11 −2 modio/modio/detail/ops/compression/ExtractAllToFolderOp.h
+7 −0 modio/modio/detail/ops/compression/ExtractEntryDeflateOp.h
+7 −0 modio/modio/detail/ops/compression/ExtractEntryStoreOp.h
+8 −0 modio/modio/detail/ops/compression/zip/AddFileEntryOp.h
+13 −0 modio/modio/detail/ops/compression/zip/FinalizeArchiveOp.h
+22 −4 modio/modio/detail/ops/mod/SubmitModChangesOp.h
+8 −4 modio/modio/detail/ops/mod/SubmitNewModOp.h
+10 −0 modio/modio/detail/ops/modmanagement/InstallOrUpdateMod.h
+1 −1 modio/modio/detail/ops/modmanagement/UninstallMod.h
+8 −0 modio/modio/detail/ops/upload/UploadFileOp.h
+7 −0 modio/modio/detail/ops/upload/UploadFilePartOp.h
+7 −1 modio/modio/detail/ops/upload/UploadMultipartFileOp.h
+2 −0 modio/modio/detail/userdata/ModioUserDataContainer.ipp
+1 −100 modio/modio/detail/userdata/ModioUserProfile.h
+2 −2 modio/modio/http/ModioHttpParams.h
+3 −2 modio/modio/http/ModioHttpParams.ipp
+3 −2 modio/modio/impl/SDKModManagement.ipp
+46 −0 modio/modio/impl/SDKPreconditionChecks.h
+15 −1 modio/modio/impl/SDKUserData.ipp
+7 −0 platform/linux/linux/linux/detail/ops/http/ReadSomeResponseBodyOp.h
+6 −3 platform/linux/ueplatform.json
+4 −2 platform/macos/ueplatform.json
+0 −1 platform/ms-common/CMakeLists.txt
+2 −0 platform/ms-common/include/common/HttpCallback.h
+4 −2 platform/win32/ueplatform.json
Loading

0 comments on commit 0695a86

Please sign in to comment.