@@ -13,32 +13,10 @@ rm -rf ${CLEAN_DEBUG_DIR}
1313mkdir -p ${CLEAN_DIR} /{bin/$PLAT_DIR ,tc2/bin/$PLAT_DIR ,tc2/materials,tc2/cfg,tc2/scripts}
1414mkdir -p ${CLEAN_DEBUG_DIR} /{bin/$PLAT_DIR ,tc2/bin/$PLAT_DIR }
1515
16- declare -a EXES=(
17- tc2_win64
18- bin/$PLAT_DIR /captioncompiler
19- bin/$PLAT_DIR /glview
20- bin/$PLAT_DIR /height2normal
21- bin/$PLAT_DIR /motionmapper
22- bin/$PLAT_DIR /qc_eyes
23- bin/$PLAT_DIR /tgadiff
24- bin/$PLAT_DIR /vbsp
25- bin/$PLAT_DIR /vice
26- bin/$PLAT_DIR /vrad
27- bin/$PLAT_DIR /vtf2tga
28- bin/$PLAT_DIR /vtfdiff
29- bin/$PLAT_DIR /vvis
30- )
31-
3216declare -a DLLS=(
33- bin/$PLAT_DIR /vrad_dll
34- bin/$PLAT_DIR /vvis_dll
3517 tc2/bin/$PLAT_DIR /{client,server}
3618)
3719
38- declare -a DLLS_LIB=(
39- bin/$PLAT_DIR /steam_api64
40- )
41-
4220declare -a FILES_REP=(
4321 tc2/cfg/valve.rc
4422 tc2/cfg/default.cfg
@@ -60,14 +38,61 @@ declare -a FILES=(
6038 ../LICENSE
6139)
6240
41+ if [ $PLATFORM = " win" ]; then
42+ declare -a EXES=(
43+ tc2_win64
44+ bin/$PLAT_DIR /captioncompiler
45+ bin/$PLAT_DIR /glview
46+ bin/$PLAT_DIR /height2normal
47+ bin/$PLAT_DIR /motionmapper
48+ bin/$PLAT_DIR /qc_eyes
49+ bin/$PLAT_DIR /tgadiff
50+ bin/$PLAT_DIR /vbsp
51+ bin/$PLAT_DIR /vice
52+ bin/$PLAT_DIR /vrad
53+ bin/$PLAT_DIR /vtf2tga
54+ bin/$PLAT_DIR /vtfdiff
55+ bin/$PLAT_DIR /vvis
56+ )
57+
58+ DLLS+=(
59+ bin/$PLAT_DIR /vrad_dll
60+ bin/$PLAT_DIR /vvis_dll
61+ )
62+
63+ declare -a DLLS_LIB=(
64+ bin/$PLAT_DIR /steam_api64
65+ )
66+ elif [ $PLATFORM = " linux" ]; then
67+ declare -a EXES=(
68+ tc2_linux64
69+ )
70+
71+ declare -a DLLS_LIB=(
72+ bin/$PLAT_DIR /libsteam_api
73+ )
74+
75+ FILES+=(
76+ tc2.sh
77+ )
78+ fi
79+
6380for F in " ${EXES[@]} " ; do
6481 cp -f ${DEV_DIR} /${F}${EXE_EXT} ${CLEAN_DIR} /${F}${EXE_EXT}
6582done
6683
6784for F in " ${DLLS[@]} " ; do
6885 DLL=${F}${DLL_EXT}
6986 cp -f ${DEV_DIR} /${DLL} ${CLEAN_DIR} /${DLL}
70- cp -f ${DEV_DIR} /${F,,} .pdb ${CLEAN_DEBUG_DIR} /${F,,} .pdb
87+ if [ $PLATFORM = " win" ]; then
88+ cp -f ${DEV_DIR} /${F,,} .pdb ${CLEAN_DEBUG_DIR} /${F,,} .pdb
89+ elif [ $PLATFORM = " linux" ]; then
90+ # Linux binaries aren't stripped by the build scripts, so separate the
91+ # debug info and strip them here.
92+ cp -f ${CLEAN_DIR} /${DLL} ${CLEAN_DEBUG_DIR} /${DLL} .dbg
93+ objcopy --add-gnu-debuglink=${CLEAN_DEBUG_DIR} /${DLL} .dbg ${CLEAN_DIR} /${DLL}
94+ strip ${CLEAN_DIR} /${DLL}
95+ fi
7196done
7297
7398for F in " ${DLLS_LIB[@]} " ; do
0 commit comments