Skip to content

Commit

Permalink
support UE5
Browse files Browse the repository at this point in the history
  • Loading branch information
hxhb committed Nov 7, 2021
1 parent a7b9f7d commit 1bf11ef
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 46 deletions.
6 changes: 3 additions & 3 deletions PullBinaries.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@echo off
set PROJECT_NAME=UE4Launcher
md %PROJECT_NAME%\Engine\Binaries\Win64
md %PROJECT_NAME%\Engine\Content\Internationalization\icudt53l
md %PROJECT_NAME%\Engine\Content\Internationalization\icudt64l
md %PROJECT_NAME%\Engine\Content\Slate
md %PROJECT_NAME%\Engine\Shaders\StandaloneRenderer
copy ..\..\..\Binaries\Win64\%PROJECT_NAME%.exe %PROJECT_NAME%\Engine\Binaries\Win64
copy ..\..\..\Binaries\Win64\%PROJECT_NAME%*.exe %PROJECT_NAME%\Engine\Binaries\Win64
copy Register.reg %PROJECT_NAME%\
copy UnRegister.reg %PROJECT_NAME%\
xcopy /y/i/s/e ..\..\..\Content\Internationalization\English\icudt53l %PROJECT_NAME%\Engine\Content\Internationalization\icudt53l
xcopy /y/i/s/e ..\..\..\Content\Internationalization\English\icudt64l %PROJECT_NAME%\Engine\Content\Internationalization\icudt64l
xcopy /y/i/s/e ..\..\..\Content\Slate %PROJECT_NAME%\Engine\Content\Slate
xcopy /y/i/s/e ..\..\..\Shaders\StandaloneRenderer %PROJECT_NAME%\Engine\Shaders\StandaloneRenderer
copy Resources\icon.ico %PROJECT_NAME%\Engine\Content\Slate\Icons
Expand Down
Binary file modified Resources/Resource.aps
Binary file not shown.
40 changes: 20 additions & 20 deletions Resources/VersionResource.inl
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,26 @@ END
//
// Application Manifest
//

#if _DEBUG

// Debug manifest
#if _WIN64
1 RT_MANIFEST "../../../Runtime/Launch/Resources/Windows/Debug-PCLaunch-Win64.manifest"
#else
1 RT_MANIFEST "../../../Runtime/Launch/Resources/Windows/Debug-PCLaunch-Win32.manifest"
#endif

#else

// Release manifest
#if _WIN64
1 RT_MANIFEST "../../../Runtime/Launch/Resources/Windows/PCLaunch-Win64.manifest"
#else
1 RT_MANIFEST "../../../Runtime/Launch/Resources/Windows/PCLaunch-Win32.manifest"
#endif

#endif
//
//#if _DEBUG
//
//// Debug manifest
//#if _WIN64
//1 RT_MANIFEST "../../../Runtime/Launch/Resources/Windows/Debug-PCLaunch-Win64.manifest"
//#else
//1 RT_MANIFEST "../../../Runtime/Launch/Resources/Windows/Debug-PCLaunch-Win32.manifest"
//#endif
//
//#else
//
//// Release manifest
//#if _WIN64
//1 RT_MANIFEST "../../../Runtime/Launch/Resources/Windows/PCLaunch-Win64.manifest"
//#else
//1 RT_MANIFEST "../../../Runtime/Launch/Resources/Windows/PCLaunch-Win32.manifest"
//#endif
//
//#endif

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
Expand Down
2 changes: 1 addition & 1 deletion Source/Private/SlateWidget/SCombBoxWarper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TSharedRef<SWidget> SCombBoxWarper::HandleGenerateWidget(TSharedPtr<FString> InI

FText SCombBoxWarper::HandleSelectionChangeText() const
{
return CurrentSelectedItem.IsValid() ? FText::FromString(*CurrentSelectedItem) : FText::FromString(TEXT("AAAAAAAAAAAAAAAAAAAA"));
return CurrentSelectedItem.IsValid() ? FText::FromString(*CurrentSelectedItem) : FText::FromString(TEXT("Not found any engine"));
}

void SCombBoxWarper::UpdateSelector(const TArray<FString>& pSelectorList,const FString& pSelectedItem)
Expand Down
22 changes: 11 additions & 11 deletions Source/Private/SlateWidget/SConfPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void SConfPanel::Construct(const FArguments& InArgs)
.HAlign(HAlign_Center)
[
SNew(SHyperlink)
.Text(LOCTEXT("Developer", "Developed by imzlp.me"))
.Text(LOCTEXT("Developer", "Developed by lipengzha"))
.OnNavigate(this, &SConfPanel::HyLinkClickEventOpenDeveloperWebsite)
]
]
Expand Down Expand Up @@ -342,7 +342,7 @@ void SConfPanel::Construct(const FArguments& InArgs)

void SConfPanel::HyLinkClickEventOpenDeveloperWebsite()
{
FPlatformProcess::LaunchURL(TEXT("https://imzlp.me"), NULL, NULL);
FPlatformProcess::LaunchURL(TEXT("https://imzlp.com"), NULL, NULL);
}


Expand Down Expand Up @@ -712,15 +712,15 @@ void SConfPanel::UpdateOpenProjectSlnButton(const FString& SelectedProjectPath)
}
}

TSharedRef<SWidget> MakeWidgetUELauncher()
{
extern TOptional<FSlateRenderTransform> GetTestRenderTransform();
extern FVector2D GetTestRenderTransformPivot();
return
SNew(SConfPanel)
.RenderTransform_Static(&GetTestRenderTransform)
.RenderTransformPivot_Static(&GetTestRenderTransformPivot);
}
// TSharedRef<SWidget> MakeWidgetUELauncher()
// {
// extern TOptional<FSlateRenderTransform> GetTestRenderTransform();
// extern FVector2D GetTestRenderTransformPivot();
// return
// SNew(SConfPanel)
// .RenderTransform_Static(&GetTestRenderTransform)
// .RenderTransformPivot_Static(&GetTestRenderTransformPivot);
// }
END_SLATE_FUNCTION_BUILD_OPTIMIZATION

#undef LOCTEXT_NAMESPACE
15 changes: 12 additions & 3 deletions Source/Private/Tools/EngineLaunchTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "Tools/SerializationTools.h"
#include <shellapi.h>
#include "Misc/FileHelper.h"
#include <winreg.h>

bool EngineLaunchTools::EngineLauncher(const FLaunchConf& conf)
{
Expand Down Expand Up @@ -167,8 +168,8 @@ TArray<FToolInfo> EngineLaunchTools::GetToolsInfoList()
else
{
TArray<FToolInfo> DefaultTools{
{ TEXT("UE4Editor"), TEXT(""), TEXT("Engine/Binaries/Win64") },
{ TEXT("UE4Editor-cmd"),TEXT(""),TEXT("Engine/Binaries/Win64") },
{ TEXT("Editor"), TEXT(""), TEXT("Engine/Binaries/Win64") },
{ TEXT("Editor-cmd"),TEXT(""),TEXT("Engine/Binaries/Win64") },
{ TEXT("UnrealFrontend"),TEXT(""),TEXT("Engine/Binaries/Win64") },
{ TEXT("NetworkProfiler"),TEXT(""),TEXT("Engine/Binaries/DotNET") }
};
Expand Down Expand Up @@ -210,7 +211,15 @@ FString EngineLaunchTools::GetToolBinPath(const FLaunchConf& conf)
#define PLATFROM_EXECUTABLE_FORMAT TEXT(".exe")
FString resault(TEXT(""));
FToolInfo ToolInfo = EngineLaunchTools::GetToolInfo(conf.Tool);
resault = FPaths::Combine(conf.Engine, ToolInfo.BinPath, ToolInfo.ToolName + PLATFROM_EXECUTABLE_FORMAT);
if (ToolInfo.ToolName.Equals(TEXT("Editor"),ESearchCase::IgnoreCase) || ToolInfo.ToolName.Equals(TEXT("Editor-cmd"), ESearchCase::IgnoreCase))
{
resault = FPaths::Combine(conf.Engine, ToolInfo.BinPath, TEXT("UE4")+ToolInfo.ToolName + PLATFROM_EXECUTABLE_FORMAT);
if (!FPaths::FileExists(resault))
{
resault = FPaths::Combine(conf.Engine, ToolInfo.BinPath, TEXT("Unreal") + ToolInfo.ToolName + PLATFROM_EXECUTABLE_FORMAT);
}
}

#undef PLATFROM_EXECUTABLE_FORMAT
return resault;
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Private/Windows/WindowsMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <shellapi.h>

int WinMain(
_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ HINSTANCE hInInstance,
_In_opt_ HINSTANCE hInPrevInstance,
_In_ LPSTR lpCmdLine,
_In_ int nShowCmd
)
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/SlateWidget/SConfPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SEditableBoxWraper;
class SConfPanel;

/** @return a new Drag and Drop test widget */
TSharedRef<SWidget> MakeWidgetUELauncher();
// TSharedRef<SWidget> MakeWidgetUELauncher();

DECLARE_DELEGATE_OneParam(FOnOpendFile, const FString&)

Expand Down
3 changes: 2 additions & 1 deletion Source/Public/Tools/EngineLaunchTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

#include "Containers/Array.h"
#include "Data/FLaunchConf.h"

#include <winreg.h>
#include "UnrealString.h"
struct FToolInfo
{
FToolInfo() = default;
Expand Down
3 changes: 2 additions & 1 deletion UE4Launcher.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public UE4Launcher(ReadOnlyTargetRules Target) : base(Target)
"SlateReflector",
"StandaloneRenderer",
"WebBrowser",
"SourceCodeAccess"
"SourceCodeAccess",
"OpenGL"
}
);
PrivateIncludePathModuleNames.AddRange(
Expand Down
6 changes: 3 additions & 3 deletions UE4Launcher.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public UE4LauncherTarget(TargetInfo Target) : base(Target)
LinkType = TargetLinkType.Monolithic;
LaunchModuleName = "UE4Launcher";
ExtraModuleNames.Add("EditorStyle");

// Lean and mean
bCompileLeanAndMeanUE = true;
DefaultBuildSettings = BuildSettingsVersion.V1;
// Lean and mean
bCompileLeanAndMeanUE = true;

// No editor or editor-only data is needed
bBuildEditor = false;
Expand Down

0 comments on commit 1bf11ef

Please sign in to comment.