Skip to content

Commit

Permalink
Added v4 template to the main repo (#825)
Browse files Browse the repository at this point in the history
#CHANGE template project to generate zip and a dotnet new template pack for duality projects
  • Loading branch information
Barsonax authored Jun 5, 2020
1 parent 4cff3d8 commit f4b7ef5
Show file tree
Hide file tree
Showing 16 changed files with 344 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Duality.sln
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DualityPhysics", "Source\Co
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleRunner", "Samples\SampleRunner\SampleRunner.csproj", "{A9B86395-ED96-4695-8A18-548301524B42}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DualityTemplates", "Source\DualityTemplates\DualityTemplates.csproj", "{3AB26D57-70D9-40DE-B12D-6B1489035805}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -260,6 +262,10 @@ Global
{A9B86395-ED96-4695-8A18-548301524B42}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9B86395-ED96-4695-8A18-548301524B42}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9B86395-ED96-4695-8A18-548301524B42}.Release|Any CPU.Build.0 = Release|Any CPU
{3AB26D57-70D9-40DE-B12D-6B1489035805}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3AB26D57-70D9-40DE-B12D-6B1489035805}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AB26D57-70D9-40DE-B12D-6B1489035805}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AB26D57-70D9-40DE-B12D-6B1489035805}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
63 changes: 63 additions & 0 deletions Source/DualityTemplates/DualityTemplates.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageId>AdamsLair.Duality.Templates</PackageId>
<Title>Duality Templates</Title>
<Authors>Rick van Dam</Authors>
<Description>Templates to use with the Duality game engine</Description>
<PackageTags>dotnet-new;templates;duality</PackageTags>
<TargetFramework>netstandard2.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(MSBuildProjectDirectory)/bin</OutputPath>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
<Version>4.0.0-alpha</Version>
<PackageProjectUrl>https://www.duality2d.net/</PackageProjectUrl>
<RepositoryUrl>https://github.com/AdamsLair/duality</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
</PropertyGroup>

<ItemGroup>
<Content Include="Templates\**\*" CopyToOutputDirectory="PreserveNewest" />
<Content Remove="Templates\**\obj\**" />
<Content Remove="Templates\SolutionTemplate\Plugins\**" />
<None Remove="Templates\**\obj\**" />
<Content Remove="Templates\**\bin\**" />
<None Remove="Templates\**\bin\**" />
<Content Remove="Templates\**\.vs\**" />
<Compile Remove="**\*" />
<Compile Remove="Templates\SolutionTemplate\Plugins\**" />

<Content Remove="Templates\SolutionTemplate\*.dll" />
<None Remove="Templates\SolutionTemplate\*.dll" />
<Content Remove="Templates\SolutionTemplate\*.pdb" />
<None Remove="Templates\SolutionTemplate\*.pdb" />
<Content Remove="Templates\SolutionTemplate\*.exe" />
<None Remove="Templates\SolutionTemplate\*.exe" />
<Content Remove="Templates\SolutionTemplate\*.xml" />
<EmbeddedResource Remove="Templates\SolutionTemplate\Plugins\**" />
<None Remove="Templates\SolutionTemplate\*.xml" />
<None Remove="Templates\SolutionTemplate\Plugins\**" />
</ItemGroup>

<ItemGroup>
<Content Update="Templates\SolutionTemplate\.template.config\template.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
</ItemGroup>

<Target Name="CreateZips" AfterTargets="Build">
<ZipDirectory SourceDirectory="$(OutputPath)/Templates/SolutionTemplate" DestinationFile="$(OutputPath)\Duality.zip" Overwrite="true" />
<RemoveDir Directories="$(OutputPath)/Templates" />
</Target>


<Target Name="CoreCompile" />
<PropertyGroup>
<SkipCopyBuildProduct>true</SkipCopyBuildProduct>
</PropertyGroup>
</Project>
18 changes: 18 additions & 0 deletions Source/DualityTemplates/Templates/SolutionTemplate/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Build output files
**/bin
**/obj

# Duality specific files
/Temp
/Backup
/UserData.dat
/DesignTimeData.dat
*.pdb
/*.dll
/*.exe
/*.txt
/*.xml
/Plugins

# Visual studio specific files
Source/.vs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Rick van Dam",
"classifications": [ "Duality" ],
"identity": "DualitySolutionTemplate",
"name": "DualitySolutionTemplate",
"shortName": "dualitySolution",
"sourceName": "DualityGame",
"tags": {
"language": "C#"
},
"postActions": [
{
"actionId": "3A7C4B45-1F5D-4A30-959A-51B88E82B5D2",
"args": {
"executable": "dotnet",
"args": "build Source"
},
"manualInstructions": [
{
"text": "Builds the solution using dotnet build'"
}
],
"continueOnError": false,
"description ": "runs the build"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<DualityFolder>$(MSBuildThisFileDirectory)</DualityFolder>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29911.84
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameLauncher", "Launchers\GameLauncher\GameLauncher.csproj", "{EB32E368-2C3C-444F-9F7A-C808C03D462E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameEditor", "Launchers\GameEditor\GameEditor.csproj", "{E587311C-714A-4078-ADAE-EC00E8D971CB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DualityGameCorePlugin", "Plugins\DualityGameCorePlugin\DualityGameCorePlugin.csproj", "{E77740F1-234A-4B92-B1BC-43AD9EB9BA03}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{F75B2813-797D-44A5-A301-331C229992C7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DualityGameEditorPlugin", "Plugins\DualityGameEditorPlugin\DualityGameEditorPlugin.csproj", "{F0DCA20C-6888-4294-97C4-14C82B4DBC82}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EB32E368-2C3C-444F-9F7A-C808C03D462E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB32E368-2C3C-444F-9F7A-C808C03D462E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB32E368-2C3C-444F-9F7A-C808C03D462E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB32E368-2C3C-444F-9F7A-C808C03D462E}.Release|Any CPU.Build.0 = Release|Any CPU
{E587311C-714A-4078-ADAE-EC00E8D971CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E587311C-714A-4078-ADAE-EC00E8D971CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E587311C-714A-4078-ADAE-EC00E8D971CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E587311C-714A-4078-ADAE-EC00E8D971CB}.Release|Any CPU.Build.0 = Release|Any CPU
{E77740F1-234A-4B92-B1BC-43AD9EB9BA03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E77740F1-234A-4B92-B1BC-43AD9EB9BA03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E77740F1-234A-4B92-B1BC-43AD9EB9BA03}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E77740F1-234A-4B92-B1BC-43AD9EB9BA03}.Release|Any CPU.Build.0 = Release|Any CPU
{F0DCA20C-6888-4294-97C4-14C82B4DBC82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0DCA20C-6888-4294-97C4-14C82B4DBC82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0DCA20C-6888-4294-97C4-14C82B4DBC82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0DCA20C-6888-4294-97C4-14C82B4DBC82}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E77740F1-234A-4B92-B1BC-43AD9EB9BA03} = {F75B2813-797D-44A5-A301-331C229992C7}
{F0DCA20C-6888-4294-97C4-14C82B4DBC82} = {F75B2813-797D-44A5-A301-331C229992C7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3678251F-E0BD-439B-9C29-8FB5513B3241}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<AllowedReferenceRelatedFileExtensions>.pdb</AllowedReferenceRelatedFileExtensions>
<RuntimeIdentifier>any</RuntimeIdentifier>
</PropertyGroup>

<Target Name="CopyAdditionalReferenceFiles" BeforeTargets="Build">
<ItemGroup>
<AdditionalReferenceFiles Include="%(Reference.RelativeDir)%(Reference.Filename).xml;%(Reference.RelativeDir)%(Reference.Filename).pdb" />
</ItemGroup>

<Message Text="Copying reference files to $(OutputPath)" Importance="High" />
<Copy SourceFiles="@(AdditionalReferenceFiles)" DestinationFolder="$(OutputPath)" Condition="Exists('%(RootDir)%(Directory)%(Filename)%(Extension)')" />
</Target>

<Target Name="CopyBuildOutputToDeploy" AfterTargets="Build">
<ItemGroup>
<PluginFiles Include="$(OutputPath)*.core.dll;$(OutputPath)*.core.pdb;$(OutputPath)*.core.xml;$(OutputPath)*.editor.dll;$(OutputPath)*.editor.pdb;$(OutputPath)*.editor.xml" />
<LibFiles Include="$(OutputPath)**/*" Exclude="@(PluginFiles)" />
</ItemGroup>

<Message Text="Copying plugin files to $(DualityFolder)Plugins" Importance="High" />
<Copy SourceFiles="@(PluginFiles)" DestinationFolder="$(DualityFolder)Plugins" />

<Message Text="Copying lib files to $(DualityFolder)" Importance="High" />
<Copy SourceFiles="@(LibFiles)" DestinationFiles="@(LibFiles->'$(DualityFolder)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>

<Target Name="CoreCompile" />
<PropertyGroup>
<SkipCopyBuildProduct>true</SkipCopyBuildProduct>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<PackageReference Include="AdamsLair.Duality.Editor.Backend.DefaultOpenTK" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Editor.Plugins.Base" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Editor.Plugins.CamView" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Editor.Plugins.HelpAdvisor" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Editor.Plugins.LogView" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Editor.Plugins.ObjectInspector" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Editor.Plugins.ProjectView" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Editor.Plugins.SceneView" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Editor" Version="4.0.0-alpha" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Plugins\DualityGameEditorPlugin\DualityGameEditorPlugin.csproj" />
<ProjectReference Include="..\GameLauncher\GameLauncher.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"profiles": {
"GameEditor": {
"commandName": "Executable",
"executablePath": ".\\DualityEditor.exe",
"workingDirectory": ".\\..\\..\\..\\.."
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<PackageReference Include="AdamsLair.Duality.Backend.DefaultOpenTK" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Backend.DotNetFramework" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Launcher" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Plugins.Compatibility" Version="4.0.0-alpha" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Plugins\DualityGameCorePlugin\DualityGameCorePlugin.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"profiles": {
"GameLauncher": {
"commandName": "Executable",
"executablePath": ".\\DualityLauncher.exe",
"workingDirectory": ".\\..\\..\\..\\.."
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Duality;

namespace DualityGameCorePlugin
{
/// <summary>
/// Defines a Duality core plugin.
/// </summary>
public class DualityGameCorePlugin : CorePlugin
{
// Override methods here for global logic
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>DualityGameCorePlugin.core</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AdamsLair.Duality" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Primitives" Version="4.0.0-alpha" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

using System;
using System.Collections.Generic;
using System.Linq;

using Duality;

namespace DualityGameCorePlugin
{
public class YourCustomComponentType : Component
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>DualityGameEditorPlugin.editor</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AdamsLair.Duality" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Primitives" Version="4.0.0-alpha" />
<PackageReference Include="AdamsLair.Duality.Editor" Version="4.0.0-alpha" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Duality.Editor;

namespace DualityGameEditorPlugin
{
/// <summary>
/// Defines a Duality editor plugin.
/// </summary>
public class DualityGameEditorPlugin : EditorPlugin
{
public override string Id
{
get { return "Duality_EditorPlugin"; }
}
}
}

0 comments on commit f4b7ef5

Please sign in to comment.