Przeglądaj źródła

Samples - Magick使用AnyCPU,删除无用代码

weixiangjie 1 rok temu
rodzic
commit
f4f08ae335

+ 1 - 1
Demo/Examples/Samples/AnnotationTest/CS/AnnotationTest.csproj

@@ -57,7 +57,7 @@
   </ItemGroup>
 
     <ItemGroup>
-      <PackageReference Include="Magick.NET-Q8-x64" Version="13.6.0" />
+      <PackageReference Include="Magick.NET-Q8-AnyCPU" Version="13.6.0" />
     </ItemGroup>
 
 </Project>

+ 1 - 1
Demo/Examples/Samples/BackgroundTest/CS/BackgroundTest.csproj

@@ -56,7 +56,7 @@
   </ItemGroup>
 
     <ItemGroup>
-      <PackageReference Include="Magick.NET-Q8-x64" Version="13.6.0" />
+      <PackageReference Include="Magick.NET-Q8-AnyCPU" Version="13.6.0" />
     </ItemGroup>
 
 </Project>

+ 0 - 22
Demo/Examples/Samples/DigitalSignatureTest/CS/DigitalSignatureTest.cs

@@ -40,28 +40,6 @@ namespace DigitalSignatureTest
                 Directory.CreateDirectory(trustedFolder);
             }
             CPDFSignature.SignCertTrustedFolder = trustedFolder;
-
-
-            // Get the access control of the directory
-            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
-            {
-                DirectoryInfo directoryInfo = new DirectoryInfo(outputPath);
-                DirectorySecurity directorySecurity = directoryInfo.GetAccessControl();
-                directorySecurity.AddAccessRule(new FileSystemAccessRule("Everyone", FileSystemRights.FullControl, AccessControlType.Allow));
-                directoryInfo.SetAccessControl(directorySecurity);
-            }
-            else if(RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
-            {
-                // Set the access control of the directory
-                string[] args = { "chmod", "-R", "777", outputPath };
-                Process process = new Process();
-                process.StartInfo.FileName = "/bin/chmod";
-                process.StartInfo.Arguments = string.Join(" ", args);
-                process.StartInfo.UseShellExecute = false;
-                process.StartInfo.RedirectStandardOutput = true;   
-                process.Start();
-                process.WaitForExit();
-            }
             
             #endregion
 

+ 4 - 4
Demo/Examples/Samples/DigitalSignatureTest/CS/DigitalSignatureTest.csproj

@@ -54,10 +54,6 @@
     </ProjectReference>
   </ItemGroup>
 
-    <ItemGroup>
-      <PackageReference Include="Magick.NET-Q8-x64" Version="13.6.0" />
-    </ItemGroup>
-
     <ItemGroup>
       <None Update="Certificate.pfx">
         <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -67,4 +63,8 @@
       </None>
     </ItemGroup>
 
+    <ItemGroup>
+      <PackageReference Include="Magick.NET-Q8-AnyCPU" Version="13.6.0" />
+    </ItemGroup>
+
 </Project>

+ 11 - 2
Demo/Examples/Samples/PDFToImage/CS/PDFToImageTest.csproj

@@ -1,6 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <LangVersion>7.3</LangVersion>
+    <Configurations>Release;Debug</Configurations>
+    <Platforms>AnyCPU;x64</Platforms>
+    <AssemblyName>Samples_ComPDFKit</AssemblyName>
+    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+    <TargetFramework>net7.0</TargetFramework>
+    <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
+  </PropertyGroup>
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

+ 1 - 1
Demo/Examples/Samples/WatermarkTest/CS/WatermarkTest.csproj

@@ -54,7 +54,7 @@
   </ItemGroup>
 
     <ItemGroup>
-      <PackageReference Include="Magick.NET-Q8-x64" Version="13.6.0" />
+      <PackageReference Include="Magick.NET-Q8-AnyCPU" Version="13.6.0" />
     </ItemGroup>
 
 </Project>