From b341710599858c2a01e186243f0829fa071b8dd8 Mon Sep 17 00:00:00 2001 From: Taylor Love Date: Sat, 24 Feb 2024 14:40:18 -0800 Subject: [PATCH] + Disable code signing :( + Bump MC version string + Rename terracotta to clay + Fix publish.bat file for generating releases + Add docs for building releases --- dev-docs/how-to-build-a-release.md | 18 ++++++++++ dev-docs/how-to-deploy-api.md | 2 +- src/PixelStacker.Logic/IO/Config/Constants.cs | 2 +- src/PixelStacker.Logic/Model/Materials.cs | 34 +++++++++---------- src/PixelStacker/PixelStacker.csproj | 4 +-- .../Properties/PublishProfiles/publish.bat | 7 ++-- src/PixelStacker/UI/MainForm.Main.cs | 2 +- 7 files changed, 44 insertions(+), 25 deletions(-) create mode 100644 dev-docs/how-to-build-a-release.md diff --git a/dev-docs/how-to-build-a-release.md b/dev-docs/how-to-build-a-release.md new file mode 100644 index 0000000..e957a27 --- /dev/null +++ b/dev-docs/how-to-build-a-release.md @@ -0,0 +1,18 @@ +# How to build a release +This guide covers the build and packaging process for deploying the desktop application. + +## Prerequisites: +1. Visual Studio 2022 installed + +## Building +1. Open up developer command prompt in VS via: Tools > Command Line > Developer Command prompt +2. Type into console, `%cd%/PixelStacker/Properties/PublishProfiles/publish.bat` +3. Your files will be zipped into `%cd%/PixelStacker/bin/publish` + +## Code signing +If you want to add code signing to the process, that is totally doable. I used to have it working, but in order to continue doing so it requires me to pay money for a code signing certificate. To re-enable code signing, you must add the following lines to the bottom of the PixelStacker.csproj file. Then, make sure you have the code signing tool installed, and follow any other steps from certum or your code signing certificate provider of choice. +``` + + + +``` \ No newline at end of file diff --git a/dev-docs/how-to-deploy-api.md b/dev-docs/how-to-deploy-api.md index 3d03e25..6b638f0 100644 --- a/dev-docs/how-to-deploy-api.md +++ b/dev-docs/how-to-deploy-api.md @@ -2,7 +2,7 @@ This guide covers the deployment process for deploying the API project onto a linux server. [Try out the API](https://taylorlove.info/projects/pixelstacker/swagger/index.html) -## Preresiquits: +## Prerequisites: 1. Ubuntu OS installed 2. .NET 6.0 or higher installed on the Ubuntu OS 4. Visual Studio 22 or higher on your local machine. diff --git a/src/PixelStacker.Logic/IO/Config/Constants.cs b/src/PixelStacker.Logic/IO/Config/Constants.cs index 86b7cbf..caeb9d7 100644 --- a/src/PixelStacker.Logic/IO/Config/Constants.cs +++ b/src/PixelStacker.Logic/IO/Config/Constants.cs @@ -3,7 +3,7 @@ public static class Constants { public const int DisplayRefreshIntervalMs = 10; - public const string Version = "1.19.1b"; + public const string Version = "1.20.4"; public const string Website = "https://taylorlove.info/pixelstacker"; [System.Obsolete("Switch to using DefaultTextureSize, bc that is what this should represent.", true)] public const int TextureSize = 16; diff --git a/src/PixelStacker.Logic/Model/Materials.cs b/src/PixelStacker.Logic/Model/Materials.cs index c44ec2f..120e8a3 100644 --- a/src/PixelStacker.Logic/Model/Materials.cs +++ b/src/PixelStacker.Logic/Model/Materials.cs @@ -123,23 +123,23 @@ public static List List new Material("1.7", false, "Powder", "SAND_00", "zzSand", 12, 0, Textures.sand, Textures.sand, $"minecraft:{nameof(Textures.sand)}", $"minecraft:{nameof(Textures.sand)}", "minecraft:sand"), new Material("1.7", false, "Powder", "SAND_01", "zzSand Red", 12, 1, Textures.red_sand, Textures.red_sand, $"minecraft:{nameof(Textures.red_sand)}", $"minecraft:{nameof(Textures.red_sand)}", "minecraft:sand"), - new Material("1.7", false, "Clay", "TERRA_00", "White Clay", 159, 0, Textures.white_terracotta, Textures.white_terracotta, $"minecraft:{nameof(Textures.white_terracotta)}", $"minecraft:{nameof(Textures.white_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_01", "Orange Clay", 159, 1, Textures.orange_terracotta, Textures.orange_terracotta, $"minecraft:{nameof(Textures.orange_terracotta)}", $"minecraft:{nameof(Textures.orange_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_02", "Magenta Clay", 159, 2, Textures.magenta_terracotta, Textures.magenta_terracotta, $"minecraft:{nameof(Textures.magenta_terracotta)}", $"minecraft:{nameof(Textures.magenta_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_03", "Light Blue Clay", 159, 3, Textures.light_blue_terracotta, Textures.light_blue_terracotta, $"minecraft:{nameof(Textures.light_blue_terracotta)}", $"minecraft:{nameof(Textures.light_blue_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_04", "Yellow Clay", 159, 4, Textures.yellow_terracotta, Textures.yellow_terracotta, $"minecraft:{nameof(Textures.yellow_terracotta)}", $"minecraft:{nameof(Textures.yellow_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_05", "Lime Clay", 159, 5, Textures.lime_terracotta, Textures.lime_terracotta, $"minecraft:{nameof(Textures.lime_terracotta)}", $"minecraft:{nameof(Textures.lime_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_06", "Pink Clay", 159, 6, Textures.pink_terracotta, Textures.pink_terracotta, $"minecraft:{nameof(Textures.pink_terracotta)}", $"minecraft:{nameof(Textures.pink_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_07", "Gray Clay", 159, 7, Textures.gray_terracotta, Textures.gray_terracotta, $"minecraft:{nameof(Textures.gray_terracotta)}", $"minecraft:{nameof(Textures.gray_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_08", "Light Gray Clay", 159, 8, Textures.light_gray_terracotta, Textures.light_gray_terracotta, $"minecraft:{nameof(Textures.light_gray_terracotta)}", $"minecraft:{nameof(Textures.light_gray_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_09", "Cyan Clay", 159, 9, Textures.cyan_terracotta, Textures.cyan_terracotta, $"minecraft:{nameof(Textures.cyan_terracotta)}", $"minecraft:{nameof(Textures.cyan_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_10", "Purple Clay", 159, 10, Textures.purple_terracotta, Textures.purple_terracotta, $"minecraft:{nameof(Textures.purple_terracotta)}", $"minecraft:{nameof(Textures.purple_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_11", "Blue Clay", 159, 11, Textures.blue_terracotta, Textures.blue_terracotta, $"minecraft:{nameof(Textures.blue_terracotta)}", $"minecraft:{nameof(Textures.blue_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_12", "Brown Clay", 159, 12, Textures.brown_terracotta, Textures.brown_terracotta, $"minecraft:{nameof(Textures.brown_terracotta)}", $"minecraft:{nameof(Textures.brown_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_13", "Green Clay", 159, 13, Textures.green_terracotta, Textures.green_terracotta, $"minecraft:{nameof(Textures.green_terracotta)}", $"minecraft:{nameof(Textures.green_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_14", "Red Clay", 159, 14, Textures.red_terracotta, Textures.red_terracotta, $"minecraft:{nameof(Textures.red_terracotta)}", $"minecraft:{nameof(Textures.red_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "TERRA_15", "Black Clay", 159, 15, Textures.black_terracotta, Textures.black_terracotta, $"minecraft:{nameof(Textures.black_terracotta)}", $"minecraft:{nameof(Textures.black_terracotta)}", "minecraft:stained_hardened_clay"), - new Material("1.7", false, "Clay", "CLAY_HARD_00", "zzHardened Clay", 172, 0, Textures.terracotta, Textures.terracotta, $"minecraft:{nameof(Textures.terracotta)}", $"minecraft:{nameof(Textures.terracotta)}", "minecraft:hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_00", "White Terracotta", 159, 0, Textures.white_terracotta, Textures.white_terracotta, $"minecraft:{nameof(Textures.white_terracotta)}", $"minecraft:{nameof(Textures.white_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_01", "Orange Terracotta", 159, 1, Textures.orange_terracotta, Textures.orange_terracotta, $"minecraft:{nameof(Textures.orange_terracotta)}", $"minecraft:{nameof(Textures.orange_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_02", "Magenta Terracotta", 159, 2, Textures.magenta_terracotta, Textures.magenta_terracotta, $"minecraft:{nameof(Textures.magenta_terracotta)}", $"minecraft:{nameof(Textures.magenta_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_03", "Light Blue Terracotta", 159, 3, Textures.light_blue_terracotta, Textures.light_blue_terracotta, $"minecraft:{nameof(Textures.light_blue_terracotta)}", $"minecraft:{nameof(Textures.light_blue_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_04", "Yellow Terracotta", 159, 4, Textures.yellow_terracotta, Textures.yellow_terracotta, $"minecraft:{nameof(Textures.yellow_terracotta)}", $"minecraft:{nameof(Textures.yellow_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_05", "Lime Terracotta", 159, 5, Textures.lime_terracotta, Textures.lime_terracotta, $"minecraft:{nameof(Textures.lime_terracotta)}", $"minecraft:{nameof(Textures.lime_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_06", "Pink Terracotta", 159, 6, Textures.pink_terracotta, Textures.pink_terracotta, $"minecraft:{nameof(Textures.pink_terracotta)}", $"minecraft:{nameof(Textures.pink_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_07", "Gray Terracotta", 159, 7, Textures.gray_terracotta, Textures.gray_terracotta, $"minecraft:{nameof(Textures.gray_terracotta)}", $"minecraft:{nameof(Textures.gray_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_08", "Light Gray Terracotta", 159, 8, Textures.light_gray_terracotta, Textures.light_gray_terracotta, $"minecraft:{nameof(Textures.light_gray_terracotta)}", $"minecraft:{nameof(Textures.light_gray_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_09", "Cyan Terracotta", 159, 9, Textures.cyan_terracotta, Textures.cyan_terracotta, $"minecraft:{nameof(Textures.cyan_terracotta)}", $"minecraft:{nameof(Textures.cyan_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_10", "Purple Terracotta", 159, 10, Textures.purple_terracotta, Textures.purple_terracotta, $"minecraft:{nameof(Textures.purple_terracotta)}", $"minecraft:{nameof(Textures.purple_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_11", "Blue Terracotta", 159, 11, Textures.blue_terracotta, Textures.blue_terracotta, $"minecraft:{nameof(Textures.blue_terracotta)}", $"minecraft:{nameof(Textures.blue_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_12", "Brown Terracotta", 159, 12, Textures.brown_terracotta, Textures.brown_terracotta, $"minecraft:{nameof(Textures.brown_terracotta)}", $"minecraft:{nameof(Textures.brown_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_13", "Green Terracotta", 159, 13, Textures.green_terracotta, Textures.green_terracotta, $"minecraft:{nameof(Textures.green_terracotta)}", $"minecraft:{nameof(Textures.green_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_14", "Red Terracotta", 159, 14, Textures.red_terracotta, Textures.red_terracotta, $"minecraft:{nameof(Textures.red_terracotta)}", $"minecraft:{nameof(Textures.red_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "TERRA_15", "Black Terracotta", 159, 15, Textures.black_terracotta, Textures.black_terracotta, $"minecraft:{nameof(Textures.black_terracotta)}", $"minecraft:{nameof(Textures.black_terracotta)}", "minecraft:stained_hardened_clay"), + new Material("1.7", false, "Clay", "CLAY_HARD_00", "zzHardened Terracotta", 172, 0, Textures.terracotta, Textures.terracotta, $"minecraft:{nameof(Textures.terracotta)}", $"minecraft:{nameof(Textures.terracotta)}", "minecraft:hardened_clay"), new Material("1.7", false, "Clay", "CLAY_SOFT_00", "zzClay", 82, 0, Textures.clay, Textures.clay, $"minecraft:{nameof(Textures.clay)}", $"minecraft:{nameof(Textures.clay)}", "minecraft:clay"), new Material("1.7", false, "Planks", "PLANK_OAK", "Planks Oak", 5, 0, Textures.oak_planks, Textures.oak_planks, $"minecraft:{nameof(Textures.oak_planks)}", $"minecraft:{nameof(Textures.oak_planks)}", "minecraft:planks"), diff --git a/src/PixelStacker/PixelStacker.csproj b/src/PixelStacker/PixelStacker.csproj index bb85fac..acf266b 100644 --- a/src/PixelStacker/PixelStacker.csproj +++ b/src/PixelStacker/PixelStacker.csproj @@ -101,7 +101,7 @@ Settings.Designer.cs - + \ No newline at end of file diff --git a/src/PixelStacker/Properties/PublishProfiles/publish.bat b/src/PixelStacker/Properties/PublishProfiles/publish.bat index d9cd2b2..edf9daf 100644 --- a/src/PixelStacker/Properties/PublishProfiles/publish.bat +++ b/src/PixelStacker/Properties/PublishProfiles/publish.bat @@ -1,5 +1,6 @@ :: Open up developer command prompt in VS via: Tools > Command Line > Developer Command prompt :: Execute these commands. +:: /PixelStacker/Properties/PublishProfiles/publish.bat :: :: @@ -14,16 +15,16 @@ dotnet publish .\PixelStacker\PixelStacker.csproj /p:PublishProfile=fd-x64-windo && del .\PixelStacker\bin\publish\release-with-dotnet-runtime.zip^ && cd .\PixelStacker\bin\publish\sc^ && jar -cfM ..\release-with-dotnet-runtime.zip .\^ - && cd ..\..\..\..\ + && cd ..\..\..\..\^ && dotnet publish .\PixelStacker\PixelStacker.csproj /p:PublishProfile=fd-gpu-x64-windows^ && dotnet publish .\PixelStacker\PixelStacker.csproj /p:PublishProfile=fd-gpu-x86-windows^ && del .\PixelStacker\bin\publish\release-with-gpu-feature.zip^ && cd .\PixelStacker\bin\publish\fd-gpu^ && jar -cfM ..\release-with-gpu-feature.zip .\^ - && cd ..\..\..\..\ + && cd ..\..\..\..\^ && dotnet publish .\PixelStacker\PixelStacker.csproj /p:PublishProfile=sc-gpu-x64-windows^ && dotnet publish .\PixelStacker\PixelStacker.csproj /p:PublishProfile=sc-gpu-x86-windows^ && del .\PixelStacker\bin\publish\release-with-gpu-feature-and-dotnet-runtime.zip^ && cd .\PixelStacker\bin\publish\sc-gpu^ && jar -cfM ..\release-with-gpu-feature-and-dotnet-runtime.zip .\^ - && cd ..\..\..\..\ + && cd ..\..\..\..\^ diff --git a/src/PixelStacker/UI/MainForm.Main.cs b/src/PixelStacker/UI/MainForm.Main.cs index f668fe6..9bee91a 100644 --- a/src/PixelStacker/UI/MainForm.Main.cs +++ b/src/PixelStacker/UI/MainForm.Main.cs @@ -73,7 +73,7 @@ private void InitializeKonamiCodeWatcher() { this.InvokeEx(c => { - MessageBox.Show("Advanced mode " + (c.Options.IsAdvancedModeEnabled ? "enabled" : "disabled") + "!"); + MessageBox.Show("Advanced mode " + (!c.Options.IsAdvancedModeEnabled ? "enabled" : "disabled") + "!"); c.Options.IsAdvancedModeEnabled = !c.Options.IsAdvancedModeEnabled; c.Options.Save();