Mercurial > hg > batmud > gmap2
changeset 214:00e673963d35 gmap2
More cleanups and improvements in building script.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 12 Mar 2014 17:50:49 +0200 |
parents | d42517381b86 |
children | 6d9e3a63d6e1 |
files | tools/makegmaps.php |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/makegmaps.php Wed Mar 12 17:20:59 2014 +0200 +++ b/tools/makegmaps.php Wed Mar 12 17:50:49 2014 +0200 @@ -4,6 +4,7 @@ // Paths and files $binConvert = "convert"; $binMercurial = "hg"; +$binMake = "make"; $pathMapUtils = "maputils/"; $pathImageCache = "cache/"; @@ -34,7 +35,7 @@ $continentJS = $pathMarkerData."continents.js"; $tradelaneOut = $pathMarkerData."tradelane.json"; $tradelaneOverlay = $pathMarkerData."trlines.json"; -$mkloc = $pathMapUtils."mkloc"; +$binMkLoc = $pathMapUtils."mkloc"; $modes = array( "xml" => array("batclient.xml" , 0, 0), @@ -182,18 +183,18 @@ passthru($tmp) == 0 or die("Error executing: ".$tmp."\n"); } -$tmp = "cd ".escapeshellarg($pathMapUtils)." && make"; +$tmp = "cd ".escapeshellarg($pathMapUtils)." && ".$binMake." ".escapeshellarg(basename($binMkLoc)); echo "* $tmp\n"; passthru($tmp) == 0 or die("Error executing: ".$tmp."\n"); -if (!file_exists($mkloc)) - die($mkloc." not found. Maputils package not built, or some other error occured.\n"); +if (!file_exists($binMkLoc)) + die($binMkLoc." not found. Maputils package not built, or some other error occured.\n"); -$tmp = "cd ".escapeshellarg($pathMapUtils)." && make"; +$tmp = "cd ".escapeshellarg($pathMapUtils)." && ".$binMake; passthru($tmp) == 0 or die("Error executing: ".$tmp."\n"); -$tmp = "cd ".escapeshellarg($pathRawMaps)." && make fetch 2> /dev/null"; +$tmp = "cd ".escapeshellarg($pathRawMaps)." && ".$binMake." fetch 2> /dev/null"; passthru($tmp) == 0 or die("Error executing: ".$tmp."\n"); @@ -235,7 +236,7 @@ foreach ($modes as $mode => $mdata) { - $tmp = escapeshellcmd($mkloc)." -v -o ".escapeshellarg($pathMarkerData.$mdata[0])." -G ".$mode." "; + $tmp = escapeshellcmd($binMkLoc)." -v -o ".escapeshellarg($pathMarkerData.$mdata[0])." -G ".$mode." "; foreach ($continentList as $name => $data) {