diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-02-26 07:28:42 -0800 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-02-26 07:28:42 -0800 |
commit | 839a58d517bfecf7e424679cb950a788daef54c4 (patch) | |
tree | 3ef9f17c4aa52bf1a9fdaa70164fd957a4f6c4d3 /src/mscorlib | |
parent | c5b0444280ba0add2ca8880d240a592642e04f25 (diff) | |
parent | 29f52c442a08240b3df1c5893901f9dfcae6751f (diff) | |
download | coreclr-839a58d517bfecf7e424679cb950a788daef54c4.tar.gz coreclr-839a58d517bfecf7e424679cb950a788daef54c4.tar.bz2 coreclr-839a58d517bfecf7e424679cb950a788daef54c4.zip |
Merge pull request #3374 from dotnet-bot/from-tfs
Merge changes from TFS
Diffstat (limited to 'src/mscorlib')
-rw-r--r-- | src/mscorlib/GenerateSplitStringResources.targets | 27 | ||||
-rw-r--r-- | src/mscorlib/src/mscorlib.txt | 4 |
2 files changed, 21 insertions, 10 deletions
diff --git a/src/mscorlib/GenerateSplitStringResources.targets b/src/mscorlib/GenerateSplitStringResources.targets index 4b69ba6ead..88e01cb612 100644 --- a/src/mscorlib/GenerateSplitStringResources.targets +++ b/src/mscorlib/GenerateSplitStringResources.targets @@ -1,28 +1,37 @@ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> - <ResGenCommand Condition="'$(ResGenCommand)'=='' and '$(OsEnvironment)'=='Windows_NT'">$(SDK40ToolsPath)ResGen.exe</ResGenCommand> - <ResGenCommand Condition="'$(ResGenCommand)'=='' and '$(OsEnvironment)'=='Unix'">resgen</ResGenCommand> <PrepareResourcesDependsOn>GenerateSplitStringResources;$(PrepareResourcesDependsOn)</PrepareResourcesDependsOn> </PropertyGroup> - + + <PropertyGroup> + <PreprocessFileTaskAsssemblyPath Condition="'$(PreprocessFileTaskAsssemblyPath)' == ''">$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll</PreprocessFileTaskAsssemblyPath> + </PropertyGroup> + + <UsingTask TaskName="PreprocessFile" AssemblyFile="$(PreprocessFileTaskAsssemblyPath)" /> + <Target Name="GenerateSplitStringResources" - Inputs="$(MSBuildThisFileFullPath);$(MSBuildProjectFile);$(BclSourcesRoot)\mscorlib.txt" - Outputs="@(SplitTextStringResource->'$(IntermediateOutputPath)%(Filename).resources')"> + Inputs="@(SplitTextStringResource)" + Outputs="@(SplitTextStringResource->'$(IntermediateOutputPath)%(Filename).txt')"> - <ItemGroup Condition="'$(OsEnvironment)'=='Windows_NT'"> + <ItemGroup> <Internal_ResGenDefines Remove="" /> <Internal_ResGenDefines Include="INCLUDE_DEBUG" /> <Internal_ResGenDefines Include="INCLUDE_RUNTIME" /> <Internal_ResGenDefines Include="%(SplitTextStringResource.ResGenDefines)" /> </ItemGroup> - <Exec Command=""$(ResGenCommand)" "%(SplitTextStringResource.Identity)" "$(IntermediateOutputPath)%(SplitTextStringResource.Filename).resources" @(Internal_ResGenDefines->'/D:%(Identity)', ' ')" /> + <PreprocessFile SourceFile="%(SplitTextStringResource.Identity)" OutputFile="$(IntermediateOutputPath)%(SplitTextStringResource.Filename).txt" Defines="@(Internal_ResGenDefines)" /> + + <GenerateResource Sources="$(IntermediateOutputPath)%(SplitTextStringResource.Filename).txt" + OutputResources="$(IntermediateOutputPath)%(SplitTextStringResource.Filename).resources" + ExecuteAsTool="false" /> <ItemGroup> <EmbeddedResource Include="@(SplitTextStringResource->'$(IntermediateOutputPath)%(Filename).resources')"> - <WithCulture>false</WithCulture> + <WithCulture>false</WithCulture> <ManifestResourceName>%(Filename)</ManifestResourceName> </EmbeddedResource> + <Clean Include="$(IntermediateOutputPath)%(SplitTextStringResource.Filename).txt" /> <Clean Include="$(IntermediateOutputPath)%(SplitTextStringResource.Filename).resources" /> </ItemGroup> @@ -30,4 +39,4 @@ <Internal_ResGenDefines Remove="" /> </ItemGroup> </Target> -</Project> +</Project>
\ No newline at end of file diff --git a/src/mscorlib/src/mscorlib.txt b/src/mscorlib/src/mscorlib.txt index 4ae226931f..f435a7b7a2 100644 --- a/src/mscorlib/src/mscorlib.txt +++ b/src/mscorlib/src/mscorlib.txt @@ -8,7 +8,9 @@ ; For resource info, see the ResourceManager documentation and the ResGen tool, ; which is a managed app using ResourceWriter. -; ResGen now supports C++ & C# style #ifdef's, like #ifndef FOO and #if BAR +; ResGen now supports limited preprocessing of txt files, you can use +; #if SYMBOL and #if !SYMBOL to control what sets of resources are included in +; the resulting resources. ; The naming scheme is: [Namespace.] ExceptionName _ Reason ; We'll suppress "System." where possible. |