Skip to content

Commit

Permalink
Fix bug in the make_uproject_cpp script.
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuwch committed May 24, 2017
1 parent e166b1f commit 67dfd80
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions docs/make_uproject_cpp.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
# Convert a blueprint only project to a cpp project by
# Convert a blueprint only project to a cpp project by
# adding some empty cpp code to fool the checking code
uproject=`ls *.uproject`

# Make sure I am in a uproject folder
echo ${uproject}
if [ ! -z ${uproject} ]; then
echo Make a folder called Source
mkdir -p Source
if [ -z ${uproject} ]; then
exit
fi

build_rule="using UnrealBuildTool; public class dummyTarget : TargetRules { public dummyTarget(TargetInfo Target) { } }"
echo ${build_rule} > Source/dummy.Target.cs
echo Make a folder called Source
mkdir -p Source/playground

game_target='using UnrealBuildTool; public class playgroundTarget : TargetRules { public playgroundTarget(TargetInfo Target) { Type = TargetType.Game; }}'
echo ${game_target} > Source/playground.Target.cs

editor_target='using UnrealBuildTool; public class playgroundEditorTarget : TargetRules { public playgroundEditorTarget(TargetInfo Target) { Type = TargetType.Editor; }}'
echo ${editor_target} > Source/playgroundEditor.Target.cs

build_rule='using UnrealBuildTool; public class playground : ModuleRules { public playground(TargetInfo Target) { PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore"}); }}'
echo ${build_rule} > Source/playground/playground.Build.cs

playground_entry_code='#include "EngineMinimal.h"
#include "playground.h"
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, playground, "playground" );'
echo ${playground_entry_code} > Source/playground/playground.cpp

0 comments on commit 67dfd80

Please sign in to comment.