how to have a script/batch check for mkgmap version?

I just noticed, that mkgmap changed the files it outputs on an empty command just again... /java -jar mkgmap.jar --latin1 --overview-mapname=test1 --tdbfile --index/ used to produce at least either: /mdr*.tmp/ or /test1_mdr.img/ now however (since integration of the overview2 branch?) - no files are output at all anymore... it would be great if there was a possibility to check for a) mkgmap working (check if working very basic/only react if correct Java installed, and output a file - even without input) b) best would be if that file could contain the mkgmap version number - so right now 2641... or am I missing something - and what I want to achieve is already possible? -- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org

Well I managed some sort of test - but it would be nicer to get the version output to file for checking: /:checkfor_new_mkgmap_versions// //if not exist mkgmap.jar goto :begin// //echo your mkgmap version is:// //java -jar mkgmap.jar --version >> version_test.txt// //if %errorlevel% EQU 0 if exist version_test.txt goto :part2ofcheck// //if %errorlevel% NEQ 0 @for /R %%i in (version_test.txt) do @if %%~zi==0 del %%i // //echo mkmgap.jar found but not working. Either mkgmap.jar too old, or java not correctly installed!// //goto :begin// // //:part2ofcheck// //@for /R %%i in (version_test.txt) do @if %%~zi==0 del %%i // //if not exist version_test.txt goto :begin// //echo if mkgmap version lower 2641 - please update mkgmap.jar!// //del version_test.txt// //@echo.// //@echo./ Dunno why >> doesn't put the version into the version_text.txt but instead puts the time of running mkgmap into the .txt file. On 06.06.2013 22:39, Felix Hartmann wrote:
I just noticed, that mkgmap changed the files it outputs on an empty command just again...
/java -jar mkgmap.jar --latin1 --overview-mapname=test1 --tdbfile --index/
used to produce at least either: /mdr*.tmp/ or /test1_mdr.img/ now however (since integration of the overview2 branch?) - no files are output at all anymore...
it would be great if there was a possibility to check for a) mkgmap working (check if working very basic/only react if correct Java installed, and output a file - even without input) b) best would be if that file could contain the mkgmap version number - so right now 2641...
or am I missing something - and what I want to achieve is already possible? -- keep on biking and discovering new trails
Felix openmtbmap.org &www.velomap.org
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org

Hi Felix, yes, I added some checks in mkgmap to avoid the writing of (almost) empty files when mkgmap is started without file args. If you want to produce an output file, you can use the test function, e.g. java -jar mkgmap.jar test-map:test-points Felix Hartmann-2 wrote
Well I managed some sort of test - but it would be nicer to get the version output to file for checking:
Dunno why >> doesn't put the version into the version_text.txt but instead puts the time of running mkgmap into the .txt file.
the reason is that --version prints to stderr instead of stdout. I also don't know why. On Windows, you can use this command to fill a fill with the version number. java -jar mkgmap.jar --version 2> version.txt If you want to append it to the file, use java -jar mkgmap.jar --version 2>> version.txt Gerd -- View this message in context: http://gis.19327.n5.nabble.com/how-to-have-a-script-batch-check-for-mkgmap-v... Sent from the Mkgmap Development mailing list archive at Nabble.com.

java -jar mkgmap.jar test-map:test-points I didn't remember that one. And thanks for clarifying that the version goes to stderr not stdout. On 07.06.2013 08:24, GerdP wrote:
Hi Felix,
yes, I added some checks in mkgmap to avoid the writing of (almost) empty files when mkgmap is started without file args. If you want to produce an output file, you can use the test function, e.g. java -jar mkgmap.jar test-map:test-points
Felix Hartmann-2 wrote
Well I managed some sort of test - but it would be nicer to get the version output to file for checking:
Dunno why >> doesn't put the version into the version_text.txt but instead puts the time of running mkgmap into the .txt file. the reason is that --version prints to stderr instead of stdout. I also don't know why. On Windows, you can use this command to fill a fill with the version number. java -jar mkgmap.jar --version 2> version.txt
If you want to append it to the file, use java -jar mkgmap.jar --version 2>> version.txt
Gerd
-- View this message in context: http://gis.19327.n5.nabble.com/how-to-have-a-script-batch-check-for-mkgmap-v... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org
participants (2)
-
Felix Hartmann
-
GerdP