Skip to content

Commit

Permalink
Pulled in monogame dependencies to avoid compatibility breaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
RossNordby committed Mar 18, 2017
1 parent 313261a commit 7a2c63a
Show file tree
Hide file tree
Showing 53 changed files with 337 additions and 8 deletions.
14 changes: 10 additions & 4 deletions BEPUphysicsDemos/BEPUphysicsDemos.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
<Import Project="..\Dependencies\MonoGame\MonoGame.Common.props" Condition="Exists('..\Dependencies\MonoGame\MonoGame.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand All @@ -15,6 +15,8 @@
<MonoGamePlatform>Windows</MonoGamePlatform>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
Expand Down Expand Up @@ -207,10 +209,14 @@
<Compile Include="Sample Code\UprightSpring.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework">
<HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Dependencies\MonoGame\Tools\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -259,7 +265,7 @@
<Content Include="Content\whitePixel.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
<Import Project="..\Dependencies\MonoGame\MonoGame.Content.Builder.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
14 changes: 10 additions & 4 deletions BEPUphysicsDrawer/BEPUphysicsDrawer.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
<Import Project="..\Dependencies\MonoGame\MonoGame.Common.props" Condition="Exists('..\Dependencies\MonoGame\MonoGame.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand All @@ -15,6 +15,8 @@
<MonoGamePlatform>Windows</MonoGamePlatform>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
Expand Down Expand Up @@ -140,10 +142,14 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework">
<HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Dependencies\MonoGame\Tools\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
Expand All @@ -170,7 +176,7 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
<Import Project="..\Dependencies\MonoGame\MonoGame.Content.Builder.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
2 changes: 2 additions & 0 deletions Dependencies/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# No value in any of the docu-.xmls in this path.
*.xml
7 changes: 7 additions & 0 deletions Dependencies/MonoGame/MonoGame.Common.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MonoGameInstallDirectory Condition=" '$(MonoGameInstallDirectory)' == '' And Exists('/usr/lib/mono/xbuild/MonoGame/v3.0/MonoGame.Common.props') ">/usr/lib/mono/xbuild/</MonoGameInstallDirectory>
<MonoGameInstallDirectory Condition=" '$(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>
</PropertyGroup>
</Project>
108 changes: 108 additions & 0 deletions Dependencies/MonoGame/MonoGame.Content.Builder.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<!--
MonoGame - Copyright (C) The MonoGame Team
This file is subject to the terms and conditions defined in
file 'LICENSE.txt', which is part of this source code package.
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- 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>

<ContentRootDirectory Condition=" '$(ContentRootDirectory)' == '' " >Content</ContentRootDirectory>
<ParentOutputDir Condition=" '$(ParentOutputDir)' == '' " >$(ProjectDir)$(ContentRootDirectory)\bin\$(MonoGamePlatform)</ParentOutputDir>
<ParentIntermediateDir Condition=" '$(ParentIntermediateDir)' == '' " >$(ProjectDir)$(ContentRootDirectory)\obj\$(MonoGamePlatform)</ParentIntermediateDir>

<!-- 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)' == ''">$(MSBuildThisFileDirectory)Tools\MGCB.exe</MonoGameContentBuilderExe>
<MonoGameContentBuilderCmd>&quot;$(MonoGameContentBuilderExe)&quot;</MonoGameContentBuilderCmd>
<MonoGameContentBuilderCmd Condition=" '$(OS)' != 'Windows_NT' ">$(MonoExe) $(MonoGameContentBuilderCmd)</MonoGameContentBuilderCmd>

<PlatformResourcePrefix Condition="'$(MonoGamePlatform)' == 'MacOSX' Or '$(MonoGamePlatform)' == 'iOS'">Resources\</PlatformResourcePrefix>
<PlatformResourcePrefix Condition="'$(MonoGamePlatform)' == 'Android'">Assets\</PlatformResourcePrefix>
<PlatformResourcePrefix Condition="'$(PlatformResourcePrefix)' == ''"></PlatformResourcePrefix>

<Header>/platform:$(MonoGamePlatform) /outputDir:&quot;$(ParentOutputDir)&quot; /intermediateDir:&quot;$(ParentIntermediateDir)&quot; /quiet</Header>
</PropertyGroup>

<!-- Get all Mono Game Content References and store them in a list -->
<!-- We do this here so we are compatible with xbuild -->
<ItemGroup>
<ContentReferences Include="@(MonoGameContentReference)"/>
</ItemGroup>

<Error Text="The MonoGamePlatform property was not defined in the project! It must be set to Windows, WindowsGL, WindowsStoreApp, WindowsPhone8, MacOSX, iOS, Linux, DesktopGL, RaspberryPi, Android, Ouya, NativeClient, PlayStation4, or PlayStationMobile."
Condition=" '$(MonoGamePlatform)' != 'Windows' And
'$(MonoGamePlatform)' != 'iOS' And
'$(MonoGamePlatform)' != 'Android' And
'$(MonoGamePlatform)' != 'Linux' And
'$(MonoGamePlatform)' != 'DesktopGL' And
'$(MonoGamePlatform)' != 'MacOSX' And
'$(MonoGamePlatform)' != 'WindowsStoreApp' And
'$(MonoGamePlatform)' != 'NativeClient' And
'$(MonoGamePlatform)' != 'Ouya' And
'$(MonoGamePlatform)' != 'PlayStationMobile' And
'$(MonoGamePlatform)' != 'WindowsPhone8' And
'$(MonoGamePlatform)' != 'RaspberryPi' And
'$(MonoGamePlatform)' != 'PlayStation4' And
'$(MonoGamePlatform)' != 'WindowsGL'" />

<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)' == '' "
/>

<MakeDir Directories="$(ParentIntermediateDir)"/>
<MakeDir Directories="$(ParentOutputDir)"/>

</Target>

<PropertyGroup>
<BuildDependsOn>
BuildContent;
$(BuildDependsOn);
</BuildDependsOn>
</PropertyGroup>

<Target Name="RunContentBuilder">
<Exec Condition=" '%(ContentReferences.FullPath)' != '' " Command="$(MonoGameContentBuilderCmd) /@:&quot;%(ContentReferences.FullPath)&quot; $(Header)"
WorkingDirectory="%(ContentReferences.RootDir)%(ContentReferences.Directory)" />

<CreateItem Include="$(ParentOutputDir)\**\*.*">
<Output TaskParameter="Include" ItemName="ExtraContent" />
</CreateItem>
</Target>

<Target Name="BuildContent" DependsOnTargets="Prepare;RunContentBuilder"
Outputs="%(ExtraContent.RecursiveDir)%(ExtraContent.Filename)%(ExtraContent.Extension)">
<CreateItem Include="$(ParentOutputDir)\%(ExtraContent.RecursiveDir)%(ExtraContent.Filename)%(ExtraContent.Extension)"
AdditionalMetadata="Link=$(PlatformResourcePrefix)$(ContentRootDirectory)\%(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>
Binary file not shown.
5 changes: 5 additions & 0 deletions Dependencies/MonoGame/Tools/ATI.TextureConverter.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<dllmap os="linux" dll="TextureConverter.dll" target="libTextureConverter.so"/>
<dllmap os="osx" dll="TextureConverter.dll" target="libTextureConverter.dylib"/>
</configuration>
Binary file added Dependencies/MonoGame/Tools/Assimp64.dll
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/AssimpNet.dll
Binary file not shown.
5 changes: 5 additions & 0 deletions Dependencies/MonoGame/Tools/AssimpNet.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<configuration>
<dllmap os="macos" dll="assimp.dll" target="libassimp.dylib"/>
<dllmap os="linux" dll="assimp.dll" target="libassimp.so"/>
</configuration>

Binary file added Dependencies/MonoGame/Tools/CppNet.dll
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/FreeImage.dll
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/FreeImageNET.dll
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/Lidgren.Network.dll
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/MGCB.exe
Binary file not shown.
3 changes: 3 additions & 0 deletions Dependencies/MonoGame/Tools/MGCB.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions Dependencies/MonoGame/Tools/Nvidia.TextureTools.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<configuration>

<dllmap os="macos" dll="nvtt.dll" target="libnvtt.dylib"/>

<dllmap os="linux" dll="nvtt.dll" target="libnvtt.so"/>

</configuration>

Binary file added Dependencies/MonoGame/Tools/PVRTexLibNET.dll
Binary file not shown.
5 changes: 5 additions & 0 deletions Dependencies/MonoGame/Tools/PVRTexLibNET.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<dllmap os="linux" dll="PVRTexLibWrapper.dll" cpu="x86-64" target="libPVRTexLibWrapper.so"/>
<dllmap os="osx" dll="PVRTexLibWrapper.dll" target="libPVRTexLibWrapper.dylib"/>
</configuration>
Binary file added Dependencies/MonoGame/Tools/PVRTexLibWrapper.dll
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/Pipeline.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions Dependencies/MonoGame/Tools/Pipeline.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/SharpDX.DXGI.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/SharpDX.XAudio2.dll
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/SharpDX.XInput.dll
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/SharpDX.dll
Binary file not shown.
Binary file added Dependencies/MonoGame/Tools/SharpFont.dll
Binary file not shown.
7 changes: 7 additions & 0 deletions Dependencies/MonoGame/Tools/SharpFont.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<dllmap dll="freetype6.dll">
<dllentry os="linux" dll="libfreetype.so.6" />
<dllentry os="osx" dll="libfreetype.6.dylib" />
</dllmap>
</configuration>
46 changes: 46 additions & 0 deletions Dependencies/MonoGame/Tools/Templates/Effect.fx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#if OPENGL
#define SV_POSITION POSITION
#define VS_SHADERMODEL vs_3_0
#define PS_SHADERMODEL ps_3_0
#else
#define VS_SHADERMODEL vs_4_0_level_9_1
#define PS_SHADERMODEL ps_4_0_level_9_1
#endif

matrix WorldViewProjection;

struct VertexShaderInput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
};

struct VertexShaderOutput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
};

VertexShaderOutput MainVS(in VertexShaderInput input)
{
VertexShaderOutput output = (VertexShaderOutput)0;

output.Position = mul(input.Position, WorldViewProjection);
output.Color = input.Color;

return output;
}

float4 MainPS(VertexShaderOutput input) : COLOR
{
return input.Color;
}

technique BasicColorDrawing
{
pass P0
{
VertexShader = compile VS_SHADERMODEL MainVS();
PixelShader = compile PS_SHADERMODEL MainPS();
}
};
Binary file added Dependencies/MonoGame/Tools/Templates/Effect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions Dependencies/MonoGame/Tools/Templates/Effect.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Effect
Effect.png
EffectImporter
EffectProcessor
Effect.fx
Binary file added Dependencies/MonoGame/Tools/Templates/Font.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions Dependencies/MonoGame/Tools/Templates/SpriteEffect.fx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#if OPENGL
#define SV_POSITION POSITION
#define VS_SHADERMODEL vs_3_0
#define PS_SHADERMODEL ps_3_0
#else
#define VS_SHADERMODEL vs_4_0_level_9_1
#define PS_SHADERMODEL ps_4_0_level_9_1
#endif

Texture2D SpriteTexture;

sampler2D SpriteTextureSampler = sampler_state
{
Texture = <SpriteTexture>;
};

struct VertexShaderOutput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
float2 TextureCoordinates : TEXCOORD0;
};

float4 MainPS(VertexShaderOutput input) : COLOR
{
return tex2D(SpriteTextureSampler,input.TextureCoordinates) * input.Color;
}

technique SpriteDrawing
{
pass P0
{
PixelShader = compile PS_SHADERMODEL MainPS();
}
};
5 changes: 5 additions & 0 deletions Dependencies/MonoGame/Tools/Templates/SpriteEffect.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Sprite Effect
Effect.png
EffectImporter
EffectProcessor
SpriteEffect.fx
Loading

0 comments on commit 7a2c63a

Please sign in to comment.