Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rem @echo off
- :: Some Launcher for the Minetest-Mapper using WizApp for eyecandy
- :: Place this folder in the folder the minetest-mapper.exe is in
- :: so that the mapper is in the parent folder of this.
- :: no color choosing and some default geometry as of yet.
- :: more might come
- :: this file is all cco
- :: except where I kopied ideas from others that didn't state a license
- :: The creator wishes to not be held responsible
- :: for any havoc it may create - this is a batch file!
- :: Use with care, it will not ask before destroying your pc.
- :: The creator of this file may be found roaming the minetest servers,
- :: IRC or the forums at minetest.net as twoelk
- :letsbegin
- set page=:letsbegin
- set watitle=Minetest Mapper Batch wraparound
- set wabmp=minetest-icon-120.bmp
- set watext=~This is a version that may sort of run on XP.~~The "Back" and "Cancel" buttons will NOT work on most pages, so use at own risk.
- set watext1=~Behavior on Vista or later may be totally different. Please use the normal runmapper.bat on those.
- set watext2=~~~This is a container driven by batch files that may aid in using the command line tool Minetest Mapper.~do you want to continue?~~Press OK if you do.~Press Cancel if you do not.
- set walabels=;OK
- set wabat=wabatconfigs.bat
- set waoutput=
- set wainput=
- start /w wizapp NOBACK TB
- set watext=
- set watext1=
- set watext2=
- set walabels=
- if errorlevel 2 goto :cancel
- if errorlevel 0 if not errorlevel 2 echo Then let's continue.
- set previous=:letsbegin
- goto page3
- :page2
- set page=:page2
- set watext=~~Choose a language you want the program to run in:
- set wainput= ^&English; ^&German
- set waoutnum=0
- set wabmp=minetest-icon-120.bmp
- start /w wizapp RB
- call %wabat%
- if "%waoutnum%"=="0" set language=English
- if "%waoutnum%"=="1" set language=German
- set waoutput=
- set wainput=
- set waoutnum=
- if errorlevel 2 goto :cancel
- if errorlevel 1 goto %previous%
- set previous=:page2
- :page3
- set page=:page3
- set watext=~~Choose the folder of a Minetest World to map:
- set walistsep=,
- set waoutput=
- start /w wizapp FB DIR
- call %wabat%
- set world_dir=%waoutput%
- set watext=
- set walistsep=
- set waoutput=
- if errorlevel 0 goto :page4
- if errorlevel 1 goto %previous%
- if errorlevel 2 goto :cancel
- set previous=:page3
- :page4
- set page=:page4
- echo The world is in: %world_dir%
- if exist %world_dir%\map.sqlite goto :treasurehunt
- set watext=Sorry, the world path does not seem to be valid. Please try again.
- start /w wizapp MB STOP
- goto %previous%
- :treasurehunt
- echo in treasurhunt now
- set watext=~~Write an output file name or keep the suggested (Map+World-Name+IsoDate.png)
- set inputstring=%world_dir%
- set treasure=worlds
- set found=notyet
- :searchloop
- for /f "tokens=1* delims=\" %%a in ("%inputstring%") do set found=%%a&set rest=%%b
- if %found%==%treasure% goto :foundtreasure
- set inputstring=%rest%
- if "%rest%"=="" goto :page3
- goto searchloop
- :foundtreasure
- set worldname=%rest%
- :findisodate
- set isodate=%date:~6,4%%date:~3,2%%date:~0,2%T%time:~0,2%%time:~3,2%
- set isodate=%isodate: =0%
- set waoutput=Map-%worldname%-%isodate%.png
- start /w wizapp EB
- call %wabat%
- set filename=%waoutput%
- echo file name is %waoutput%
- set watext=
- set waoutput=
- set inputstring=
- set treasure=
- set found=
- set rest=
- if errorlevel 0 goto :page5
- if errorlevel 2 goto :cancel
- if errorlevel 1 goto %previous%
- set previous=:page4
- :page5
- set page=:page5
- set watext=~~Choose something:
- set wainput=--drawscale --drawplayers --draworigin
- for %%c in (0 1 2) do set chk%%c=
- for %%c in (%waoutnum%) do set chk%%c=1
- if "%chk0%"=="1" echo drawscale was checked
- if "%chk1%"=="1" echo drawplayers was checked
- if "%chk2%"=="1" echo draworigin was checked
- start /w wizapp CL
- call %wabat%
- set parameters1=%waoutput%
- set waoutput=
- set wainput=
- if errorlevel 0 goto :collectingdata
- if errorlevel 2 goto :cancel
- if errorlevel 1 goto %previous%
- set previous=:page5
- :collectingdata
- set page=:collectingdata
- set runcommando=minetest_mapper.exe -i %world_dir% -o %filename% %parameters1% --geometry -6000:-6000+12000+12000 >>configinfo.txt
- echo _____________________>configinfo.txt
- echo Die gespeicherten Variablen>>configinfo.txt
- echo _____________________>>configinfo.txt
- echo The chosen language is: %language%>>configinfo.txt
- echo The world is in: %world_dir%>>configinfo.txt
- echo The map file shall be called: %filename%>>configinfo.txt
- echo The parameters are: %parameters1%>>configinfo.txt
- echo _____________________>>configinfo.txt
- echo The resulting command would be:>>configinfo.txt
- echo _____________________>>configinfo.txt
- echo %runcommando%>>configinfo.txt
- del wabatconfigs.bat
- rem if errorlevel 2 goto :cancel
- rem if errorlevel 1 goto %previous%
- rem set previous=:collectingdata
- rem if errorlevel 0 goto :showdata
- :showdata
- set page=:showdata
- set wafile=configinfo.txt
- set watext=The collected data:
- start /w wizapp FT
- set wafile=
- set watext=
- if errorlevel 0 goto :makemap
- if errorlevel 2 goto :cancel
- if errorlevel 1 goto %previous%
- set previous=:showdata
- :makemap
- set page=:makemap
- set watext=Shall the map be made?
- start /w wizapp MB QUESTION
- set watext=
- if errorlevel 0 goto :checkformapper
- if errorlevel 2 goto :cancel
- if errorlevel 1 goto %previous%
- set previous=:makemap
- :checkformapper
- if "%mapperpath%"=="" set mapperpath=..\
- if exist %mapperpath%minetest_mapper.exe goto :runmapper
- set watext=Sorry, the Minetest-mapper.exe cannot be found. ~Please make sure it is in the parent folder of this batch file and try again.
- start /w wizapp MB STOP
- goto %previous%
- :runmapper
- set page=:runmapper
- set home=%cd%
- cd ..
- %runcommando%>>runme.bat
- echo .. please wait a bit ..
- call runme.bat
- dir
- pause
- cd %home%
- set watext=Do you want to make another map?
- start /w wizapp MB QUESTION
- set watext=
- if errorlevel 2 goto :cancel
- if errorlevel 0 goto :page3
- :cancel
- set page=
- set watitle=
- set wabmp=
- set watext=
- set previous=
- set wainput=
- set waoutnum=
- set wabat=
- set walistsep=
- set waoutput=
- :end
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement