Advertisement
Guest User

Crash on insurgency start up, macOS Sierra 10.12

a guest
Oct 24th, 2016
795
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # figure out the absolute path to the script being run a bit
  4. # non-obvious, the ${0%/*} pulls the path out of $0, cd's into the
  5. # specified directory, then uses $PWD to figure out where that
  6. # directory lives - and all this in a subshell, so we don't affect
  7. # $PWD
  8.  
  9. GAMEROOT=$(cd "${0%/*}" && echo $PWD)
  10.  
  11. #determine platform
  12. UNAME=`uname`
  13. if [ "$UNAME" == "Darwin" ]; then
  14. # Workaround OS X El Capitan 10.11 System Integrity Protection (SIP) which does not allow
  15. # DYLD_INSERT_LIBRARIES to be set for system processes.
  16. if [ "$STEAM_DYLD_INSERT_LIBRARIES" != "" ] && [ "$DYLD_INSERT_LIBRARIES" == "" ]; then
  17. export DYLD_INSERT_LIBRARIES="$STEAM_DYLD_INSERT_LIBRARIES"
  18. fi
  19. # prepend our lib path to LD_LIBRARY_PATH
  20. export DYLD_LIBRARY_PATH="${GAMEROOT}"/bin:$DYLD_LIBRARY_PATH
  21. elif [ "$UNAME" == "Linux" ]; then
  22. # prepend our lib path to LD_LIBRARY_PATH
  23. export LD_LIBRARY_PATH="${GAMEROOT}"/bin:$LD_LIBRARY_PATH
  24. fi
  25.  
  26. if [ -z $GAMEEXE ]; then
  27. if [ "$UNAME" == "Darwin" ]; then
  28. GAMEEXE="insurgency_osx"
  29. elif [ "$UNAME" == "Linux" ]; then
  30. GAMEEXE="insurgency_linux"
  31. fi
  32. fi
  33.  
  34. ulimit -n 2048
  35.  
  36. # enable nVidia threaded optimizations
  37. export __GL_THREADED_OPTIMIZATIONS=1
  38. # enable Mesa threaded shader compiles
  39. export multithread_glsl_compiler=1
  40.  
  41. # and launch the game
  42. cd "$GAMEROOT"
  43.  
  44. STATUS=42
  45. while [ $STATUS -eq 42 ]; do
  46. if [ "${DEBUGGER}" == "gdb" ]; then
  47. ARGSFILE=$(mktemp $USER.hl2.gdb.XXXX)
  48. echo run $@ > "$ARGSFILE"
  49. ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} -x "-game insurgency $ARGSFILE"
  50. rm "$ARGSFILE"
  51. else
  52. ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "-game insurgency $@"
  53. fi
  54. STATUS=$?
  55. done
  56. exit $STATUS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement