Browse Source

Adjusted compatibility hint for linux-musl-x64

Marcin Ziąbek 10 months ago
parent
commit
085eca8a85
1 changed files with 3 additions and 13 deletions
  1. 3 13
      Source/QuestPDF/Qpdf/QpdfNativeDependencyCompatibilityChecker.cs

+ 3 - 13
Source/QuestPDF/Qpdf/QpdfNativeDependencyCompatibilityChecker.cs

@@ -27,20 +27,10 @@ internal static class QpdfNativeDependencyCompatibilityChecker
     private static string GetHint()
     private static string GetHint()
     {
     {
         var platform = NativeDependencyProvider.GetRuntimePlatform();
         var platform = NativeDependencyProvider.GetRuntimePlatform();
-        
-        if (!platform.StartsWith("linux"))
+
+        if (platform != "linux-musl-x64")
             return string.Empty;
             return string.Empty;
         
         
-        var command = platform switch
-        {
-            "linux-x64" or "linux-arm64" => "apt install openssl libjpeg-turbo8",
-            "linux-musl-x64" => "apk add openssl libjpeg-turbo",
-            _ => throw new NotSupportedException()
-        };
-        
-        const string openSslHint = "Please also ensure that the OpenSSL library is installed on your system with version at least 3.0.0.";
-        const string qpdfHint = "Do NOT install the qpdf package.";
-        
-        return $"Installing additional dependencies may help. Please try the following command: '{command}'. {openSslHint} {qpdfHint}";
+        return $"Installing additional dependencies may help. Please try the following command: 'apk add libjpeg-turbo'. Do NOT install the qpdf package.";
     }
     }
 }
 }