Parcourir la source

[genproj] Handle resources properly, add helper scripts to bootstrap

Miguel de Icaza il y a 9 ans
Parent
commit
2f21472994
27 fichiers modifiés avec 39 ajouts et 34 suppressions
  1. 4 0
      build-libs.bat
  2. 3 0
      build-libs.sh
  3. 2 0
      mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng-net_4_x.csproj
  4. 1 1
      mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite-net_4_x.csproj
  5. 1 1
      mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap-net_4_x.csproj
  6. 1 1
      mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition-net_4_x.csproj
  7. 1 1
      mcs/class/System.Data.Services.Client/System.Data.Services.Client-net_4_x.csproj
  8. 1 1
      mcs/class/System.Json.Microsoft/System.Json.Microsoft-net_4_x.csproj
  9. 2 2
      mcs/class/System.Net.Http.Formatting/System.Net.Http.Formatting-net_4_x.csproj
  10. 1 1
      mcs/class/System.Reactive.Core/System.Reactive.Core-net_4_x.csproj
  11. 1 1
      mcs/class/System.Reactive.Linq/System.Reactive.Linq-net_4_x.csproj
  12. 1 1
      mcs/class/System.Reactive.PlatformServices/System.Reactive.PlatformServices-net_4_x.csproj
  13. 1 1
      mcs/class/System.Reactive.Providers/System.Reactive.Providers-net_4_x.csproj
  14. 1 1
      mcs/class/System.Reactive.Windows.Threading/System.Reactive.Windows.Threading-net_4_x.csproj
  15. 2 2
      mcs/class/System.Web.Http/System.Web.Http-net_4_x.csproj
  16. 1 1
      mcs/class/System.Web.Mvc3/System.Web.Mvc3-net_4_x.csproj
  17. 2 2
      mcs/class/System.Web.Razor/System.Web.Razor-net_4_x.csproj
  18. 2 2
      mcs/class/System.Web.WebPages.Deployment/System.Web.WebPages.Deployment-net_4_x.csproj
  19. 2 2
      mcs/class/System.Web.WebPages.Razor/System.Web.WebPages.Razor-net_4_x.csproj
  20. 2 2
      mcs/class/System.Web.WebPages/System.Web.WebPages-net_4_x.csproj
  21. 1 1
      mcs/class/System.Web/System.Web-net_4_x.csproj
  22. 1 1
      mcs/class/System.Web/System.Web-plainweb-net_4_x.csproj
  23. 1 1
      mcs/class/System.Windows.Forms/System.Windows.Forms-net_4_x.csproj
  24. 1 1
      mcs/nunit24/ClientUtilities/util/nunit.util-net_4_x.csproj
  25. 1 0
      msvc/scripts/Commons.Xml.Relaxng.pre
  26. 2 1
      msvc/scripts/genproj.cs
  27. 0 6
      msvc/scripts/prepare.cs

+ 4 - 0
build-libs.bat

@@ -0,0 +1,4 @@
+@echo off
+cd mcs\jay
+vcbuild jay.vcxproj
+msbuild net_4_x.sln

+ 3 - 0
build-libs.sh

@@ -0,0 +1,3 @@
+#!/bin/sh
+(cd mcs/jay; make)
+msbuild net_4_x.sln

+ 2 - 0
mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng-net_4_x.csproj

@@ -97,9 +97,11 @@
   -->
   <PropertyGroup>
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+$(ProjectDir)\..\..\jay\jay -ct &lt; $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs
 
     </PreBuildEvent>
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
+$(ProjectDir)\..\..\jay\jay.exe -ct &lt; $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs
 
     </PreBuildEvent>
 

+ 1 - 1
mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite-net_4_x.csproj

@@ -128,7 +128,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="resources/SR.resources">
+    <EmbeddedResource Include="resources/SR.resx">
       <LogicalName>SR.resources</LogicalName>
     </EmbeddedResource>
     <EmbeddedResource Include="resources/SQLiteCommand.bmp">

+ 1 - 1
mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap-net_4_x.csproj

@@ -304,7 +304,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resources">
+    <EmbeddedResource Include="Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resx">
       <LogicalName>ResultCodeMessages.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 1
mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition-net_4_x.csproj

@@ -263,7 +263,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Microsoft.Internal.Strings.resources">
+    <EmbeddedResource Include="Microsoft.Internal.Strings.resx">
       <LogicalName>Microsoft.Internal.Strings.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 1
mcs/class/System.Data.Services.Client/System.Data.Services.Client-net_4_x.csproj

@@ -220,7 +220,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Client/System.Data.Services.Client.resources">
+    <EmbeddedResource Include="Client/System.Data.Services.Client.resx">
       <LogicalName>System.Data.Services.Client.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 1
mcs/class/System.Json.Microsoft/System.Json.Microsoft-net_4_x.csproj

@@ -126,7 +126,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="System.Json.Properties.Resources.resources">
+    <EmbeddedResource Include="System.Json.Properties.Resources.resx">
       <LogicalName>System.Json.Properties.Resources.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 2 - 2
mcs/class/System.Net.Http.Formatting/System.Net.Http.Formatting-net_4_x.csproj

@@ -354,10 +354,10 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="System.Net.Http.Properties.CommonWebApiResources.resources">
+    <EmbeddedResource Include="System.Net.Http.Properties.CommonWebApiResources.resx">
       <LogicalName>System.Net.Http.Properties.CommonWebApiResources.resources</LogicalName>
     </EmbeddedResource>
-    <EmbeddedResource Include="System.Net.Http.Properties.Resources.resources">
+    <EmbeddedResource Include="System.Net.Http.Properties.Resources.resx">
       <LogicalName>System.Net.Http.Properties.Resources.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 1
mcs/class/System.Reactive.Core/System.Reactive.Core-net_4_x.csproj

@@ -177,7 +177,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Strings_Core.resources">
+    <EmbeddedResource Include="Strings_Core.resx">
       <LogicalName>System.Reactive.Strings_Core.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 1
mcs/class/System.Reactive.Linq/System.Reactive.Linq-net_4_x.csproj

@@ -274,7 +274,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Strings_Linq.resources">
+    <EmbeddedResource Include="Strings_Linq.resx">
       <LogicalName>System.Reactive.Strings_Linq.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 1
mcs/class/System.Reactive.PlatformServices/System.Reactive.PlatformServices-net_4_x.csproj

@@ -126,7 +126,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Strings_PlatformServices.resources">
+    <EmbeddedResource Include="Strings_PlatformServices.resx">
       <LogicalName>System.Reactive.Strings_PlatformServices.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 1
mcs/class/System.Reactive.Providers/System.Reactive.Providers-net_4_x.csproj

@@ -119,7 +119,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Strings_Providers.resources">
+    <EmbeddedResource Include="Strings_Providers.resx">
       <LogicalName>System.Reactive.Strings_Providers.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 1
mcs/class/System.Reactive.Windows.Threading/System.Reactive.Windows.Threading-net_4_x.csproj

@@ -119,7 +119,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Strings_WindowsThreading.resources">
+    <EmbeddedResource Include="Strings_WindowsThreading.resx">
       <LogicalName>System.Reactive.Strings_WindowsThreading.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 2 - 2
mcs/class/System.Web.Http/System.Web.Http-net_4_x.csproj

@@ -386,10 +386,10 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="System.Web.Http.Properties.CommonWebApiResources.resources">
+    <EmbeddedResource Include="System.Web.Http.Properties.CommonWebApiResources.resx">
       <LogicalName>System.Web.Http.Properties.CommonWebApiResources.resources</LogicalName>
     </EmbeddedResource>
-    <EmbeddedResource Include="System.Web.Http.Properties.SRResources.resources">
+    <EmbeddedResource Include="System.Web.Http.Properties.SRResources.resx">
       <LogicalName>System.Web.Http.Properties.SRResources.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 1
mcs/class/System.Web.Mvc3/System.Web.Mvc3-net_4_x.csproj

@@ -491,7 +491,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Mvc/Resources/MvcResources.resources">
+    <EmbeddedResource Include="Mvc/Resources/MvcResources.resx">
       <LogicalName>System.Web.Mvc.Resources.MvcResources.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 2 - 2
mcs/class/System.Web.Razor/System.Web.Razor-net_4_x.csproj

@@ -244,10 +244,10 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="System.Web.Razor.Resources.RazorResources.resources">
+    <EmbeddedResource Include="System.Web.Razor.Resources.RazorResources.resx">
       <LogicalName>System.Web.Razor.Resources.RazorResources.resources</LogicalName>
     </EmbeddedResource>
-    <EmbeddedResource Include="System.Web.Razor.Common.CommonResources.resources">
+    <EmbeddedResource Include="System.Web.Razor.Common.CommonResources.resx">
       <LogicalName>System.Web.Razor.Common.CommonResources.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 2 - 2
mcs/class/System.Web.WebPages.Deployment/System.Web.WebPages.Deployment-net_4_x.csproj

@@ -124,10 +124,10 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="System.Web.WebPages.Deployment.Common.CommonResources.resources">
+    <EmbeddedResource Include="System.Web.WebPages.Deployment.Common.CommonResources.resx">
       <LogicalName>System.Web.WebPages.Deployment.Common.CommonResources.resources</LogicalName>
     </EmbeddedResource>
-    <EmbeddedResource Include="System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources">
+    <EmbeddedResource Include="System.Web.WebPages.Deployment.Resources.ConfigurationResources.resx">
       <LogicalName>System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 2 - 2
mcs/class/System.Web.WebPages.Razor/System.Web.WebPages.Razor-net_4_x.csproj

@@ -131,10 +131,10 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="System.Web.WebPages.Razor.Resources.RazorWebResources.resources">
+    <EmbeddedResource Include="System.Web.WebPages.Razor.Resources.RazorWebResources.resx">
       <LogicalName>System.Web.WebPages.Razor.Resources.RazorWebResources.resources</LogicalName>
     </EmbeddedResource>
-    <EmbeddedResource Include="System.Web.WebPages.Razor.Common.CommonResources.resources">
+    <EmbeddedResource Include="System.Web.WebPages.Razor.Common.CommonResources.resx">
       <LogicalName>System.Web.WebPages.Razor.Common.CommonResources.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 2 - 2
mcs/class/System.Web.WebPages/System.Web.WebPages-net_4_x.csproj

@@ -279,10 +279,10 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="System.Web.WebPages.Resources.WebPageResources.resources">
+    <EmbeddedResource Include="System.Web.WebPages.Resources.WebPageResources.resx">
       <LogicalName>System.Web.WebPages.Resources.WebPageResources.resources</LogicalName>
     </EmbeddedResource>
-    <EmbeddedResource Include="System.Web.WebPages.Common.CommonResources.resources">
+    <EmbeddedResource Include="System.Web.WebPages.Common.CommonResources.resx">
       <LogicalName>System.Web.WebPages.Common.CommonResources.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 1
mcs/class/System.Web/System.Web-net_4_x.csproj

@@ -1563,7 +1563,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="resources/TranslationResources.resources">
+    <EmbeddedResource Include="resources/TranslationResources.resx">
       <LogicalName>TranslationResources.resources</LogicalName>
     </EmbeddedResource>
     <EmbeddedResource Include="resources/WebUIValidation.js">

+ 1 - 1
mcs/class/System.Web/System.Web-plainweb-net_4_x.csproj

@@ -1555,7 +1555,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="resources/TranslationResources.resources">
+    <EmbeddedResource Include="resources/TranslationResources.resx">
       <LogicalName>TranslationResources.resources</LogicalName>
     </EmbeddedResource>
     <EmbeddedResource Include="resources/WebUIValidation.js">

+ 1 - 1
mcs/class/System.Windows.Forms/System.Windows.Forms-net_4_x.csproj

@@ -1050,7 +1050,7 @@
     <EmbeddedResource Include="resources/DnDMove.cur">
       <LogicalName>System.Windows.Forms.DnDMove.cur</LogicalName>
     </EmbeddedResource>
-    <EmbeddedResource Include="resources/keyboards.resources">
+    <EmbeddedResource Include="resources/keyboards.resx">
       <LogicalName>keyboards.resources</LogicalName>
     </EmbeddedResource>
     <EmbeddedResource Include="resources/16_computer.png">

+ 1 - 1
mcs/nunit24/ClientUtilities/util/nunit.util-net_4_x.csproj

@@ -159,7 +159,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Transform.resources">
+    <EmbeddedResource Include="Transform.resx">
       <LogicalName>NUnit.Util.Transform.resources</LogicalName>
     </EmbeddedResource>
   </ItemGroup>

+ 1 - 0
msvc/scripts/Commons.Xml.Relaxng.pre

@@ -0,0 +1 @@
+$(ProjectDir)\..\..\jay\jay.exe -ct &lt; $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs

+ 2 - 1
msvc/scripts/genproj.cs

@@ -811,7 +811,8 @@ class MsbuildGenerator {
 			foreach (var dk in embedded_resources) {
 				var source = dk.Key;
 				if (source.EndsWith (".resources"))
-					source.Replace (".resources", ".resx");
+					source = source.Replace (".resources", ".resx");
+				Console.WriteLine ("Got {0} -> {1}", dk.Key, source);
 				resources.AppendFormat ("    <EmbeddedResource Include=\"{0}\">" + NewLine, source);
 				resources.AppendFormat ("      <LogicalName>{0}</LogicalName>" + NewLine, dk.Value);
 				resources.AppendFormat ("    </EmbeddedResource>" + NewLine);

+ 0 - 6
msvc/scripts/prepare.cs

@@ -28,12 +28,6 @@ class Prepare {
 		}
 
 		switch (args [1]){
-		case "xml":
-			Filter (bdir + "/class/System.XML/System.Xml.XPath/Parser.jay",
-				bdir + "/class/System.XML/Mono.Xml.Xsl/PatternParser.jay",
-				(i, o) => o.Write (i.ReadToEnd ().Replace ("%start Expr", "%start Pattern")));
-			break;
-
 		case "core":
 			Filter (bdir + "/build/common/Consts.cs.in",
 				bdir + "/build/common/Consts.cs",