Advertisement
Concerned_Hobbit

opengl_convert.cmd

Dec 5th, 2013
1,395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.68 KB | None | 0 0
  1. @echo off
  2. color 0a
  3. echo Converting Starbound to OpenGL
  4.  
  5. If exist "C:\Program Files\Steam\" goto WIN32
  6. If exist "C:\Program Files (x86)\Steam" goto WIN64
  7.  
  8. :WIN32
  9. set "sbpath=C:\Program Files\Steam\"
  10. set "winpath=C:\Program Files\Steam\SteamApps\common\Starbound\win32\"
  11. echo Steam detected in '%sbpath%'
  12. echo Searching for Starbound Installation
  13. If not exist "%winpath%" goto nostarbound
  14. echo Starbound Installation found. Checking that files have not been modified
  15. If not exist "%winpath%starbound_opengl.exe" goto openglexe
  16. If not exist "%winpath%starbound.exe" goto starboundexe
  17. echo Installation is clean.
  18. If exist "%winpath%opengl_converter" goto alreadyrun
  19. echo Starting OpenGL Convertion
  20. mkdir "%winpath%opengl_converter"
  21. move /-y "%winpath%starbound_opengl.exe" "%winpath%opengl_converter\starbound_opengl.exe"
  22. move /-y "%winpath%starbound.exe" "%winpath%opengl_converter\starbound.exe"
  23. echo Moved files to backup location
  24. echo Copying OpenGL in place of old starbound.exe
  25. copy /-y "%winpath%opengl_converter\starbound_opengl.exe" "%winpath%starbound.exe"
  26. goto end
  27.  
  28. :WIN64
  29. set "sbpath=C:\Program Files (x86)\Steam\"
  30. set "winpath=C:\Program Files (x86)\Steam\SteamApps\common\Starbound\win32\"
  31. echo Steam detected in '%sbpath%'
  32. echo Searching for Starbound Installation
  33. If not exist "%winpath%" goto nostarbound
  34. echo Starbound Installation found. Checking that files have not been modified
  35. If not exist "%winpath%starbound_opengl.exe" goto openglexe
  36. If not exist "%winpath%starbound.exe" goto starboundexe
  37. echo Installation is clean.
  38. If exist "%winpath%opengl_converter" goto alreadyrun
  39. echo Starting OpenGL Convertion
  40. mkdir "%winpath%opengl_converter"
  41. move /-y "%winpath%starbound_opengl.exe" "%winpath%opengl_converter\starbound_opengl.exe"
  42. move /-y "%winpath%starbound.exe" "%winpath%opengl_converter\starbound.exe"
  43. echo Moved files to backup location
  44. echo Copying OpenGL in place of old starbound.exe
  45. copy /-y "%winpath%opengl_converter\starbound_opengl.exe" "%winpath%starbound.exe"
  46. goto done
  47. goto end
  48.  
  49. :openglexe
  50. echo starbound_opengl.exe has not been found in %winpath%!
  51. echo This may me a broken installation.
  52. goto end
  53.  
  54. :starboundexe
  55. echo starbound.exe has not been found in %winpath%!
  56. echo This may me a broken installation.
  57. goto end
  58.  
  59. :nostarbound
  60. echo Starbound not found! Are your folders set up correctly and have you downloaded Starbound?
  61. goto end
  62.  
  63. :alreadyrun
  64. echo You have already run OpenGL Converter!
  65. echo Please download the undo tool to undo this action.
  66. goto end
  67.  
  68. :done
  69. echo Done!
  70. echo You can find your original .exe files in
  71. echo %winpath%opengl_converter\
  72. goto end
  73.  
  74. :end
  75. echo Script made by Concerned Hobbit for the Starbound forums.
  76. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement