Made Contentless a nuget package

This commit is contained in:
Ellpeck 2019-11-07 01:42:07 +01:00
parent 8bbc6cba33
commit 9f7e4e78f4
51 changed files with 68 additions and 189694 deletions

Binary file not shown.

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<dllmap os="linux" dll="TextureConverter.dll" target="libTextureConverter.so"/>
<dllmap os="osx" dll="TextureConverter.dll" target="libTextureConverter.dylib"/>
</configuration>

Binary file not shown.

Binary file not shown.

View file

@ -1,5 +0,0 @@
<configuration>
<dllmap os="macos" dll="assimp.dll" target="libassimp.dylib"/>
<dllmap os="linux" dll="assimp.dll" target="libassimp.so"/>
</configuration>

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

View file

@ -1,4 +0,0 @@
<configuration>
<dllmap os="macos" dll="nvtt.dll" target="libnvtt.dylib"/>
<dllmap os="linux" dll="nvtt.dll" target="libnvtt.so"/>
</configuration>

Binary file not shown.

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<dllmap os="linux" dll="PVRTexLibWrapper.dll" cpu="x86-64" target="libPVRTexLibWrapper.so"/>
<dllmap os="osx" dll="PVRTexLibWrapper.dll" target="libPVRTexLibWrapper.dylib"/>
</configuration>

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<dllmap dll="freetype6" os="osx" target="libfreetype.6.dylib" />
</configuration>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -2,15 +2,26 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net462</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<NuspecFile>Contentless.nuspec</NuspecFile>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\MonoGame\MonoGame.Framework.Content.Pipeline\MonoGame.Framework.Content.Pipeline.Windows.csproj" />
<ProjectReference Include="..\MonoGame\MonoGame.Framework.Content.Pipeline\MonoGame.Framework.Content.Pipeline.Windows.csproj">
<PrivateAssets>All</PrivateAssets>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="System.ValueTuple" Version="4.5.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>Contentless</id>
<version>2.0.1</version>
<authors>Ellpeck</authors>
<description>A tool for MonoGame that automatically handles adding assets to the Content Pipeline project</description>
<tags>monogame mono xna content pipeline mgcb builder tool library</tags>
<projectUrl>https://github.com/Ellpeck/Contentless</projectUrl>
<licenseUrl>https://github.com/Ellpeck/Contentless/blob/master/LICENSE</licenseUrl>
<repository type="git" url="https://github.com/Ellpeck/Contentless"/>
<readme>README.md</readme>
</metadata>
<files>
<file src="../README.md" target="README.md"/>
<file src="_._" target="lib/net462/"/>
<file src="Contentless.targets" target="build/Contentless.targets"/>
<file src="bin\Debug\net462\**\*" target="tools/"/>
</files>
</package>

View file

@ -0,0 +1,5 @@
<Project>
<Target Name="Contentless" BeforeTargets="BeforeBuild">
<Exec Command="$(MSBuildThisFileDirectory)/../tools/Contentless.exe @(MonoGameContentReference)"/>
</Target>
</Project>

0
Contentless/_._ Normal file
View file

@ -1 +1 @@
Subproject commit 431271a92c3ebc2a6b6811fde09376865b512240
Subproject commit 97708388e9adf6cb2ff66171ed0be5d4183e6b63

View file

@ -1,32 +1,42 @@
# Contentless
A commandline tool for MonoGame that automatically handles adding assets to the Content Pipeline project so you don't have to use their interface to add every content file manually.
A tool for MonoGame that automatically handles adding assets to the Content Pipeline project so you don't have to use their interface to add every content file manually.
# How to use
Clone this repository or download a build from the [Releases](https://github.com/Ellpeck/Contentless/releases) tab.
Next, add Contentless to your build process by adding the following task to your `.csproj` file. Note that you might have to change the paths to fit your project's setup.
To use Contentless, you first have to add it to your project, either through your NuGet package manager or by adding it to your `.csproj` file as follows. Keep in mind to update the `Version` to the most recent one. You can find the package on the [NuGet website](https://www.nuget.org/packages/Contentless/) as well.
```xml
<Target Name="Contentless" BeforeTargets="BeforeBuild">
<Exec Command="..\..\Contentless\Build\Contentless.exe Content/Content.mgcb" />
</Target>
<ItemGroup>
<PackageReference Include="Contentless" Version="VERSION" />
</ItemGroup>
```
Next, you need to find the reference to your `Content.mgcb` file in your `.csproj` file or create one if there isn't already one present. The reference's type should be `MonoGameContentReference` so that Contentless can identify it correctly. If you're using the [MonoGame Content Builder](https://www.nuget.org/packages/MonoGame.Content.Builder/) alongside Contentless, this setting should already be applied.
```xml
<ItemGroup>
<MonoGameContentReference Include="Content\Content.mgcb" />
</ItemGroup>
```
Contentless will now automatically add any content files from your `Content` directory and subdirectories to your `Content.mgcb` file if they haven't already been added either manually or by Contentless. No existing items' configurations will be overridden, so you can still use the Content Pipeline tool to modify any settings as well.
# Configuring
To add a configuration file to Contentless, simply create a file named `Contentless.json` in the same directory as your `Content.mgcb` file. You can use the config to change several options. For reference, here is a configuration file with the default values that are used if no config is supplied, along with some documentation:
To add a configuration file to Contentless, simply create a file named `Contentless.json` in the same directory as your `Content.mgcb` file. You can use the config to change several options:
```json5
{
// The list of files that should be excluded. Can use regex
// The list of files that should be excluded. Can use regex.
// Default: ["obj/", "bin/"]
"exclude": [
"obj/",
"bin/"
],
// If any files that were skipped without errors should be logged (Files that already have entries or files that were ignored)
// Default: true
"logSkipped": true,
// The list of files that should use a different importer than the one that Contentless automatically determined. Can use regex
// Default: {}
"overrides": {
// Entries are file regexes mapped to importer names, for example: ".json": "JsonImporter"
// If you specify "Copy" as the importer, the file's Build Mode will be set to Copy rather than Build, for example: ".txt": "Copy"
// Example: Make all files matching the regex ".json" use the importer "JsonImporter"
".json": "JsonImporter",
// Example: Specifying "Copy" as the importer sets the file's Build Mode to "Copy" instead of "Build"
".txt": "Copy"
}
}
```

View file

@ -6,6 +6,13 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Contentless" Version="2.0.1" />
<PackageReference Include="MonoGame.Extended.Content.Pipeline" Version="3.7.0" />
</ItemGroup>
<ItemGroup>
<None Remove="Content\Content.mgcb" />
<MonoGameContentReference Include="Content\Content.mgcb" />
</ItemGroup>
</Project>