Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
270 lines (219 sloc) 8.33 KB
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask
TaskName="Microsoft.Build.Tasks.CreateBooManifestResourceName"
AssemblyFile="Boo.Microsoft.Build.Tasks.dll" />
<UsingTask
TaskName="Boo.Microsoft.Build.Tasks.Booc"
AssemblyFile="Boo.Microsoft.Build.Tasks.dll"/>
<UsingTask
TaskName="Boo.Microsoft.Build.Tasks.ExecBoo"
AssemblyFile="Boo.Microsoft.Build.Tasks.dll"/>
<PropertyGroup>
<MSBuildAllProjects Condition="'$(BooBinPath)' != ''">
$(MSBuildAllProjects);$(BooBinPath)\Boo.Microsoft.Build.targets
</MSBuildAllProjects>
<MSBuildAllProjects Condition="'$(BooBinPath)' == ''">
$(MSBuildAllProjects);$(MSBuildBinPath)\Boo.Microsoft.Build.targets
</MSBuildAllProjects>
<DefaultLanguageSourceExtension>.boo</DefaultLanguageSourceExtension>
<Language>Boo</Language>
</PropertyGroup>
<!--
The CreateManifestResourceNames target create the manifest resource names
from the .RESX files.
[IN]
@(ResxWithNoCulture) - The names the non-culture .RESX files.
@(ResxWithCulture) - The names the culture .RESX files.
@(NonResxWithNoCulture) - The names of the non-culture non-RESX
files (like bitmaps, etc).
@(NonResxWithCulture) - The names of the culture non-RESX
files (like bitmaps, etc).
[OUT]
@(ManifestResourceWithNoCultureName) - The corresponding manifest
resource name (.RESOURCE)
@(ManifestResourceWithCultureName) - The corresponding manifest
resource name (.RESOURCE)
@(ManifestNonResxWithNoCulture) - The corresponding manifest
resource name.
@(ManifestNonResxWithCulture) - The corresponding manifest
resource name.
For Boo applications the transformation is like:
Resources1.resx => RootNamespace.Resources1 => Build into main assembly
SubFolder\Resources1.resx =>
RootNamespace.SubFolder.Resources1 =>
Build into main assembly
Resources1.fr.resx =>
RootNamespace.Resources1.fr =>
Build into satellite assembly
Resources1.notaculture.resx =>
RootNamespace.Resources1.notaculture =>
Build into main assembly
For other project systems, this transformation may be different.
-->
<PropertyGroup>
<CreateManifestResourceNamesDependsOn>
</CreateManifestResourceNamesDependsOn>
</PropertyGroup>
<Target
Name="CreateManifestResourceNames"
DependsOnTargets="$(CreateManifestResourceNamesDependsOn)"
>
<CallTarget Targets="CreateManifestResourceNames_35" Condition="'$(MSBuildToolsVersion)' == '3.5'"/>
<CallTarget Targets="CreateManifestResourceNames_20" Condition="'$(MSBuildToolsVersion)' != '3.5'"/>
</Target>
<Target
Name="CreateManifestResourceNames_20"
Condition="'
@(ResxWithNoCulture)
@(ResxWithCulture)
@(NonResxWithNoCulture)
@(NonResxWithCulture)'!=''"
>
<!-- Create the target resource names for non-culture resx files -->
<CreateBooManifestResourceName
Condition="'@(ResxWithNoCulture)'!=''"
ResourceFiles="@(ResxWithNoCulture)"
RootNamespace="$(RootNamespace)">
<Output
TaskParameter="ManifestResourceNames"
ItemName="ManifestResourceWithNoCultureName"/>
</CreateBooManifestResourceName>
<!-- Create the target resource names for culture resx files. -->
<CreateBooManifestResourceName
Condition="'@(ResxWithCulture)'!=''"
ResourceFiles="@(ResxWithCulture)"
RootNamespace="$(RootNamespace)">
<Output
TaskParameter="ManifestResourceNames"
ItemName="ManifestResourceWithCultureName"/>
</CreateBooManifestResourceName>
<!-- Create the target resource names for non-culture non-resx files. -->
<CreateBooManifestResourceName
Condition="'@(NonResxWithNoCulture)'!=''"
ResourceFiles="@(NonResxWithNoCulture)"
RootNamespace="$(RootNamespace)">
<Output
TaskParameter="ManifestResourceNames"
ItemName="ManifestNonResxWithNoCulture"/>
</CreateBooManifestResourceName>
<!-- Create the target resource names for culture non-resx files. -->
<CreateBooManifestResourceName
Condition="'@(NonResxWithCulture)'!=''"
ResourceFiles="@(NonResxWithCulture)"
RootNamespace="$(RootNamespace)">
<Output
TaskParameter="ManifestResourceNames"
ItemName="ManifestNonResxWithCulture"/>
</CreateBooManifestResourceName>
</Target>
<Target
Name="CreateManifestResourceNames_35"
Condition="'@(EmbeddedResource)' != ''"
>
<ItemGroup>
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
<CreateBooManifestResourceName
ResourceFiles="@(EmbeddedResource)"
RootNamespace="$(RootNamespace)"
Condition="'%(EmbeddedResource.ManifestResourceName)' == ''">
<Output TaskParameter="ResourceFilesWithManifestResourceNames" ItemName="_Temporary" />
</CreateBooManifestResourceName>
<ItemGroup>
<EmbeddedResource Remove="@(EmbeddedResource)" Condition="'%(EmbeddedResource.ManifestResourceName)' == ''"/>
<EmbeddedResource Include="@(_Temporary)" />
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
</Target>
<PropertyGroup>
<!--
"None" is not technically a valid DebugType, so we can't pass it
in as such to the compiler. So here, we modify the properties so
they make sense.
-->
<DebugSymbols Condition="'$(DebugType)' == 'none'">false</DebugSymbols>
<DebugType Condition="'$(DebugType)' == 'none'"></DebugType>
<!-- Provide a facility to override UseHostCompilerIfAvailable-->
<UseHostCompilerIfAvailable
Condition="'$(UseHostCompilerIfAvailable)' == ''">
true
</UseHostCompilerIfAvailable>
</PropertyGroup>
<ItemGroup>
<DocFileItem
Include="$(DocumentationFile)"
Condition="'$(DocumentationFile)'!=''">
<InProject>false</InProject>
</DocFileItem>
</ItemGroup>
<PropertyGroup>
<CoreCompileDependsOn>
_ComputeNonExistentFileProperty
</CoreCompileDependsOn>
</PropertyGroup>
<PropertyGroup Condition=" '$(BoocToolPath)' != '' ">
<ReferencePath>$(ReferencePath);$(BoocToolPath)</ReferencePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(BoocToolPath)' == '' ">
<ReferencePath>$(ReferencePath);$(BooBinPath)</ReferencePath>
</PropertyGroup>
<Target
Name="CoreCompile"
Inputs="$(MSBuildAllProjects);
@(Compile);
@(ManifestResourceWithNoCulture);
$(ApplicationIcon);
$(AssemblyOriginatorKeyFile);
@(ManifestNonResxWithNoCultureOnDisk);
@(ReferencePath);
@(CompiledLicenseFile)"
Outputs="@(IntermediateAssembly)"
DependsOnTargets="$(CoreCompileDependsOn)"
>
<Booc
AllowUnsafeBlocks="$(AllowUnsafeBlocks)"
CheckForOverflowUnderflow="$(CheckForOverflowUnderflow)"
Culture="$(AssemblyCulture)"
DefineSymbols="$(DefineConstants)"
DelaySign="$(DelaySign)"
DisabledWarnings="$(NoWarn)"
Ducky="$(Ducky)"
EmitDebugInformation="$(DebugSymbols)"
GenerateFullPaths="$(GenerateFullPaths)"
KeyContainer="$(AssemblyKeyContainerName)"
KeyFile="$(AssemblyOriginatorKeyFile)"
NoConfig="$(NoConfig)"
NoStandardLib="$(NoStdLib)"
OptionalWarnings="$(OptionalWarnings)"
OutputAssembly="@(IntermediateAssembly)"
Pipeline="$(Pipeline)"
Platform="$(PlatformTarget)"
References="@(ReferencePath)"
Resources="@(ManifestResourceWithNoCulture);
@(ManifestNonResxWithNoCultureOnDisk);
@(CompiledLicenseFile)"
ResponseFiles="$(CompilerResponseFile)"
SourceDirectory="$(SourceDirectory)"
Sources="@(Compile)"
Strict="$(Strict)"
TargetType="$(OutputType)"
ToolPath="$(BoocToolPath)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
Utf8Output="$(Utf8Output)"
Verbosity="$(BoocVerbosity)"
WarningsAsErrors="$(WarningsAsErrors)"
WhiteSpaceAgnostic="$(WhiteSpaceAgnostic)"
/>
<Copy
Condition=" ('$(BoocToolPath)' == '') and ('$(CopyBooLangToOutput)' != 'false') "
SkipUnchangedFiles="true"
SourceFiles="$(BooBinPath)\Boo.Lang.dll"
DestinationFolder="$(OutputPath)"/>
<Copy
Condition=" ('$(BoocToolPath)' != '') and ('$(CopyBooLangToOutput)' != 'false') "
SkipUnchangedFiles="true"
SourceFiles="$(BoocToolPath)\Boo.Lang.dll"
DestinationFolder="$(OutputPath)"/>
</Target>
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />
</Project>