diff --git a/TeslaLogger/OSMMapProvider.cs b/TeslaLogger/OSMMapProvider.cs index 328dd6dd4..ed11c5ce7 100644 --- a/TeslaLogger/OSMMapProvider.cs +++ b/TeslaLogger/OSMMapProvider.cs @@ -239,14 +239,29 @@ public override void CreateParkingMap(double lat, double lng, int width, int hei private static void GetOSMMapGeneratorFilename(out string fileName, out string arguments) { - fileName = "/usr/bin/mono"; - arguments = "/etc/teslalogger/OSMMapGenerator.exe "; + if (Tools.IsMono()) + { + fileName = "/usr/bin/mono"; + arguments = "/etc/teslalogger/OSMMapGenerator.exe "; - if (!Tools.IsMono()) + if (!Tools.IsMono()) + { + var f = new FileInfo("../../../OSMMapGenerator/bin/Debug/OSMMapGenerator.exe"); + fileName = f.FullName; + arguments = ""; + } + } + else { - var f = new FileInfo("../../../OSMMapGenerator/bin/Debug/OSMMapGenerator.exe"); - fileName = f.FullName; - arguments = ""; + fileName = "/home/cli/dotnet"; + arguments = "/etc/teslalogger/OSMMapGenerator.exe "; + + if (!Tools.IsMono()) + { + var f = new FileInfo("OSMMapGeneratorNET8.dll"); + fileName = f.FullName; + arguments = ""; + } } }