mirror of
https://github.com/ChronosX88/mta-mono.git
synced 2024-12-26 10:51:47 +00:00
160 lines
6.6 KiB
Plaintext
160 lines
6.6 KiB
Plaintext
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||
|
<UsingTask TaskName="Moonlight.Build.Tasks.CreateTestPage" AssemblyFile="Moonlight.Build.Tasks.dll" />
|
||
|
<UsingTask TaskName="Moonlight.Build.Tasks.GenerateMoonlightManifest" AssemblyFile="Moonlight.Build.Tasks.dll"/>
|
||
|
<UsingTask TaskName="Moonlight.Build.Tasks.GenerateXap" AssemblyFile="Moonlight.Build.Tasks.dll" />
|
||
|
<UsingTask TaskName="Moonlight.Build.Tasks.GetMoonlightFrameworkPath" AssemblyFile="Moonlight.Build.Tasks.dll"/>
|
||
|
<UsingTask TaskName="Moonlight.Build.Tasks.Respack" AssemblyFile="Moonlight.Build.Tasks.dll" />
|
||
|
<UsingTask TaskName="Moonlight.Build.Tasks.XamlG" AssemblyFile="Moonlight.Build.Tasks.dll"/>
|
||
|
|
||
|
<PropertyGroup>
|
||
|
<PrepareResourcesDependsOn>
|
||
|
GenerateXamlG;
|
||
|
Respack;
|
||
|
$(PrepareResourcesDependsOn)
|
||
|
</PrepareResourcesDependsOn>
|
||
|
|
||
|
<PrepareForRunDependsOn>
|
||
|
GenerateMoonlightManifest;
|
||
|
GenerateXap;
|
||
|
CreateTestPage;
|
||
|
$(PrepareForRunDependsOn)
|
||
|
</PrepareForRunDependsOn>
|
||
|
|
||
|
<CscToolExe Condition="'$(CscToolExe)' == '' and '$(OS)' == 'Windows_NT'">smcs.bat</CscToolExe>
|
||
|
<CscToolExe Condition="'$(CscToolExe)' == '' and '$(OS)' != 'Windows_NT'">smcs</CscToolExe>
|
||
|
|
||
|
<XapFileName Condition="'$(XapFileName)' == ''">$(AssemblyName).xap</XapFileName>
|
||
|
<TestPageFileName Condition="'$(TestPageFileName)' == ''">TestPage.html</TestPageFileName>
|
||
|
<SilverlightVersion Condition="'$(SilverlightVersion)' == ''">2.0</SilverlightVersion>
|
||
|
<RuntimeVersion Condition="'$(RuntimeVersion)' == '' and '$(SilverlightVersion)' == '2.0'">2.0.31005.0</RuntimeVersion>
|
||
|
<RuntimeVersion Condition="'$(RuntimeVersion)' == '' and '$(SilverlightVersion)' == '3.0'">3.0.40624.0</RuntimeVersion>
|
||
|
|
||
|
<AssemblySearchPaths>
|
||
|
{CandidateAssemblyFiles};
|
||
|
$(ReferencePath);
|
||
|
{HintPathFromItem};
|
||
|
{TargetFrameworkDirectory};
|
||
|
{RawFileName};
|
||
|
$(OutDir)
|
||
|
</AssemblySearchPaths>
|
||
|
</PropertyGroup>
|
||
|
|
||
|
<ItemGroup>
|
||
|
<MoonlightManifestFile Include="$(OutDir)AppManifest.xaml">
|
||
|
<TargetPath>AppManifest.xaml</TargetPath>
|
||
|
</MoonlightManifestFile>
|
||
|
</ItemGroup>
|
||
|
|
||
|
<!-- Override 'GetFrameworkPaths' -->
|
||
|
<Target Name="GetFrameworkPaths">
|
||
|
<GetMoonlightFrameworkPath
|
||
|
SilverlightVersion="$(SilverlightVersion)">
|
||
|
<Output TaskParameter="FrameworkPath" PropertyName="TargetFrameworkDirectory"/>
|
||
|
<Output TaskParameter="FrameworkPath" ItemName="_FrameworkPath"/>
|
||
|
</GetMoonlightFrameworkPath>
|
||
|
|
||
|
<Error Text="Moonlight framework v$(SilverlightVersion) doesn't seem to be installed. Expected framework directory could not be found (@(_FrameworkPath)). To force a particular silverlight version, try: xbuild $(MSBuildProjectFile) /p:SilverlightVersion=2.0"
|
||
|
Condition="!Exists('@(_FrameworkPath)')" />
|
||
|
|
||
|
<CreateProperty Value="$(AssemblySearchPaths);@(_FrameworkPath->'%(Identity)-redist')"
|
||
|
Condition="Exists('@(_FrameworkPath->'%(Identity)-redist')')">
|
||
|
<Output TaskParameter="Value" PropertyName="AssemblySearchPaths"/>
|
||
|
</CreateProperty>
|
||
|
</Target>
|
||
|
|
||
|
<Target Name="Respack">
|
||
|
<Respack
|
||
|
Resources="@(Resource);@(Page);@(ApplicationDefinition)"
|
||
|
OutputFile="$(IntermediateOutputPath)$(AssemblyName).g.resources">
|
||
|
<Output TaskParameter="OutputFile" ItemName="FileWrites"/>
|
||
|
<Output TaskParameter="OutputFile" ItemName="ManifestResourceWithNoCulture"/>
|
||
|
</Respack>
|
||
|
</Target>
|
||
|
|
||
|
<Target Name="GenerateXamlG">
|
||
|
<CreateItem Include="@(Compile)" Condition="'%(Compile.Extension)' == '.xaml' and '%(Compile.Generator)' == 'MSBuild:MarkupCompilePass1'">
|
||
|
<Output TaskParameter="Include" ItemName="XamlFiles"/>
|
||
|
</CreateItem>
|
||
|
<CreateItem Include="@(ApplicationDefinition)" Condition="'%(Extension)' == '.xaml' and '%(Generator)' == 'MSBuild:MarkupCompilePass1'">
|
||
|
<Output TaskParameter="Include" ItemName="XamlFiles"/>
|
||
|
</CreateItem>
|
||
|
<CreateItem Include="@(Page)" Condition="'%(Extension)' == '.xaml' and '%(Generator)' == 'MSBuild:MarkupCompilePass1'">
|
||
|
<Output TaskParameter="Include" ItemName="XamlFiles"/>
|
||
|
</CreateItem>
|
||
|
|
||
|
<XamlG
|
||
|
Sources="@(XamlFiles)"
|
||
|
Language = "$(Language)"
|
||
|
AssemblyName = "$(AssemblyName)"
|
||
|
OutputFiles = "@(XamlFiles->'$(IntermediateOutputPath)%(Filename).g$(DefaultLanguageSourceExtension)')"
|
||
|
>
|
||
|
<Output TaskParameter="OutputFiles" ItemName="Compile"/>
|
||
|
<Output TaskParameter="OutputFiles" ItemName="FileWrites"/>
|
||
|
</XamlG>
|
||
|
</Target>
|
||
|
|
||
|
<Target Name="GenerateMoonlightManifest"
|
||
|
Inputs="$(MSBuildAllProjects);$(SilverlightManifestTemplate)"
|
||
|
Outputs="@(MoonlightManifestFile->'%(Identity)')">
|
||
|
<GenerateMoonlightManifest
|
||
|
ManifestFile="@(MoonlightManifestFile->'%(Identity)')"
|
||
|
EntryPointAssembly="$(AssemblyName)$(TargetExt)"
|
||
|
References="@(ReferenceCopyLocalPaths)"
|
||
|
SilverlightManifestTemplate="$(SilverlightManifestTemplate)"
|
||
|
SilverlightAppEntry="$(SilverlightAppEntry)"
|
||
|
RuntimeVersion="$(RuntimeVersion)"
|
||
|
|
||
|
Condition = "'$(GenerateSilverlightManifest)' == 'true'"
|
||
|
>
|
||
|
<Output TaskParameter="ManifestFile" ItemName="FileWrites"/>
|
||
|
</GenerateMoonlightManifest>
|
||
|
</Target>
|
||
|
|
||
|
<PropertyGroup>
|
||
|
<GenerateXapDependsOn>
|
||
|
GenerateXamlG;
|
||
|
GenerateMoonlightManifest;
|
||
|
GetXapInputFiles
|
||
|
</GenerateXapDependsOn>
|
||
|
</PropertyGroup>
|
||
|
<Target Name="GenerateXap" DependsOnTargets="$(GenerateXapDependsOn)" Condition="'$(XapOutputs)' == 'true'"
|
||
|
Inputs="@(XapInputFiles)" Outputs="$(OutDir)$(XapFilename)">
|
||
|
<!-- Looks for %(DestinationSubdirectory) in LocalCopyReferences -->
|
||
|
<GenerateXap
|
||
|
InputFiles="@(XapInputFiles)"
|
||
|
LocalCopyReferences="@(ReferenceCopyLocalPaths)"
|
||
|
XapFilename="$(OutDir)$(XapFilename)"
|
||
|
>
|
||
|
<Output TaskParameter="XapFilename" ItemName="FileWrites"/>
|
||
|
</GenerateXap>
|
||
|
</Target>
|
||
|
|
||
|
<Target Name="CreateTestPage" Condition="'$(CreateTestPage)' == 'true' and '$(XapOutputs)' == 'true'">
|
||
|
<CreateTestPage
|
||
|
XapFileName="$(XapFileName)"
|
||
|
Title="$(AssemblyName)"
|
||
|
TestPageFilename="$(OutDir)$(TestPageFilename)">
|
||
|
<Output TaskParameter="TestPageFilename" ItemName="FileWrites"/>
|
||
|
</CreateTestPage>
|
||
|
</Target>
|
||
|
|
||
|
<Target Name="GetXapInputFiles">
|
||
|
<CreateItem Include="@(IntermediateAssembly)" AdditionalMetadata="TargetPath=$(AssemblyName)$(TargetExt)">
|
||
|
<Output TaskParameter="Include" ItemName="XapInputFiles"/>
|
||
|
</CreateItem>
|
||
|
|
||
|
<CreateItem Include="@(ContentWithTargetPath)">
|
||
|
<Output TaskParameter="Include" ItemName="XapInputFiles"/>
|
||
|
</CreateItem>
|
||
|
|
||
|
<CreateItem Include="@(MoonlightManifestFile)" Condition="'$(GenerateSilverlightManifest)' == 'true'">
|
||
|
<Output TaskParameter="Include" ItemName="XapInputFiles"/>
|
||
|
</CreateItem>
|
||
|
|
||
|
<CreateItem Include="$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb" AdditionalMetadata="TargetPath=$(AssemblyName)$(TargetExt).mdb"
|
||
|
Condition="Exists('$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb')">
|
||
|
<Output TaskParameter="Include" ItemName="XapInputFiles"/>
|
||
|
</CreateItem>
|
||
|
</Target>
|
||
|
</Project>
|