2015-09-01 12:27:21 -04:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "BlueprintNativeCodeGenPCH.h"
|
|
|
|
|
#include "GenerateBlueprintCodeModuleCommandlet.h"
|
|
|
|
|
#include "NativeCodeGenCommandlineParams.h"
|
|
|
|
|
#include "BlueprintNativeCodeGenCoordinator.h"
|
2015-09-04 13:35:03 -04:00
|
|
|
#include "BlueprintNativeCodeGenUtils.h"
|
2015-09-18 14:01:11 -04:00
|
|
|
#include "BlueprintNativeCodeGenManifest.h"
|
|
|
|
|
#include "FileManager.h"
|
2015-09-01 12:27:21 -04:00
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
|
* GenerateBlueprintCodeModuleImpl
|
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
|
|
namespace GenerateBlueprintCodeModuleImpl
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
|
* UGenerateBlueprintCodeModuleCommandlet
|
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
UGenerateBlueprintCodeModuleCommandlet::UGenerateBlueprintCodeModuleCommandlet(FObjectInitializer const& ObjectInitializer)
|
|
|
|
|
: Super(ObjectInitializer)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
int32 UGenerateBlueprintCodeModuleCommandlet::Main(FString const& Params)
|
|
|
|
|
{
|
|
|
|
|
TArray<FString> Tokens, Switches;
|
|
|
|
|
ParseCommandLine(*Params, Tokens, Switches);
|
|
|
|
|
|
|
|
|
|
FNativeCodeGenCommandlineParams CommandlineParams(Switches);
|
|
|
|
|
|
|
|
|
|
if (CommandlineParams.bHelpRequested)
|
|
|
|
|
{
|
|
|
|
|
UE_LOG(LogBlueprintCodeGen, Display, TEXT("%s"), *FNativeCodeGenCommandlineParams::HelpMessage);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-09 18:51:40 -04:00
|
|
|
FBlueprintNativeCodeGenUtils::FScopedFeedbackContext ScopedErrorTracker;
|
|
|
|
|
{
|
2015-09-18 14:01:11 -04:00
|
|
|
FBlueprintNativeCodeGenUtils::GenerateCodeModule(CommandlineParams);
|
2015-09-09 18:51:40 -04:00
|
|
|
}
|
|
|
|
|
return ScopedErrorTracker.HasErrors();
|
2015-09-01 12:27:21 -04:00
|
|
|
}
|
|
|
|
|
|