~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Microsoft.Build.targets

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 
2
        
 
3
        <UsingTask
 
4
                TaskName="Microsoft.Build.Tasks.CreateBooManifestResourceName"
 
5
                AssemblyFile="Boo.Microsoft.Build.Tasks.dll" />
 
6
        
 
7
        <UsingTask
 
8
                TaskName="Boo.Microsoft.Build.Tasks.Booc"
 
9
                AssemblyFile="Boo.Microsoft.Build.Tasks.dll"/>
 
10
        
 
11
        <UsingTask
 
12
                TaskName="Boo.Microsoft.Build.Tasks.ExecBoo"
 
13
                AssemblyFile="Boo.Microsoft.Build.Tasks.dll"/>
 
14
        
 
15
        <PropertyGroup>
 
16
                <MSBuildAllProjects Condition="'$(BooBinPath)' != ''">
 
17
                $(MSBuildAllProjects);$(BooBinPath)\Boo.Microsoft.Build.targets
 
18
                </MSBuildAllProjects>
 
19
                <MSBuildAllProjects Condition="'$(BooBinPath)' == ''">
 
20
                $(MSBuildAllProjects);$(MSBuildBinPath)\Boo.Microsoft.Build.targets
 
21
                </MSBuildAllProjects>
 
22
                <DefaultLanguageSourceExtension>.boo</DefaultLanguageSourceExtension>
 
23
                <Language>Boo</Language>
 
24
        </PropertyGroup>
 
25
        
 
26
        <!--
 
27
    The CreateManifestResourceNames target create the manifest resource names
 
28
        from the .RESX files.
 
29
 
 
30
        [IN]
 
31
        @(ResxWithNoCulture) - The names the non-culture .RESX files.
 
32
        @(ResxWithCulture) - The names the culture .RESX files.
 
33
        @(NonResxWithNoCulture) - The names of the non-culture non-RESX
 
34
                                          files (like bitmaps, etc).
 
35
                                                                  
 
36
        @(NonResxWithCulture) - The names of the culture non-RESX
 
37
                                       files (like bitmaps, etc).
 
38
 
 
39
        [OUT]
 
40
        @(ManifestResourceWithNoCultureName) - The corresponding manifest
 
41
                                                       resource name (.RESOURCE)
 
42
                                                                                           
 
43
        @(ManifestResourceWithCultureName) - The corresponding manifest
 
44
                                                     resource name (.RESOURCE)
 
45
                                                                                         
 
46
        @(ManifestNonResxWithNoCulture) - The corresponding manifest
 
47
                                                  resource name.
 
48
                                                                                  
 
49
        @(ManifestNonResxWithCulture) - The corresponding manifest
 
50
                                               resource name.
 
51
 
 
52
    For Boo applications the transformation is like:
 
53
 
 
54
        Resources1.resx => RootNamespace.Resources1 => Build into main assembly
 
55
        
 
56
                SubFolder\Resources1.resx =>
 
57
                        RootNamespace.SubFolder.Resources1 =>
 
58
                                Build into main assembly
 
59
        
 
60
                Resources1.fr.resx =>
 
61
                        RootNamespace.Resources1.fr =>
 
62
                                Build into satellite assembly
 
63
                                
 
64
        Resources1.notaculture.resx =>
 
65
                        RootNamespace.Resources1.notaculture =>
 
66
                                Build into main assembly
 
67
 
 
68
    For other project systems, this transformation may be different.
 
69
    -->
 
70
        
 
71
        <PropertyGroup>
 
72
                <CreateManifestResourceNamesDependsOn>
 
73
                </CreateManifestResourceNamesDependsOn>
 
74
        </PropertyGroup>
 
75
        
 
76
        <Target
 
77
                Name="CreateManifestResourceNames"
 
78
                DependsOnTargets="$(CreateManifestResourceNamesDependsOn)"
 
79
        >
 
80
                <CallTarget Targets="CreateManifestResourceNames_35" Condition="'$(MSBuildToolsVersion)' == '3.5'"/>
 
81
                <CallTarget Targets="CreateManifestResourceNames_20" Condition="'$(MSBuildToolsVersion)' != '3.5'"/>
 
82
        </Target>
 
83
        
 
84
        <Target
 
85
                Name="CreateManifestResourceNames_20"
 
86
                Condition="'
 
87
                @(ResxWithNoCulture)
 
88
                @(ResxWithCulture)
 
89
                @(NonResxWithNoCulture)
 
90
                @(NonResxWithCulture)'!=''"
 
91
        >
 
92
                <!-- Create the target resource names for non-culture resx files -->
 
93
                <CreateBooManifestResourceName
 
94
                        Condition="'@(ResxWithNoCulture)'!=''"
 
95
                        ResourceFiles="@(ResxWithNoCulture)"
 
96
                        RootNamespace="$(RootNamespace)">
 
97
                        
 
98
                        <Output
 
99
                                TaskParameter="ManifestResourceNames"
 
100
                                ItemName="ManifestResourceWithNoCultureName"/>
 
101
                
 
102
                </CreateBooManifestResourceName>
 
103
                
 
104
                <!-- Create the target resource names for culture resx files. -->
 
105
                <CreateBooManifestResourceName
 
106
                        Condition="'@(ResxWithCulture)'!=''"
 
107
                        ResourceFiles="@(ResxWithCulture)"
 
108
                        RootNamespace="$(RootNamespace)">
 
109
                        
 
110
                        <Output
 
111
                                TaskParameter="ManifestResourceNames"
 
112
                                ItemName="ManifestResourceWithCultureName"/>
 
113
                
 
114
                </CreateBooManifestResourceName>
 
115
                
 
116
                <!-- Create the target resource names for non-culture non-resx files. -->
 
117
                <CreateBooManifestResourceName
 
118
                        Condition="'@(NonResxWithNoCulture)'!=''"
 
119
                        ResourceFiles="@(NonResxWithNoCulture)"
 
120
                        RootNamespace="$(RootNamespace)">
 
121
                        
 
122
                        <Output
 
123
                                TaskParameter="ManifestResourceNames"
 
124
                                ItemName="ManifestNonResxWithNoCulture"/>
 
125
                
 
126
                </CreateBooManifestResourceName>
 
127
                
 
128
                <!-- Create the target resource names for culture non-resx files. -->
 
129
                <CreateBooManifestResourceName
 
130
                        Condition="'@(NonResxWithCulture)'!=''"
 
131
                        ResourceFiles="@(NonResxWithCulture)"
 
132
                        RootNamespace="$(RootNamespace)">
 
133
                        
 
134
                        <Output
 
135
                                TaskParameter="ManifestResourceNames"
 
136
                                ItemName="ManifestNonResxWithCulture"/>
 
137
                
 
138
                </CreateBooManifestResourceName>
 
139
        </Target>
 
140
        
 
141
        <Target
 
142
                Name="CreateManifestResourceNames_35"
 
143
                Condition="'@(EmbeddedResource)' != ''"
 
144
        >
 
145
                <ItemGroup>
 
146
                        <_Temporary Remove="@(_Temporary)" />
 
147
                </ItemGroup>
 
148
                
 
149
                <CreateBooManifestResourceName
 
150
                        ResourceFiles="@(EmbeddedResource)"
 
151
                        RootNamespace="$(RootNamespace)"
 
152
                        Condition="'%(EmbeddedResource.ManifestResourceName)' == ''">
 
153
                        
 
154
                        <Output TaskParameter="ResourceFilesWithManifestResourceNames" ItemName="_Temporary" />
 
155
                
 
156
                </CreateBooManifestResourceName>
 
157
                
 
158
                <ItemGroup>
 
159
                        <EmbeddedResource Remove="@(EmbeddedResource)" Condition="'%(EmbeddedResource.ManifestResourceName)' == ''"/>
 
160
                        <EmbeddedResource Include="@(_Temporary)" />
 
161
                        <_Temporary Remove="@(_Temporary)" />
 
162
                </ItemGroup>
 
163
        </Target>
 
164
        
 
165
        
 
166
        <PropertyGroup>
 
167
                
 
168
                <!--
 
169
                "None" is not technically a valid DebugType, so we can't pass it
 
170
                in as such to the compiler.  So here, we modify the properties so
 
171
            they make sense.
 
172
                -->
 
173
                <DebugSymbols Condition="'$(DebugType)' == 'none'">false</DebugSymbols>
 
174
                <DebugType    Condition="'$(DebugType)' == 'none'"></DebugType>
 
175
                
 
176
                <!-- Provide a facility to override UseHostCompilerIfAvailable-->
 
177
                <UseHostCompilerIfAvailable
 
178
                        Condition="'$(UseHostCompilerIfAvailable)' == ''">
 
179
                true
 
180
                </UseHostCompilerIfAvailable>
 
181
        
 
182
        </PropertyGroup>
 
183
        
 
184
        <ItemGroup>
 
185
                <DocFileItem
 
186
                        Include="$(DocumentationFile)"
 
187
                        Condition="'$(DocumentationFile)'!=''">
 
188
                        
 
189
                        <InProject>false</InProject>
 
190
                </DocFileItem>
 
191
        </ItemGroup>
 
192
        
 
193
        <PropertyGroup>
 
194
                <CoreCompileDependsOn>
 
195
                _ComputeNonExistentFileProperty
 
196
                </CoreCompileDependsOn>
 
197
        </PropertyGroup>
 
198
        
 
199
        <PropertyGroup Condition=" '$(BoocToolPath)' != '' ">
 
200
                <ReferencePath>$(ReferencePath);$(BoocToolPath)</ReferencePath>
 
201
        </PropertyGroup>
 
202
        <PropertyGroup Condition=" '$(BoocToolPath)' == '' ">
 
203
                <ReferencePath>$(ReferencePath);$(BooBinPath)</ReferencePath>
 
204
        </PropertyGroup>
 
205
        
 
206
        <Target
 
207
                Name="CoreCompile"
 
208
                Inputs="$(MSBuildAllProjects);
 
209
                        @(Compile);
 
210
                        @(ManifestResourceWithNoCulture);
 
211
                        $(ApplicationIcon);
 
212
                        $(AssemblyOriginatorKeyFile);
 
213
                        @(ManifestNonResxWithNoCultureOnDisk);
 
214
                        @(ReferencePath);
 
215
                        @(CompiledLicenseFile)"
 
216
                Outputs="@(IntermediateAssembly)"
 
217
                DependsOnTargets="$(CoreCompileDependsOn)"
 
218
        >
 
219
                <Warning Text="This version of Boo does not support compiling for .NET $(TargetFrameworkVersion); the project will be compiled for .NET 4.0 instead." Condition=" '$(TargetFrameworkVersion)' != 'v4.0' "/>
 
220
                
 
221
                <Booc
 
222
                        AllowUnsafeBlocks="$(AllowUnsafeBlocks)"
 
223
                        CheckForOverflowUnderflow="$(CheckForOverflowUnderflow)"
 
224
                        Culture="$(AssemblyCulture)"
 
225
                        DefineSymbols="$(DefineConstants)"
 
226
                        DelaySign="$(DelaySign)"
 
227
                        DisabledWarnings="$(NoWarn)"
 
228
                        Ducky="$(Ducky)"
 
229
                        EmitDebugInformation="$(DebugSymbols)"
 
230
                        GenerateFullPaths="$(GenerateFullPaths)"
 
231
                        KeyContainer="$(AssemblyKeyContainerName)"
 
232
                        KeyFile="$(AssemblyOriginatorKeyFile)"
 
233
                        NoConfig="$(NoConfig)"
 
234
                        NoStandardLib="$(NoStdLib)"
 
235
                        OptionalWarnings="$(OptionalWarnings)"
 
236
                        OutputAssembly="@(IntermediateAssembly)"
 
237
                        Pipeline="$(Pipeline)"
 
238
                        Platform="$(PlatformTarget)"
 
239
                        References="@(ReferencePath)"
 
240
                        Resources="@(ManifestResourceWithNoCulture);
 
241
                                   @(ManifestNonResxWithNoCultureOnDisk);
 
242
                                   @(CompiledLicenseFile)"
 
243
                        ResponseFiles="$(CompilerResponseFile)"
 
244
                        SourceDirectory="$(SourceDirectory)"
 
245
                        Sources="@(Compile)"
 
246
                        Strict="$(Strict)"
 
247
                        TargetType="$(OutputType)"
 
248
                        ToolPath="$(BoocToolPath)"
 
249
                        TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
 
250
                        Utf8Output="$(Utf8Output)"
 
251
                        Verbosity="$(BoocVerbosity)"
 
252
                        WarningsAsErrors="$(WarningsAsErrors)"
 
253
                        WhiteSpaceAgnostic="$(WhiteSpaceAgnostic)"
 
254
                />
 
255
                
 
256
                <Copy
 
257
                        Condition=" ('$(BoocToolPath)' == '') and ('$(CopyBooLangToOutput)' != 'false') "
 
258
                        SkipUnchangedFiles="true"
 
259
                        SourceFiles="$(BooBinPath)\Boo.Lang.dll"
 
260
                        DestinationFolder="$(OutputPath)"/>
 
261
                
 
262
                <Copy
 
263
                        Condition=" ('$(BoocToolPath)' != '') and ('$(CopyBooLangToOutput)' != 'false') "
 
264
                        SkipUnchangedFiles="true"
 
265
                        SourceFiles="$(BoocToolPath)\Boo.Lang.dll"
 
266
                        DestinationFolder="$(OutputPath)"/>
 
267
        </Target>
 
268
        
 
269
        <Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />
 
270
</Project>