echo "configureonly - do not perform any builds; just configure the build."
echo "skipconfigure - skip build configuration."
echo "skipnative - do not build native components."
- echo "skipmscorlib - do not build mscorlib.dll even if mono is installed."
+ echo "skipmscorlib - do not build mscorlib.dll."
echo "skiptests - skip the tests in the 'tests' subdirectory."
echo "cmakeargs - user-settable additional arguments passed to CMake."
return
fi
- hash mono 2> /dev/null || { echo >&2 "Skipping mscorlib.dll build since Mono is not installed."; __SkipMSCorLib=1; return; }
-
# Restore buildTools
restoreBuildTools
<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>
<Internal_ResGenDefines Remove="" />
</ItemGroup>
</Target>
-</Project>
+</Project>
\ No newline at end of file
; 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.