# HG changeset patch # User Matti Hamalainen # Date 1397282854 -10800 # Node ID 8a8bd1d4a51c4e030e740504f4356677df857744 # Parent 3729d8871b5024e55291e308648a13f29604f53a Some more work on setup process. Still missing some pieces. diff -r 3729d8871b50 -r 8a8bd1d4a51c tools/makegmaps.php --- a/tools/makegmaps.php Sat Apr 12 08:20:05 2014 +0300 +++ b/tools/makegmaps.php Sat Apr 12 09:07:34 2014 +0300 @@ -16,7 +16,7 @@ "pathMapUtils" => array(2, "maputils/", "Path for maputils directory tree."), "pathImageCache" => array(2, "cache/", "Image cache directory."), - "pathMarkerData" => array(2, "../", "Path to marker data files."), + "pathGMap" => array(2, "../", "Path to map main directory and marker data files."), "pathTileData" => array(2, "../tiles/", "Path to map tiles directory structure."), "pathRawMaps" => array(3, FALSE, "Path to the raw ASCII maps."), @@ -277,6 +277,15 @@ echo "\n"; } + $cfg["gmapsKey"] = stInputPrompt( + "Enter your Google Maps API key (or leave empty, and edit later)\n", + FALSE, FALSE); + + echo + "\nNext up are some files and paths. All of them can be safely\n". + "left to their default values (e.g. just press ) unless\n". + "you know you want something set differently.\n\n"; + stQueryConfigItems(1); stQueryConfigItems(2); @@ -287,16 +296,24 @@ stQueryConfigItems(3); - stOutputToFile($gmapsConfig, ""); + stOutputToFile($gmapsConfig, ""); + + stOutputToFile($cfg["pathGMap"]."config.inc.php", + "\n"); } // // Set rest of the paths etc // -$worldJS = $cfg["pathMarkerData"]."world.js"; -$tradelaneOut = $cfg["pathMarkerData"]."tradelane.json"; -$tradelaneOverlay = $cfg["pathMarkerData"]."trlines.json"; +$pathTileData = $cfg["pathGMap"]."tiles/"; +$worldJS = $cfg["pathGMap"]."world.js"; +$tradelaneOut = $cfg["pathGMap"]."tradelane.json"; +$tradelaneOverlay = $cfg["pathGMap"]."trlines.json"; $binMkLoc = $cfg["pathMapUtils"]."mkloc"; $rawSuffix = ".new"; $rawAltSuffix = ".map"; @@ -402,7 +419,7 @@ foreach ($modes as $mode => $mdata) { - $tmp = escapeshellcmd($binMkLoc)." -v -o ".escapeshellarg($cfg["pathMarkerData"].$mdata[0])." -G ".$mode." "; + $tmp = escapeshellcmd($binMkLoc)." -v -o ".escapeshellarg($cfg["pathGMap"].$mdata[0])." -G ".$mode." "; foreach ($continentList as $name => $data) {