From 3f0fcbf3c61fc40b44d2818dfbfed6f1fc149a1a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 10 Nov 2022 09:37:05 +0000 Subject: [PATCH] a few more changes missing on prebuild source --- Prebuild/src/Core/Targets/AutotoolsTarget.cs | 13 ++----------- Prebuild/src/Core/Targets/VSGenericTarget.cs | 13 +++++++++++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Prebuild/src/Core/Targets/AutotoolsTarget.cs b/Prebuild/src/Core/Targets/AutotoolsTarget.cs index 1f7f07cf38..83a9eced7f 100644 --- a/Prebuild/src/Core/Targets/AutotoolsTarget.cs +++ b/Prebuild/src/Core/Targets/AutotoolsTarget.cs @@ -166,7 +166,6 @@ namespace Prebuild.Core.Targets Kernel m_Kernel; XmlDocument autotoolsDoc; XmlUrlResolver xr; - System.Security.Policy.Evidence e; readonly Dictionary assemblyPathToPackage = new Dictionary(); readonly Dictionary assemblyFullNameToPath = new Dictionary(); readonly Dictionary packagesHash = new Dictionary(); @@ -969,9 +968,7 @@ namespace Prebuild.Core.Targets RunInitialization(); const string streamName = "autotools.xml"; - string fqStreamName = String.Format("Prebuild.data.{0}", - streamName - ); + string fqStreamName = String.Format("Prebuild.data.{0}", streamName ); // Retrieve stream for the autotools template XML Stream autotoolsStream = Assembly.GetExecutingAssembly() @@ -979,7 +976,6 @@ namespace Prebuild.Core.Targets if (autotoolsStream == null) { - /* * try without the default namespace prepended, in * case prebuild.exe assembly was compiled with @@ -992,9 +988,7 @@ namespace Prebuild.Core.Targets { string errStr = String.Format("Could not find embedded resource file:\n" + - "'{0}' or '{1}'", - streamName, fqStreamName - ); + "'{0}' or '{1}'", streamName, fqStreamName ); m_Kernel.Log.Write(errStr); @@ -1006,9 +1000,6 @@ namespace Prebuild.Core.Targets xr = new System.Xml.XmlUrlResolver(); xr.Credentials = CredentialCache.DefaultCredentials; - // Create a default evidence - no need to limit access - e = new System.Security.Policy.Evidence(); - // Load the autotools XML autotoolsDoc = new XmlDocument(); autotoolsDoc.Load(autotoolsStream); diff --git a/Prebuild/src/Core/Targets/VSGenericTarget.cs b/Prebuild/src/Core/Targets/VSGenericTarget.cs index 2320866b78..61290711bb 100755 --- a/Prebuild/src/Core/Targets/VSGenericTarget.cs +++ b/Prebuild/src/Core/Targets/VSGenericTarget.cs @@ -720,8 +720,17 @@ namespace Prebuild.Core.Targets ps.WriteLine(" True"); ps.WriteLine(" "); ps.WriteLine(" "); - ps.WriteLine(" {0}", - conf.Options["CompilerDefines"].ToString() == "" ? this.kernel.ForcedConditionals : conf.Options["CompilerDefines"] + ";" + kernel.ForcedConditionals); + if (string.IsNullOrEmpty(conf.Options["CompilerDefines"].ToString())) + { + ps.WriteLine(" {0}", kernel.ForcedConditionals); + } + else + { + if (string.IsNullOrEmpty(kernel.ForcedConditionals)) + ps.WriteLine(" {0}", conf.Options["CompilerDefines"]); + else + ps.WriteLine(" {0}", conf.Options["CompilerDefines"] + ";" + kernel.ForcedConditionals); + } ps.WriteLine(" {0}", Helper.NormalizePath(conf.Options["XmlDocFile"].ToString())); ps.WriteLine(" {0}", conf.Options["DebugInformation"]); ps.WriteLine(" {0}", conf.Options["FileAlignment"]);