Advertisement
Guest User

Untitled

a guest
Nov 7th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.11 KB | None | 0 0
  1. @echo off
  2. COLOR 0E
  3. echo ======================================
  4. echo   Welcome to the Oxide File Modifier
  5. echo.
  6. echo   The purpose of this script is to
  7. echo   copy the newly compiled Oxide files
  8. echo   into your vanilla Rust Server
  9. echo   Enjoy!
  10. echo ======================================
  11.  
  12. :SETVARS
  13. SET /p RustLoc=Where are your Rust Files Located?:
  14. SET /p OxideFiles=Where are your compiled oxide files (the folder with the .sln file)?:
  15. SET /p OxideUpdtr=What is your compiled oxide patcher directory (the folder with the .sln file)?:
  16. IF "!RustLoc:~-1!"=="\" SET RustLoc=!RustLoc:~,-1!
  17. IF "!OxideFiles:~-1!"=="\" SET OxideFiles=!OxideFiles:~,-1!
  18. IF "!OxideUpdtr:~-1!"=="\" SET OxideUpdtr=!OxideUpdtr:~,-1!
  19. If Exist "%RustLoc%\RustDedicated.exe" (
  20.     echo Rust Found!
  21.     ) else (
  22.     echo Can't find RustDedicated.exe!
  23.     GOTO SETVARS
  24.     )
  25.  
  26. echo Copying over Oxide files....
  27. @echo on
  28. copy "%OxideFiles%\Dependencies\lua52.dll" "%RustLoc%\" /Y
  29. copy "%OxideFiles%\Dependencies\KeraLua.dll" "%RustLoc%\RustDedicated_Data\Managed\" /Y
  30. copy "%OxideFiles%\Dependencies\KopiLua.dll" "%RustLoc%\RustDedicated_Data\Managed\" /Y
  31. copy "%OxideFiles%\Dependencies\NLua.dll" "%RustLoc%\RustDedicated_Data\Managed\" /Y
  32. copy "%OxideFiles%\oxide.root.json" "%RustLoc%\" /Y
  33. copy "%RustLoc%\RustDedicated_Data\Managed\Oxide.Core.dll" "%OxideUpdtr%\" /Y
  34. @echo off
  35.     echo Updating Patcher Project...
  36.  @echo off
  37. setlocal enabledelayedexpansion
  38. set  /p txtfile=Please show me the location of RustExperimental.opj [Including filename]:
  39.  
  40. IF "!RustLoc:~-1!"=="\" SET RustLoc=!RustLoc:~,-1!
  41. set newfile=C:\RustExperimental.opj
  42. if exist "%newfile%" del /f /q "%newfile%"
  43. set search="TargetDirectory": "D:\\Oxide\\Rust Server\\Release\\RustDedicated_Data\\Managed",
  44. set replace="TargetDirectory": "%RustLoc%\RustDedicated_Data\Managed",
  45. set replace=%replace:\=\\%
  46. for /f "tokens=*" %%a in (%txtfile%) do (
  47.    set newline=%%a
  48.    set newline=!newline:%search%=%replace%!
  49.    echo !newline! >> %newfile%
  50. )
  51. echo Project Updated - Please Load Project C:\RustExperimental.opj to apply the patch...
  52. %OxideUpdtr%\OxidePatcher.exe
  53. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement