Move MatterControl source code into a subdirectory

This commit is contained in:
Nettika 2026-01-28 21:30:58 -08:00
parent 2c6e34243a
commit 70af2d9ae8
Signed by: nettika
SSH key fingerprint: SHA256:f+PJrfIq49zrQ6dQrHj18b+PJKmAldeAMiGdj8IzXCA
2007 changed files with 13 additions and 8 deletions

View file

@ -0,0 +1,51 @@
using System;
using System.IO;
using MatterHackers.Agg.Platform;
using MatterHackers.MatterControl.DataStorage;
namespace MatterHackers.MatterControl.SlicerConfiguration
{
public static class MatterSliceInfo
{
public static string DisplayName { get; } = "MatterSlice";
public static string GetEnginePath()
{
switch (AggContext.OperatingSystem)
{
case OSType.Windows:
return getWindowsPath();
case OSType.Mac:
return getMacPath();
case OSType.X11:
return getLinuxPath();
case OSType.Android:
return null;
default:
throw new NotImplementedException();
}
}
private static string getWindowsPath()
{
string matterSliceRelativePath = Path.Combine(".", "MatterSlice.exe");
return Path.GetFullPath(matterSliceRelativePath);
}
private static string getMacPath()
{
string applicationPath = Path.Combine(ApplicationDataStorage.Instance.ApplicationPath, "MatterSlice");
return applicationPath;
}
private static string getLinuxPath()
{
string matterSliceRelativePath = Path.Combine(".", "MatterSlice.exe");
return Path.GetFullPath(matterSliceRelativePath);
}
}
}