mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2025-10-31 21:50:44 +07:00
Was pointing to OSX versions of monogame after falling through the conditions, this fixes it to point to the windows install locations
98 lines
6.6 KiB
XML
98 lines
6.6 KiB
XML
<!--
|
|
The main project needs a reference to this project. We use our own instead of the default MonoGame version so we can control
|
|
where our content gets built since we don't use "Content" but instead use "CompiledContent"
|
|
<Import Project="../MonoGameContent.targets" />
|
|
-->
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<PropertyGroup>
|
|
<MonoGameInstallDirectory
|
|
Condition=" '$(OS)' == 'Windows_NT' And '$(MonoGameInstallDirectory)' == '' And Exists('C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Common.props') ">C:\Program Files (x86)\MSBuild</MonoGameInstallDirectory>
|
|
<MonoGameInstallDirectory
|
|
Condition=" '$(OS)' != 'Windows_NT' And '$(MonoGameInstallDirectory)' == '' And Exists('/Library/Frameworks/Mono.framework/External/xbuild/MonoGame/v3.0/MonoGame.Common.props') ">/Library/Frameworks/Mono.framework/External/xbuild</MonoGameInstallDirectory>
|
|
<MonoGameInstallDirectory
|
|
Condition=" '$(MonoGameInstallDirectory)' == '' ">$(MSBuildProgramFiles32)</MonoGameInstallDirectory>
|
|
<ContentOutputDir>bin/DesktopGL</ContentOutputDir>
|
|
<ContentIntermediateDir>obj/DesktopGL</ContentIntermediateDir>
|
|
</PropertyGroup>
|
|
|
|
<UsingTask Condition=" '$(OS)' == 'Windows_NT' " TaskName="MonoGame.Build.Tasks.CollectContentReferences"
|
|
AssemblyFile="C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Build.Tasks.dll" />
|
|
<UsingTask Condition=" '$(OS)' != 'Windows_NT' " TaskName="MonoGame.Build.Tasks.CollectContentReferences"
|
|
AssemblyFile="\Library\Frameworks\MonoGame.framework\v3.0\MonoGame.Build.Tasks.dll" />
|
|
|
|
<!-- Add MonoGameContentReference to item type selection in Visual Studio -->
|
|
<ItemGroup>
|
|
<AvailableItemName Include="MonoGameContentReference" />
|
|
</ItemGroup>
|
|
|
|
<!-- This disables the IDE feature that skips executing msbuild in some build situations. -->
|
|
<PropertyGroup>
|
|
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="Prepare">
|
|
<PropertyGroup>
|
|
<MonoGameInstallDir>$(MonoGameInstallDirectory)\MonoGame\v3.0\</MonoGameInstallDir>
|
|
<!-- El Capitan Support -->
|
|
<MonoExe Condition=" '$(OS)' != 'Windows_NT' And Exists ('/Library/Frameworks/Mono.framework/Versions/Current/bin/mono') ">/Library/Frameworks/Mono.framework/Versions/Current/bin/mono</MonoExe>
|
|
<MonoExe Condition=" '$(OS)' != 'Windows_NT' And Exists ('/usr/local/bin/mono') ">/usr/local/bin/mono</MonoExe>
|
|
<MonoExe Condition=" '$(OS)' != 'Windows_NT' And Exists ('/usr/bin/mono') ">/usr/bin/mono</MonoExe>
|
|
<MonoExe Condition=" '$(OS)' != 'Windows_NT' And '$(MonoExe)' == '' ">mono</MonoExe>
|
|
<MonoGameContentBuilderExe Condition="'$(MonoGameContentBuilderExe)' == ''">$(MonoGameInstallDir)Tools\MGCB.exe</MonoGameContentBuilderExe>
|
|
<MonoGameContentBuilderCmd>"$(MonoGameContentBuilderExe)"</MonoGameContentBuilderCmd>
|
|
<MonoGameContentBuilderCmd Condition=" '$(OS)' != 'Windows_NT' ">$(MonoExe) $(MonoGameContentBuilderCmd)</MonoGameContentBuilderCmd>
|
|
<PlatformResourcePrefix Condition="'$(MonoGamePlatform)' == 'MacOSX'">$(MonoMacResourcePrefix)</PlatformResourcePrefix>
|
|
<PlatformResourcePrefix Condition="'$(MonoGamePlatform)' == 'iOS'">$(IPhoneResourcePrefix)</PlatformResourcePrefix>
|
|
<PlatformResourcePrefix Condition="'$(MonoGamePlatform)' == 'Android'">$(MonoAndroidAssetsPrefix)</PlatformResourcePrefix>
|
|
<PlatformResourcePrefix Condition="'$(PlatformResourcePrefix)' != '' And !HasTrailingSlash('$(PlatformResourcePrefix)')">$(PlatformResourcePrefix)\</PlatformResourcePrefix>
|
|
<PlatformResourcePrefix Condition="'$(PlatformResourcePrefix)' == ''"></PlatformResourcePrefix>
|
|
<MonoGameMGCBAdditionalArguments Condition="'$(MonoGameMGCBAdditionalArguments)' ==''">/quiet</MonoGameMGCBAdditionalArguments>
|
|
<Header>/platform:$(MonoGamePlatform)</Header>
|
|
</PropertyGroup>
|
|
|
|
<!-- Get all Mono Game Content References and store them in a list -->
|
|
<!-- We do this here so we are compatible with xbuild -->
|
|
<CollectContentReferences ContentReferences="@(MonoGameContentReference)" MonoGamePlatform="$(MonoGamePlatform)">
|
|
<Output TaskParameter="Output" ItemName="ContentReferences" />
|
|
</CollectContentReferences>
|
|
|
|
<Error
|
|
Text="The MonoGame content builder executable could not be located at '$(MonoGameContentBuilderExe)'!"
|
|
Condition="!Exists('$(MonoGameContentBuilderExe)')"
|
|
/>
|
|
|
|
<Warning
|
|
Text="No Content References Found. Please make sure your .mgcb file has a build action of MonoGameContentReference"
|
|
Condition=" '%(ContentReferences.FullPath)' == '' "
|
|
/>
|
|
</Target>
|
|
|
|
|
|
<PropertyGroup>
|
|
<BuildDependsOn>
|
|
BuildContent;
|
|
$(BuildDependsOn);
|
|
</BuildDependsOn>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="RunContentBuilder">
|
|
<Exec Condition=" '%(ContentReferences.FullPath)' != '' "
|
|
Command="$(MonoGameContentBuilderCmd) $(MonoGameMGCBAdditionalArguments) $(Header) /@:"%(ContentReferences.FullPath)" /outputDir:"$(ContentOutputDir)" /intermediateDir:"$(ContentIntermediateDir)""
|
|
WorkingDirectory="%(ContentReferences.RootDir)%(ContentReferences.Directory)" />
|
|
<CreateItem Include="%(ContentReferences.RelativeFullPath)%(ContentReferences.ContentOutputDir)\**\*.*"
|
|
AdditionalMetadata="ContentOutputDir=%(ContentReferences.ContentDirectory)">
|
|
<Output TaskParameter="Include" ItemName="ExtraContent" />
|
|
</CreateItem>
|
|
</Target>
|
|
|
|
<Target Name="BuildContent" DependsOnTargets="Prepare;RunContentBuilder" AfterTargets="Build" Condition=" '@(MonoGameContentReference)' != '' "
|
|
Outputs="%(ExtraContent.RecursiveDir)%(ExtraContent.Filename)%(ExtraContent.Extension)">
|
|
<CreateItem Include="%(ExtraContent.FullPath)" AdditionalMetadata="Link=$(PlatformResourcePrefix)%(ExtraContent.ContentOutputDir)%(ExtraContent.RecursiveDir)%(ExtraContent.Filename)%(ExtraContent.Extension);CopyToOutputDirectory=PreserveNewest"
|
|
Condition="'%(ExtraContent.Filename)' != ''">
|
|
<Output TaskParameter="Include" ItemName="Content" Condition="'$(MonoGamePlatform)' != 'Android' And '$(MonoGamePlatform)' != 'iOS' And '$(MonoGamePlatform)' != 'MacOSX'" />
|
|
<Output TaskParameter="Include" ItemName="BundleResource" Condition="'$(MonoGamePlatform)' == 'MacOSX' Or '$(MonoGamePlatform)' == 'iOS'" />
|
|
<Output TaskParameter="Include" ItemName="AndroidAsset" Condition="'$(MonoGamePlatform)' == 'Android'" />
|
|
</CreateItem>
|
|
</Target>
|
|
</Project>
|