Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[All] Use nuget references instead of project references for all demos. #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions Audio3D/Audio3D.MacOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D5C989FD-6AE3-417F-BCB9-7AE30F195A31}</ProjectGuid>
<ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>Audio3D</RootNamespace>
<AssemblyName>Audio3D</AssemblyName>
<SuppressXamMacUpsell>True</SuppressXamMacUpsell>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
Expand Down Expand Up @@ -63,8 +66,10 @@
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="MonoMac" />
<Reference Include="Xamarin.Mac" />
<Reference Include="MonoGame.Framework">
<HintPath>..\packages\MonoGame.Framework.MacOS.3.7.1.189\lib\XamarinMac\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
Expand All @@ -79,9 +84,10 @@
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
<ItemGroup>
<Folder Include="Content\" />
</ItemGroup>
Expand All @@ -94,14 +100,5 @@
<Content Include="Content\DogTexture.xnb" />
<Content Include="Content\checker.xnb" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj">
<Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>
<Name>Lidgren.Network.MacOS</Name>
</ProjectReference>
<ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
<Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
<Name>MonoGame.Framework.MacOS</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\packages\MonoGame.Framework.MacOS.3.7.1.189\build\MonoGame.Framework.MacOS.targets" Condition="Exists('..\packages\MonoGame.Framework.MacOS.3.7.1.189\build\MonoGame.Framework.MacOS.targets')" />
</Project>
2 changes: 1 addition & 1 deletion Audio3D/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
<string>10.9</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
Expand Down
6 changes: 3 additions & 3 deletions Audio3D/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using System.Collections.Generic;
using System.Linq;

using MonoMac.AppKit;
using MonoMac.Foundation;
using AppKit;
using Foundation;

namespace Audio3D
{
Expand All @@ -29,7 +29,7 @@ class AppDelegate : NSApplicationDelegate
{
Audio3DGame game;

public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
public override void DidFinishLaunching (NSNotification notification)
{
game = new Audio3DGame ();
game.Run ();
Expand Down
4 changes: 4 additions & 0 deletions Audio3D/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.MacOS" version="3.7.1.189" targetFramework="xamarinmac20" />
</packages>
27 changes: 12 additions & 15 deletions BackgroundThreadTester/BackgroundThreadTester.MacOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{8592FA21-37B6-41C8-BC7F-17EB4930B96A}</ProjectGuid>
<ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>BackgroundThreadTester</RootNamespace>
<AssemblyName>BackgroundThreadTester</AssemblyName>
<SuppressXamMacUpsell>True</SuppressXamMacUpsell>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>True</DebugSymbols>
Expand Down Expand Up @@ -46,18 +49,21 @@
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="MonoMac" />
<Reference Include="Xamarin.Mac" />
<Reference Include="System.Windows.Forms" />
<Reference Include="MonoGame.Framework">
<HintPath>..\packages\MonoGame.Framework.MacOS.3.7.1.189\lib\XamarinMac\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="Info.plist">
</None>
<None Include="Content\beehive.png" />
<None Include="README.md" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
<ItemGroup>
<Folder Include="Content\" />
</ItemGroup>
Expand All @@ -78,14 +84,5 @@
<ItemGroup>
<InterfaceDefinition Include="MainMenu.xib" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj">
<Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>
<Name>Lidgren.Network.MacOS</Name>
</ProjectReference>
<ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
<Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
<Name>MonoGame.Framework.MacOS</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\packages\MonoGame.Framework.MacOS.3.7.1.189\build\MonoGame.Framework.MacOS.targets" Condition="Exists('..\packages\MonoGame.Framework.MacOS.3.7.1.189\build\MonoGame.Framework.MacOS.targets')" />
</Project>
22 changes: 10 additions & 12 deletions BackgroundThreadTester/Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using System.Windows.Forms;
using System.Threading;

using MonoMac.AppKit;
using MonoMac.Foundation;

using AppKit;
using Foundation;
namespace BackgroundThreadTester
{
public class Game1 : Microsoft.Xna.Framework.Game
Expand Down Expand Up @@ -65,9 +63,9 @@ protected override void UnloadContent ()

public void CreateBackgroundThread ()
{
System.Console.WriteLine ("before invoke");
// create a new thread using BackgroundWorkerThread as method to execute
var thread = new Thread (BackgroundWorkerThread as ThreadStart);
System.Console.WriteLine ("before invoke");
// create a new thread using BackgroundWorkerThread as method to execute
var thread = new Thread (BackgroundWorkerThread);
// start it
thread.Start ();

Expand All @@ -86,7 +84,7 @@ void BackgroundWorkerThread ()
Console.WriteLine ("Before add");

// Make sure we invoke this on the Main Thread or OpenGL will throw an error
MonoMac.AppKit.NSApplication.SharedApplication.BeginInvokeOnMainThread (delegate {
AppKit.NSApplication.SharedApplication.BeginInvokeOnMainThread (delegate {
Components.Add (new TestTexture (this));
});
Console.WriteLine ("After add");
Expand All @@ -112,7 +110,7 @@ public int GetBackBufferHeight ()

public String GetStyleMask ()
{
return this.Window.Window.StyleMask.ToString ();
return this.Window.ToString (); // TODO
}//GetStyleMask


Expand Down Expand Up @@ -183,13 +181,13 @@ public void CenterWindow ()
fNewX = (fScreenWidth - fWindowWidth) / 2;
fNewY = (fScreenHeight - fWindowHeight) / 2;

fTitleBarHeight = this.Window.Window.Frame.Height - fWindowHeight;
fTitleBarHeight = this.Window.Frame.Height - fWindowHeight;

System.Drawing.PointF pfLocation = new System.Drawing.PointF (fNewX, fNewY);
System.Drawing.PointF pfSize = new System.Drawing.PointF (fWindowWidth, fWindowHeight + fTitleBarHeight);
System.Drawing.SizeF sfSize = new System.Drawing.SizeF (pfSize);
System.Drawing.RectangleF rectTemp = new System.Drawing.RectangleF (pfLocation, sfSize);
this.Window.Window.SetFrame (rectTemp, true);
this.Window.SetFrame (rectTemp, true);
}//CenterWindow
}
}
2 changes: 1 addition & 1 deletion BackgroundThreadTester/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
<string>10.9</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
Expand Down
3 changes: 0 additions & 3 deletions BackgroundThreadTester/InputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.Media;
using System.IO;
using Microsoft.Xna.Framework.GamerServices;

namespace BackgroundThreadTester
{
Expand Down
5 changes: 1 addition & 4 deletions BackgroundThreadTester/Object.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;


namespace BackgroundThreadTester
Expand Down Expand Up @@ -66,7 +63,7 @@ public override void Draw(GameTime gameTime)
// Get the current spritebatch
SpriteBatch sBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));

sBatch.Draw(texture, v2Temp, recCurrentFrame, new Color(255, 255, 255, (byte)nAlpha), fRotation, vecRotationCenter, 1f, SpriteEffects.None, 0);
sBatch.Draw (texture, v2Temp, recCurrentFrame, new Color ((byte)255, (byte)255, (byte)255, (byte)nAlpha), fRotation, vecRotationCenter, 1f, SpriteEffects.None, 0);

base.Draw(gameTime);
}
Expand Down
6 changes: 3 additions & 3 deletions BackgroundThreadTester/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using MonoMac.AppKit;
using MonoMac.Foundation;
using AppKit;
using Foundation;


namespace BackgroundThreadTester
Expand All @@ -22,7 +22,7 @@ class AppDelegate : NSApplicationDelegate
{
Game1 game;

public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
public override void DidFinishLaunching (NSNotification notification)
{
game = new Game1();
game.Run();
Expand Down
3 changes: 0 additions & 3 deletions BackgroundThreadTester/TextManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
namespace BackgroundThreadTester
{
public class TextManager : Microsoft.Xna.Framework.DrawableGameComponent
Expand Down
4 changes: 4 additions & 0 deletions BackgroundThreadTester/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.MacOS" version="3.7.1.189" targetFramework="xamarinmac20" />
</packages>
2 changes: 1 addition & 1 deletion BloomSample/BloomComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public BloomComponent(Game game)
: base(game)
{
if (game == null)
throw new ArgumentNullException("game");
throw new ArgumentNullException(nameof (game));
}


Expand Down
28 changes: 13 additions & 15 deletions BloomSample/BloomSample.MacOS.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" 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')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A93553D9-11E5-4B0B-9809-4E4765D5FD8F}</ProjectGuid>
<ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>BloomSample</RootNamespace>
<AssemblyName>BloomSample</AssemblyName>
<SuppressXamMacUpsell>True</SuppressXamMacUpsell>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
Expand Down Expand Up @@ -63,8 +67,10 @@
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="MonoMac" />
<Reference Include="Xamarin.Mac" />
<Reference Include="MonoGame.Framework">
<HintPath>..\packages\MonoGame.Framework.MacOS.3.7.1.189\lib\XamarinMac\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
Expand All @@ -75,9 +81,10 @@
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
<ItemGroup>
<Folder Include="Content\" />
</ItemGroup>
Expand Down Expand Up @@ -115,14 +122,5 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj">
<Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>
<Name>Lidgren.Network.MacOS</Name>
</ProjectReference>
<ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
<Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
<Name>MonoGame.Framework.MacOS</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\packages\MonoGame.Framework.MacOS.3.7.1.189\build\MonoGame.Framework.MacOS.targets" Condition="Exists('..\packages\MonoGame.Framework.MacOS.3.7.1.189\build\MonoGame.Framework.MacOS.targets')" />
</Project>
2 changes: 1 addition & 1 deletion BloomSample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
<string>10.9</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
Expand Down
6 changes: 3 additions & 3 deletions BloomSample/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using System.Collections.Generic;
using System.Linq;

using MonoMac.AppKit;
using MonoMac.Foundation;
using AppKit;
using Foundation;

namespace BloomPostprocess
{
Expand All @@ -29,7 +29,7 @@ class AppDelegate : NSApplicationDelegate
{
BloomPostprocessGame game;

public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
public override void DidFinishLaunching (NSNotification notification)
{
game = new BloomPostprocessGame ();
game.Run ();
Expand Down
Loading