Jelajahi Sumber

Audio3D - Changes so iOS builds.

Dominique Louis 1 bulan lalu
induk
melakukan
55014c4dca

+ 26 - 4
Audio3D/.vscode/launch.json

@@ -2,26 +2,48 @@
     "version": "0.2.0",
     "configurations": [
         {
-            "name": "Run Windows",
+            "name": "Launch Windows",
             "type": "coreclr",
             "request": "launch",
             "preLaunchTask": "build-windows",
-            "program": "${workspaceFolder}/Platforms/Windows/bin/Debug/net8.0-windows/Audio3D.Windows.exe",
+            "program": "${workspaceFolder}/Platforms/Windows/bin/Debug/net8.0-windows/Audio3D.exe",
             "args": [],
             "cwd": "${workspaceFolder}/Platforms/Windows",
             "stopAtEntry": false,
             "console": "internalConsole"
         },
         {
-            "name": "Run DesktopGL",
+            "name": "Launch DesktopGL",
             "type": "coreclr",
             "request": "launch",
             "preLaunchTask": "build-desktopgl",
-            "program": "${workspaceFolder}/Platforms/DesktopGL/bin/Debug/net8.0/Audio3D.DesktopGL.exe",
+            "program": "${workspaceFolder}/Platforms/DesktopGL/bin/Debug/net8.0/Audio3D",
             "args": [],
             "cwd": "${workspaceFolder}/Platforms/DesktopGL",
             "stopAtEntry": false,
             "console": "internalConsole"
+        },
+        {
+            "name": "Launch Android",
+            "type": "coreclr",
+            "request": "launch",
+            "preLaunchTask": "build-android",
+            "program": "${workspaceFolder}/Platforms/Android/bin/Debug/net8.0-android/Audio3D.dll",
+            "args": [],
+            "cwd": "${workspaceFolder}/Platforms/Android",
+            "stopAtEntry": false,
+            "console": "internalConsole"
+        },
+        {
+            "name": "Launch iOS",
+            "type": "coreclr",
+            "request": "launch",
+            "preLaunchTask": "build-ios",
+            "program": "${workspaceFolder}/Platforms/iOS/bin/Debug/net8.0-ios/iossimulator-arm64/Audio3D.app/Audio3D",
+            "args": [],
+            "cwd": "${workspaceFolder}/Platforms/iOS",
+            "stopAtEntry": false,
+            "console": "internalConsole"
         }
     ]
 }

+ 6 - 6
Audio3D/.vscode/tasks.json

@@ -16,17 +16,17 @@
             "problemMatcher": "$msCompile"
         },
         {
-            "label": "run-windows",
+            "label": "build-android",
             "type": "shell",
-            "command": "dotnet run --project Platforms/Windows/Audio3D.Windows.csproj",
-            "group": "test",
+            "command": "dotnet build Platforms/Android/Audio3D.Android.csproj",
+            "group": "build",
             "problemMatcher": "$msCompile"
         },
         {
-            "label": "run-desktopgl",
+            "label": "build-ios",
             "type": "shell",
-            "command": "dotnet run --project Platforms/DesktopGL/Audio3D.DesktopGL.csproj",
-            "group": "test",
+            "command": "dotnet build Platforms/iOS/Audio3D.iOS.csproj",
+            "group": "build",
             "problemMatcher": "$msCompile"
         }
     ]

+ 1 - 1
Audio3D/Core/Audio3D.Core.csproj

@@ -9,6 +9,6 @@
     <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
   </PropertyGroup>
   <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.*" />
+    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.4.2633-develop" PrivateAssets="all"/>
   </ItemGroup>
 </Project>

+ 0 - 0
Audio3D/Core/Game.cs → Audio3D/Core/Audio3DGame.cs


+ 2 - 1
Audio3D/Platforms/Android/Audio3D.Android.csproj

@@ -3,7 +3,8 @@
     <TargetFramework>net8.0-android</TargetFramework>
     <OutputType>Exe</OutputType>
     <RootNamespace>Audio3D.Android</RootNamespace>
-    <AssemblyTitle>Audio3D Android</AssemblyTitle>
+    <AssemblyName>Audio3D</AssemblyName>
+    <AssemblyTitle>Audio3D</AssemblyTitle>
     <Description>Android platform for Audio3D MonoGame sample.</Description>
     <Authors>CartBlanche</Authors>
     <Company>CartBlanche</Company>

+ 2 - 1
Audio3D/Platforms/DesktopGL/Audio3D.DesktopGL.csproj

@@ -3,6 +3,7 @@
     <TargetFramework>net8.0</TargetFramework>
     <OutputType>WinExe</OutputType>
     <RootNamespace>Audio3D.DesktopGL</RootNamespace>
+    <AssemblyName>Audio3D</AssemblyName>
     <AssemblyTitle>Audio3D DesktopGL</AssemblyTitle>
     <Description>DesktopGL platform for Audio3D MonoGame sample.</Description>
     <Authors>CartBlanche</Authors>
@@ -11,7 +12,7 @@
   </PropertyGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\Core\Audio3D.Core.csproj" />
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.*" />
+    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.4.2633-develop" />
   </ItemGroup>
   <ItemGroup>
     <Content Include="..\..\Core\Content\**\*.xnb" Link="Content\%(RecursiveDir)%(Filename)%(Extension)">

+ 1 - 0
Audio3D/Platforms/Windows/Audio3D.Windows.csproj

@@ -3,6 +3,7 @@
     <TargetFramework>net8.0-windows</TargetFramework>
     <OutputType>WinExe</OutputType>
     <RootNamespace>Audio3D.Windows</RootNamespace>
+    <AssemblyName>Audio3D</AssemblyName>
     <AssemblyTitle>Audio3D Windows</AssemblyTitle>
     <Description>Windows platform for Audio3D MonoGame sample.</Description>
     <Authors>CartBlanche</Authors>

+ 2 - 1
Audio3D/Platforms/iOS/Audio3D.iOS.csproj

@@ -3,6 +3,7 @@
     <TargetFramework>net8.0-ios</TargetFramework>
     <OutputType>Exe</OutputType>
     <RootNamespace>Audio3D.iOS</RootNamespace>
+    <AssemblyName>Audio3D</AssemblyName>
     <AssemblyTitle>Audio3D iOS</AssemblyTitle>
     <Description>iOS platform for Audio3D MonoGame sample.</Description>
     <Authors>CartBlanche</Authors>
@@ -11,7 +12,7 @@
   </PropertyGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\Core\Audio3D.Core.csproj" />
-    <PackageReference Include="MonoGame.Framework.iOS" Version="3.8.*" />
+    <PackageReference Include="MonoGame.Framework.iOS" Version="3.8.4.2633-develop" />
   </ItemGroup>
   <ItemGroup>
     <Content Include="..\..\Core\Content\**\*.xnb" Link="Content\%(RecursiveDir)%(Filename)%(Extension)">

+ 12 - 2
Audio3D/Platforms/iOS/Program.cs

@@ -1,12 +1,22 @@
+using Foundation;
 using UIKit;
 
 namespace Audio3D.iOS
 {
-    public class Application
+    [Register("AppDelegate")]
+    class AppDelegate : UIApplicationDelegate
     {
+        private Audio3DGame game;
+
+        public override void FinishedLaunching(UIApplication app)
+        {
+            game = new Audio3DGame();
+            game.Run();
+        }
+
         static void Main(string[] args)
         {
             UIApplication.Main(args, null, typeof(AppDelegate));
         }
     }
-}
+}