From 5014694591110f14f44ee2058b5b0d9379380f93 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 23 Jul 2012 17:41:52 -0700 Subject: [PATCH] allow auto-opening of rendered svg on linux --- utils/svg2png/svg2png.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/svg2png/svg2png.cpp b/utils/svg2png/svg2png.cpp index 63aa5725d..c06ba187f 100644 --- a/utils/svg2png/svg2png.cpp +++ b/utils/svg2png/svg2png.cpp @@ -182,14 +182,16 @@ int main (int argc,char** argv) boost::algorithm::ireplace_last(svg_name,".svg",".png"); mapnik::save_to_file(im.data(),svg_name,"png"); -#ifdef DARWIN if (auto_open) { std::ostringstream s; +#ifdef DARWIN s << "open " << svg_name; +#else + s << "xdg-open " << svg_name; +#endif system(s.str().c_str()); } -#endif std::clog << "rendered to: " << svg_name << "\n"; } }