Browse Source

macos fixes & remove mac label for volta

pull/438/head
jt 1 year ago
parent
commit
b4fd64e7fc
  1. 1
      StabilityMatrix.Avalonia.Diagnostics/StabilityMatrix.Avalonia.Diagnostics.csproj
  2. 1
      StabilityMatrix.Avalonia/App.axaml
  3. 2
      StabilityMatrix.Avalonia/Helpers/UriHandler.cs
  4. 9
      StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
  5. 5
      StabilityMatrix.Core/Models/Packages/BasePackage.cs
  6. 2
      StabilityMatrix.Core/Models/Packages/VoltaML.cs
  7. 2
      StabilityMatrix.Core/Processes/ProcessRunner.cs
  8. 1
      StabilityMatrix.Core/StabilityMatrix.Core.csproj
  9. 1
      StabilityMatrix.Tests/StabilityMatrix.Tests.csproj
  10. 1
      StabilityMatrix.UITests/StabilityMatrix.UITests.csproj

1
StabilityMatrix.Avalonia.Diagnostics/StabilityMatrix.Avalonia.Diagnostics.csproj

@ -21,6 +21,7 @@
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.5" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.5" />
<PackageReference Include="DotNet.Bundle" Version="0.9.13" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />

1
StabilityMatrix.Avalonia/App.axaml

@ -4,6 +4,7 @@
xmlns:local="using:StabilityMatrix.Avalonia"
xmlns:idcr="using:Dock.Avalonia.Controls.Recycling"
xmlns:styling="clr-namespace:FluentAvalonia.Styling;assembly=FluentAvalonia"
Name="Stability Matrix"
RequestedThemeVariant="Dark">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->

2
StabilityMatrix.Avalonia/Helpers/UriHandler.cs

@ -64,7 +64,7 @@ public class UriHandler
{
RegisterUriSchemeWin();
}
else
else if (Compat.IsLinux)
{
RegisterUriSchemeUnix();
}

9
StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj

@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<CFBundleName>Stability Matrix</CFBundleName>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;osx-arm64</RuntimeIdentifiers>
@ -14,6 +15,13 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<CFBundleURLTypes Include="dummy">
<CFBundleURLName>StabilityMatrix.URL</CFBundleURLName>
<CFBundleURLSchemes>stabilitymatrix;stabilitymatrix://</CFBundleURLSchemes>
</CFBundleURLTypes>
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="StabilityMatrix.Tests" />
<InternalsVisibleTo Include="StabilityMatrix.UITests" />
@ -37,6 +45,7 @@
<PackageReference Include="Dock.Avalonia" Version="11.0.0.3" />
<PackageReference Include="Dock.Model.Avalonia" Version="11.0.0.3" />
<PackageReference Include="Dock.Serializer" Version="11.0.0.3" />
<PackageReference Include="DotNet.Bundle" Version="0.9.13" />
<PackageReference Include="DynamicData" Version="8.1.1" />
<PackageReference Include="FluentAvalonia.BreadcrumbBar" Version="2.0.2" />
<PackageReference Include="FluentAvaloniaUI" Version="2.0.4" />

5
StabilityMatrix.Core/Models/Packages/BasePackage.cs

@ -133,6 +133,11 @@ public abstract class BasePackage
return TorchVersion.DirectMl;
}
if (Compat.IsMacOS && Compat.IsArm && AvailableTorchVersions.Contains(TorchVersion.Mps))
{
return TorchVersion.Mps;
}
return TorchVersion.Cpu;
}

2
StabilityMatrix.Core/Models/Packages/VoltaML.cs

@ -62,7 +62,7 @@ public class VoltaML : BaseGitPackage
public override SharedFolderMethod RecommendedSharedFolderMethod => SharedFolderMethod.Symlink;
public override IEnumerable<TorchVersion> AvailableTorchVersions =>
new[] { TorchVersion.Cpu, TorchVersion.Cuda, TorchVersion.DirectMl, TorchVersion.Mps };
new[] { TorchVersion.Cpu, TorchVersion.Cuda, TorchVersion.DirectMl };
public override IEnumerable<SharedFolderMethod> AvailableSharedFolderMethods =>
new[] { SharedFolderMethod.Symlink, SharedFolderMethod.None };

2
StabilityMatrix.Core/Processes/ProcessRunner.cs

@ -92,7 +92,7 @@ public static class ProcessRunner
else if (Compat.IsMacOS)
{
using var process = new Process();
process.StartInfo.FileName = "explorer";
process.StartInfo.FileName = "open";
process.StartInfo.Arguments = $"-R {Quote(filePath)}";
process.Start();
await process.WaitForExitAsync().ConfigureAwait(false);

1
StabilityMatrix.Core/StabilityMatrix.Core.csproj

@ -23,6 +23,7 @@
<PackageReference Include="DeviceId.Mac" Version="6.2.1" />
<PackageReference Include="DeviceId.Windows" Version="6.5.0" />
<PackageReference Include="DeviceId.Windows.Wmi" Version="6.5.1" />
<PackageReference Include="DotNet.Bundle" Version="0.9.13" />
<PackageReference Include="DynamicData" Version="8.1.1" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="LiteDB.Async" Version="0.1.7" />

1
StabilityMatrix.Tests/StabilityMatrix.Tests.csproj

@ -11,6 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNet.Bundle" Version="0.9.13" />
<PackageReference Include="DotNext" Version="4.15.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.0" />

1
StabilityMatrix.UITests/StabilityMatrix.UITests.csproj

@ -11,6 +11,7 @@
<ItemGroup>
<PackageReference Include="Avalonia.Headless.XUnit" Version="11.0.5" />
<PackageReference Include="DotNet.Bundle" Version="0.9.13" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="Verify" Version="22.4.1" />

Loading…
Cancel
Save