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>
|
||||
|
||||
<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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
"exclude": [
|
||||
"obj/",
|
||||
"bin/",
|
||||
"Ex*.png"
|
||||
"Ex*.png",
|
||||
"Tiled/*.png"
|
||||
],
|
||||
"logSkipped": true,
|
||||
"references": ["MonoGame.Extended.Content.Pipeline"],
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue