Updated gdc-psyfork with current (NPOTB).
Updated gdc-psyfork with current (NPOTB).
- Added script support for Steam3 content (CS:GO, ND, etc.).
- Removed script steam.inf temp-move hack now that DepotDownloader correctly handles checksums.
- Updated symbols.txt.
- Fixed gdc having issues with gamedata files that contain new or unknown sections ("Addresses").
1.1 --- a/tools/gdc-psyfork/GameConfigs.cpp Sat Dec 01 13:37:08 2012 -0500
1.2 +++ b/tools/gdc-psyfork/GameConfigs.cpp Sat Dec 01 13:39:34 2012 -0500
1.3 @@ -153,6 +153,10 @@
1.4 {
1.5 m_ParseState = PSTATE_GAMEDEFS_SIGNATURES;
1.6 }
1.7 + else
1.8 + {
1.9 + m_IgnoreLevel++;
1.10 + }
1.11
1.12 break;
1.13 }
2.1 --- a/tools/gdc-psyfork/example-scripts/gdc_core.sh Sat Dec 01 13:37:08 2012 -0500
2.2 +++ b/tools/gdc-psyfork/example-scripts/gdc_core.sh Sat Dec 01 13:39:34 2012 -0500
2.3 @@ -7,7 +7,11 @@
2.4 ENGINE_BIN=${ENGINE_PATH}/bin/engine
2.5 GAME_BIN=${ENGINE_PATH}/${GAME_DIR}/bin/server
2.6 STEAMINF=${ENGINE_PATH}/${GAME_DIR}/steam.inf
2.7 -BIN_EXT=""
2.8 +
2.9 +if [ "${GAMEDATA_DIR}" == "" ] ; then
2.10 + GAMEDATA_DIR=${GAME_DIR}
2.11 +fi
2.12 +
2.13 if [ $MOD == 1 ] ; then
2.14 BIN_EXT="_i486"
2.15 fi
2.16 @@ -15,12 +19,12 @@
2.17 echo -e "Checking game ${GAME_DIR}...\n"
2.18
2.19 if [ $MOD == 0 ] && [ "$1" == "auto" ] ; then
2.20 - ./updatecheck.pl "${STEAMINF}"
2.21 + UPDATE_RES=`./updatecheck.pl "${STEAMINF}"`
2.22 if [ $? -ne 0 ] ; then
2.23 exit 1
2.24 - elif [ ! -e ${STEAMINF}.new ] ; then
2.25 - echo -e "Update (maybe) available but no steam.inf.new written!\n"
2.26 fi
2.27 + EXPECTED_VER=`echo ${UPDATE_RES} | egrep -o '([0-9]+)$'`
2.28 + echo Expecting version ${EXPECTED_VER}
2.29 fi
2.30
2.31 export RDTSC_FREQUENCY="disabled"
2.32 @@ -36,24 +40,43 @@
2.33 if [ ${UPDATE} -eq 1 ] ; then
2.34 cd ${DD_PATH}
2.35
2.36 - if [ $MOD == 0 ] ; then
2.37 - #workaround for DD1 "bug" (won't redownload file of same name/size)
2.38 - rm -f ${STEAMINF}.old
2.39 - mv ${STEAMINF} ${STEAMINF}.old
2.40 + if [ "${DD_GAME}" != "" ] ; then
2.41 + DD_OPT_AUTH=`tr '\r\n' ' ' < dd-login-info.txt`
2.42 + elif [ "${DD_APP}" != "" ] ; then
2.43 + DD_OPT_AUTH=`tr '\r\n' ' ' < dd-login-info.txt`
2.44 + else
2.45 + echo "Error: neither DD_GAME nor DD_APP are set!"
2.46 + exit 1
2.47 fi
2.48
2.49 for i in 1 2 3 4 5
2.50 do
2.51 - mono DepotDownloader.exe \
2.52 - -game "${DD_GAME}" \
2.53 - -dir ${DD_DIR} \
2.54 - -filelist server.txt \
2.55 - -all-platforms
2.56 + if [ "${DD_GAME}" != "" ] ; then
2.57 + mono DepotDownloader.exe \
2.58 + -game "${DD_GAME}" \
2.59 + -dir ${DD_DIR} \
2.60 + -filelist server.txt \
2.61 + -all-platforms \
2.62 + -no-exclude \
2.63 + ${DD_OPT_CELL} \
2.64 + ${DD_OPT_AUTH}
2.65 + else
2.66 + mono DepotDownloader.exe \
2.67 + -app "${DD_APP}" \
2.68 + -dir ${DD_DIR} \
2.69 + -filelist server.txt \
2.70 + -all-platforms \
2.71 + -no-exclude \
2.72 + ${DD_OPT_CELL} \
2.73 + ${DD_OPT_AUTH}
2.74 + fi
2.75 +
2.76 + echo
2.77
2.78 if [ $? == 0 ] ; then
2.79 break
2.80 elif [ $i == 5 ] ; then
2.81 - echo -e "Update failed five times; giving up �\(�_�)/�\n"
2.82 + echo Update failed five times; welp
2.83 break
2.84 fi
2.85
2.86 @@ -64,14 +87,21 @@
2.87
2.88 if [ "$1" == "auto" ] ; then
2.89 DOWNLOADED_VER=`grep -E "^(Patch)?Version=(([0-9]\.?)+)" ${STEAMINF} | grep -Eo "([0-9]\.?)+" | sed s/[^0-9]//g`
2.90 - EXPECTED_VER=`cat ${STEAMINF}.new`
2.91
2.92 if [ ${DOWNLOADED_VER} != ${EXPECTED_VER} ] ; then
2.93 - echo -e "Download resulted with version ${DOWNLOADED_VER}, but expected ${EXPECTED_VER}. Exiting.\n"
2.94 + echo Download resulted with version ${DOWNLOADED_VER}, but expected ${EXPECTED_VER}. Exiting.
2.95 exit 1
2.96 fi
2.97 fi
2.98
2.99 +# update game-specific
2.100 +cd ${SCRIPT_PATH}
2.101 +GAME_SCRIPT_NAME=`echo $0 | sed s/\.sh$//`
2.102 +echo checking to see if ${GAME_SCRIPT_NAME}_repos.sh exists
2.103 +if [ -e ${GAME_SCRIPT_NAME}_repos.sh ] ; then
2.104 + ./${GAME_SCRIPT_NAME}_repos.sh
2.105 +fi
2.106 +
2.107 # update sourcemod
2.108 cd ${SM_PATH}/tools/gdc-psyfork
2.109 hg pull -u
2.110 @@ -88,15 +118,6 @@
2.111 -w ${GAME_BIN}.dll \
2.112 -y ${ENGINE_BIN}.dll
2.113 echo -e "------------------------------------------------------\n"
2.114 - echo -e "\n"
2.115 done
2.116
2.117 -if [ ! -e ${STEAMINF} ] ; then
2.118 - mv ${STEAMINF}.old ${STEAMINF}
2.119 -fi
2.120 -
2.121 -if [ "$1" == "auto" ] && [ -e ${STEAMINF}.new ] ; then
2.122 - rm ${STEAMINF}.new
2.123 -fi
2.124 -
2.125 exit 0
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/tools/gdc-psyfork/example-scripts/gdc_csgo.sh Sat Dec 01 13:39:34 2012 -0500
3.3 @@ -0,0 +1,35 @@
3.4 +#!/bin/bash
3.5 +
3.6 +# Path to DepotDownloader
3.7 +DD_PATH=/home/gdc/dd
3.8 +
3.9 +# Path for DepotDownloader to download to, relative to DD_PATH
3.10 +DD_DIR=csgo
3.11 +
3.12 +# AppId to use for DepotDownloader for Steam3 content (steamcmd app_update number)
3.13 +DD_APP=740
3.14 +
3.15 +# Absolute path to game's engine directory
3.16 +ENGINE_PATH=${DD_PATH}/${DD_DIR}/
3.17 +
3.18 +# Game's directory name
3.19 +GAME_DIR=csgo
3.20 +
3.21 +# SM gamedata engine name
3.22 +ENGINE_NAME=csgo
3.23 +
3.24 +# List of gamedata files to run checks on
3.25 +gamedata_files=(
3.26 + "sdktools.games/engine.csgo.txt"
3.27 + "sm-cstrike.games/game.csgo.txt"
3.28 +)
3.29 +
3.30 +# Is game a 2006/2007 "mod" ?
3.31 +# If so, bin names are adjusted with _i486 suffix and no update check will be done
3.32 +MOD=0
3.33 +
3.34 +# DO NOT EDIT BELOW THIS LINE
3.35 +
3.36 +source ./gdc_core.sh $1 $2 $3 $4
3.37 +
3.38 +exit $?
4.1 --- a/tools/gdc-psyfork/example-scripts/gdc_cstrike.sh Sat Dec 01 13:37:08 2012 -0500
4.2 +++ b/tools/gdc-psyfork/example-scripts/gdc_cstrike.sh Sat Dec 01 13:39:34 2012 -0500
4.3 @@ -6,7 +6,7 @@
4.4 # Path for DepotDownloader to download to, relative to DD_PATH
4.5 DD_DIR=source
4.6
4.7 -# Game to use for DepotDownloader -game param
4.8 +# Game to use for DepotDownloader for Steam2 content (hldsupdatetool -game param)
4.9 DD_GAME="Counter-Strike Source"
4.10
4.11 # Absolute path to game's engine directory
5.1 --- a/tools/gdc-psyfork/symbols.txt Sat Dec 01 13:37:08 2012 -0500
5.2 +++ b/tools/gdc-psyfork/symbols.txt Sat Dec 01 13:39:34 2012 -0500
5.3 @@ -40,6 +40,7 @@
5.4 "GroundEntChanged" "_ZN11CBaseEntity35NetworkStateChanged_m_hGroundEntityEv"
5.5 "OnTakeDamage" "_ZN11CBaseEntity12OnTakeDamageERK15CTakeDamageInfo"
5.6 "PreThink" "_ZN11CBasePlayer8PreThinkEv"
5.7 + "PostConstructor" "_ZN11CBaseEntity15PostConstructorEPKc"
5.8 "PostThink" "_ZN11CBasePlayer9PostThinkEv"
5.9 "Reload" "_ZN17CBaseCombatWeapon6ReloadEv"
5.10 "SetTransmit" "_ZN11CBaseEntity11SetTransmitEP18CCheckTransmitInfob"
5.11 @@ -72,14 +73,24 @@
5.12 "GetSoundEmissionOrigin" "_ZNK11CBaseEntity22GetSoundEmissionOriginEv"
5.13 "GetServerClass" "_ZN11CBaseEntity14GetServerClassEv"
5.14 "StudioFrameAdvance" "_ZN14CBaseAnimating18StudioFrameAdvanceEv"
5.15 - "ShouldGib" "_ZN20CBaseCombatCharacter9ShouldGibERK15CTakeDamageInfo"
5.16 + "ShouldGib" "_ZN9CTFPlayer9ShouldGibERK15CTakeDamageInfob"
5.17 "GetRadius" "_ZN13CTFBaseRocket9GetRadiusEv"
5.18 "DeflectPlayer" "_ZN13CTFWeaponBase13DeflectPlayerEP9CTFPlayerS1_R6VectorS3_S3_"
5.19 +
5.20 + // CSSDM
5.21 + "IPointsForKill" "_ZN14CTeamplayRules14IPointsForKillEP11CBasePlayerS1_"
5.22 + "RemoveAllItems" "_ZN11CBasePlayer14RemoveAllItemsEb"
5.23 + "GiveAmmo" "_ZN20CBaseCombatCharacter8GiveAmmoEiib"
5.24 +
5.25 + // NapalmLagFix
5.26 + "RadiusDamage" "_ZN10CGameRules12RadiusDamageERK15CTakeDamageInfoRK6VectorfiP11CBaseEntity"
5.27 }
5.28
5.29 "Options"
5.30 {
5.31 "CreateGameRulesObject" "allowmultiple,allowmidfunc"
5.32 + "TakeOverBot" "allowmidfunc"
5.33 + "OnVersusRoundStart" "allowmidfunc"
5.34 }
5.35 }
5.36
5.37 @@ -120,8 +131,22 @@
5.38 {
5.39 "#supported"
5.40 {
5.41 + "engine" "css"
5.42 + "engine" "orangebox_valve"
5.43 + }
5.44 +
5.45 + "Keys"
5.46 + {
5.47 + "TraceAttack" "_ZN11CBaseEntity11TraceAttackERK15CTakeDamageInfoRK6VectorP10CGameTraceP15CDmgAccumulator"
5.48 + }
5.49 + }
5.50 +
5.51 + "#default"
5.52 + {
5.53 + "#supported"
5.54 + {
5.55 "engine" "left4dead"
5.56 - "game" "left4dead2"
5.57 + "engine" "left4dead2"
5.58 }
5.59
5.60 "Keys"