Guest User

V2.4.3b of Godus Diag dump. Only 58.312% finished!

a guest
Sep 13th, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 4.96 KB | None | 0 0
  1. @echo off
  2. rem V2.4.3b of Godus Diag dump. Only 58.312% finished!
  3. set GodusSaveDir=GodusInfo
  4. set Desktop=%USERPROFILE%\Desktop
  5. set DiagDir=%Desktop%\%GodusSaveDir%
  6. set GodusDir=
  7. set i=
  8.  
  9. echo Game diagnostics files are being saved to %GodusSaveDir% which is being put on your desktop.
  10. echo.
  11. echo ---
  12. echo.
  13. if "%1"=="/h" echo Command lines are: /h - help
  14. if "%1"=="/h" echo                    /godusdir [godus.exe path]
  15. if "%1"=="/h" goto end
  16. if "%1"=="/godusdir" if not "%2"=="" set GodusDir=%2
  17. rem if you want to set a Directory for Godus manually just change the default "set GodusDir=" line up above to something or use the command line option of /godusdir [path to godus.exe].
  18.  
  19. if "%GodusDir%"=="" goto setup_godusdir
  20. echo Godus.exe directory manually set to: %GodusDir%
  21. goto setup_diagdir
  22. :setup_godusdir
  23. for /f "delims=" %%i in ('dir /b /a-d ".\godus.exe" 2^>nul') do set GodusDir=%%i
  24. if "%GodusDir%"=="" goto setup_diagdir
  25. set GodusDir=%GodusDir:~0,-9%
  26. if "%GodusDir%"=="" set GodusDir=.
  27. echo Found Godus.exe in %GodusDir%
  28.  
  29. :setup_diagdir
  30.  
  31. echo Creating directory %DiagDir%
  32. mkdir %DiagDir%
  33.  
  34. echo Diagnostics Directory is: %DiagDir%
  35. if not exist %DiagDir% goto error_DiagDir
  36. echo %DiagDir% - Directory created.
  37.  
  38. if not "%GodusDir%"=="" goto Create_Dxdiagdump
  39. :PickDrive
  40.  
  41. set GodusDir=
  42. choice /c abcdefghijklmnopqrstuvwxyz /n /M "Drive where your game is installed > "
  43.  
  44. if ERRORLEVEL==1  set GodusDir=A
  45. if ERRORLEVEL==2  set GodusDir=B
  46. if ERRORLEVEL==3  set GodusDir=C
  47. if ERRORLEVEL==4  set GodusDir=D
  48. if ERRORLEVEL==5  set GodusDir=E
  49. if ERRORLEVEL==6  set GodusDir=F
  50. if ERRORLEVEL==7  set GodusDir=G
  51. if ERRORLEVEL==8  set GodusDir=H
  52. if ERRORLEVEL==9  set GodusDir=I
  53. if ERRORLEVEL==10 set GodusDir=J
  54. if ERRORLEVEL==11 set GodusDir=K
  55. if ERRORLEVEL==12 set GodusDir=L
  56. if ERRORLEVEL==13 set GodusDir=M
  57. if ERRORLEVEL==14 set GodusDir=N
  58. if ERRORLEVEL==15 set GodusDir=O
  59. if ERRORLEVEL==16 set GodusDir=P
  60. if ERRORLEVEL==17 set GodusDir=Q
  61. if ERRORLEVEL==18 set GodusDir=R
  62. if ERRORLEVEL==19 set GodusDir=S
  63. if ERRORLEVEL==20 set GodusDir=T
  64. if ERRORLEVEL==21 set GodusDir=U
  65. if ERRORLEVEL==22 set GodusDir=V
  66. if ERRORLEVEL==23 set GodusDir=W
  67. if ERRORLEVEL==24 set GodusDir=X
  68. if ERRORLEVEL==25 set GodusDir=Y
  69. if ERRORLEVEL==26 set GodusDir=Z
  70. if ERRORLEVEL==0 if %GodusDir%.==. goto choice_error
  71.  
  72. Echo Finding Godus.exe the long way - This may take a while.
  73. for /f "delims=" %%i in ('dir /s /b /a-d "%GodusDir%:\godus.exe" 2^>nul') do set GodusDir=%%i
  74. if exist %GodusDir% goto set_godusdir
  75. echo godus.exe not found on drive %GodusDir%
  76. echo Please try another drive letter or press ctrl-c to exit
  77. goto pickdrive
  78. :set_godusdir
  79. set GodusDir=%GodusDir:~0,-9%
  80. Echo Found Godus install dir -> %GodusDir%
  81. set i=
  82. :Create_Dxdiagdump
  83. echo ---
  84. echo Starting Godus diagnostics data retrival.
  85. echo ---
  86. Echo Creating DXDiagDump.txt - This may take a while. Even on a fast system.
  87. dxdiag /t %DiagDir%\DxdiagDump.txt
  88. :getgodusfiles
  89.  
  90. rem Collect Crash.log,Verbose.log and other files like minidump.
  91. :Crash_collect
  92. echo Copying Crashlog Files.
  93. copy /Y %GodusDir%\crashlog-*.txt %DiagDir%
  94. :Verbose_log
  95. Echo Copying Verbose Files.
  96. copy /Y %GodusDir%\verbose_*.log %DiagDir%
  97. :Misc_files
  98. Echo Copying the id file.
  99. Copy /Y %GodusDir%\id %DiagDir%
  100. :Mini_dump
  101. Echo Checking if minidump has been created.
  102. if not exist %GodusDir%..\minidump.dmp goto no_mini_dump
  103. echo Copying %GodusDir%..\minidump.dmp
  104. copy /Y %GodusDir%..\minidump.dmp %DiagDir%
  105. goto save_games
  106. :no_mini_dump
  107. echo No Mini dump found.
  108. :Save_games
  109. for /f "delims=" %%i in ('dir /b /ad "%GodusDir%\prf*.*"') do set PrfDir=%%i
  110. if "%PrfDir%"=="" goto no_save_dir
  111. echo Save game directory %PrfDir%
  112. md %DiagDir%\%PrfDir%
  113. echo Copying Save game data.
  114. copy /Y %GodusDir%\%PrfDir%\*.* %DiagDir%\%PrfDir%
  115.  
  116. :copy_balance_files
  117. Echo Copying balance files.
  118. mkdir %DiagDir%\BalanceModifiersOriginals
  119. mkdir %DiagDir%\bm
  120. copy /Y %GodusDir%\BalanceModifiersOriginals\*.* %DiagDir%\BalanceModifiersOriginals
  121. copy /Y %GodusDir%\bm\*.* %DiagDir%\bm
  122. :make_nice_info_for_22cans
  123. Echo Makeing Verbose index file for 22cans. This is handy if you have large verbose files with new sessions.
  124. find /I /N "LOG_START" %GodusDir%\Verbose*.log > %DiagDir%\Verbose_index.txt
  125. for %%i in (Verbose_*.log) do find /I "Error" %GodusDir%\%%i > %DiagDir%\%%i.error
  126. for %%i in (Verbose_*.log) do find /I "didn't" %GodusDir%\%%i >> %DiagDir%\%%i.error
  127. for %%i in (Verbose_*.log) do find /I "not Found" %GodusDir%\%%i >> %DiagDir%\%%i.error
  128. for %%i in (Verbose_*.log) do find /I "Failed" %GodusDir%\%%i >> %DiagDir%\%%i.error
  129. for %%i in (Verbose_*.log) do find /I "iwerror" %GodusDir%\%%i >> %DiagDir%\%%i.error
  130. for %%i in (Verbose_*.log.error) do sort %%i >%%i
  131. cd /d %DiagDir%
  132. goto end
  133. :choice_error
  134. echo Mysterious choice error. Could be ctrl-c or ctrl-break was pressed?
  135. goto end
  136. :no_save_dir
  137. echo No save game directory found.
  138. goto end
  139. :error_DiagDir
  140. echo Diagnostic dump directory unable to be created. Error Code 1. (Directory not found)
  141. :end
Advertisement
Add Comment
Please, Sign In to add comment