pull config from program options
This commit is contained in:
parent
f73723f9af
commit
92196dc207
@ -44,13 +44,30 @@ void print_tree(boost::property_tree::ptree const& pt, const unsigned recursion_
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int main (int argc, char * argv[]) {
|
int main (int argc, const char * argv[]) {
|
||||||
LogPolicy::GetInstance().Unmute();
|
LogPolicy::GetInstance().Unmute();
|
||||||
try {
|
try {
|
||||||
std::cout << "\n starting up engines, compile at "
|
std::string ip_address;
|
||||||
<< __DATE__ << ", " __TIME__ << std::endl;
|
int ip_port, requested_num_threads;
|
||||||
IniFile serverConfig((argc > 1 ? argv[1] : "server.ini"));
|
|
||||||
OSRM routing_machine((argc > 1 ? argv[1] : "server.ini"));
|
ServerPaths server_paths;
|
||||||
|
if( !GenerateServerProgramOptions(
|
||||||
|
argc,
|
||||||
|
argv,
|
||||||
|
server_paths,
|
||||||
|
ip_address,
|
||||||
|
ip_port,
|
||||||
|
requested_num_threads
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleLogger().Write() <<
|
||||||
|
"starting up engines, " << g_GIT_DESCRIPTION << ", " <<
|
||||||
|
"compiled at " << __DATE__ << ", " __TIME__;
|
||||||
|
|
||||||
|
OSRM routing_machine(server_paths);
|
||||||
|
|
||||||
RouteParameters route_parameters;
|
RouteParameters route_parameters;
|
||||||
route_parameters.zoomLevel = 18; //no generalization
|
route_parameters.zoomLevel = 18; //no generalization
|
||||||
|
Loading…
Reference in New Issue
Block a user