Added FNA Template from my development version.

master
Andrew Russell 2017-11-07 17:30:00 +10:00
parent c930980544
commit ef025eafb5
18 changed files with 1120 additions and 2 deletions

9
.gitignore vendored
View File

@ -286,3 +286,12 @@ __pycache__/
*.btm.cs
*.odx.cs
*.xsd.cs
#
# Ignores for FNA-Template
#
# Ignore the libs directory (user will add it themselves)
FNALibs

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F6DF8289-8138-41C7-B747-E672AFEE44A4}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CreateTemplate</RootNamespace>
<AssemblyName>CreateTemplate</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

166
CreateTemplate/Program.cs Normal file
View File

@ -0,0 +1,166 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace CreateTemplate
{
class Program
{
static void Main(string[] args)
{
// Validate command line:
if(args.Length == 0 || args.Length != (args[0] == "--template" ? 4 : 3))
{
Console.WriteLine("Usage:");
Console.WriteLine(" CreateTemplate [--template] <ProjectName> <SourceDirectory> <DestinationDirectory>");
Console.WriteLine();
Console.WriteLine("The output will be placed in the folder at <DestinationDirectory>" + Path.DirectorySeparatorChar + "<ProjectName>");
Console.WriteLine();
Console.WriteLine("Options:");
Console.WriteLine(" --template: Generate a Visual Studio compatible project template.");
Console.WriteLine();
return;
}
bool vsTemplate = args[0] == "--template";
string projectName = args[vsTemplate ? 1 : 0];
string sourceDirectory = Path.GetFullPath(args[vsTemplate ? 2 : 1]);
string destinationDirectory = Path.GetFullPath(args[vsTemplate ? 3 : 2]);
if(!Directory.Exists(sourceDirectory))
{
Console.WriteLine("ERROR: Source directory not found!");
return;
}
if(!File.Exists(Path.Combine(sourceDirectory, "FNATemplate.csproj")))
{
Console.WriteLine("ERROR: Source directory is missing \"FNATemplate.csproj\"");
return;
}
if(destinationDirectory.StartsWith(sourceDirectory)) // <- Probably not the most robust way to do this...
{
Console.WriteLine("ERROR: Destination directory is contained with the source directory!");
return;
}
// And off we go...
string projectDirectory = Path.Combine(destinationDirectory, projectName);
Directory.CreateDirectory(projectDirectory);
StreamWriter templateFile = null;
if(vsTemplate)
{
templateFile = new StreamWriter(Path.Combine(projectDirectory, projectName + ".vstemplate"));
templateFile.WriteLine("<VSTemplate Version=\"3.0.0\" xmlns=\"http://schemas.microsoft.com/developer/vstemplate/2005\" Type=\"Project\">");
templateFile.WriteLine(" <TemplateData>");
templateFile.WriteLine(" <Name>FNA Game Project</Name>");
templateFile.WriteLine(" <Description>A cross-platform game project using FNA.</Description>");
templateFile.WriteLine(" <ProjectType>CSharp</ProjectType>");
templateFile.WriteLine(" <NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>");
templateFile.WriteLine(" <ProjectSubType>");
templateFile.WriteLine(" </ProjectSubType>");
templateFile.WriteLine(" <SortOrder>43900</SortOrder>");
templateFile.WriteLine(" <CreateNewFolder>true</CreateNewFolder>");
templateFile.WriteLine(" <CreateInPlace>true</CreateInPlace>"); // <- Required because we have relative import paths in the project file!
templateFile.WriteLine(" <DefaultName>MyFNAGameProject</DefaultName>");
templateFile.WriteLine(" <ProvideDefaultName>true</ProvideDefaultName>");
templateFile.WriteLine(" <LocationField>Enabled</LocationField>");
templateFile.WriteLine(" <EnableLocationBrowseButton>true</EnableLocationBrowseButton>");
//templateFile.WriteLine(" <Icon>__TemplateIcon.png</Icon>");
//templateFile.WriteLine(" <PreviewImage>__PreviewImage.png</PreviewImage>");
templateFile.WriteLine(" </TemplateData>");
templateFile.WriteLine(" <TemplateContent>");
templateFile.WriteLine(" <Project TargetFileName=\"" + projectName + ".csproj\" File=\"" + projectName + ".csproj\" ReplaceParameters=\"true\">");
}
string binDir = Path.DirectorySeparatorChar + "bin" + Path.DirectorySeparatorChar;
string objDir = Path.DirectorySeparatorChar + "obj" + Path.DirectorySeparatorChar;
string binDirFirst = "bin" + Path.DirectorySeparatorChar;
string objDirFirst = "obj" + Path.DirectorySeparatorChar;
foreach(var inputPath in Directory.EnumerateFiles(sourceDirectory, "*.*", SearchOption.AllDirectories))
{
string localPath = inputPath.Substring(sourceDirectory.EndsWith(Path.DirectorySeparatorChar.ToString()) ? sourceDirectory.Length : sourceDirectory.Length + 1);
if(localPath.Contains(binDir) || localPath.Contains(objDir) || localPath.StartsWith(binDirFirst) || localPath.StartsWith(objDirFirst))
{
continue;
}
string outputLocalPath = localPath.Replace("FNATemplate", projectName);
// NOTE: "GetFileName" here is because VS bizarrely combines the path from the ProjectItem AND the TargetFileName
string templateTargetFileName = Path.GetFileName(localPath).Replace("FNATemplate", "$safeprojectname$");
string outputPath = Path.Combine(projectDirectory, outputLocalPath);
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
// Quick'n'dirty text replacement:
bool replaceParameters;
if(outputLocalPath.EndsWith(".csproj"))
{
var lines = File.ReadAllLines(inputPath);
for(int i = 0; i < lines.Length; i++)
{
if(lines[i].Contains("<ProjectGuid>"))
lines[i] = " <ProjectGuid>" + (vsTemplate ? "$guid1$" : Guid.NewGuid().ToString()) + "</ProjectGuid>";
else if(lines[i].Contains("FNATemplate"))
lines[i] = lines[i].Replace("FNATemplate", vsTemplate ? "$safeprojectname$" : projectName);
}
File.WriteAllLines(outputPath, lines);
replaceParameters = true;
}
else if(localPath.EndsWith(".cs"))
{
var lines = File.ReadAllLines(inputPath);
for(int i = 0; i < lines.Length; i++)
{
if(lines[i].Contains("[assembly: Guid("))
lines[i] = "[assembly: Guid(\"" + (vsTemplate ? "$guid2$" : Guid.NewGuid().ToString()) + "\")]";
else if(lines[i].Contains("FNATemplate"))
lines[i] = lines[i].Replace("FNATemplate", vsTemplate ? "$safeprojectname$" : projectName);
}
File.WriteAllLines(outputPath, lines);
replaceParameters = true;
}
else // All other files
{
File.Copy(inputPath, outputPath, true);
replaceParameters = false;
}
if(vsTemplate)
{
templateFile.Write(" <ProjectItem TargetFileName=\"");
templateFile.Write(templateTargetFileName);
templateFile.Write("\"");
if(replaceParameters)
templateFile.Write(" ReplaceParameters=\"true\"");
templateFile.Write(">");
templateFile.Write(outputLocalPath);
templateFile.WriteLine("</ProjectItem>");
}
}
if(vsTemplate)
{
templateFile.WriteLine(" </Project>");
templateFile.WriteLine(" </TemplateContent>");
templateFile.WriteLine("</VSTemplate>");
templateFile.Close();
}
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CreateTemplate")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CreateTemplate")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("eb5275ca-9920-41cf-aa32-442e77dbed09")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

63
FNATemplate.sln Normal file
View File

@ -0,0 +1,63 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FNATemplate", "FNATemplate\FNATemplate.csproj", "{D488C5AD-5192-4A08-88FD-22219586ED9F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FNA", "FNA\FNA.csproj", "{35253CE1-C864-4CD3-8249-4D1319748E8F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreateTemplate", "CreateTemplate\CreateTemplate.csproj", "{F6DF8289-8138-41C7-B747-E672AFEE44A4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D488C5AD-5192-4A08-88FD-22219586ED9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D488C5AD-5192-4A08-88FD-22219586ED9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D488C5AD-5192-4A08-88FD-22219586ED9F}.Debug|x86.ActiveCfg = Debug|x86
{D488C5AD-5192-4A08-88FD-22219586ED9F}.Debug|x86.Build.0 = Debug|x86
{D488C5AD-5192-4A08-88FD-22219586ED9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D488C5AD-5192-4A08-88FD-22219586ED9F}.Release|Any CPU.Build.0 = Release|Any CPU
{D488C5AD-5192-4A08-88FD-22219586ED9F}.Release|x86.ActiveCfg = Release|x86
{D488C5AD-5192-4A08-88FD-22219586ED9F}.Release|x86.Build.0 = Release|x86
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|x86.ActiveCfg = Debug|Any CPU
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|x86.Build.0 = Debug|Any CPU
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|Any CPU.Build.0 = Release|Any CPU
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|x86.ActiveCfg = Release|Any CPU
{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|x86.Build.0 = Release|Any CPU
{F6DF8289-8138-41C7-B747-E672AFEE44A4}.Debug|Any CPU.ActiveCfg = Debug|x86
{F6DF8289-8138-41C7-B747-E672AFEE44A4}.Debug|Any CPU.Build.0 = Debug|x86
{F6DF8289-8138-41C7-B747-E672AFEE44A4}.Debug|x86.ActiveCfg = Debug|x86
{F6DF8289-8138-41C7-B747-E672AFEE44A4}.Debug|x86.Build.0 = Debug|x86
{F6DF8289-8138-41C7-B747-E672AFEE44A4}.Release|Any CPU.ActiveCfg = Release|x86
{F6DF8289-8138-41C7-B747-E672AFEE44A4}.Release|Any CPU.Build.0 = Release|x86
{F6DF8289-8138-41C7-B747-E672AFEE44A4}.Release|x86.ActiveCfg = Release|x86
{F6DF8289-8138-41C7-B747-E672AFEE44A4}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.TextStylePolicy = $1
$1.scope = text/x-csharp
$1.FileWidth = 80
$1.TabsToSpaces = True
$1.inheritsSet = null
$0.CSharpFormattingPolicy = $2
$2.scope = text/x-csharp
$2.SpaceAfterControlFlowStatementKeyword = False
$0.TextStylePolicy = $3
$3.FileWidth = 80
$3.TabsToSpaces = True
$3.EolMarker = Unix
$3.scope = text/plain
$0.StandardHeader = $4
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,34 @@
#----------------------------- Global Properties ----------------------------#
/outputDir:bin/Windows
/intermediateDir:obj/Windows
/platform:Windows
/config:
/profile:HiDef
/compress:False
#-------------------------------- References --------------------------------#
#---------------------------------- Content ---------------------------------#
#begin Font.spritefont
/importer:FontDescriptionImporter
/processor:FontDescriptionProcessor
/processorParam:PremultiplyAlpha=True
/processorParam:TextureFormat=Color
/build:Font.spritefont
#begin Smile.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Smile.png

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains an xml description of a font, and will be read by the XNA
Framework Content Pipeline. Follow the comments to customize the appearance
of the font in your game, and to change the characters which are available to draw
with.
-->
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<!--
Modify this string to change the font that will be imported.
-->
<FontName>Roboto/Roboto-Regular.ttf</FontName>
<!--
Size is a float value, measured in points. Modify this value to change
the size of the font.
-->
<Size>18</Size>
<!--
Spacing is a float value, measured in pixels. Modify this value to change
the amount of spacing in between characters.
-->
<Spacing>0</Spacing>
<!--
UseKerning controls the layout of the font. If this value is true, kerning information
will be used when placing characters.
-->
<UseKerning>true</UseKerning>
<!--
Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
and "Bold, Italic", and are case sensitive.
-->
<Style>Regular</Style>
<!--
If you uncomment this line, the default character will be substituted if you draw
or measure text that contains characters which were not included in the font.
-->
<DefaultCharacter>?</DefaultCharacter>
<!--
CharacterRegions control what letters are available in the font. Every
character from Start to End will be built and made available for drawing. The
default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
character set. The characters are ordered according to the Unicode standard.
See the documentation for more information.
-->
<CharacterRegions>
<CharacterRegion>
<Start>&#32;</Start>
<End>&#126;</End>
</CharacterRegion>
</CharacterRegions>
</Asset>
</XnaContent>

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,20 @@
// A simple example effect for FNA-Template.
sampler TextureSampler : register(s0);
float4 PixelShaderFunction(float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 tex = tex2D(TextureSampler, texCoord);
return tex * float4(texCoord.x, texCoord.y, 1, 1);
}
technique Technique1
{
pass Pass1
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" 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)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D488C5AD-5192-4A08-88FD-22219586ED9F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FNATemplate</RootNamespace>
<AssemblyName>FNATemplate</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="FNATemplateGame.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FNA\FNA.csproj">
<Project>{35253CE1-C864-4CD3-8249-4D1319748E8F}</Project>
<Name>FNA</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="Content\Content.mgcb" />
</ItemGroup>
<ItemGroup>
<CompileShader Include="Effects\ExampleEffect.fx" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<MonoGamePlatform>Windows</MonoGamePlatform>
</PropertyGroup>
<!-- Required for MGCB to output sensibly -->
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
<Import Project="..\build\BuildShaders.targets" />
<Import Project="..\build\CopyFNALibs.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace FNATemplate
{
class FNATemplateGame : Game
{
GraphicsDeviceManager graphics;
public FNATemplateGame()
{
graphics = new GraphicsDeviceManager(this);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
graphics.PreferMultiSampling = true;
Content.RootDirectory = "Content";
Window.AllowUserResizing = true;
IsMouseVisible = true;
}
SpriteBatch spriteBatch;
SpriteFont font;
Texture2D smile;
Effect exampleEffect;
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
// Most content can be loaded from MonoGame Content Builder projects.
// (Note how "Content.mgcb" has the Build Action "MonoGameContentReference".)
font = Content.Load<SpriteFont>("Font");
smile = Content.Load<Texture2D>("smile");
// Effects need to be loaded from files built by fxc.exe from the DirectX SDK (June 2010)
// (Note how each .fx file has the Build Action "CompileShader", which produces a .fxb file.)
exampleEffect = new Effect(GraphicsDevice, File.ReadAllBytes(@"Effects/ExampleEffect.fxb"));
base.LoadContent();
}
protected override void Update(GameTime gameTime)
{
// Insert your game update logic here.
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
// Replace this with your own drawing code.
GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin();
spriteBatch.DrawString(font, "Insert awesome game here!", new Vector2(20, 20), Color.White);
spriteBatch.End();
spriteBatch.Begin(0, null, null, null, null, exampleEffect);
spriteBatch.Draw(smile, new Vector2(20, 60), Color.White);
spriteBatch.End();
base.Draw(gameTime);
}
}
}

46
FNATemplate/Program.cs Normal file
View File

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
namespace FNATemplate
{
class Program
{
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetDllDirectory(string lpPathName);
static void Main(string[] args)
{
// https://github.com/FNA-XNA/FNA/wiki/4:-FNA-and-Windows-API#64-bit-support
if(Environment.OSVersion.Platform == PlatformID.Win32NT)
{
SetDllDirectory(Path.Combine(
AppDomain.CurrentDomain.BaseDirectory,
Environment.Is64BitProcess ? "x64" : "x86"
));
}
// https://github.com/FNA-XNA/FNA/wiki/7:-FNA-Environment-Variables#fna_graphics_enable_highdpi
// NOTE: from documentation:
// Lastly, when packaging for macOS, be sure this is in your app bundle's Info.plist:
// <key>NSHighResolutionCapable</key>
// <string>True</string>
Environment.SetEnvironmentVariable("FNA_GRAPHICS_ENABLE_HIGHDPI", "1");
using(FNATemplateGame game = new FNATemplateGame())
{
bool isHighDPI = Environment.GetEnvironmentVariable("FNA_GRAPHICS_ENABLE_HIGHDPI") == "1";
if(isHighDPI)
Debug.WriteLine("HiDPI Enabled");
game.Run();
}
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("FNATemplate")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FNATemplate")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("68e63d4e-84c3-4440-a5dd-f6e0991142ca")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

123
README.md
View File

@ -1,2 +1,121 @@
# FNA-Template
A simple template for FNA game projects.
FNA Template
============
FNA Template is a quick, easy and robust way to start new projects using FNA (http://fna-xna.github.io/), Ethan Lee's excellent reimplementation of Microsoft XNA Game Studio.
It has been tested with Visual Studio 2010 (on Windows) and Visual Studio Community 2017 (on OSX). But it should run on other versions of Visual Studio, or directly with MSBuild.
It uses MonoGame's content pipeline for building assets (except shaders), but does not use MonoGame at runtime. It does NOT require XNA or XNA Game Studio.
FNA Template is released under the Microsoft Public License. (Note that this is the same license as FNA).
Getting Started
===============
To use FNA Template you will need to install the following:
- MonoGame (tested with MonoGame 3.6) from http://www.monogame.net/ for building content
- DirectX SDK (June 2010) from https://www.microsoft.com/en-us/download/details.aspx?id=6812 for building shaders
Building shaders on OSX
-----------------------
On OSX, the DirectX SDK is still required (and we need wine to help). Here is how to install it:
- Install Homebrew from https://brew.sh/
- Install wine with `brew install wine`
- Install winetricks with `brew install winetricks`
- (If you already have these installed, update with `brew update`, `brew upgrade wine` `brew upgrade winetricks`)
- Setup wine with `winecfg`
- Install the DirectSDK with `winetricks dxsdk_jun2010`
NOTE: At time of writing there is a bug in winetricks that will cause the DirectX SDK to not install correctly. See https://github.com/Winetricks/winetricks/issues/841
You can either modify your winetricks to fix that bug (`which winetricks`, and then find and replace the broken hash value), or use `winetricks d3dcompiler_43` instead and put a copy of `fxc.exe` from the DirectX SDK in the `builds/tools` directory (see `BuildShaders.targets` for details).
Required FNA components
-----------------------
You need to add the following directories at the same level as the solution file:
- "FNA" containing the FNA project from https://github.com/FNA-XNA/FNA
- "FNALibs" containing the FNA libraries from http://fna.flibitijibibo.com/archive/fnalibs.tar.bz2
At this point you should be able to open the solution file, and build and run the FNATemplate project.
Debugging on OSX
----------------
In order to run in the debugger on Visual Studio on OSX, you will need to add an environment variable:
- Right click the FNATemplate project
- Options
- Run -> Configurations -> Default
- Environment Variables -> Add
- "DYLD_LIBRARY_PATH" "./osx/"
You will need to repeat these steps for any new projects you create from the template (because they are per-user debugging settings, not part of the project file).
Using the CreateTemplate tool
-----------------------------
Use the CreateTemplate tool to create new versions of the FNATemplate (NOTE: Including any local modifications). This is easier than copying the files and fixing up names and GUIDs by hand.
The command line is:
`CreateTemplate [--template] <ProjectName> <SourceDirectory> <DestinationDirectory>`
You can use it to directly create new projects:
`CreateTemplate NewProject "X:\pathToThisSolution\FNATemplate" "X:\yourSolution\NewProject"`
Or you can create a Visual Studio template file, which itself can be used to create projects.
`CreateTemplate --template FNATemplate "X:\pathToThisSolution\FNATemplate" .`
To install the generated template in Visual Studio:
- Go to the output folder (containing the resulting .vstemplate file)
- Select all files in that folder (Ctrl + A)
- Add them to a zip (Right click -> Send To -> Compressed (zipped) folder)
- Move that zip file to the project templates directory for your platform (eg: "C:\Users\<USERNAME>\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#")
(NOTE: Ensure that the .vstemplate file is at the root of the resulting .zip file. Otherwise the template will not work.)
Note that the template requires the "FNA" and "FNALibs" directories as specified above, as well as the "build" directory. You will also need to add the FNA project to your solution.
Building and loading shaders
============================
FNA Template uses fxc.exe (from the DirectX SDK) to build shaders, rather than using a content pipleine. This produces raw .fxb files rather than the usual .xnb content files.
To add .fx (shader source) files to your project, add them and then set their Build Action to "Compile Shader" in the Properties window (typically the F4 key). (Set "Copy to Output Directory" to "Do not copy".)
To load a shader, read it directly from the .fxb file. For example:
`myEffect = new Effect(GraphicsDevice, File.ReadAllBytes(@"Effects/MyEffect.fxb"));`
An example shader is included in FNATemplate.
Note that if you are not creating your own shaders, you can safely delete the shader file and associated code from the template, and skip installing the DirectX SDK.
Building and loading other content
==================================
Other content is built using the MonoGame Content Pipeline. The .mgcb file in the template can be opened with the MonoGame Content Pipeline Tool.
Unlike MonoGame, simply create the content for the Windows platform.
Load content the same as you would with XNA or MonoGame. For example:
`font = Content.Load<SpriteFont>("Font");`
Distributing your game
======================
Please refer to https://github.com/FNA-XNA/FNA/wiki/3:-Distributing-FNA-Games

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<AvailableItemName Include="CompileShader" />
</ItemGroup>
<PropertyGroup>
<!-- WINDOWS: -->
<!-- 1) Use a provided tools\fxc.exe (Requires DirectX (June 2010) or the SDK) -->
<FxcCommandLine Condition="'$(FxcCommandLine)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(MSBuildThisFileDirectory)tools\fxc.exe')" >"$(MSBuildThisFileDirectory)tools\fxc.exe"</FxcCommandLine>
<!-- 2) Use the SDK version (Requires DirectX SDK (June 2010)) -->
<FxcCommandLine Condition="'$(FxcCommandLine)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe')" >"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe"</FxcCommandLine>
<!-- NON-WINDOWS (eg: OSX) (Requires wine is in PATH) -->
<!-- 1) Use a provided tools/fxc.exe (Requires "winetricks d3dcompiler_43" or "winetricks dxsdk_jun2010") -->
<FxcCommandLine Condition="'$(FxcCommandLine)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(MSBuildThisFileDirectory)tools\fxc.exe')" >wine "$(MSBuildThisFileDirectory)tools/fxc.exe"</FxcCommandLine>
<!-- 2) Use the SDK version (Requires "winetricks dxsdk_jun2010") -->
<FxcCommandLine Condition="'$(FxcCommandLine)' == '' AND '$(OS)' != 'Windows_NT' AND '$(WINEPREFIX)' != '' AND Exists('$(WINEPREFIX)/drive_c/Program Files/Microsoft DirectX SDK (June 2010)/Utilities/bin/x86/fxc.exe')" >wine "$(WINEPREFIX)/drive_c/Program Files/Microsoft DirectX SDK (June 2010)/Utilities/bin/x86/fxc.exe"</FxcCommandLine>
<FxcCommandLine Condition="'$(FxcCommandLine)' == '' AND '$(OS)' != 'Windows_NT' AND '$(WINEPREFIX)' != '' AND Exists('$(WINEPREFIX)/drive_c/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Utilities/bin/x86/fxc.exe')" >wine "$(WINEPREFIX)/drive_c/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Utilities/bin/x86/fxc.exe"</FxcCommandLine>
<FxcCommandLine Condition="'$(FxcCommandLine)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(HOME)/.wine/drive_c/Program Files/Microsoft DirectX SDK (June 2010)/Utilities/bin/x86/fxc.exe')" >wine "$(HOME)/.wine/drive_c/Program Files/Microsoft DirectX SDK (June 2010)/Utilities/bin/x86/fxc.exe"</FxcCommandLine>
<FxcCommandLine Condition="'$(FxcCommandLine)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(HOME)/.wine/drive_c/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Utilities/bin/x86/fxc.exe')" >wine "$(HOME)/.wine/drive_c/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Utilities/bin/x86/fxc.exe"</FxcCommandLine>
</PropertyGroup>
<!-- Reference:
https://stackoverflow.com/questions/3433200/msbuild-how-do-i-create-and-use-a-task-to-convert-content-items-at-build-time
Handy reload solution: https://stackoverflow.com/a/24837585/165500
-->
<Target Name="BuildShaders" BeforeTargets="Compile"
Inputs="@(CompileShader)"
Outputs="@(CompileShader -> '$(OutputPath)%(RelativeDir)%(Filename).fxb' )" >
<Error Text="Unable to find fxc.exe. Install DirectX SDK (June 2010). See the documentation for more details."
Condition="'$(FxcCommandLine)' == '' AND '$(OS)' == 'Windows_NT'" />
<Error Text="Unable to find fxc.exe. Install DirectX SDK (June 2010) using 'winetricks dxsdk_jun2010'. See the documentation for more details."
Condition="'$(FxcCommandLine)' == '' AND '$(OS)' != 'Windows_NT'" />
<!-- fxc doesn't know how to create directories: -->
<MakeDir Directories="$(OutputPath)%(CompileShader.RelativeDir)"/>
<Exec Command="$(FxcCommandLine) /nologo /Vd /T fx_2_0 /Fo &quot;$(OutputPath)%(CompileShader.RelativeDir)%(CompileShader.Filename).fxb&quot; &quot;%(CompileShader.Identity)&quot;" />
<Message Text="@(CompileShader -> '$(OutputPath)%(RelativeDir)%(Filename).fxb' )" Importance="High" />
<!-- Add to the cleaning list, so we know how to do rebuilds:
(NOTE: FileWrites gets written out to obj directory at some point, possbily after CoreCompile)
-->
<ItemGroup>
<FileWrites Include="@(CompileShader -> '$(OutputPath)%(RelativeDir)%(Filename).fxb' )"/>
</ItemGroup>
</Target>
<!-- Ensure that dependent projects are aware of generated shaders:
Reference: https://stackoverflow.com/questions/14322391/msbuild-to-copy-dynamically-generated-files-as-part-of-project-dependency
Also: https://stackoverflow.com/questions/44752139/how-to-make-msbuild-correctly-track-files-generated-with-an-external-tool-across
-->
<Target Name="IncludeShaders" BeforeTargets="GetCopyToOutputDirectoryItems">
<ItemGroup>
<CompiledShaders Include="@(CompileShader -> '$(OutputPath)%(RelativeDir)%(Filename).fxb' )">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>%(RelativeDir)%(FileName).fxb</TargetPath>
</CompiledShaders>
<AllItemsFullPathWithTargetPath Include="@(CompiledShaders->'%(FullPath)')" />
</ItemGroup>
</Target>
</Project>

20
build/CopyFNALibs.targets Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Content Include="..\FNALibs\x86\**\*.*" Condition="'$(OS)' == 'Windows_NT' AND '$(Platform)' != 'x64'">
<Link>x86\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\FNALibs\x64\**\*.*" Condition="'$(OS)' == 'Windows_NT' AND '$(Platform)' != 'x86'">
<Link>x64\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\FNALibs\osx\**\*.*" Condition="'$(OS)' != 'Windows_NT'" >
<Link>osx\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>