This repository was archived by the owner on Sep 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathPackagingRobot.sh
More file actions
97 lines (67 loc) · 3.15 KB
/
PackagingRobot.sh
File metadata and controls
97 lines (67 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
GameName=`basename $PWD`
MyPackPath="${GameName}Robot"
GamePath="$MyPackPath/$GameName"
GameBinariesPath="$GamePath/Binaries"
GameBinariesLinuxPath="$GameBinariesPath/Linux"
GameConfigPath="$GamePath/Config"
GameContentPath="$GamePath/Content"
GameDerivedDataCachePath="$GamePath/DerivedDataCache"
UnrealEnginePath="$MyPackPath/UnrealEngine"
InnerEnginePath="$UnrealEnginePath/Engine"
EngineBinariesPath="$InnerEnginePath/Binaries"
EngineBinariesLinuxPath="$EngineBinariesPath/Linux"
EngineBinariesThirdPartyPath="$EngineBinariesPath/ThirdParty"
EngineConfigPath="$InnerEnginePath/Config"
EngineContentPath="$InnerEnginePath/Content"
EngineDerivedDataCachePath="$InnerEnginePath/DerivedDataCache"
EnginePluginsPath="$InnerEnginePath/Plugins"
EngineSavedPath="$InnerEnginePath/Saved"
EngineShadersPath="$InnerEnginePath/Shaders"
#To create Robot dir
if [ ! -d "$MyPackPath" ]; then
mkdir "$MyPackPath"
else
echo "The '$MyPackPath' dir has already exist!"
#exit 1
rm -rf $MyPackPath
mkdir $MyPackPath
fi
mkdir $GamePath $GameBinariesPath $GameBinariesLinuxPath $GameConfigPath $GameContentPath $GameDerivedDataCachePath
mkdir $UnrealEnginePath $InnerEnginePath $EngineBinariesPath $EngineBinariesLinuxPath $EngineBinariesThirdPartyPath
mkdir $EngineConfigPath $EngineContentPath $EngineDerivedDataCachePath $EnginePluginsPath $EngineSavedPath $EngineShadersPath
#To deal with Game project files
#copy .uproject file
cp ./*.uproject $GamePath
#copy Game Logic *.so files
cp -av ./Binaries/Linux/*.so $GameBinariesLinuxPath
#copy config files
cp -av ./Config/* $GameConfigPath
#copy Content files and remove the Paks file
cp -avr ./Saved/Cooked/LinuxNoEditor/$GameName/Content $GamePath
#copy all DerivedDataCache files
cp -avr ./DerivedDataCache $GamePath
#To deal with Unreal Engine files
#copy Engine Binaries files
OrientUnrealEngine="../UnrealEngine/Engine"
cp -avr $OrientUnrealEngine/Binaries/Linux/Linux $EngineBinariesLinuxPath
cp -av $OrientUnrealEngine/Binaries/Linux/libUE4Editor-*.so $EngineBinariesLinuxPath
cp -av $OrientUnrealEngine/Binaries/Linux/libmcpp.* $EngineBinariesLinuxPath
cp -av $OrientUnrealEngine/Binaries/Linux/libnv* $EngineBinariesLinuxPath
cp -av $OrientUnrealEngine/Binaries/Linux/libopenal.* $EngineBinariesLinuxPath
cp -av $OrientUnrealEngine/Binaries/Linux/lib.* $EngineBinariesLinuxPath
cp -av $OrientUnrealEngine/Binaries/Linux/UE4Editor $EngineBinariesLinuxPath
cp -avr $OrientUnrealEngine/Binaries/ThirdParty/ICU $EngineBinariesThirdPartyPath
cp -avr $OrientUnrealEngine/Config $InnerEnginePath
cp -avr $OrientUnrealEngine/Content $InnerEnginePath
cp -avr $OrientUnrealEngine/DerivedDataCache $InnerEnginePath
cp -avr $OrientUnrealEngine/Saved $InnerEnginePath
cp -avr $OrientUnrealEngine/Shaders $InnerEnginePath
#copy plugins files and remove same useless files
cp -avr $OrientUnrealEngine/Plugins $InnerEnginePath
find $InnerEnginePath -name "Intermediate" -type d | xargs rm -rf
echo "Customize this Project's resource."
#remove more resource files for the game project
#./CustomResource.sh $GameName
echo "Packaging all files! It will take some time..."
tar -czvf ${GameName}Robot.tar.gz $MyPackPath
echo "Robot Package End"