allow auto-opening of rendered svg on linux
This commit is contained in:
parent
5c20a9f72a
commit
5014694591
1 changed files with 4 additions and 2 deletions
|
@ -182,14 +182,16 @@ int main (int argc,char** argv)
|
|||
|
||||
boost::algorithm::ireplace_last(svg_name,".svg",".png");
|
||||
mapnik::save_to_file<mapnik::image_data_32>(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";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue