Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo OFF
- set "iconFile=%~1"
- set "iconName=%~n1"
- set "iconDir=%~dp1"
- set steamLibDrive=C
- set "steamLibDir=Program Files\Steam\steamapps\common\"
- set "steamLibDirx86=Program Files (x86)\Steam\steamapps\common\"
- set "modToolsPng=Don't Starve Mod Tools\mod_tools\png.exe"
- set "libDir=%steamLibDrive%:\%steamLibDir%"
- set "pngTool=%libDir%%modToolsPng%"
- IF not exist "%pngTool%" (
- set "libDir=%steamLibDrive%:\%steamLibDirx86%"
- set "pngTool=%libDir%%modToolsPng%"
- IF not exist "%pngTool%" (
- IF not exist "%libDir%" (
- IF not exist "%steamLibDrive%:\%steamLibDir%" (
- echo "Could not find Steam Library folder. Please adjust the paths in this .cmd script"
- goto editThis
- )
- )
- echo Could not find DST Mod Tools PNG executable. Please change the paths in this .cmd script or download the latest Mod Tools version.
- setlocal EnableDelayedExpansion
- :SetPrompt
- set "UserChoice="
- set /P "UserChoice=Would you like to download the mod tools? [Y/N]: "
- set "UserChoice=!UserChoice: =!"
- if /I "!UserChoice!" == "N" goto SetPromptb
- if /I not "!UserChoice!" == "Y" goto SetPrompt
- goto getModTools
- endlocal
- setlocal EnableDelayedExpansion
- :SetPromptb
- set "UserChoice="
- set /P "UserChoice=Would you like to edit this .cmd script? [Y/N]: "
- set "UserChoice=!UserChoice: =!"
- if /I "!UserChoice!" == "N" endlocal & goto end
- if /I not "!UserChoice!" == "Y" goto SetPromptb
- goto editThis
- endlocal
- goto end
- )
- )
- IF not exist "%libDir%" (
- set "libDir=%steamLibDrive%:\%steamLibDirx86%"
- )
- IF not exist "%libDir%" (
- echo "Could not find Steam Library folder. Please adjust the paths in this .cmd script"
- )
- "%pngTool%" "%iconFile%" "%iconName%.tex"
- echo done?
- pause
- goto :EOF
- :getModTools
- endlocal
- start "" "steam://install/245850"
- goto end
- :editThis
- endlocal
- start notepad "%~0"
- goto end
- :end
- echo Please try again after resolving the issue.
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement