Quellcode durchsuchen

Fixes #415. Colors: The native method "COLOR_PAIRS" does not exist

BDisp vor 2 Jahren
Ursprung
Commit
683272f959

+ 3 - 1
Terminal.Gui/ConsoleDrivers/CursesDriver/binding.cs

@@ -43,6 +43,7 @@
 //
 using System;
 using System.Runtime.InteropServices;
+using Terminal.Gui;
 
 namespace Unix.Terminal {
 #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
@@ -93,7 +94,8 @@ namespace Unix.Terminal {
 
 					if (attempts == 1) {
 						attempts++;
-						if (Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.OperatingSystem.Contains ("opensuse")) {
+						var (exitCode, result) = ClipboardProcessRunner.Bash ("cat /etc/os-release", waitForOutput: true);
+						if (exitCode == 0 && result.Contains ("opensuse")) {
 							libs [0] = "libncursesw.so.5";
 						}
 					} else {

+ 0 - 2
Terminal.Gui/Terminal.Gui.csproj

@@ -16,8 +16,6 @@
     <InformationalVersion>1.0</InformationalVersion>
   </PropertyGroup>
   <ItemGroup>
-    <PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
-    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
     <PackageReference Include="NStack.Core" Version="1.0.7" />
     <InternalsVisibleTo Include="UnitTests" />
   </ItemGroup>