Browse Source

Binaries sample update - test (#54)

* Update shatter effect fx - Model needs replacing

* Updated csProj of sample to use binaries.  Binaries download MUST be unpacked to root folder as MonoGame.3.8.4.2908-develop

* Added Vulkan sample
Simon (Darkside) Jackson 3 weeks ago
parent
commit
a286dcc86b

+ 2 - 0
Collisions/CollisionSample.sln

@@ -8,6 +8,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CollisionSample.Windows", "
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CollisionSample.DesktopGL", "Platforms\Desktop\CollisionSample.DesktopGL.csproj", "{AFFFC991-4956-45EF-8746-C1AE3FC7A247}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CollisionSample.DesktopVK", "Platforms\Vulkan\CollisionSample.DesktopVK.csproj", "{AFFFC991-4956-45EF-8746-C1AE3FC7A247}"
+EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CollisionSample.Android", "Platforms\Android\CollisionSample.Android.csproj", "{AFFFC991-4956-45EF-8746-C1AE3FC7A248}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CollisionSample.iOS", "Platforms\iOS\CollisionSample.iOS.csproj", "{AFFFC991-4956-45EF-8746-C1AE3FC7A249}"

+ 5 - 2
Collisions/Core/CollisionSample.Core.csproj

@@ -5,10 +5,13 @@
     <AssemblyName>CollisionSample.Core</AssemblyName>
     <RootNamespace>CollisionSample.Core</RootNamespace>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+    <MonoGamePlatform>Native</MonoGamePlatform>
+    <MonoGameBinariesPath Condition="'$(MonoGameBinariesPath)' == ''">$(MSBuildThisFileDirectory)..\..\MonoGame.3.8.4.2908-develop\MonoGame.Framework\</MonoGameBinariesPath>    
   </PropertyGroup>
-
   <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.*" PrivateAssets="all" />
+    <Reference Include="MonoGame.Framework">
+      <HintPath>$(MonoGameBinariesPath)$(MonoGamePlatform)\MonoGame.Framework.dll</HintPath>
+    </Reference>	
   </ItemGroup>
 
 </Project>

+ 10 - 2
Collisions/Platforms/Android/CollisionSample.Android.csproj

@@ -5,10 +5,18 @@
     <RootNamespace>CollisionSample</RootNamespace>
     <AssemblyName>Collision</AssemblyName>
     <SupportedOSPlatformVersion>28.0</SupportedOSPlatformVersion>
+    <MonoGamePlatform>Android</MonoGamePlatform>
+    <MonoGameBinariesPath Condition="'$(MonoGameBinariesPath)' == ''">$(MSBuildThisFileDirectory)..\..\..\MonoGame.3.8.4.2908-develop\MonoGame.Framework\</MonoGameBinariesPath>    
   </PropertyGroup>
-
   <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.Android" Version="3.8.*" />
+    <None Include="$(MonoGameBinariesPath)$(MonoGamePlatform)\runtimes\android-arm64\native\*">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <Reference Include="MonoGame.Framework">
+      <HintPath>$(MonoGameBinariesPath)$(MonoGamePlatform)\MonoGame.Framework.dll</HintPath>
+    </Reference>	
+  </ItemGroup>
+  <ItemGroup>
     <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.*" />
     <ProjectReference Include="..\..\Core\CollisionSample.Core.csproj" />
   </ItemGroup>

+ 10 - 3
Collisions/Platforms/Desktop/CollisionSample.DesktopGL.csproj

@@ -10,14 +10,21 @@
     <RootNamespace>CollisionSample</RootNamespace>
     <ApplicationManifest>..\..\Core\Content\app.manifest</ApplicationManifest>
     <ApplicationIcon>..\..\Core\Content\Game.ico</ApplicationIcon>
+    <MonoGamePlatform>DesktopGL</MonoGamePlatform>
+    <MonoGameBinariesPath Condition="'$(MonoGameBinariesPath)' == ''">$(MSBuildThisFileDirectory)..\..\..\MonoGame.3.8.4.2908-develop\MonoGame.Framework\</MonoGameBinariesPath>    
   </PropertyGroup>
-
   <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.*" />
+    <None Include="$(MonoGameBinariesPath)$(MonoGamePlatform)\runtimes\win-x64\native\*">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <Reference Include="MonoGame.Framework">
+      <HintPath>$(MonoGameBinariesPath)$(MonoGamePlatform)\MonoGame.Framework.dll</HintPath>
+    </Reference>	
+  </ItemGroup>
+  <ItemGroup>
     <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.*" />
     <ProjectReference Include="..\..\Core\CollisionSample.Core.csproj" />
   </ItemGroup>
-
   <ItemGroup>
     <Content Include="..\..\..\CompiledContent\Android\Content\Fonts\Arial.xnb" Link="Content\Arial.xnb">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+ 34 - 0
Collisions/Platforms/Vulkan/CollisionSample.DesktopVK.csproj

@@ -0,0 +1,34 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>net8.0</TargetFramework>
+    <RollForward>Major</RollForward>
+    <PublishReadyToRun>false</PublishReadyToRun>
+    <TieredCompilation>false</TieredCompilation>
+    <AssemblyName>Collision</AssemblyName>
+    <RootNamespace>CollisionSample</RootNamespace>
+    <ApplicationManifest>..\..\Core\Content\app.manifest</ApplicationManifest>
+    <ApplicationIcon>..\..\Core\Content\Game.ico</ApplicationIcon>
+    <MonoGamePlatform>DesktopVK</MonoGamePlatform>
+    <MonoGameBinariesPath Condition="'$(MonoGameBinariesPath)' == ''">$(MSBuildThisFileDirectory)..\..\..\MonoGame.3.8.4.2908-develop\MonoGame.Framework\</MonoGameBinariesPath>    
+  </PropertyGroup>
+  <ItemGroup>
+    <None Include="$(MonoGameBinariesPath)$(MonoGamePlatform)\release\*">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <Reference Include="MonoGame.Framework">
+      <HintPath>$(MonoGameBinariesPath)Native\MonoGame.Framework.dll</HintPath>
+    </Reference>	
+  </ItemGroup>
+  <ItemGroup>
+    <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.*" />
+    <ProjectReference Include="..\..\Core\CollisionSample.Core.csproj" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="..\..\..\CompiledContent\Android\Content\Fonts\Arial.xnb" Link="Content\Arial.xnb">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+
+</Project>

+ 14 - 0
Collisions/Platforms/Vulkan/Program.cs

@@ -0,0 +1,14 @@
+using System;
+
+namespace CollisionSample
+{
+    public static class Program
+    {
+        [STAThread]
+        static void Main()
+        {
+            using (var game = new CollisionGame())
+                game.Run();
+        }
+    }
+}

+ 10 - 2
Collisions/Platforms/Windows/CollisionSample.Windows.csproj

@@ -11,10 +11,18 @@
     <RootNamespace>CollisionSample</RootNamespace>
     <ApplicationManifest>..\..\Core\Content\app.manifest</ApplicationManifest>
     <ApplicationIcon>..\..\Core\Content\Game.ico</ApplicationIcon>
+    <MonoGamePlatform>WindowsDX</MonoGamePlatform>
+    <MonoGameBinariesPath Condition="'$(MonoGameBinariesPath)' == ''">$(MSBuildThisFileDirectory)..\..\..\MonoGame.3.8.4.2908-develop\MonoGame.Framework\</MonoGameBinariesPath>    
   </PropertyGroup>
-
   <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.*" />
+    <None Include="$(MonoGameBinariesPath)$(MonoGamePlatform)\native\*">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <Reference Include="MonoGame.Framework">
+      <HintPath>$(MonoGameBinariesPath)$(MonoGamePlatform)\MonoGame.Framework.dll</HintPath>
+    </Reference>	
+  </ItemGroup>
+  <ItemGroup>
     <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.*" />
     <ProjectReference Include="..\..\Core\CollisionSample.Core.csproj" />
   </ItemGroup>

+ 10 - 2
Collisions/Platforms/iOS/CollisionSample.iOS.csproj

@@ -10,10 +10,18 @@
     <RootNamespace>CollisionSample</RootNamespace>
     <RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
     <UseInterpreter>false</UseInterpreter>
+    <MonoGamePlatform>iOS</MonoGamePlatform>
+    <MonoGameBinariesPath Condition="'$(MonoGameBinariesPath)' == ''">$(MSBuildThisFileDirectory)..\..\..\MonoGame.3.8.4.2908-develop\MonoGame.Framework\</MonoGameBinariesPath>    
   </PropertyGroup>
-
   <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.iOS" Version="3.8.*" />
+    <None Include="$(MonoGameBinariesPath)$(MonoGamePlatform)\runtimes\ios-arm64\native\*">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <Reference Include="MonoGame.Framework">
+      <HintPath>$(MonoGameBinariesPath)$(MonoGamePlatform)\MonoGame.Framework.dll</HintPath>
+    </Reference>	
+  </ItemGroup>
+  <ItemGroup>
     <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.*" />
     <ProjectReference Include="..\..\Core\CollisionSample.Core.csproj" />
   </ItemGroup>