X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=msvc%2Fscripts%2Fgenproj.cs;h=96337cadaaff450ce4e4e274987a19063fbedc2b;hb=edbc5c2334e10836479d1cc528c68d4ad5b47440;hp=b627e50afd84c80f9660c99d8c511ad554c1c4f0;hpb=8d1a18d611a7e44bf9cdac34039652d1c325f5b0;p=mono.git diff --git a/msvc/scripts/genproj.cs b/msvc/scripts/genproj.cs index b627e50afd8..96337cadaaf 100644 --- a/msvc/scripts/genproj.cs +++ b/msvc/scripts/genproj.cs @@ -563,7 +563,13 @@ class MsbuildGenerator { case "/publicsign": return true; - + + case "/deterministic": + return true; + + case "/runtimemetadataversion": + return true; + case "/-getresourcestrings": return true; } @@ -788,12 +794,8 @@ class MsbuildGenerator { var refs = new StringBuilder (); - bool is_test = response.Contains ("_test_"); - if (is_test) { - // F:\src\mono\mcs\class\lib\net_2_0\nunit.framework.dll - // F:\src\mono\mcs\class\SomeProject\SomeProject_test_-net_2_0.csproj - var nunitLibPath = string.Format (@"..\lib\{0}\nunit.framework.dll", profile); - refs.Append (string.Format (" " + NewLine, nunitLibPath)); + if (response.Contains ("_test")) { + refs.Append ($@" {NewLine}"); } // @@ -894,6 +896,12 @@ class MsbuildGenerator { else build_output_dir = "bin\\Debug\\" + library; + if (build_output_dir.Contains ("-linux") || build_output_dir.Contains ("-darwin") || build_output_dir.Contains ("-win32")) + build_output_dir = build_output_dir + .Replace ("-linux", "-$(HostPlatform)") + .Replace ("-darwin", "-$(HostPlatform)") + .Replace ("-win32", "-$(HostPlatform)"); + bool basic_or_build = (library.Contains ("-basic") || library.Contains ("-build")); // @@ -903,13 +911,10 @@ class MsbuildGenerator { string strongNameSection = ""; if (StrongNameKeyFile != null){ strongNameSection = String.Format ( - " " + NewLine + " true" + NewLine + "{1}" + - " " + NewLine + - " " + NewLine + - " {0}" + NewLine + - " ", StrongNameKeyFile, StrongNameDelaySign ? " true" + NewLine : ""); + " {0}", + StrongNameKeyFile, StrongNameDelaySign ? " true" + NewLine : ""); } Csproj.output = template. Replace ("@OUTPUTTYPE@", Target == Target.Library ? "Library" : "Exe"). @@ -1040,7 +1045,7 @@ class MsbuildGenerator { public class Driver { - static IEnumerable GetProjects (bool full = false) + static IEnumerable GetProjects (bool withTests = false) { XDocument doc = XDocument.Load ("order.xml"); foreach (XElement project in doc.Root.Elements ()) { @@ -1062,12 +1067,6 @@ public class Driver { // if (!(dir.StartsWith ("class") || dir.StartsWith ("mcs") || dir.StartsWith ("basic"))) continue; - - if (full){ - if (!library.Contains ("tests")) - yield return project; - continue; - } #endif // // Do not do 2.1, it is not working yet @@ -1085,11 +1084,12 @@ public class Driver { if (dir.Contains ("nunit20")) continue; -#if true - if (profile != "net_4_x" || library.Contains ("tests")) + if (library.Contains ("tests") && !withTests) continue; -#endif - //Console.WriteLine ("Going to handle {0}", library); + + if (profile != "net_4_x") + continue; + yield return project; } } @@ -1103,12 +1103,12 @@ public class Driver { if (args.Length == 1 && args [0].ToLower ().Contains ("-h")) { Console.WriteLine ("Usage:"); - Console.WriteLine ("genproj.exe [visual_studio_release] [output_full_solutions]"); + Console.WriteLine ("genproj.exe [visual_studio_release] [output_full_solutions] [with_tests]"); Console.WriteLine ("If output_full_solutions is false, only the main System*.dll"); Console.WriteLine (" assemblies (and dependencies) is included in the solution."); Console.WriteLine ("Example:"); - Console.WriteLine ("genproj.exe 2012 false"); - Console.WriteLine ("genproj.exe with no arguments is equivalent to 'genproj.exe 2012 true'\n\n"); + Console.WriteLine ("genproj.exe 2012 false false"); + Console.WriteLine ("genproj.exe with no arguments is equivalent to 'genproj.exe 2012 true false'\n\n"); Console.WriteLine ("genproj.exe deps"); Console.WriteLine ("Generates a Makefile dependency file from the projects input"); Environment.Exit (0); @@ -1116,6 +1116,7 @@ public class Driver { var slnVersion = (args.Length > 0) ? args [0] : "2012"; bool fullSolutions = (args.Length > 1) ? bool.Parse (args [1]) : true; + bool withTests = (args.Length > 2) ? bool.Parse (args [2]) : false; // To generate makefile depenedencies var makefileDeps = (args.Length > 0 && args [0] == "deps"); @@ -1125,11 +1126,11 @@ public class Driver { var projects = new Dictionary (); var duplicates = new List (); - foreach (var project in GetProjects (makefileDeps)) { + foreach (var project in GetProjects (withTests)) { var library_output = project.Element ("library_output").Value; projects [library_output] = new MsbuildGenerator (project); } - foreach (var project in GetProjects (makefileDeps)){ + foreach (var project in GetProjects (withTests)){ var library_output = project.Element ("library_output").Value; //Console.WriteLine ("=== {0} ===", library_output); var gen = projects [library_output];