From 5a7d2fd60ec4bd1639a1223ec5d2c54c534d0392 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 11 Jan 2016 15:00:56 -0800 Subject: [core] Eliminate platform::assetRoot() I regenerated assets.zip so that all file paths have an `assets/` prefix, as the Android AssetFileSource implementation asserts, and removed `TEST_DATA` from the paths. --- bin/render.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/render.cpp b/bin/render.cpp index 26fd06d507..0bcb5dff73 100644 --- a/bin/render.cpp +++ b/bin/render.cpp @@ -30,6 +30,7 @@ int main(int argc, char *argv[]) { double pixelRatio = 1.0; static std::string output = "out.png"; std::string cache_file = "cache.sqlite"; + std::string asset_root = "."; std::vector classes; std::string token; bool debug = false; @@ -48,6 +49,7 @@ int main(int argc, char *argv[]) { ("debug", po::bool_switch(&debug)->default_value(debug), "Debug mode") ("output,o", po::value(&output)->value_name("file")->default_value(output), "Output file name") ("cache,d", po::value(&cache_file)->value_name("file")->default_value(cache_file), "Cache database file name") + ("assets,d", po::value(&asset_root)->value_name("file")->default_value(asset_root), "Directory to which asset:// URLs will resolve") ; try { @@ -64,7 +66,7 @@ int main(int argc, char *argv[]) { using namespace mbgl; util::RunLoop loop; - DefaultFileSource fileSource(cache_file); + DefaultFileSource fileSource(cache_file, asset_root); // Try to load the token from the environment. if (!token.size()) { -- cgit v1.2.1