mirror of
https://github.com/Ellpeck/Contentless.git
synced 2024-11-27 17:28:35 +01:00
Merge branch 'main' into fix-build-task
# Conflicts: # Contentless/Program.cs
This commit is contained in:
commit
cd2cf5aa77
6 changed files with 18 additions and 17 deletions
|
@ -11,10 +11,10 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MonoGame.Framework.Content.Pipeline" Version="3.8.0.1641">
|
<PackageReference Include="MonoGame.Framework.Content.Pipeline" Version="3.8.1.303">
|
||||||
<PrivateAssets>All</PrivateAssets>
|
<PrivateAssets>All</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641">
|
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303">
|
||||||
<PrivateAssets>All</PrivateAssets>
|
<PrivateAssets>All</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1">
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<repository type="git" url="https://github.com/Ellpeck/Contentless" />
|
<repository type="git" url="https://github.com/Ellpeck/Contentless" />
|
||||||
<readme>README.md</readme>
|
<readme>README.md</readme>
|
||||||
<icon>Logo.png</icon>
|
<icon>Logo.png</icon>
|
||||||
<version>3.0.7</version>
|
<version>3.1.2</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<group targetFramework="net8.0" />
|
<group targetFramework="net8.0" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -13,16 +13,16 @@ namespace Contentless;
|
||||||
|
|
||||||
public static class Program {
|
public static class Program {
|
||||||
|
|
||||||
public static void Main(string[] args) {
|
public static int Main(string[] args) {
|
||||||
if (args.Length < 1) {
|
if (args.Length < 1) {
|
||||||
Console.Error.WriteLine("Please specify the location of the content file you want to use");
|
Console.Error.WriteLine("Please specify the location of the content file you want to use");
|
||||||
return;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
var contentFile = new FileInfo(Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, args[0])));
|
var contentFile = new FileInfo(Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, args[0])));
|
||||||
if (!contentFile.Exists) {
|
if (!contentFile.Exists || contentFile.Extension != ".mgcb") {
|
||||||
Console.Error.WriteLine($"Unable to find content file {contentFile}");
|
Console.Error.WriteLine($"Unable to find valid content file at {contentFile}");
|
||||||
return;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine($"Using content file {contentFile}");
|
Console.WriteLine($"Using content file {contentFile}");
|
||||||
|
@ -38,6 +38,7 @@ public static class Program {
|
||||||
Console.WriteLine($"Using config from {configFile}");
|
Console.WriteLine($"Using config from {configFile}");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Console.Error.WriteLine($"Error loading config from {configFile}: {e}");
|
Console.Error.WriteLine($"Error loading config from {configFile}: {e}");
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Console.WriteLine("Using default config");
|
Console.WriteLine("Using default config");
|
||||||
|
@ -50,6 +51,10 @@ public static class Program {
|
||||||
if (config.References.Length > 0) {
|
if (config.References.Length > 0) {
|
||||||
if (args.Length > 1) {
|
if (args.Length > 1) {
|
||||||
var csprojFullPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, args[1]));
|
var csprojFullPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, args[1]));
|
||||||
|
if (!File.Exists(csprojFullPath) || Path.GetExtension(csprojFullPath) != ".csproj") {
|
||||||
|
Console.Error.WriteLine($"Unable to find valid project file at {contentFile}");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
Program.ExtractVersions(csprojFullPath, referencesVersions);
|
Program.ExtractVersions(csprojFullPath, referencesVersions);
|
||||||
var settings = Settings.LoadDefaultSettings(Path.GetDirectoryName(csprojFullPath));
|
var settings = Settings.LoadDefaultSettings(Path.GetDirectoryName(csprojFullPath));
|
||||||
packagesFolder = SettingsUtility.GetGlobalPackagesFolder(settings);
|
packagesFolder = SettingsUtility.GetGlobalPackagesFolder(settings);
|
||||||
|
@ -196,6 +201,7 @@ public static class Program {
|
||||||
Console.WriteLine("Wrote changes to content file");
|
Console.WriteLine("Wrote changes to content file");
|
||||||
}
|
}
|
||||||
Console.Write("Done");
|
Console.Write("Done");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SafeAssemblyLoad(string refPath) {
|
private static void SafeAssemblyLoad(string refPath) {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#-------------------------------- References --------------------------------#
|
#-------------------------------- References --------------------------------#
|
||||||
|
|
||||||
/reference:C:/Users/me/.nuget/packages/monogame.extended.content.pipeline/3.8.0/tools/MonoGame.Extended.Content.Pipeline.dll
|
/reference:C:/Users/me/.nuget/packages/monogame.extended.content.pipeline/3.9.0-alpha0093/tools/MonoGame.Extended.Content.Pipeline.dll
|
||||||
|
|
||||||
#---------------------------------- Content ---------------------------------#
|
#---------------------------------- Content ---------------------------------#
|
||||||
|
|
||||||
|
@ -42,12 +42,6 @@
|
||||||
/processor:TiledMapProcessor
|
/processor:TiledMapProcessor
|
||||||
/build:Tiled/Map.tmx
|
/build:Tiled/Map.tmx
|
||||||
|
|
||||||
#begin Tiled/Tiles.png
|
|
||||||
/importer:TextureImporter
|
|
||||||
/processor:TextureProcessor
|
|
||||||
/processorParam:TextureFormat=NoChange
|
|
||||||
/build:Tiled/Tiles.png
|
|
||||||
|
|
||||||
#begin Tiled/Tileset.tsx
|
#begin Tiled/Tileset.tsx
|
||||||
/importer:TiledMapTilesetImporter
|
/importer:TiledMapTilesetImporter
|
||||||
/processor:TiledMapTilesetProcessor
|
/processor:TiledMapTilesetProcessor
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"obj/",
|
"obj/",
|
||||||
"bin/",
|
"bin/",
|
||||||
"Ex*.png"
|
"Ex*.png",
|
||||||
|
"Tiled/*.png"
|
||||||
],
|
],
|
||||||
"logSkipped": true,
|
"logSkipped": true,
|
||||||
"references": ["MonoGame.Extended.Content.Pipeline"],
|
"references": ["MonoGame.Extended.Content.Pipeline"],
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MonoGame.Extended.Content.Pipeline" Version="3.8.0" />
|
<PackageReference Include="MonoGame.Extended.Content.Pipeline" Version="3.9.0-alpha0093" />
|
||||||
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
|
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue