(ded4a3e0a) v0.9.0.7
This commit is contained in:
+53
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using MonoDevelop.Ide.Templates;
|
||||
using System.Xml;
|
||||
using MonoDevelop.Core;
|
||||
using MonoDevelop.Projects;
|
||||
|
||||
namespace MonoDevelop.MonoGame
|
||||
{
|
||||
public class ContentItemTemplate : FileDescriptionTemplate
|
||||
{
|
||||
SingleFileDescriptionTemplate template;
|
||||
FileCopyMode mode = FileCopyMode.None;
|
||||
|
||||
public override string Name {
|
||||
get { return template.Name; }
|
||||
}
|
||||
|
||||
public override void Load (XmlElement filenode, FilePath baseDirectory)
|
||||
{
|
||||
foreach (XmlNode node in filenode.ChildNodes) {
|
||||
if (node is XmlElement) {
|
||||
template = CreateTemplate ((XmlElement) node, baseDirectory) as SingleFileDescriptionTemplate;
|
||||
if (template == null)
|
||||
throw new InvalidOperationException ("Resource templates must contain single-file templates.");
|
||||
var attr = node.Attributes ["CopyToOutputDirectory"];
|
||||
if (attr != null) {
|
||||
Enum.TryParse<FileCopyMode> ( attr.Value, out mode);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool AddToProject(SolutionFolderItem policyParent, Project project, string language, string directory, string name)
|
||||
{
|
||||
ProjectFile file = template.AddFileToProject(policyParent, project, language, directory, name);
|
||||
if (file != null)
|
||||
{
|
||||
file.BuildAction = BuildAction.Content;
|
||||
file.CopyToOutputDirectory = mode;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Show ()
|
||||
{
|
||||
template.Show ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+219
@@ -0,0 +1,219 @@
|
||||
<Addin id="MonoGame" namespace="MonoDevelop" name="MonoGame Addin" author="Dean Ellis" copyright="MSPL" url="http://www.monogame.net/" description="MonoGame Addin for MonoDevelop" category="Game Development" version="0.0.0.0">
|
||||
<Runtime>
|
||||
<Import file="icons/monogame-project-32.png" />
|
||||
<!-- File Templates -->
|
||||
<Import file="templates/MonoGameContentBuilderTemplate.xpt.xml" />
|
||||
<Import file="templates/MonoGameContentProcessor.xpt.xml" />
|
||||
<Import file="templates/MonoGameContentImporter.xpt.xml" />
|
||||
<!--- Generic Templates -->
|
||||
<Import file="templates/MonoGameProject.xpt.xml" />
|
||||
<Import file="templates/MonoGameSharedProject.xpt.xml" />
|
||||
<Import file="templates/MonoGamePCLProject.xpt.xml" />
|
||||
<Import file="templates/MonoGamePipelineProject.xpt.xml" />
|
||||
<Import file="templates/Common/Importer1.cs" />
|
||||
<Import file="templates/Common/Processor1.cs" />
|
||||
<!-- Windows Templates -->
|
||||
<Import file="templates/MonoGameWindowsProject.xpt.xml" />
|
||||
<Import file="templates/Common/AssemblyInfo.cs" />
|
||||
<Import file="templates/Common/Game1.cs" />
|
||||
<Import file="templates/Common/Icon-md.png" />
|
||||
<Import file="templates/Common/Icon-hd.png" />
|
||||
<Import file="templates/Common/Icon.ico" />
|
||||
<Import file="templates/Common/Program.cs" />
|
||||
<Import file="templates/Common/Content.mgcb" />
|
||||
<Import file="templates/Common/OpenTK.dll.config" />
|
||||
<Import file="templates/Common/Tao.Sdl.dll.config" />
|
||||
<Import file="templates/Common/MonoGame.Framework.dll.config" />
|
||||
<Import file="templates/Common/app.manifest" />
|
||||
<!-- Android Templates -->
|
||||
<Import file="templates/MonoGameAndroidProject.xpt.xml" />
|
||||
<Import file="templates/Android/Activity1.cs" />
|
||||
<Import file="templates/Android/Resource.cs" />
|
||||
<Import file="templates/Android/AndroidManifest.xml" />
|
||||
<Import file="templates/Android/AboutAssets.txt" />
|
||||
<Import file="templates/Android/AboutContent.txt" />
|
||||
<Import file="templates/Android/AboutResources.txt" />
|
||||
<Import file="templates/Android/Splash.png" />
|
||||
<Import file="templates/Android/Styles.xml" />
|
||||
<!-- Mac Templates -->
|
||||
<Import file="templates/MonoGameMacProject.xpt.xml" />
|
||||
<Import file="templates/MonoGameOSXProject.xpt.xml" />
|
||||
<Import file="templates/MonoGameXamMacProject.xpt.xml" />
|
||||
<Import file="templates/Mac/MacInfo.plist" />
|
||||
<Import file="templates/Mac/MainMenu.xib" />
|
||||
<Import file="templates/Mac/Program.cs" />
|
||||
<Import file="templates/Mac/XamMac2Program.cs" />
|
||||
<Import file="templates/Mac/XamMacProgram.cs" />
|
||||
<!-- iOS Templates -->
|
||||
<Import file="templates/MonoGameiOSProject.xpt.xml" />
|
||||
<Import file="templates/iOS/iOSDefault.png" />
|
||||
<Import file="templates/iOS/iOSGameThumbnail.png" />
|
||||
<Import file="templates/iOS/iOSInfo.plist" />
|
||||
<Import file="templates/MonoGametvOSProject.xpt.xml" />
|
||||
<Import file="templates/iOS/Entitlements.plist.xml" />
|
||||
<Import file="templates/iOS/Info_tvOS.plist.xml" />
|
||||
<!-- Shared Templates -->
|
||||
<Import file="templates/MonoGameMobileOnly-SAP.xpt.xml" />
|
||||
<Import file="templates/Shared/Program.cs" />
|
||||
<Import file="templates/Shared/Activity1.cs" />
|
||||
<!-- Additional Modules -->
|
||||
<Import file="MonoDevelop.MonoGame.Android.dll" />
|
||||
<Import file="MonoDevelop.MonoGame.Core.dll" />
|
||||
<Import file="MonoDevelop.MonoGame.iOS.dll" />
|
||||
<Import file="MonoDevelop.MonoGame.Mac.dll" />
|
||||
<!-- Native Libraries -->
|
||||
<Import file="templates/libs/x64/libopenal.so.1" />
|
||||
<Import file="templates/libs/x86/libopenal.so.1" />
|
||||
<Import file="templates/libs/libopenal.1.dylib" />
|
||||
<Import file="templates/libs/x64/soft_oal.dll" />
|
||||
<Import file="templates/libs/x86/soft_oal.dll" />
|
||||
<Import file="templates/libs/x64/libSDL2-2.0.so.0" />
|
||||
<Import file="templates/libs/x86/libSDL2-2.0.so.0" />
|
||||
<Import file="templates/libs/libSDL2-2.0.0.dylib" />
|
||||
<Import file="templates/libs/x64/SDL2.dll" />
|
||||
<Import file="templates/libs/x86/SDL2.dll" />
|
||||
<!-- Nuget Packages -->
|
||||
<Import file="packages/MonoGame.Framework.Android.3.4.0.459.nupkg" />
|
||||
<Import file="packages/MonoGame.Framework.iOS.3.4.0.459.nupkg" />
|
||||
<Import file="packages/MonoGame.Framework.Linux.3.4.0.459.nupkg" />
|
||||
<Import file="packages/MonoGame.Framework.MacOS.3.4.0.459.nupkg" />
|
||||
<Import file="packages/MonoGame.Framework.WindowsDX.3.4.0.459.nupkg" />
|
||||
<Import file="packages/MonoGame.Framework.WindowsGL.3.4.0.459.nupkg" />
|
||||
<Import file="packages/MonoGame.Framework.Content.Pipeline.Portable.3.2.99.1-Beta.nupkg" />
|
||||
<Import file="packages/MonoGame.Framework.Portable.3.2.99.1-Beta.nupkg" />
|
||||
<!-- Exclude non .net files from a scan -->
|
||||
<ScanExclude path="nvtt.dll" />
|
||||
<!-- Exclude -->
|
||||
<Import file="exclude.addins" />
|
||||
</Runtime>
|
||||
<Dependencies>
|
||||
<Addin id="Core" version="6.0" />
|
||||
<Addin id="Ide" version="6.0" />
|
||||
<Addin id="DesignerSupport" version="4.0" />
|
||||
</Dependencies>
|
||||
<ConditionType id="IsWindows" type="MonoDevelop.MonoGame.MonoGameIsWindowsCondition" />
|
||||
<ConditionType id="IsMac" type="MonoDevelop.MonoGame.MonoGameIsMacCondition" />
|
||||
<ConditionType id="IsLinux" type="MonoDevelop.MonoGame.MonoGameIsLinuxCondition" />
|
||||
<Extension path="/MonoDevelop/Core/StockIcons">
|
||||
<StockIcon stockid="monogame-project" file="icons/monogame-project-32.png" />
|
||||
</Extension>
|
||||
<Extension path="/MonoDevelop/ProjectModel/ProjectModelExtensions">
|
||||
<Class class="MonoDevelop.MonoGame.MonoGameMSBuildImports" />
|
||||
</Extension>
|
||||
<!--
|
||||
<Extension path="/MonoDevelop/ProjectModel/MSBuildItemTypes">
|
||||
<DotNetProjectSubtype id="MonoGame" guid="{9b831fef-f496-498f-9fe8-180da5cb4258}" type="MonoDevelop.MonoGame.MonoGameProject">
|
||||
</DotNetProjectSubtype>
|
||||
</Extension>
|
||||
-->
|
||||
<Extension path="/MonoDevelop/Ide/ProjectTemplateCategories">
|
||||
<Category id="monogame" name="MonoGame" icon="monogame-project" insertbefore="other">
|
||||
<Category id="app" name="App">
|
||||
<Category id="games" name="Games" mappedCategories="C#/MonoGame;monogame/app/games" />
|
||||
</Category>
|
||||
<Category id="library" name="Library">
|
||||
<Category id="crossplat" name="Cross Platform" />
|
||||
<Category id="pipeline" name="Content Pipeline" />
|
||||
</Category>
|
||||
</Category>
|
||||
</Extension>
|
||||
<Extension path="/MonoDevelop/Ide/FileTemplateTypes">
|
||||
<FileTemplateType name="ContentFile" class="MonoDevelop.MonoGame.ContentItemTemplate" />
|
||||
</Extension>
|
||||
<!--
|
||||
<Extension path="/MonoDevelop/ProjectModel/ProjectBindings">
|
||||
<ProjectBinding id="MonoGame" class="MonoDevelop.MonoGame.MonoGameProjectBinding" />
|
||||
</Extension>
|
||||
-->
|
||||
<Extension path="/MonoDevelop/Ide/ProjectTemplates">
|
||||
<ProjectTemplate id="MonoGameSharedProject" file="templates/MonoGameSharedProject.xpt.xml" />
|
||||
<ProjectTemplate id="MonoGamePCLProject" file="templates/MonoGamePCLProject.xpt.xml" />
|
||||
<ProjectTemplate id="MonoGamePipelineProject" file="templates/MonoGamePipelineProject.xpt.xml" />
|
||||
<Condition id="IsWindows">
|
||||
<!-- DirectX Based Templates -->
|
||||
<ProjectTemplate id="MonoGameDXProject" file="templates/MonoGameWindowsProject.xpt.xml" />
|
||||
<!--- Linux Templates -->
|
||||
<ProjectTemplate id="MonoGameProject" file="templates/MonoGameProject.xpt.xml" />
|
||||
</Condition>
|
||||
<Condition id="IsLinux">
|
||||
<!--- Linux Templates -->
|
||||
<ProjectTemplate id="MonoGameProject" file="templates/MonoGameProject.xpt.xml" />
|
||||
</Condition>
|
||||
<Condition id="IsMac">
|
||||
<!--- Mac Templates -->
|
||||
<ProjectTemplate id="MonoGameProject" file="templates/MonoGameProject.xpt.xml" />
|
||||
</Condition>
|
||||
</Extension>
|
||||
<Extension path="/MonoDevelop/Ide/FileTemplates">
|
||||
<FileTemplate id="MonoGameContentBuilderTemplate" file="templates/MonoGameContentBuilderTemplate.xpt.xml" />
|
||||
<FileTemplate id="MonoGameContentImporter" file="templates/MonoGameContentImporter.xpt.xml" />
|
||||
<FileTemplate id="MonoGameContentProcessor" file="templates/MonoGameContentProcessor.xpt.xml" />
|
||||
</Extension>
|
||||
<Extension path="/MonoDevelop/Ide/ProjectTemplatePackageRepositories">
|
||||
<PackageRepository path="packages" />
|
||||
</Extension>
|
||||
<Extension path="/MonoDevelop/Ide/FileFilters">
|
||||
<FileFilter id="MGCB" insertbefore="AllFiles" _label="MonoGame Content Build Files" extensions="*.mgcb" />
|
||||
</Extension>
|
||||
<Extension path="/MonoDevelop/Core/MimeTypes">
|
||||
<MimeType id="text/x-mgcb" _description="MonoGame Content Build File" icon="monogame-project" isText="false">
|
||||
<File pattern="*.mgcb" />
|
||||
</MimeType>
|
||||
</Extension>
|
||||
<Extension path="/MonoDevelop/Ide/DisplayBindings">
|
||||
<DisplayBinding id="MonoGamePipeline" insertbefore="DefaultDisplayBinding" class="MonoDevelop.MonoGame.PipelineDisplayBinding" />
|
||||
</Extension>
|
||||
<!-- We still need this for MonoMac and Xamarin Mac Classic support -->
|
||||
<!--
|
||||
<Extension path="/MonoDevelop/ProjectModel/ProjectServiceExtensions">
|
||||
<Class class="MonoDevelop.MonoGame.MonoGameBuildExtension" />
|
||||
</Extension>
|
||||
-->
|
||||
<Module>
|
||||
<Runtime>
|
||||
<Import assembly="MonoDevelop.MonoGame.Android.dll" />
|
||||
</Runtime>
|
||||
<Dependencies>
|
||||
<Addin id="MonoAndroid" version="4.0" />
|
||||
</Dependencies>
|
||||
<Extension path="/MonoDevelop/Ide/ProjectTemplates">
|
||||
<ProjectTemplate id="MonoGameForAndroidProject" file="templates/MonoGameAndroidProject.xpt.xml" />
|
||||
</Extension>
|
||||
</Module>
|
||||
<Module>
|
||||
<Runtime>
|
||||
<Import assembly="MonoDevelop.MonoGame.iOS.dll" />
|
||||
</Runtime>
|
||||
<Dependencies>
|
||||
<Addin id="IPhone" version="4.0" />
|
||||
</Dependencies>
|
||||
<Extension path="/MonoDevelop/Ide/ProjectTemplates">
|
||||
<ProjectTemplate id="MonoGameForIPhoneProject" file="templates/MonoGameiOSProject.xpt.xml" />
|
||||
<ProjectTemplate id="MonoGameFortvOSProject" file="templates/MonoGametvOSProject.xpt.xml" />
|
||||
</Extension>
|
||||
</Module>
|
||||
<Module>
|
||||
<Runtime>
|
||||
</Runtime>
|
||||
<Dependencies>
|
||||
<Addin id="IPhone" version="4.0" />
|
||||
<Addin id="MonoAndroid" version="4.0" />
|
||||
</Dependencies>
|
||||
<Extension path="/MonoDevelop/Ide/ProjectTemplates">
|
||||
<ProjectTemplate id="MonoGameForMobileSAPProject" file="templates/MonoGameMobileOnly-SAP.xpt.xml" />
|
||||
</Extension>
|
||||
</Module>
|
||||
<Module>
|
||||
<Runtime>
|
||||
<Import assembly="MonoDevelop.MonoGame.Mac.dll" />
|
||||
</Runtime>
|
||||
<Dependencies>
|
||||
<Addin id="MonoMac" version="4.0" />
|
||||
</Dependencies>
|
||||
<Extension path="/MonoDevelop/Ide/ProjectTemplates">
|
||||
<ProjectTemplate id="MonoGameForMonoMacProject" file="templates/MonoGameMacProject.xpt.xml" />
|
||||
<ProjectTemplate id="MonoGameForXamMac2Project" file="templates/MonoGameOSXProject.xpt.xml" />
|
||||
<ProjectTemplate id="MonoGameForXamMacProject" file="templates/MonoGameXamMacProject.xpt.xml" />
|
||||
</Extension>
|
||||
</Module>
|
||||
</Addin>
|
||||
+246
@@ -0,0 +1,246 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{B2C75BDF-A022-41C6-9618-EDD8BEE76556}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>MonoDevelop.MonoGame</RootNamespace>
|
||||
<AssemblyName>MonoDevelop.MonoGame</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CustomCommands>
|
||||
<CustomCommands>
|
||||
<Command type="Execute" command=""/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/XamarinStudio.exe"" workingdir="/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/">
|
||||
<EnvironmentVariables>
|
||||
<Variable name="MONODEVELOP_DEV_ADDINS" value="${TargetDir}" />
|
||||
</EnvironmentVariables>
|
||||
</Command>
|
||||
</CustomCommands>
|
||||
</CustomCommands>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="MonoDevelop.Core">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/MonoDevelop.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="MonoDevelop.Ide">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/MonoDevelop.Ide.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="MonoDevelop.DesignerSupport">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.NRefactory">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/ICSharpCode.NRefactory.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Mono.TextEditor">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/Mono.TextEditor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Mono.Addins">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/Mono.Addins.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="PipelineDisplayBinding.cs" />
|
||||
<Compile Include="MonoGameContentEditorViewContent.cs" />
|
||||
<Compile Include="MonoGameConditions.cs" />
|
||||
<Compile Include="ContentItemTemplate.cs" />
|
||||
<Compile Include="MonoGameMSBuildImports.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MonoDevelop.MonoGame.Core\MonoDevelop.MonoGame.Core.csproj">
|
||||
<Project>{3FE5AAE8-BE24-4FC3-AF86-2AA3C3CD8DB4}</Project>
|
||||
<Name>MonoDevelop.MonoGame.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="icons\" />
|
||||
<Folder Include="templates\" />
|
||||
<Folder Include="templates\Common\" />
|
||||
<Folder Include="packages\" />
|
||||
<Folder Include="templates\libs\" />
|
||||
<Folder Include="templates\libs\x64\" />
|
||||
<Folder Include="templates\libs\x86\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="templates\MonoGameWindowsProject.xpt.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="icons\monogame-project-32.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Common\AssemblyInfo.cs">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Common\Game1.cs">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Common\Icon-md.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Common\Program.cs">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="exclude.addins">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Common\Icon-hd.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="packages\*.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\MonoGameProject.xpt.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\MonoGameSharedProject.xpt.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\MonoGameContentBuilderTemplate.xpt.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Common\Content.mgcb">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Common\app.manifest">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<!---
|
||||
<Content Include="packages\MonoGame.Framework.Android.3.3.0.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="packages\MonoGame.Framework.iOS.3.3.0.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="packages\MonoGame.Framework.Linux.3.3.0.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="packages\MonoGame.Framework.MacOS.3.3.0.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="packages\MonoGame.Framework.MonoMac.3.3.0.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="packages\MonoGame.Framework.WindowsDX.3.3.0.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="packages\MonoGame.Framework.WindowsGL.3.3.0.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="packages\MonoGame.Framework.Pipeline.3.3.0.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
-->
|
||||
<Content Include="templates\MonoGamePCLProject.xpt.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\MonoGamePipelineProject.xpt.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Common\Importer1.cs">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Common\Processor1.cs">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\MonoGameContentImporter.xpt.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\MonoGameContentProcessor.xpt.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\OpenTK.dll.config">
|
||||
<Link>templates\Common\OpenTK.dll.config</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\GamepadConfig\Tao.Sdl.dll.config">
|
||||
<Link>templates\Common\Tao.Sdl.dll.config</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Common\Icon.ico">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\MonoGame.Framework.dll.config">
|
||||
<Link>templates\Common\MonoGame.Framework.dll.config</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\openal-soft\MacOS\Universal\libopenal.1.dylib">
|
||||
<Link>templates\libs\libopenal.1.dylib</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\openal-soft\Linux\x64\libopenal.so.1">
|
||||
<Link>templates\libs\x64\libopenal.so.1</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\openal-soft\Windows\x64\soft_oal.dll">
|
||||
<Link>templates\libs\x64\soft_oal.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\openal-soft\Windows\x86\soft_oal.dll">
|
||||
<Link>templates\libs\x86\soft_oal.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\openal-soft\Linux\x86\libopenal.so.1">
|
||||
<Link>templates\libs\x86\libopenal.so.1</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\SDL\Linux\x64\libSDL2-2.0.so.0">
|
||||
<Link>templates\libs\x64\libSDL2-2.0.so.0</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\SDL\Windows\x64\SDL2.dll">
|
||||
<Link>templates\libs\x64\SDL2.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\SDL\Windows\x86\SDL2.dll">
|
||||
<Link>templates\libs\x86\SDL2.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\SDL\Linux\x86\libSDL2-2.0.so.0">
|
||||
<Link>templates\libs\x86\libSDL2-2.0.so.0</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\ThirdParty\Dependencies\SDL\MacOS\Universal\libSDL2-2.0.0.dylib">
|
||||
<Link>templates\libs\libSDL2-2.0.0.dylib</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="MonoDevelop.MonoGame.addin.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="MonoGameProject.cs" />
|
||||
<None Include="MonoGameBuildExtension.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using MonoDevelop.Projects;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MonoDevelop.MonoGame
|
||||
{
|
||||
public class MonoGameBuildExtension : ProjectServiceExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// List of ProjectTypes which map to the Platform Enum in MonoGame
|
||||
/// This is used to pass the correct /platform parameter for the auto
|
||||
/// build of content.
|
||||
/// </summary>
|
||||
static Dictionary<string,string> supportedProjectTypes = new Dictionary<string,string>() {
|
||||
{"MonoMac", "MacOSX"},
|
||||
{"XamMac","DesktopGL"},
|
||||
};
|
||||
|
||||
string platform;
|
||||
|
||||
protected override BuildResult Build (MonoDevelop.Core.IProgressMonitor monitor, SolutionEntityItem item, ConfigurationSelector configuration)
|
||||
{
|
||||
#if DEBUG
|
||||
monitor.Log.WriteLine("MonoGame Extension Build Called");
|
||||
#endif
|
||||
try
|
||||
{
|
||||
var proj = item as Project;
|
||||
if (proj == null)
|
||||
{
|
||||
#if DEBUG
|
||||
monitor.Log.WriteLine("MonoGame Extension Null Project");
|
||||
#endif
|
||||
return base.Build (monitor, item, configuration);
|
||||
}
|
||||
#if DEBUG
|
||||
foreach(var p in proj.GetProjectTypes()) {
|
||||
monitor.Log.WriteLine("MonoGame Extension Project Type {0}", p);
|
||||
}
|
||||
#endif
|
||||
if (!proj.GetProjectTypes().Any(x => supportedProjectTypes.ContainsKey(x)))
|
||||
return base.Build (monitor, item, configuration);
|
||||
|
||||
var files = proj.Items.Where(x => x is ProjectFile).Cast<ProjectFile>();
|
||||
foreach(var file in files.Where(f => f.BuildAction == "MonoGameContentReference")) {
|
||||
monitor.Log.WriteLine ("Found MonoGame Content Builder Response File : {0}", file.FilePath);
|
||||
platform = proj.GetProjectTypes().FirstOrDefault(x => supportedProjectTypes.ContainsKey(x));
|
||||
if (!string.IsNullOrEmpty (platform)) {
|
||||
try {
|
||||
RunMonoGameContentBuilder(file.FilePath.ToString(), supportedProjectTypes[platform], monitor);
|
||||
} catch (Exception ex) {
|
||||
monitor.ReportWarning(ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
return base.Build (monitor, item, configuration);
|
||||
}
|
||||
finally
|
||||
{
|
||||
#if DEBUG
|
||||
monitor.Log.WriteLine("MonoGame Extension Build Ended");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
protected override BuildResult Compile (MonoDevelop.Core.IProgressMonitor monitor, SolutionEntityItem item, BuildData buildData)
|
||||
{
|
||||
var proj = item as Project;
|
||||
if (proj == null)
|
||||
return base.Compile (monitor, item, buildData);
|
||||
if (!proj.GetProjectTypes().Any(x => supportedProjectTypes.ContainsKey(x)))
|
||||
return base.Compile (monitor, item, buildData);
|
||||
var files = buildData.Items.Where(x => x is ProjectFile).Cast<ProjectFile>().ToArray();
|
||||
foreach (var file in files.Where(f => f.BuildAction == "MonoGameContentReference")) {
|
||||
var path = System.IO.Path.Combine (Path.GetDirectoryName (file.FilePath.ToString ()), "bin", supportedProjectTypes[platform]);
|
||||
monitor.Log.WriteLine("Processing {0}", path);
|
||||
if (!Directory.Exists (path))
|
||||
continue;
|
||||
foreach (var output in Directory.GetFiles (path, "*.*", SearchOption.AllDirectories)) {
|
||||
var link = string.Format ("Content{0}", output.Replace (path, ""));
|
||||
if (proj.Files.FirstOrDefault (x => Path.GetFileName (x.FilePath.ToString ()) == Path.GetFileName (output)) == null) {
|
||||
monitor.Log.WriteLine ("Auto Including Content {0}", output);
|
||||
proj.Files.Add (new ProjectFile (output, BuildAction.BundleResource) {
|
||||
Link = new MonoDevelop.Core.FilePath (link),
|
||||
Flags = ProjectItemFlags.DontPersist | ProjectItemFlags.Hidden,
|
||||
Visible = false,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return base.Compile (monitor, item, buildData);
|
||||
}
|
||||
|
||||
void RunMonoGameContentBuilder(string responseFile, string platform, MonoDevelop.Core.IProgressMonitor monitor) {
|
||||
var process = new Process ();
|
||||
var location = Path.Combine (Path.GetDirectoryName (typeof(MonoGameBuildExtension).Assembly.Location), "MGCB.exe");
|
||||
if (!File.Exists (location)) {
|
||||
switch (Environment.OSVersion.Platform) {
|
||||
case PlatformID.Win32NT:
|
||||
location = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86), @"MSBuild\MonoGame\v3.0\Tools", "MGCB.exe");
|
||||
break;
|
||||
case PlatformID.Unix:
|
||||
if (Directory.Exists ("/Applications") &&
|
||||
Directory.Exists ("/Users")) {
|
||||
location = Path.Combine ("/Applications/Pipeline.app/Contents/MonoBundle", "MGCB.exe");
|
||||
} else {
|
||||
location = Path.Combine ("/bin", "mgcb");
|
||||
}
|
||||
break;
|
||||
case PlatformID.MacOSX:
|
||||
location = Path.Combine ("/Applications/Pipeline.app/Contents/MonoBundle", "MGCB.exe");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!File.Exists (location)) {
|
||||
monitor.Log.WriteLine ("MGCB.exe not found");
|
||||
return;
|
||||
}
|
||||
process.StartInfo.WorkingDirectory = Path.GetDirectoryName (responseFile);
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
|
||||
process.StartInfo.FileName = location;
|
||||
process.StartInfo.Arguments = string.Format ("/@:\"{1}\" /platform:{0}", platform, responseFile);
|
||||
} else if (Directory.Exists ("/Applications") &&
|
||||
Directory.Exists ("/Users")) {
|
||||
process.StartInfo.FileName = "mono";
|
||||
process.StartInfo.Arguments = string.Format ("\"{0}\" /@:\"{2}\" /platform:{1}", location, platform, responseFile);
|
||||
} else {
|
||||
process.StartInfo.FileName = location;
|
||||
process.StartInfo.Arguments = string.Format ("/@:\"{1}\" /platform:{0}", platform, responseFile);
|
||||
}
|
||||
process.StartInfo.CreateNoWindow = true;
|
||||
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
process.StartInfo.RedirectStandardOutput = true;
|
||||
process.OutputDataReceived += (sender, args) => monitor.Log.WriteLine(args.Data);
|
||||
|
||||
monitor.Log.WriteLine ("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
||||
|
||||
// Fire off the process.
|
||||
process.Start();
|
||||
process.BeginOutputReadLine();
|
||||
process.WaitForExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using Mono.Addins;
|
||||
using System.IO;
|
||||
|
||||
namespace MonoDevelop.MonoGame
|
||||
{
|
||||
public class MonoGameIsWindowsCondition : ConditionType
|
||||
{
|
||||
public override bool Evaluate (NodeElement conditionNode)
|
||||
{
|
||||
return Environment.OSVersion.Platform == PlatformID.Win32NT;
|
||||
}
|
||||
}
|
||||
|
||||
public class MonoGameIsLinuxCondition : ConditionType
|
||||
{
|
||||
public override bool Evaluate (NodeElement conditionNode)
|
||||
{
|
||||
return Environment.OSVersion.Platform == PlatformID.Unix
|
||||
&& !Directory.Exists ("/Applications")
|
||||
&& !Directory.Exists ("/Users")
|
||||
&& !Directory.Exists ("/Library");
|
||||
}
|
||||
}
|
||||
|
||||
public class MonoGameIsMacCondition : ConditionType
|
||||
{
|
||||
public override bool Evaluate (NodeElement conditionNode)
|
||||
{
|
||||
return (Environment.OSVersion.Platform == PlatformID.Unix
|
||||
&& Directory.Exists("/Applications")
|
||||
&& Directory.Exists("/Users")
|
||||
&& Directory.Exists("/Library"))
|
||||
|| Environment.OSVersion.Platform == PlatformID.MacOSX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using MonoDevelop.Ide.Gui;
|
||||
using Gtk;
|
||||
using System.IO;
|
||||
|
||||
namespace MonoDevelop.MonoGame
|
||||
{
|
||||
#if BUILDINEDITOR
|
||||
class MonoGameContentEditorViewContent : AbstractBaseViewContent, IViewContent
|
||||
{
|
||||
Alignment control;
|
||||
Pipeline.MacOS.MainView view;
|
||||
|
||||
public event EventHandler ContentNameChanged;
|
||||
public event EventHandler ContentChanged;
|
||||
public event EventHandler DirtyChanged;
|
||||
public event EventHandler BeforeSave;
|
||||
public void Load (string fileName)
|
||||
{
|
||||
view.Load (fileName);
|
||||
}
|
||||
public void LoadNew (Stream content, string mimeType)
|
||||
{
|
||||
view.LoadNew (content, mimeType);
|
||||
}
|
||||
public void Save (string fileName)
|
||||
{
|
||||
view.Save (fileName);
|
||||
}
|
||||
public void Save ()
|
||||
{
|
||||
view.Save ();
|
||||
}
|
||||
public void DiscardChanges ()
|
||||
{
|
||||
view.Undo ();
|
||||
}
|
||||
public MonoDevelop.Projects.Project Project {
|
||||
get ;
|
||||
set;
|
||||
}
|
||||
public string PathRelativeToProject {
|
||||
get {
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
public string ContentName {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string UntitledName {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string StockIconId {
|
||||
get {
|
||||
return "monogame-project";
|
||||
}
|
||||
}
|
||||
public bool IsUntitled {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public bool IsViewOnly {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public bool IsFile {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public bool IsDirty {
|
||||
get { return view.IsDirty; }
|
||||
set { view.IsDirty = value; }
|
||||
}
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override Gtk.Widget Control {
|
||||
get {
|
||||
return control;
|
||||
}
|
||||
}
|
||||
|
||||
public MonoGameContentEditorViewContent (MonoDevelop.Core.FilePath filename, MonoDevelop.Projects.Project project)
|
||||
{
|
||||
this.ContentName = Path.GetFileName (filename.ToString());
|
||||
this.Project = project;
|
||||
control = new Alignment (0, 0, 1, 1);
|
||||
control.SetPadding (5, 5, 5, 5);
|
||||
|
||||
view = new Pipeline.MacOS.MainView (null);
|
||||
|
||||
if (filename != null) {
|
||||
view.OpenProjectPath = filename.ToString();
|
||||
}
|
||||
Pipeline.MacOS.MainView.CreateControllers (view);
|
||||
view.BuildUI ();
|
||||
|
||||
control.Add (view);
|
||||
|
||||
control.ShowAll ();
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.Xml.XPath;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using MonoDevelop.Projects.MSBuild;
|
||||
using MonoDevelop.Projects;
|
||||
|
||||
namespace MonoDevelop.MonoGame
|
||||
{
|
||||
public class MonoGameMSBuildImports : DotNetProjectExtension
|
||||
{
|
||||
const string MonoGameContentBuildTargets = "$(MSBuildExtensionsPath)\\MonoGame\\v3.0\\MonoGame.Content.Builder.targets";
|
||||
const string MonoGameCommonProps = "$(MSBuildExtensionsPath)\\MonoGame\\v3.0\\MonoGame.Common.props";
|
||||
const string MonoGameExtensionsPath = @"$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\{0}\{1}";
|
||||
const string MonoGameExtensionsAbsolutePath = @"/Library/Frameworks/MonoGame.framework/v3.0/Assemblies/{0}/{1}";
|
||||
|
||||
static bool UpgradeMonoGameProject (MonoDevelop.Core.ProgressMonitor monitor, DotNetProjectExtension extension, MSBuildProject project)
|
||||
{
|
||||
bool needsSave = false;
|
||||
bool containsMGCB = project.ItemGroups.Any (x => x.Items.Any (i => System.IO.Path.GetExtension (i.Include) == ".mgcb"));
|
||||
bool isMonoGame = project.PropertyGroups.Any (x => x.GetProperties().Any (p => p.Name == "MonoGamePlatform")) ||
|
||||
project.ItemGroups.Any (x => x.Items.Any (i => i.Name == "Reference" && i.Include == "MonoGame.Framework")) ||
|
||||
containsMGCB;
|
||||
bool isDesktopGL = project.ItemGroups.Any (x => x.Items.Any (i => i.Include.EndsWith ("SDL2.dll")));
|
||||
bool isApplication = project.PropertyGroups.Any (x => x.GetProperties().Any (p => p.Name == "OutputType" && p.Value == "Exe"))
|
||||
| project.PropertyGroups.Any (x => x.GetProperties().Any (p => p.Name == "AndroidApplication" && string.Compare (p.Value, bool.TrueString, true)==0));
|
||||
bool isShared = project.PropertyGroups.Any (x => x.GetProperties().Any (p => p.Name == "HasSharedItems" && p.Value == "true"));
|
||||
bool absoluteReferenes = false;
|
||||
var type = extension.Project.GetType ().Name;
|
||||
|
||||
monitor.Log.WriteLine ("Found {0}", type);
|
||||
monitor.Log.WriteLine ("Found {0}", project.GetType ().Name);
|
||||
var platform = isDesktopGL ? "DesktopGL" : "Windows";
|
||||
var path = MonoGameExtensionsPath;
|
||||
if (extension.Project.FlavorGuids.Contains ("{FEACFBD2-3405-455C-9665-78FE426C6842}")) {
|
||||
platform = "iOS";
|
||||
}
|
||||
if (extension.Project.FlavorGuids.Contains ("{06FA79CB-D6CD-4721-BB4B-1BD202089C55}")) {
|
||||
platform = "tvOS";
|
||||
}
|
||||
if (extension.Project.FlavorGuids.Contains ("{EFBA0AD7-5A72-4C68-AF49-83D382785DCF}")) {
|
||||
platform = "Android";
|
||||
}
|
||||
if (extension.Project.FlavorGuids.Contains ("{948B3504-5B70-4649-8FE4-BDE1FB46EC69}")) {
|
||||
platform = "MacOSX";
|
||||
// MonoMac Classic does not use MSBuild so we need to absolute path.
|
||||
path = MonoGameExtensionsAbsolutePath;
|
||||
absoluteReferenes = true;
|
||||
}
|
||||
if (extension.Project.FlavorGuids.Contains ("{42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23}")) {
|
||||
platform = "DesktopGL";
|
||||
// Xamarin.Mac Classic does not use MSBuild so we need to absolute path.
|
||||
path = MonoGameExtensionsAbsolutePath;
|
||||
absoluteReferenes = true;
|
||||
}
|
||||
if (extension.Project.FlavorGuids.Contains ("{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1}")) {
|
||||
platform = "DesktopGL";
|
||||
}
|
||||
monitor.Log.WriteLine ("Platform = {0}", platform);
|
||||
monitor.Log.WriteLine ("Path = {0}", path);
|
||||
monitor.Log.WriteLine ("isMonoGame {0}", isMonoGame);
|
||||
if (isMonoGame) {
|
||||
var ritems = new List<MSBuildItem> ();
|
||||
foreach (var ig in project.ItemGroups) {
|
||||
foreach (var i in ig.Items.Where (x => x.Name == "Reference" && x.Include == "MonoGame.Framework")) {
|
||||
var metaData = i.Metadata;
|
||||
if (!metaData.HasProperty("HintPath")) {
|
||||
monitor.Log.WriteLine ("Fixing {0} to be MonoGameContentReference", i.Include);
|
||||
metaData.SetValue ("HintPath", string.Format (path, platform, "MonoGame.Framework.dll"));
|
||||
needsSave = true;
|
||||
}
|
||||
}
|
||||
foreach (var i in ig.Items.Where (x => x.Name == "Reference" && x.Include == "Tao.Sdl")) {
|
||||
var metaData = i.Metadata;
|
||||
if (!metaData.HasProperty("HintPath")) {
|
||||
monitor.Log.WriteLine ("Fixing {0} to be Tao.Sdl", i.Include);
|
||||
metaData.SetValue ("HintPath", string.Format (path, platform, "Tao.Sdl.dll"));
|
||||
needsSave = true;
|
||||
}
|
||||
}
|
||||
foreach (var i in ig.Items.Where (x => x.Name == "Reference" && x.Include.StartsWith ("OpenTK") &&
|
||||
(platform != "iOS" && platform != "Android"))) {
|
||||
var metaData = i.Metadata;
|
||||
if (!metaData.HasProperty ("HintPath")) {
|
||||
monitor.Log.WriteLine("Fixing {0} to be OpenTK", i.Include);
|
||||
metaData.SetValue ("HintPath", string.Format (path, platform, "OpenTK.dll"));
|
||||
metaData.SetValue ("SpecificVersion", "true");
|
||||
needsSave = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var a in ritems) {
|
||||
project.RemoveItem (a);
|
||||
}
|
||||
var dotNetProject = extension.Project;
|
||||
if (dotNetProject != null && absoluteReferenes) {
|
||||
var items = new List<ProjectReference> ();
|
||||
var newitems = new List<ProjectReference> ();
|
||||
foreach (var reference in dotNetProject.References) {
|
||||
if (reference.Reference == "MonoGame.Framework" && string.IsNullOrEmpty (reference.HintPath)) {
|
||||
items.Add (reference);
|
||||
newitems.Add (ProjectReference.CreateCustomReference (ReferenceType.Assembly, reference.Reference, string.Format(path, platform, "MonoGame.Framework.dll")));
|
||||
}
|
||||
if (reference.Reference.StartsWith ("OpenTK", StringComparison.OrdinalIgnoreCase) && string.IsNullOrEmpty (reference.HintPath)) {
|
||||
items.Add (reference);
|
||||
newitems.Add (ProjectReference.CreateCustomReference (ReferenceType.Assembly, reference.Reference, string.Format (path, platform, "OpenTK.dll")));
|
||||
}
|
||||
if (reference.Reference == "Tao.Sdl" && string.IsNullOrEmpty (reference.HintPath)) {
|
||||
items.Add (reference);
|
||||
newitems.Add (ProjectReference.CreateCustomReference (ReferenceType.Assembly, reference.Reference, string.Format (path, platform, "Tao.Sdl.dll")));
|
||||
}
|
||||
}
|
||||
dotNetProject.References.RemoveRange (items);
|
||||
dotNetProject.References.AddRange (newitems);
|
||||
}
|
||||
}
|
||||
if (isMonoGame && containsMGCB && (isApplication || isShared)) {
|
||||
if (!project.PropertyGroups.Any (x => x.GetProperties().Any (p => p.Name == "MonoGamePlatform")) && !isShared) {
|
||||
monitor.Log.WriteLine ("Adding MonoGamePlatform {0}", platform == "tvOS" ? "iOS" : platform);
|
||||
project.PropertyGroups.First ().SetValue ("MonoGamePlatform", platform == "tvOS" ? "iOS" : platform, true);
|
||||
needsSave = true;
|
||||
}
|
||||
if (!project.Imports.Any (x => x.Project.StartsWith (MonoGameCommonProps, StringComparison.OrdinalIgnoreCase))&& !isShared) {
|
||||
monitor.Log.WriteLine ("Adding MonoGame.Common.props Import");
|
||||
project.AddNewImport(MonoGameCommonProps, string.Format ("Exists('{0}')", MonoGameCommonProps), project.PropertyGroups.First());
|
||||
needsSave = true;
|
||||
}
|
||||
if (containsMGCB) {
|
||||
var ritems = new List<MSBuildItem> ();
|
||||
foreach (var ig in project.ItemGroups) {
|
||||
foreach (var i in ig.Items.Where (x => System.IO.Path.GetExtension (x.Include) == ".mgcb")) {
|
||||
if (i.Name != "MonoGameContentReference" && i.Name == "None") {
|
||||
monitor.Log.WriteLine ("Fixing {0} to be MonoGameContentReference", i.Include);
|
||||
ig.AddNewItem ("MonoGameContentReference", i.Include);
|
||||
ritems.Add (i);
|
||||
needsSave = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var a in ritems) {
|
||||
project.RemoveItem (a);
|
||||
}
|
||||
}
|
||||
if (!project.Imports.Any (x => x.Project.StartsWith (MonoGameContentBuildTargets, StringComparison.OrdinalIgnoreCase)) && !isShared) {
|
||||
monitor.Log.WriteLine ("Adding MonoGame Content Builder .targets");
|
||||
project.AddNewImport (MonoGameContentBuildTargets);
|
||||
needsSave = true;
|
||||
}
|
||||
}
|
||||
return needsSave;
|
||||
}
|
||||
|
||||
protected override void OnWriteProject(MonoDevelop.Core.ProgressMonitor monitor, MSBuildProject msproject)
|
||||
{
|
||||
base.OnWriteProject(monitor, msproject);
|
||||
var changed = UpgradeMonoGameProject (monitor, this, msproject);
|
||||
if (changed)
|
||||
{
|
||||
msproject.Save(msproject.FileName);
|
||||
this.Project.NeedsReload = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnReadProject(MonoDevelop.Core.ProgressMonitor monitor, MSBuildProject msproject)
|
||||
{
|
||||
base.OnReadProject (monitor, msproject);
|
||||
var changed = (UpgradeMonoGameProject(monitor, this, msproject));
|
||||
if (changed)
|
||||
{
|
||||
msproject.Save (msproject.FileName);
|
||||
this.Project.NeedsReload = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using MonoDevelop.Projects.MSBuild;
|
||||
using MonoDevelop.Core.Assemblies;
|
||||
using System.Xml;
|
||||
using MonoDevelop.Projects;
|
||||
|
||||
namespace MonoDevelop.MonoGame
|
||||
{
|
||||
public class MonoGameProject : DotNetAssemblyProject
|
||||
{
|
||||
public MonoGameProject ()
|
||||
{
|
||||
Init ();
|
||||
}
|
||||
|
||||
public MonoGameProject (string languageName)
|
||||
: base (languageName)
|
||||
{
|
||||
Init ();
|
||||
}
|
||||
|
||||
public MonoGameProject (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
|
||||
: base (languageName, info, projectOptions)
|
||||
{
|
||||
Init ();
|
||||
}
|
||||
|
||||
private void Init()
|
||||
{
|
||||
}
|
||||
|
||||
public override SolutionItemConfiguration CreateConfiguration (string name)
|
||||
{
|
||||
var conf = new MonoGameProjectConfiguration (name);
|
||||
conf.CopyFrom (base.CreateConfiguration (name));
|
||||
return conf;
|
||||
}
|
||||
|
||||
public override bool SupportsFormat (FileFormat format)
|
||||
{
|
||||
return format.Id == "MSBuild12";
|
||||
}
|
||||
|
||||
public override TargetFrameworkMoniker GetDefaultTargetFrameworkForFormat (FileFormat format)
|
||||
{
|
||||
return new TargetFrameworkMoniker("4.0");
|
||||
}
|
||||
|
||||
public override bool SupportsFramework (MonoDevelop.Core.Assemblies.TargetFramework framework)
|
||||
{
|
||||
if (!framework.CanReferenceAssembliesTargetingFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.NET_4_0))
|
||||
return false;
|
||||
else
|
||||
return base.SupportsFramework (framework);
|
||||
}
|
||||
}
|
||||
|
||||
public class MonoGameProjectBinding : IProjectBinding
|
||||
{
|
||||
public Project CreateProject (ProjectCreateInformation info, XmlElement projectOptions)
|
||||
{
|
||||
string lang = projectOptions.GetAttribute ("language");
|
||||
return new MonoGameProject (lang, info, projectOptions);
|
||||
}
|
||||
|
||||
public Project CreateSingleFileProject (string sourceFile)
|
||||
{
|
||||
throw new InvalidOperationException ();
|
||||
}
|
||||
|
||||
public bool CanCreateSingleFileProject (string sourceFile)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get { return "MonoGame"; }
|
||||
}
|
||||
}
|
||||
|
||||
public class MonoGameProjectConfiguration : DotNetProjectConfiguration
|
||||
{
|
||||
public MonoGameProjectConfiguration () : base ()
|
||||
{
|
||||
}
|
||||
|
||||
public MonoGameProjectConfiguration (string name) : base (name)
|
||||
{
|
||||
}
|
||||
|
||||
public override void CopyFrom (ItemConfiguration configuration)
|
||||
{
|
||||
base.CopyFrom (configuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using MonoDevelop.Ide.Gui;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using MonoDevelop.Ide.Gui.Content;
|
||||
using Gtk;
|
||||
|
||||
namespace MonoDevelop.MonoGame
|
||||
{
|
||||
#if BUILDINEDITOR
|
||||
public class PipelineDisplayBinding: IViewDisplayBinding
|
||||
{
|
||||
#region IViewDisplayBinding implementation
|
||||
|
||||
public IViewContent CreateContent (MonoDevelop.Core.FilePath fileName, string mimeType, MonoDevelop.Projects.Project ownerProject)
|
||||
{
|
||||
return new MonoGameContentEditorViewContent (fileName, ownerProject);
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
return "MonoGame Content Builder";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDisplayBinding implementation
|
||||
|
||||
public bool CanHandle (MonoDevelop.Core.FilePath fileName, string mimeType, MonoDevelop.Projects.Project ownerProject)
|
||||
{
|
||||
return mimeType == "text/x-mgcb";
|
||||
}
|
||||
|
||||
public bool CanUseAsDefault {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
#else
|
||||
public class PipelineDisplayBinding : IExternalDisplayBinding {
|
||||
#region IExternalDisplayBinding implementation
|
||||
public MonoDevelop.Ide.Desktop.DesktopApplication GetApplication (MonoDevelop.Core.FilePath fileName, string mimeType, MonoDevelop.Projects.Project ownerProject)
|
||||
{
|
||||
return new PipelineDesktopApplication (fileName.FullPath,ownerProject);
|
||||
}
|
||||
#endregion
|
||||
#region IDisplayBinding implementation
|
||||
public bool CanHandle (MonoDevelop.Core.FilePath fileName, string mimeType, MonoDevelop.Projects.Project ownerProject)
|
||||
{
|
||||
return mimeType == "text/x-mgcb";
|
||||
}
|
||||
public bool CanUseAsDefault {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
class PipelineDesktopApplication : MonoDevelop.Ide.Desktop.DesktopApplication
|
||||
{
|
||||
MonoDevelop.Projects.Project project;
|
||||
string filename;
|
||||
|
||||
public PipelineDesktopApplication (string filename, MonoDevelop.Projects.Project ownerProject)
|
||||
: base ("MonoGamePipelineTool", "MonoGame Pipeline Tool", true)
|
||||
{
|
||||
this.project = ownerProject;
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
public override void Launch (params string[] files)
|
||||
{
|
||||
var process = new Process ();
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
|
||||
process.StartInfo.FileName = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86), @"MSBuild\MonoGame\v3.0\Tools", "Pipeline.exe");
|
||||
process.StartInfo.Arguments = string.Format ("\"{0}\"", filename);
|
||||
} else {
|
||||
if (Directory.Exists ("/Applications/Pipeline.app")) {
|
||||
process.StartInfo.FileName = "open";
|
||||
process.StartInfo.EnvironmentVariables.Add("MONOGAME_PIPELINE_PROJECT", Path.GetFullPath (filename));
|
||||
process.StartInfo.Arguments = string.Format ("-b com.monogame.pipeline --args \"{0}\"", Path.GetFullPath (filename));
|
||||
} else {
|
||||
// figure out linix
|
||||
process.StartInfo.FileName = "monogame-pipeline-tool";
|
||||
process.StartInfo.Arguments = string.Format ("\"{0}\"", filename);
|
||||
}
|
||||
}
|
||||
process.StartInfo.CreateNoWindow = true;
|
||||
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
|
||||
// Fire off the process.
|
||||
process.Start();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
[assembly: AssemblyTitle ("MonoDevelop.MonoGame")]
|
||||
[assembly: AssemblyDescription ("")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyCompany ("")]
|
||||
[assembly: AssemblyProduct ("")]
|
||||
[assembly: AssemblyCopyright ("MonoGame Team")]
|
||||
[assembly: AssemblyTrademark ("")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
[assembly: AssemblyVersion ("1.0.*")]
|
||||
// The following attributes are used to specify the signing key for the assembly,
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<Addins>
|
||||
<Exclude>Assimp64.dll</Exclude>
|
||||
<Exclude>nvtt.dll</Exclude>
|
||||
<Exclude>freetype6.dll</Exclude>
|
||||
<Exclude>pvrtc.dll</Exclude>
|
||||
<Exclude>templates/libs/x86/SDL2.dll</Exclude>
|
||||
<Exclude>templates/libs/x64/SDL2.dll</Exclude>
|
||||
<Exclude>templates/libs/x86/soft_oal.dll</Exclude>
|
||||
<Exclude>templates/libs/x64/soft_oal.dll</Exclude>
|
||||
<!--
|
||||
<Exclude>libnvtt.dylib</Exclude>
|
||||
<Exclude>libnvimage.dylib</Exclude>
|
||||
<Exclude>libnvmath.dylib</Exclude>
|
||||
<Exclude>libnvcore.dylib</Exclude>
|
||||
<Exclude>libpvrtc.dylib</Exclude>
|
||||
<Exclude>libfreetype.6.dylib</Exclude>
|
||||
<Exclude>libpng15.15.dylib</Exclude>
|
||||
<Exclude>libassimp.dylib</Exclude>
|
||||
<Exclude>libfreeimage.dylib</Exclude>
|
||||
<Exclude>libfreeimageplus.dylib</Exclude>
|
||||
-->
|
||||
</Addins>
|
||||
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
+29
@@ -0,0 +1,29 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
#if __ANDROID__
|
||||
using Android.App;
|
||||
#endif
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
|
||||
[assembly: AssemblyTitle("${ProjectName}")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("${AuthorCompany}")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("${AuthorCopyright}")]
|
||||
[assembly: AssemblyTrademark("${AuthorTrademark}")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0")]
|
||||
|
||||
// The following attributes are used to specify the signing key for the assembly,
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
#----------------------------- Global Properties ----------------------------#
|
||||
|
||||
/outputDir:bin/$(Platform)
|
||||
/intermediateDir:obj/$(Platform)
|
||||
/config:
|
||||
/profile:Reach
|
||||
/compress:False
|
||||
|
||||
#-------------------------------- References --------------------------------#
|
||||
|
||||
|
||||
#---------------------------------- Content ---------------------------------#
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
|
||||
namespace ${Namespace}
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the main type for your game.
|
||||
/// </summary>
|
||||
public class Game1 : Game
|
||||
{
|
||||
GraphicsDeviceManager graphics;
|
||||
SpriteBatch spriteBatch;
|
||||
|
||||
public Game1()
|
||||
{
|
||||
graphics = new GraphicsDeviceManager(this);
|
||||
Content.RootDirectory = "Content";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows the game to perform any initialization it needs to before starting to run.
|
||||
/// This is where it can query for any required services and load any non-graphic
|
||||
/// related content. Calling base.Initialize will enumerate through any components
|
||||
/// and initialize them as well.
|
||||
/// </summary>
|
||||
protected override void Initialize()
|
||||
{
|
||||
// TODO: Add your initialization logic here
|
||||
|
||||
base.Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// LoadContent will be called once per game and is the place to load
|
||||
/// all of your content.
|
||||
/// </summary>
|
||||
protected override void LoadContent()
|
||||
{
|
||||
// Create a new SpriteBatch, which can be used to draw textures.
|
||||
spriteBatch = new SpriteBatch(GraphicsDevice);
|
||||
|
||||
//TODO: use this.Content to load your game content here
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows the game to run logic such as updating the world,
|
||||
/// checking for collisions, gathering input, and playing audio.
|
||||
/// </summary>
|
||||
/// <param name="gameTime">Provides a snapshot of timing values.</param>
|
||||
protected override void Update(GameTime gameTime)
|
||||
{
|
||||
// For Mobile devices, this logic will close the Game when the Back button is pressed
|
||||
// Exit() is obsolete on iOS
|
||||
#if !__IOS__ && !__TVOS__
|
||||
if (GamePad.GetState (PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
|
||||
Exit ();
|
||||
#endif
|
||||
|
||||
// TODO: Add your update logic here
|
||||
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called when the game should draw itself.
|
||||
/// </summary>
|
||||
/// <param name="gameTime">Provides a snapshot of timing values.</param>
|
||||
protected override void Draw(GameTime gameTime)
|
||||
{
|
||||
graphics.GraphicsDevice.Clear(Color.CornflowerBlue);
|
||||
|
||||
//TODO: Add your drawing code here
|
||||
|
||||
base.Draw(gameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 144 KiB |
+22
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Content.Pipeline;
|
||||
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
|
||||
|
||||
using TImport = System.String;
|
||||
|
||||
namespace ${Namespace}
|
||||
{
|
||||
[ContentImporter(".txt", DisplayName = "Importer1", DefaultProcessor = "Processor1")]
|
||||
public class Importer1 : ContentImporter<TImport>
|
||||
{
|
||||
public override TImport Import(string filename, ContentImporterContext context)
|
||||
{
|
||||
return default(TImport);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Content.Pipeline;
|
||||
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
|
||||
|
||||
using TInput = System.String;
|
||||
using TOutput = System.String;
|
||||
|
||||
namespace ${Namespace}
|
||||
{
|
||||
[ContentProcessor(DisplayName = "Processor1")]
|
||||
class Processor1 : ContentProcessor<TInput, TOutput>
|
||||
{
|
||||
public override TOutput Process(TInput input, ContentProcessorContext context)
|
||||
{
|
||||
return default(TOutput);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#if MONOMAC
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.Foundation;
|
||||
#elif __IOS__ || __TVOS__
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
namespace ${Namespace}
|
||||
{
|
||||
#if __IOS__ || __TVOS__
|
||||
[Register("AppDelegate")]
|
||||
class Program : UIApplicationDelegate
|
||||
#else
|
||||
static class Program
|
||||
#endif
|
||||
{
|
||||
private static Game1 game;
|
||||
|
||||
internal static void RunGame()
|
||||
{
|
||||
game = new Game1();
|
||||
game.Run();
|
||||
#if !__IOS__ && !__TVOS__
|
||||
game.Dispose ();
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
#if !MONOMAC && !__IOS__ && !__TVOS__
|
||||
[STAThread]
|
||||
#endif
|
||||
static void Main(string[] args)
|
||||
{
|
||||
#if MONOMAC
|
||||
NSApplication.Init ();
|
||||
|
||||
using (var p = new NSAutoreleasePool ()) {
|
||||
NSApplication.SharedApplication.Delegate = new AppDelegate();
|
||||
NSApplication.Main(args);
|
||||
}
|
||||
#elif __IOS__ || __TVOS__
|
||||
UIApplication.Main(args, null, "AppDelegate");
|
||||
#else
|
||||
RunGame();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if __IOS__ || __TVOS__
|
||||
public override void FinishedLaunching(UIApplication app)
|
||||
{
|
||||
RunGame();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MONOMAC
|
||||
class AppDelegate : NSApplicationDelegate
|
||||
{
|
||||
public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
|
||||
{
|
||||
AppDomain.CurrentDomain.AssemblyResolve += (object sender, ResolveEventArgs a) => {
|
||||
if (a.Name.StartsWith("MonoMac")) {
|
||||
return typeof(MonoMac.AppKit.AppKitFramework).Assembly;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
Program.RunGame();
|
||||
}
|
||||
|
||||
public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="${ProjectName}"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- A list of the Windows versions that this application has been tested on and is
|
||||
is designed to work with. Uncomment the appropriate elements and Windows will
|
||||
automatically selected the most compatible environment. -->
|
||||
|
||||
<!-- Windows Vista -->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
|
||||
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
||||
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
||||
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
|
||||
</assembly>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<Template>
|
||||
<TemplateConfiguration>
|
||||
<_Name>MonoGame Content Builder File</_Name>
|
||||
<Icon>monogame-project</Icon>
|
||||
<_Category>MonoGame</_Category>
|
||||
<LanguageName>C#</LanguageName>
|
||||
<_Description>Creates a basic MonoGame Content Builder control file.</_Description>
|
||||
</TemplateConfiguration>
|
||||
|
||||
<TemplateFiles>
|
||||
<File name="${Name}.mgcb" src="Common/Content.mgcb" BuildAction="MonoGameContentReference" />
|
||||
</TemplateFiles>
|
||||
</Template>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<Template>
|
||||
<TemplateConfiguration>
|
||||
<_Name>MonoGame Content Importer</_Name>
|
||||
<Icon>monogame-project</Icon>
|
||||
<_Category>MonoGame</_Category>
|
||||
<LanguageName>C#</LanguageName>
|
||||
<_Description>Creates a basic MonoGame Content Importer which can be used to extend the Pipeline tool.</_Description>
|
||||
</TemplateConfiguration>
|
||||
|
||||
<TemplateFiles>
|
||||
<File name="${Name}.cs" src="Common/Importer1.cs" />
|
||||
</TemplateFiles>
|
||||
</Template>
|
||||
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<Template>
|
||||
<TemplateConfiguration>
|
||||
<_Name>MonoGame Content Processor</_Name>
|
||||
<Icon>monogame-project</Icon>
|
||||
<_Category>MonoGame</_Category>
|
||||
<LanguageName>C#</LanguageName>
|
||||
<_Description>Creates a basic MonoGame Content Processor which can be used to extend the Pipeline tool.</_Description>
|
||||
</TemplateConfiguration>
|
||||
|
||||
<TemplateFiles>
|
||||
<File name="${Name}.cs" src="Common/Processor1.cs" />
|
||||
</TemplateFiles>
|
||||
</Template>
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Template>
|
||||
<TemplateConfiguration>
|
||||
<_Name>MonoGame Portable Library</_Name>
|
||||
<Category>monogame/library/crossplat</Category>
|
||||
<Icon>monogame-project</Icon>
|
||||
<LanguageName>C#</LanguageName>
|
||||
<_Description>Creates a MonoGame Portable Library (PCL). This can be used to share most of your games code.</_Description>
|
||||
</TemplateConfiguration>
|
||||
|
||||
<Actions>
|
||||
<Open filename = "Game1.cs"/>
|
||||
</Actions>
|
||||
|
||||
<Combine name = "${ProjectName}" directory = ".">
|
||||
<Actions>
|
||||
<Open filename = "Game1.cs"/>
|
||||
</Actions>
|
||||
|
||||
<Project name = "${ProjectName}" directory = "." type = "PortableDotNet">
|
||||
<Options Target = "Library" TargetFrameworkVersion = ".NETPortable,Version=v4.0,Profile=Profile158"/>
|
||||
<Packages>
|
||||
<Package id="MonoGame.Framework.Portable" version="3.2.99.1-Beta" targetFramework="portable-net45+sl50+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10"/>
|
||||
</Packages>
|
||||
<Files>
|
||||
<File name="Game1.cs" AddStandardHeader="True" src="Common/Game1.cs" />
|
||||
</Files>
|
||||
</Project>
|
||||
</Combine>
|
||||
</Template>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Template>
|
||||
<TemplateConfiguration>
|
||||
<_Name>MonoGame Pipeline Library</_Name>
|
||||
<Category>monogame/library/pipeline</Category>
|
||||
<Icon>monogame-project</Icon>
|
||||
<LanguageName>C#</LanguageName>
|
||||
<_Description>Creates a MonoGame Pipeline Extenson so you can extend the Content Pipeline.</_Description>
|
||||
</TemplateConfiguration>
|
||||
|
||||
<Combine name = "${ProjectName}" directory = ".">
|
||||
<Actions>
|
||||
<Open filename = "Importer1.cs"/>
|
||||
</Actions>
|
||||
|
||||
<Project name = "${ProjectName}" directory = ".">
|
||||
<Options Target = "Library"/>
|
||||
<Packages>
|
||||
<Package id="MonoGame.Framework.Portable" version="3.2.99.1-Beta" targetFramework="portable-net45+sl50+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10"/>
|
||||
<Package id="MonoGame.Framework.Content.Pipeline.Portable" version="3.2.99.1-Beta" targetFramework="portable-net45+sl50+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10"/>
|
||||
</Packages>
|
||||
<Files>
|
||||
<File name="Importer1.cs" AddStandardHeader="True" src="Common/Importer1.cs" />
|
||||
<File name="Processor1.cs" AddStandardHeader="True" src="Common/Processor1.cs" />
|
||||
</Files>
|
||||
</Project>
|
||||
</Combine>
|
||||
</Template>
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0"?>
|
||||
<Template>
|
||||
<TemplateConfiguration>
|
||||
<_Name>MonoGame Cross Platform Desktop Project</_Name>
|
||||
<Category>monogame/app/games</Category>
|
||||
<Icon>monogame-project</Icon>
|
||||
<LanguageName>C#</LanguageName>
|
||||
<_Description>A MonoGame game project for Windows, Mac and Linux using OpenGL.</_Description>
|
||||
</TemplateConfiguration>
|
||||
|
||||
<Actions>
|
||||
<Open filename = "Game1.cs"/>
|
||||
</Actions>
|
||||
|
||||
<Combine name = "${ProjectName}" directory = ".">
|
||||
<Options>
|
||||
<StartupProject>${ProjectName}</StartupProject>
|
||||
</Options>
|
||||
|
||||
<Project name = "${ProjectName}" directory = ".">
|
||||
<Options />
|
||||
<References>
|
||||
<Reference type="Gac" refto="System" />
|
||||
<Reference type="Gac" refto="System.Xml" />
|
||||
<Reference type="Gac" refto="System.Core" />
|
||||
<Reference type="Package" refto="MonoGame.Framework" />
|
||||
</References>
|
||||
<Files>
|
||||
<File name="Game1.cs" src="Common/Game1.cs" />
|
||||
<File name="Program.cs" src="Common/Program.cs" />
|
||||
<File name="app.manifest" src="Common/app.manifest" />
|
||||
<RawFile name="Icon.png" src="Common/Icon-md.png"/>
|
||||
<RawFile name="Icon.ico" src="Common/Icon.ico" BuildAction="EmbeddedResource"/>
|
||||
<Directory name="Properties">
|
||||
<File name="AssemblyInfo.cs" src="Common/AssemblyInfo.cs" />
|
||||
</Directory>
|
||||
<Directory name="Content">
|
||||
<File name="Content.mgcb" src="Common/Content.mgcb" BuildAction="MonoGameContentReference" />
|
||||
</Directory>
|
||||
<Directory name="x64">
|
||||
<ContentFile>
|
||||
<RawFile name="libopenal.so.1" src="libs/x64/libopenal.so.1" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
<ContentFile>
|
||||
<RawFile name="soft_oal.dll" src="libs/x64/soft_oal.dll" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
<ContentFile>
|
||||
<RawFile name="libSDL2-2.0.so.0" src="libs/x64/libSDL2-2.0.so.0" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
<ContentFile>
|
||||
<RawFile name="SDL2.dll" src="libs/x64/SDL2.dll" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
</Directory>
|
||||
<Directory name="x86">
|
||||
<ContentFile>
|
||||
<RawFile name="libopenal.so.1" src="libs/x86/libopenal.so.1" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
<ContentFile>
|
||||
<RawFile name="soft_oal.dll" src="libs/x86/soft_oal.dll" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
<ContentFile>
|
||||
<RawFile name="libSDL2-2.0.so.0" src="libs/x86/libSDL2-2.0.so.0" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
<ContentFile>
|
||||
<RawFile name="SDL2.dll" src="libs/x86/SDL2.dll" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
</Directory>
|
||||
<ContentFile>
|
||||
<File name="MonoGame.Framework.dll.config" src="Common/MonoGame.Framework.dll.config" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
<ContentFile>
|
||||
<RawFile name="libopenal.1.dylib" src="libs/libopenal.1.dylib" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
<ContentFile>
|
||||
<RawFile name="libSDL2-2.0.0.dylib" src="libs/libSDL2-2.0.0.dylib" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ContentFile>
|
||||
</Files>
|
||||
</Project>
|
||||
</Combine>
|
||||
</Template>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Template>
|
||||
<TemplateConfiguration>
|
||||
<_Name>MonoGame Shared Project</_Name>
|
||||
<Category>monogame/library/crossplat</Category>
|
||||
<Icon>monogame-project</Icon>
|
||||
<LanguageName>C#</LanguageName>
|
||||
<_Description>Creates a MonoGame Shared Project to share common code. This can be used to share most of your shared code, but you can also include platform specific code using #defines.
|
||||
Note this is a Shared Project only, it will need to be referenced from another MonoGame project to work.</_Description>
|
||||
</TemplateConfiguration>
|
||||
|
||||
<Actions>
|
||||
<Open filename = "Game1.cs"/>
|
||||
</Actions>
|
||||
|
||||
<Combine name = "${ProjectName}" directory = ".">
|
||||
<Project name = "${ProjectName}" directory = "." type = "SharedAssetsProject">
|
||||
<Files>
|
||||
<File name="Game1.cs" src="Common/Game1.cs" />
|
||||
<Directory name="Content">
|
||||
<File name="Content.mgcb" src="Common/Content.mgcb" BuildAction="MonoGameContentReference"/>
|
||||
</Directory>
|
||||
</Files>
|
||||
</Project>
|
||||
</Combine>
|
||||
</Template>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<Template>
|
||||
<TemplateConfiguration>
|
||||
<_Name>MonoGame Application (DirectX)</_Name>
|
||||
<Category>monogame/app/games</Category>
|
||||
<Icon>monogame-project</Icon>
|
||||
<LanguageName>C#</LanguageName>
|
||||
<_Description>Creates a new C# MonoGame Windows Application. This application will use the DirectX backend.</_Description>
|
||||
</TemplateConfiguration>
|
||||
|
||||
<Actions>
|
||||
<Open filename = "Game1.cs"/>
|
||||
</Actions>
|
||||
|
||||
<Combine name = "${ProjectName}" directory = ".">
|
||||
<Options>
|
||||
<StartupProject>${ProjectName}</StartupProject>
|
||||
</Options>
|
||||
|
||||
<Project name = "${ProjectName}" directory = ".">
|
||||
<Options />
|
||||
<References>
|
||||
<Reference type="Gac" refto="System" />
|
||||
<Reference type="Gac" refto="System.Xml" />
|
||||
<Reference type="Gac" refto="System.Core" />
|
||||
<Reference type="Package" refto="MonoGame.Framework" />
|
||||
</References>
|
||||
<Files>
|
||||
<File name="Game1.cs" src="Common/Game1.cs" />
|
||||
<File name="Program.cs" src="Common/Program.cs" />
|
||||
<File name="app.manifest" src="Common/app.manifest />
|
||||
<RawFile name="Icon.png" src="Common/Icon-md.png" />
|
||||
<Directory name="Properties">
|
||||
<File name="AssemblyInfo.cs" src="Common/AssemblyInfo.cs" />
|
||||
</Directory>
|
||||
<Directory name="Content">
|
||||
<File name="Content.mgcb" src="Common/Content.mgcb" BuildAction="MonoGameContentReference" />
|
||||
</Directory>
|
||||
</Files>
|
||||
</Project>
|
||||
</Combine>
|
||||
</Template>
|
||||
Reference in New Issue
Block a user