summaryrefslogtreecommitdiff
path: root/bin/render.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-01-11 15:00:56 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-01-13 13:40:31 -0800
commit5a7d2fd60ec4bd1639a1223ec5d2c54c534d0392 (patch)
treed37991995bd21955379e690b677fc288109aa2c1 /bin/render.cpp
parent86c8446d3a4390ff6577d070ac8b5fa3ad3c5cd1 (diff)
downloadqtlocation-mapboxgl-5a7d2fd60ec4bd1639a1223ec5d2c54c534d0392.tar.gz
[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.
Diffstat (limited to 'bin/render.cpp')
-rw-r--r--bin/render.cpp4
1 files changed, 3 insertions, 1 deletions
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<std::string> 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()) {