Remove usage of Mono.Posix.NETStandard accross all projects (#2906)

* Remove usage of Mono.Posix.NETStandard in Ryujinx project

* Remove usage of Mono.Posix.NETStandard in ARMeilleure project

* Remove usage of Mono.Posix.NETStandard in Ryujinx.Memory project

* Address gdkchan's comments
This commit is contained in:
Mary 2021-12-08 22:24:26 +01:00 committed by GitHub
parent bc4e70b6fa
commit 00c69f2098
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 149 additions and 42 deletions

View file

@ -1,12 +1,10 @@
using Gdk;
using Gtk;
using Mono.Unix;
using Ryujinx.Ui;
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
namespace Ryujinx.Modules
{

View file

@ -2,7 +2,6 @@ using Gtk;
using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Tar;
using ICSharpCode.SharpZipLib.Zip;
using Mono.Unix;
using Newtonsoft.Json.Linq;
using Ryujinx.Common.Logging;
using Ryujinx.Ui;
@ -355,14 +354,16 @@ namespace Ryujinx.Modules
worker.Start();
}
[DllImport("libc", SetLastError = true)]
private static extern int chmod(string path, uint mode);
private static void SetUnixPermissions()
{
string ryuBin = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Ryujinx");
if (!OperatingSystem.IsWindows())
{
UnixFileInfo unixFileInfo = new UnixFileInfo(ryuBin);
unixFileInfo.FileAccessPermissions |= FileAccessPermissions.UserExecute;
chmod(ryuBin, 0777);
}
}

View file

@ -61,9 +61,6 @@ namespace Ryujinx
}
}
// Enforce loading of Mono.Posix to avoid .NET runtime lazy loading it during an update.
Assembly.Load("Mono.Posix.NETStandard");
// Make process DPI aware for proper window sizing on high-res screens.
ForceDpiAware.Windows();
WindowScaleFactor = ForceDpiAware.GetWindowScaleFactor();

View file

@ -25,7 +25,6 @@
<PackageReference Include="OpenTK.Graphics" Version="4.5.0" />
<PackageReference Include="SPB" Version="0.0.3-build15" />
<PackageReference Include="SharpZipLib" Version="1.3.3" />
<PackageReference Include="Mono.Posix.NETStandard" Version="5.20.1-preview" />
</ItemGroup>
<ItemGroup>