2017-08-20 15:52:43 -07:00
|
|
|
|
using System;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
using System.IO;
|
2017-08-20 02:34:39 -07:00
|
|
|
|
using MatterHackers.Agg.Platform;
|
2017-08-20 15:52:43 -07:00
|
|
|
|
using MatterHackers.MatterControl.DataStorage;
|
2014-08-19 18:08:40 -07:00
|
|
|
|
|
|
|
|
|
|
namespace MatterHackers.MatterControl.SlicerConfiguration
|
|
|
|
|
|
{
|
2017-06-15 16:54:36 -07:00
|
|
|
|
public static class MatterSliceInfo
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
2017-06-15 16:54:36 -07:00
|
|
|
|
public static string DisplayName { get; } = "MatterSlice";
|
|
|
|
|
|
|
|
|
|
|
|
public static string GetEnginePath()
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
2017-08-20 02:34:39 -07:00
|
|
|
|
switch (AggContext.OperatingSystem)
|
2017-06-15 16:54:36 -07:00
|
|
|
|
{
|
|
|
|
|
|
case OSType.Windows:
|
|
|
|
|
|
return getWindowsPath();
|
2014-08-20 10:52:47 -07:00
|
|
|
|
|
2017-06-15 16:54:36 -07:00
|
|
|
|
case OSType.Mac:
|
|
|
|
|
|
return getMacPath();
|
2014-08-20 12:14:45 -07:00
|
|
|
|
|
2017-06-15 16:54:36 -07:00
|
|
|
|
case OSType.X11:
|
|
|
|
|
|
return getLinuxPath();
|
2014-08-20 12:14:45 -07:00
|
|
|
|
|
2017-06-15 16:54:36 -07:00
|
|
|
|
case OSType.Android:
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
throw new NotImplementedException();
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2014-08-20 12:14:45 -07:00
|
|
|
|
|
2017-06-15 16:54:36 -07:00
|
|
|
|
private static string getWindowsPath()
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
2014-08-27 12:02:15 -07:00
|
|
|
|
string matterSliceRelativePath = Path.Combine(".", "MatterSlice.exe");
|
|
|
|
|
|
return Path.GetFullPath(matterSliceRelativePath);
|
2014-08-19 18:08:40 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2017-06-15 16:54:36 -07:00
|
|
|
|
private static string getMacPath()
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
|
|
|
|
|
string applicationPath = Path.Combine(ApplicationDataStorage.Instance.ApplicationPath, "MatterSlice");
|
|
|
|
|
|
return applicationPath;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-06-15 16:54:36 -07:00
|
|
|
|
private static string getLinuxPath()
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
2014-08-27 12:02:15 -07:00
|
|
|
|
string matterSliceRelativePath = Path.Combine(".", "MatterSlice.exe");
|
|
|
|
|
|
return Path.GetFullPath(matterSliceRelativePath);
|
2014-08-19 18:08:40 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2017-08-20 02:34:39 -07:00
|
|
|
|
}
|