Merge branch 'main' into fix-build-task

# Conflicts:
#	Contentless/Program.cs
This commit is contained in:
Gandifil 2023-12-22 11:17:17 +03:00
commit cd2cf5aa77
6 changed files with 18 additions and 17 deletions

View file

@ -11,10 +11,10 @@
</PropertyGroup>
<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>
</PackageReference>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641">
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1">

View file

@ -10,7 +10,7 @@
<repository type="git" url="https://github.com/Ellpeck/Contentless" />
<readme>README.md</readme>
<icon>Logo.png</icon>
<version>3.0.7</version>
<version>3.1.2</version>
<dependencies>
<group targetFramework="net8.0" />
</dependencies>

View file

@ -13,16 +13,16 @@ namespace Contentless;
public static class Program {
public static void Main(string[] args) {
public static int Main(string[] args) {
if (args.Length < 1) {
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])));
if (!contentFile.Exists) {
Console.Error.WriteLine($"Unable to find content file {contentFile}");
return;
if (!contentFile.Exists || contentFile.Extension != ".mgcb") {
Console.Error.WriteLine($"Unable to find valid content file at {contentFile}");
return 1;
}
Console.WriteLine($"Using content file {contentFile}");
@ -38,6 +38,7 @@ public static class Program {
Console.WriteLine($"Using config from {configFile}");
} catch (Exception e) {
Console.Error.WriteLine($"Error loading config from {configFile}: {e}");
return 1;
}
} else {
Console.WriteLine("Using default config");
@ -50,6 +51,10 @@ public static class Program {
if (config.References.Length > 0) {
if (args.Length > 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);
var settings = Settings.LoadDefaultSettings(Path.GetDirectoryName(csprojFullPath));
packagesFolder = SettingsUtility.GetGlobalPackagesFolder(settings);
@ -196,6 +201,7 @@ public static class Program {
Console.WriteLine("Wrote changes to content file");
}
Console.Write("Done");
return 0;
}
private static void SafeAssemblyLoad(string refPath) {

View file

@ -10,7 +10,7 @@
#-------------------------------- 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 ---------------------------------#
@ -42,12 +42,6 @@
/processor:TiledMapProcessor
/build:Tiled/Map.tmx
#begin Tiled/Tiles.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:TextureFormat=NoChange
/build:Tiled/Tiles.png
#begin Tiled/Tileset.tsx
/importer:TiledMapTilesetImporter
/processor:TiledMapTilesetProcessor

View file

@ -2,7 +2,8 @@
"exclude": [
"obj/",
"bin/",
"Ex*.png"
"Ex*.png",
"Tiled/*.png"
],
"logSkipped": true,
"references": ["MonoGame.Extended.Content.Pipeline"],

View file

@ -6,7 +6,7 @@
</PropertyGroup>
<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" />
</ItemGroup>