Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* 2>nul&goto init %~nx0
- :start
- echo.
- echo -------------------------------------------------------------
- echo ^| PREPARE DOTA_LAN_SHARE BY AVEYO ^|
- echo ^|-------------------------------------------------------------^|
- echo ^| Run this once on the PC that will be sharing game files ^|
- echo ^| Share the generated "steamapps\DOTA_LAN_SHARE" folder ^|
- echo ^| Steam and DOTA should be set to enable automatic updates ^|
- echo ^| ^|
- echo ^| Other PCs should have DOTA automatic updates disabled ^|
- echo ^| and when needing updates, close their Steam client then ^|
- echo ^| manually sync this shared folder or use a batch / tool ^|
- echo ^| ^|
- echo ^| Exclude from "DOTA_LAN_SHARE\common\dota 2 beta\game\dota" ^|
- echo ^| cfg\* guides\* replays\* screenshots\* *.mdmp *.soc *.vcfg ^|
- echo ^| condump*.txt console.log server_log.txt rich_presence*.txt ^|
- echo -------------------------------------------------------------
- echo.
- call :wait 10 Starting
- call :set_dota
- md "%steamapps%\DOTA_LAN_SHARE\common\dota 2 beta\game" 2>nul
- echo SHARE = %steamapps%\DOTA_LAN_SHARE & echo Do not directly modify content here!
- echo Instead, delete DOTA_LAN_SHARE folder and re-run %~nx0 & echo.
- :: hard link
- mklink /h "%steamapps%\DOTA_LAN_SHARE\appmanifest_570.acf" "%steamapps%\appmanifest_570.acf" 1>nul 2>nul
- if exist "%steamapps%\DOTA_LAN_SHARE\appmanifest_570.acf" (set rez=OK!) else set rez=FAIL! Try running as admin..
- echo Creating hard link to appmanifest_570.acf - %rez%
- :: junctions
- for %%s in (bin core dota) do mklink /j "%steamapps%\DOTA_LAN_SHARE\common\dota 2 beta\game\%%s" "%dota%\%%s" 1>nul 2>nul
- if exist "%steamapps%\DOTA_LAN_SHARE\common\dota 2 beta\game\dota\maps\dota.vpk" (set rez=OK!) else set rez=FAIL! Try running as admin..
- echo Creating junctions to common\dota 2 beta\game\ - %rez%
- call :end DONE!
- goto :eof
- :: done!
- :set_dota
- for /f usebackq^ skip^=2^ delims^=^ eol^= %%s in (`reg query "HKCU\SOFTWARE\Valve\Steam" /v "SteamPath" /z`) do set "steampath=%%~s"
- set "steampath=%steampath:~31%" &set "libfilter=LibraryFolders { TimeNextStatsReport ContentStatsID }"
- if not exist "%steampath%\SteamApps\libraryfolders.vdf" call :end ! Cannot find Steam library!
- for /f usebackq^ delims^=^"^ tokens^=4 %%s in (`findstr /v "%libfilter%" "%steampath%\SteamApps\libraryfolders.vdf"`) do (
- if exist "%%s\steamapps\appmanifest_570.acf" if exist "%%s\steamapps\common\dota 2 beta\game\dota\maps\dota.vpk" set "libfs=%%s"
- ) & set "steamapps=%steampath%\steamapps"
- if defined libfs set "steamapps=%libfs:\\=\%\steamapps"
- set "steamapps=%steamapps:/=\%"
- if not exist "%steamapps%\common\dota 2 beta\game\dota\maps\dota.vpk" call :end ! Cannot find Dota 2!
- set "dota=%steamapps%\common\dota 2 beta\game"
- goto :eof
- :wait
- setlocal enabledelayedexpansion &if not defined x1337cr for /f %%a in ('copy /z "%~dpf0" nul') do set "x1337cr=%%a"
- (for /l %%i in (%1,-1,1) do <NUL SET /P "=_%2 in %%i !x1337cr!" &ping -n 2 localhost >nul 2>&1) & endlocal & goto :eof
- :init
- @echo off & setlocal & title %~nx0 & color 0B & cls & goto :start
- :end
- (if "%1"=="!" COLOR 7c) &echo. &echo %* &(call :wait 5 Closing) &echo/ &(if "%1"=="!" exit) &endlocal &color &goto :eof
- ::
Add Comment
Please, Sign In to add comment