Template:PatchDiff/October 22, 2012 Patch (Beta)/team fortress 2 beta engine.gcf/hl2.sh

From Team Fortress Wiki
< Template:PatchDiff/October 22, 2012 Patch (Beta)
Revision as of 10:12, 23 October 2012 by MousseBOT (talk | contribs) (Diff of file "team fortress 2 beta engine.gcf/hl2.sh" for patch October 22, 2012 Patch (Beta).)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
1515 export DYLD_LIBRARY_PATH="${GAMEROOT}"/bin:$DYLD_LIBRARY_PATH
1616elif [ "$UNAME" == "Linux" ]; then
1717 # prepend our lib path to LD_LIBRARY_PATH
N/A18 STEAMPATH=$(readlink ~/.steampath)
1819 export LD_LIBRARY_PATH="${GAMEROOT}"/bin:$LD_LIBRARY_PATH
N/A20 if [ ! -z ${STEAMPATH} ]; then
N/A21 export LD_LIBRARY_PATH="$(dirname ${STEAMPATH})":$LD_LIBRARY_PATH
N/A22 export LD_PRELOAD=$(dirname ${STEAMPATH})/gameoverlayrenderer.so
N/A23 fi
1924fi
2025 
2126if [ -z $GAMEEXE ]; then
22N/A GAMEEXE=hl2_osx
N/A27 if [ "$UNAME" == "Darwin" ]; then
N/A28 GAMEEXE=hl2_osx
N/A29 elif [ "$UNAME" == "Linux" ]; then
N/A30 GAMEEXE=hl2_linux
N/A31 fi
2332fi
2433 
2534ulimit -n 2048
2635 
N/A36# enable nVidia threaded optimizations
N/A37export __GL_THREADED_OPTIMIZATIONS=1
N/A38 
2739# and launch the game
2840cd "$GAMEROOT"
2941 
N/A42# Do the following for strace:
N/A43# GAME_DEBUGGER="strace -f -o strace.log"
N/A44# Do the following for tcmalloc
N/A45# LD_PRELOAD=../src/thirdparty/gperftools-2.0/.libs/libtcmalloc_debug.so:$LD_PRELOAD
N/A46 
3047STATUS=42
3148while [ $STATUS -eq 42 ]; do
32N/A ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
N/A49 if [ "${GAME_DEBUGGER}" == "gdb" ] || [ "${GAME_DEBUGGER}" == "cgdb" ]; then
N/A50 ARGSFILE=$(mktemp $USER.hl2.gdb.XXXX)
N/A51 echo b main > "$ARGSFILE"
N/A52 
N/A53 # Set the LD_PRELOAD varname in the debugger, and unset the global version. This makes it so that
N/A54 # gameoverlayrenderer.so and the other preload objects aren't loaded in our debugger's process.
N/A55 echo set env LD_PRELOAD=$LD_PRELOAD >> "$ARGSFILE"
N/A56 echo show env LD_PRELOAD >> "$ARGSFILE"
N/A57 unset LD_PRELOAD
N/A58 
N/A59 echo run $@ >> "$ARGSFILE"
N/A60 echo show args >> "$ARGSFILE"
N/A61 ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} -x "$ARGSFILE"
N/A62 rm "$ARGSFILE"
N/A63 else
N/A64 ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
N/A65 fi
3366 STATUS=$?
3467done
3568exit $STATUS