From a901f90a73d19b6fe8a9be9876e0c4fa704b0c35 Mon Sep 17 00:00:00 2001 From: Constantin Shalnev Date: Mon, 1 Feb 2016 16:37:28 +0300 Subject: [PATCH] Copy classificator.txt in generator_tool --- qt/build_style/build_style.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/qt/build_style/build_style.cpp b/qt/build_style/build_style.cpp index 7ee2b74f29..1b7733556e 100644 --- a/qt/build_style/build_style.cpp +++ b/qt/build_style/build_style.cpp @@ -30,6 +30,12 @@ QString GetGeometryToolPath() return resourceDir + "generator_tool.app/Contents/MacOS/generator_tool"; } +QString GetGeometryToolDir() +{ + QString const resourceDir = GetPlatform().ResourcesDir().c_str(); + return resourceDir + "generator_tool.app/Contents/MacOS/"; +} + } // namespace namespace build_style @@ -67,6 +73,13 @@ void RunRecalculationGeometryScript(QString const & mapcssFile) QString const generatorToolPath = GetGeometryToolPath(); QString const appPath = QCoreApplication::applicationFilePath(); + QString const geometryToolDir = GetGeometryToolDir(); + + if (!CopyFile(resourceDir + "drules_proto.bin", geometryToolDir + "drules_proto.bin")) + throw runtime_error("Cannot copy drawing rules file"); + if (!CopyFile(resourceDir + "classificator.txt", geometryToolDir + "classificator.txt")) + throw runtime_error("Cannot copy classificator file"); + QStringList params; params << "python" << GetRecalculateGeometryScriptPath() <<