-
Notifications
You must be signed in to change notification settings - Fork 3
/
package.sh
executable file
·49 lines (35 loc) · 1.26 KB
/
package.sh
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
#!/bin/bash
if [ -z "$KSP_PATH" ]; then
KSP_PATH=~/Games/KSP_linux
fi
if [ ! -d "$KSP_PATH" ]; then
echo "KSP path $KSP_PATH not found."
exit 1
fi
LPATH="$KSP_PATH/KSP_Data/Managed"
compile_ksp() {
LIBNAME=$1
shift
gmcs -r:"$LPATH/Assembly-CSharp.dll,$LPATH/UnityEngine.dll" -t:library "$@" -out:"$LIBNAME"
}
compile_ksp Misc/FPS.dll Misc/FPS.cs
compile_ksp Misc/UnityObjectTree.dll Misc/UnityObjectTree.cs
compile_ksp Misc/MonoProfilerToggle.dll Misc/MonoProfilerToggle.cs
MONODIR=mono/builds/embedruntimes/
cpstrip() {
TGTFILE=$2/`basename $1`
cp -f $1 $TGTFILE
strip $TGTFILE
}
cpstrip $MONODIR/linux32/libmono.so KSP_linux/KSP_Data/Mono/x86/
cpstrip $MONODIR/linux32/libmono-profiler-logging.so KSP_linux/
cp -f $MONODIR/win32/mono.dll KSP_win/KSP_Data/Mono/
cp -f $MONODIR/win32/mono-profiler-logging.dll KSP_win/
cp -f $MONODIR/win32/*.pdb PDB/
MONOTOOLS=mono-tools/Mono.Profiler/lib/
cp -f $MONOTOOLS/*.dll $MONOTOOLS/*.exe Tools/
rst2html README.rst > README.html
rm -f devtools-linux32.zip devtools-win32.zip pdb-win32.zip
zip -r devtools-linux32.zip KSP_linux Tools Misc LICENSE README.html -x \*.gitignore Tools/emveepee.bat
zip -r devtools-win32.zip KSP_win Tools Misc LICENSE README.html -x \*.gitignore Tools/emveepee.sh
zip pdb-win32.zip PDB/*.pdb