mirror of
https://github.com/Ellpeck/Contentless.git
synced 2024-11-22 07:23:30 +01:00
add build and explanation
This commit is contained in:
parent
8748a05025
commit
20078e5c27
47 changed files with 189709 additions and 6 deletions
BIN
Build/ATI.TextureConverter.dll
Normal file
BIN
Build/ATI.TextureConverter.dll
Normal file
Binary file not shown.
5
Build/ATI.TextureConverter.dll.config
Normal file
5
Build/ATI.TextureConverter.dll.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?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>
|
BIN
Build/Assimp64.dll
Normal file
BIN
Build/Assimp64.dll
Normal file
Binary file not shown.
BIN
Build/AssimpNet.dll
Normal file
BIN
Build/AssimpNet.dll
Normal file
Binary file not shown.
5
Build/AssimpNet.dll.config
Normal file
5
Build/AssimpNet.dll.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<configuration>
|
||||||
|
<dllmap os="macos" dll="assimp.dll" target="libassimp.dylib"/>
|
||||||
|
<dllmap os="linux" dll="assimp.dll" target="libassimp.so"/>
|
||||||
|
</configuration>
|
||||||
|
|
BIN
Build/AssimpNet.pdb
Normal file
BIN
Build/AssimpNet.pdb
Normal file
Binary file not shown.
9581
Build/AssimpNet.xml
Normal file
9581
Build/AssimpNet.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
Build/Contentless.exe
Normal file
BIN
Build/Contentless.exe
Normal file
Binary file not shown.
6
Build/Contentless.exe.config
Normal file
6
Build/Contentless.exe.config
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
BIN
Build/Contentless.pdb
Normal file
BIN
Build/Contentless.pdb
Normal file
Binary file not shown.
BIN
Build/CppNet.dll
Normal file
BIN
Build/CppNet.dll
Normal file
Binary file not shown.
BIN
Build/FreeImage.dll
Normal file
BIN
Build/FreeImage.dll
Normal file
Binary file not shown.
BIN
Build/MonoGame.Framework.Content.Pipeline.dll
Normal file
BIN
Build/MonoGame.Framework.Content.Pipeline.dll
Normal file
Binary file not shown.
BIN
Build/MonoGame.Framework.Content.Pipeline.pdb
Normal file
BIN
Build/MonoGame.Framework.Content.Pipeline.pdb
Normal file
Binary file not shown.
7294
Build/MonoGame.Framework.Content.Pipeline.xml
Normal file
7294
Build/MonoGame.Framework.Content.Pipeline.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
Build/MonoGame.Framework.dll
Normal file
BIN
Build/MonoGame.Framework.dll
Normal file
Binary file not shown.
BIN
Build/MonoGame.Framework.pdb
Normal file
BIN
Build/MonoGame.Framework.pdb
Normal file
Binary file not shown.
18563
Build/MonoGame.Framework.xml
Normal file
18563
Build/MonoGame.Framework.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
Build/Nvidia.TextureTools.dll
Normal file
BIN
Build/Nvidia.TextureTools.dll
Normal file
Binary file not shown.
4
Build/Nvidia.TextureTools.dll.config
Normal file
4
Build/Nvidia.TextureTools.dll.config
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<configuration>
|
||||||
|
<dllmap os="macos" dll="nvtt.dll" target="libnvtt.dylib"/>
|
||||||
|
<dllmap os="linux" dll="nvtt.dll" target="libnvtt.so"/>
|
||||||
|
</configuration>
|
BIN
Build/PVRTexLibNET.dll
Normal file
BIN
Build/PVRTexLibNET.dll
Normal file
Binary file not shown.
5
Build/PVRTexLibNET.dll.config
Normal file
5
Build/PVRTexLibNET.dll.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?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>
|
BIN
Build/PVRTexLibWrapper.dll
Normal file
BIN
Build/PVRTexLibWrapper.dll
Normal file
Binary file not shown.
BIN
Build/SharpDX.D3DCompiler.dll
Normal file
BIN
Build/SharpDX.D3DCompiler.dll
Normal file
Binary file not shown.
6789
Build/SharpDX.D3DCompiler.xml
Normal file
6789
Build/SharpDX.D3DCompiler.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
Build/SharpDX.DXGI.dll
Normal file
BIN
Build/SharpDX.DXGI.dll
Normal file
Binary file not shown.
10091
Build/SharpDX.DXGI.xml
Normal file
10091
Build/SharpDX.DXGI.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
Build/SharpDX.Direct3D11.dll
Normal file
BIN
Build/SharpDX.Direct3D11.dll
Normal file
Binary file not shown.
37725
Build/SharpDX.Direct3D11.xml
Normal file
37725
Build/SharpDX.Direct3D11.xml
Normal file
File diff suppressed because one or more lines are too long
BIN
Build/SharpDX.MediaFoundation.dll
Normal file
BIN
Build/SharpDX.MediaFoundation.dll
Normal file
Binary file not shown.
53316
Build/SharpDX.MediaFoundation.xml
Normal file
53316
Build/SharpDX.MediaFoundation.xml
Normal file
File diff suppressed because one or more lines are too long
BIN
Build/SharpDX.XAudio2.dll
Normal file
BIN
Build/SharpDX.XAudio2.dll
Normal file
Binary file not shown.
5989
Build/SharpDX.XAudio2.xml
Normal file
5989
Build/SharpDX.XAudio2.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
Build/SharpDX.XInput.dll
Normal file
BIN
Build/SharpDX.XInput.dll
Normal file
Binary file not shown.
1356
Build/SharpDX.XInput.xml
Normal file
1356
Build/SharpDX.XInput.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
Build/SharpDX.dll
Normal file
BIN
Build/SharpDX.dll
Normal file
Binary file not shown.
38946
Build/SharpDX.xml
Normal file
38946
Build/SharpDX.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
Build/SharpFont.dll
Normal file
BIN
Build/SharpFont.dll
Normal file
Binary file not shown.
4
Build/SharpFont.dll.config
Normal file
4
Build/SharpFont.dll.config
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<dllmap dll="freetype6" os="osx" target="libfreetype.6.dylib" />
|
||||||
|
</configuration>
|
BIN
Build/ffmpeg.exe
Normal file
BIN
Build/ffmpeg.exe
Normal file
Binary file not shown.
BIN
Build/ffprobe.exe
Normal file
BIN
Build/ffprobe.exe
Normal file
Binary file not shown.
BIN
Build/freetype6.dll
Normal file
BIN
Build/freetype6.dll
Normal file
Binary file not shown.
BIN
Build/libmojoshader_64.dll
Normal file
BIN
Build/libmojoshader_64.dll
Normal file
Binary file not shown.
BIN
Build/nvtt.dll
Normal file
BIN
Build/nvtt.dll
Normal file
Binary file not shown.
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -9,14 +9,21 @@ namespace Contentless {
|
||||||
public static class Program {
|
public static class Program {
|
||||||
|
|
||||||
private static readonly ImporterInfo[] Importers = GetContentImporters().ToArray();
|
private static readonly ImporterInfo[] Importers = GetContentImporters().ToArray();
|
||||||
private static readonly string[] ExcludedFolders = {"bin", "obj"};
|
private static readonly string[] ExcludedFolders = {"bin/", "obj/"};
|
||||||
|
|
||||||
public static void Main(string[] args) {
|
public static void Main(string[] args) {
|
||||||
|
if (args.Length != 1) {
|
||||||
|
Console.WriteLine("Please specify the location of the content file you want to use");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var contentFile = new FileInfo(Path.Combine(Environment.CurrentDirectory, args[0]));
|
var contentFile = new FileInfo(Path.Combine(Environment.CurrentDirectory, args[0]));
|
||||||
if (!contentFile.Exists) {
|
if (!contentFile.Exists) {
|
||||||
Console.WriteLine($"Unable to find content file {contentFile}");
|
Console.WriteLine($"Unable to find content file {contentFile}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Console.WriteLine($"Using content file {contentFile}");
|
||||||
var content = ReadContent(contentFile);
|
var content = ReadContent(contentFile);
|
||||||
|
|
||||||
var changed = false;
|
var changed = false;
|
||||||
|
@ -24,11 +31,10 @@ namespace Contentless {
|
||||||
// is the file the content file?
|
// is the file the content file?
|
||||||
if (file.Name == contentFile.Name)
|
if (file.Name == contentFile.Name)
|
||||||
continue;
|
continue;
|
||||||
var relative = Path.GetRelativePath(contentFile.Directory.FullName, file.FullName).Replace("\\", "/");
|
var relative = GetRelativePath(contentFile.Directory.FullName, file.FullName);
|
||||||
|
|
||||||
// is the file in an excluded directory?
|
// is the file in an excluded directory?
|
||||||
var dirName = file.DirectoryName.Replace("\\", "/");
|
if (ExcludedFolders.Any(e => relative.Contains(e))) {
|
||||||
if (ExcludedFolders.Any(e => dirName.Contains(e))) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,6 +113,15 @@ namespace Contentless {
|
||||||
Console.WriteLine($"Adding file {relative} with importer {importer.Type.Name} and processor {importer.Importer.DefaultProcessor}");
|
Console.WriteLine($"Adding file {relative} with importer {importer.Type.Name} and processor {importer.Importer.DefaultProcessor}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string GetRelativePath(string relativeTo, string path) {
|
||||||
|
relativeTo = relativeTo.Replace("\\", "/");
|
||||||
|
path = path.Replace("\\", "/");
|
||||||
|
|
||||||
|
if (!relativeTo.EndsWith("/"))
|
||||||
|
relativeTo += '/';
|
||||||
|
return path.Replace(relativeTo, "");
|
||||||
|
}
|
||||||
|
|
||||||
private class ImporterInfo {
|
private class ImporterInfo {
|
||||||
|
|
||||||
public readonly ContentImporterAttribute Importer;
|
public readonly ContentImporterAttribute Importer;
|
||||||
|
|
11
README.md
11
README.md
|
@ -1,2 +1,11 @@
|
||||||
# Contentless
|
# Contentless
|
||||||
A commandline tool for MonoGame that automatically handles adding assets to the Content Pipeline project
|
A commandline tool for MonoGame that automatically handles adding assets to the Content Pipeline project so you don't have to use their horrible interface.
|
||||||
|
|
||||||
|
# How to use
|
||||||
|
Clone this repository or download its `Build` folder which contains a build of Contentless. Then, 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.
|
||||||
|
```xml
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
<Exec Command="..\..\Contentless\Build\Contentless.exe Content/Content.mgcb" />
|
||||||
|
</Target>
|
||||||
|
```
|
||||||
|
Contentless will now automatically add any content files from your `Content` directory and subdirectories (excluding `bin` and `obj`) 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.
|
Loading…
Reference in a new issue