forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a crash when building content in xbuild (MonoGame#5897)
* PR MonoGame#4997 Introduced a crash in xbuild. This is because of a bug in xbuild where `<ItemGroup>` with Metadata are not supported. Instead you need to use `CreateItem`. This commit fixes that issue. There are also other issues which need to be resolved with MonoGame#4997. That said this commit also adds a new unit test for the content system. There is a sample project which we build as part of the unit test. We check the output to make sure it is in the right place. This test should be expaned on to include tests for Shared Projects and other senarios that users use. It should allow use to catch issues such as what happened in MonoGame#4997 at the point the PR is opened. * Updated Definiton to copy MacOS files on Mac * Ignore a couple of Image loading tests as the formats are not supported * Enable Tests on MacOS * Fix Tests running on MacOs * Rmeove the use of mdtool. It is obsolete * More fixes for the Content Builder Targets * More fixes for the Content Builder Targets * More fixes for the Content Builder Targets * More fixes for the Content Builder Targets * More fixes for the Content Builder Targets * Added MonoGame.Build.Tasks to the project. * Added some documentation * Fixed some errors in the docs * PR MonoGame#4997 Introduced a crash in xbuild. This is because of a bug in xbuild where `<ItemGroup>` with Metadata are not supported. Instead you need to use `CreateItem`. This commit fixes that issue. There are also other issues which need to be resolved with MonoGame#4997. That said this commit also adds a new unit test for the content system. There is a sample project which we build as part of the unit test. We check the output to make sure it is in the right place. This test should be expaned on to include tests for Shared Projects and other senarios that users use. It should allow use to catch issues such as what happened in MonoGame#4997 at the point the PR is opened. * Updated Definiton to copy MacOS files on Mac * Ignore a couple of Image loading tests as the formats are not supported * Enable Tests on MacOS * Fix Tests running on MacOs * Rmeove the use of mdtool. It is obsolete * More fixes for the Content Builder Targets * More fixes for the Content Builder Targets * More fixes for the Content Builder Targets * More fixes for the Content Builder Targets * More fixes for the Content Builder Targets * Fixed msbuild test on windows * Fixed windows tests * Fixed Task so we don't get an extra folder
- Loading branch information
1 parent
15464a3
commit 670fb07
Showing
14 changed files
with
391 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Name="MonoGame.Build.Tasks" Path="Tools/MonoGame.Build.Tasks" Type="Library" Platforms="Windows,MacOS,Linux"> | ||
|
||
<!-- Common assembly references --> | ||
<References> | ||
<Reference Include="System" /> | ||
<Reference Include="Microsoft.Build" /> | ||
<Reference Include="Microsoft.Build.Framework" /> | ||
<Reference Include="Microsoft.Build.Tasks.v4.0" /> | ||
<Reference Include="Microsoft.Build.Utilities.v4.0" /> | ||
</References> | ||
|
||
<Properties> | ||
|
||
<LangVersion>Default</LangVersion> | ||
<NoWarn>1591,0436</NoWarn> | ||
<MonoDevelopPoliciesFile>Build/MonoDevelopPolicies.xml</MonoDevelopPoliciesFile> | ||
|
||
<RootNamespace>MonoGame.Build.Tasks</RootNamespace> | ||
<PlatformSpecificOutputFolder>True</PlatformSpecificOutputFolder> | ||
|
||
<FrameworkVersions> | ||
<Version>v4.5</Version> | ||
</FrameworkVersions> | ||
|
||
</Properties> | ||
|
||
<Files> | ||
|
||
<Compile Include="Tasks\CollectContentReferences.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
|
||
</Files> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?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)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>8.0.30703</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{1A3C19CC-557D-4009-82D6-92B511EA4172}</ProjectGuid> | ||
<OutputType>WinExe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>BuildSimpleProject</RootNamespace> | ||
<AssemblyName>BuildSimpleProject</AssemblyName> | ||
<FileAlignment>512</FileAlignment> | ||
<MonoGamePlatform>DesktopGL</MonoGamePlatform> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> | ||
<DebugSymbols>true</DebugSymbols> | ||
<OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE;LINUX</DefineConstants> | ||
<DebugType>full</DebugType> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<ErrorReport>prompt</ErrorReport> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'"> | ||
<OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath> | ||
<DefineConstants>TRACE;LINUX</DefineConstants> | ||
<Optimize>true</Optimize> | ||
<DebugType>pdbonly</DebugType> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<ErrorReport>prompt</ErrorReport> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="System" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<MonoGameContentReference Include="Content\Content.mgcb" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<Import Project="..\..\MonoGame.Content.Builder.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
#----------------------------- Global Properties ----------------------------# | ||
|
||
/outputDir:bin/$(Platform) | ||
/intermediateDir:obj/$(Platform) | ||
/platform:DesktopGL | ||
/config: | ||
/profile:Reach | ||
/compress:False | ||
|
||
#-------------------------------- References --------------------------------# | ||
|
||
|
||
#---------------------------------- Content ---------------------------------# | ||
|
||
#begin ContentFont.spritefont | ||
/importer:FontDescriptionImporter | ||
/processor:FontDescriptionProcessor | ||
/processorParam:PremultiplyAlpha=True | ||
/processorParam:TextureFormat=Compressed | ||
/build:ContentFont.spritefont | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>Arial</FontName> | ||
|
||
<!-- | ||
Size is a float value, measured in points. Modify this value to change | ||
the size of the font. | ||
--> | ||
<Size>12</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> </Start> | ||
<End>~</End> | ||
</CharacterRegion> | ||
</CharacterRegions> | ||
</Asset> | ||
</XnaContent> |
Oops, something went wrong.