Skip to content

Commit

Permalink
+ Disable code signing :(
Browse files Browse the repository at this point in the history
+ Bump MC version string
+ Rename terracotta to clay
+ Fix publish.bat file for generating releases
+ Add docs for building releases
  • Loading branch information
Pangamma committed Feb 24, 2024
1 parent 144cf13 commit b341710
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 25 deletions.
18 changes: 18 additions & 0 deletions dev-docs/how-to-build-a-release.md
Original file line number Diff line number Diff line change
@@ -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.
```
<Target Name="SignTheExe" AfterTargets="Publish">
<Exec WorkingDirectory="$(PublishDir)" Command="call &quot;$(VSAPPIDDIR)..\Tools\VsDevCmd.bat&quot;&#xD;&#xA;echo &quot;Signing this exe file after publishing. $(MSBuildProjectDirectory)\$(PublishDir)PixelStacker.exe&quot;&#xD;&#xA;signtool.exe sign /fd sha256 /t http://timestamp.comodoca.com/authenticode /n &quot;Open Source Developer, Taylor Love&quot; &quot;$(MSBuildProjectDirectory)\$(PublishDir)PixelStacker.exe&quot;" />
</Target>
```
2 changes: 1 addition & 1 deletion dev-docs/how-to-deploy-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/PixelStacker.Logic/IO/Config/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
34 changes: 17 additions & 17 deletions src/PixelStacker.Logic/Model/Materials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,23 +123,23 @@ public static List<Material> 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"),
Expand Down
4 changes: 2 additions & 2 deletions src/PixelStacker/PixelStacker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<Target Name="SignTheExe" AfterTargets="Publish">
<!--<Target Name="SignTheExe" AfterTargets="Publish">
<Exec WorkingDirectory="$(PublishDir)" Command="call &quot;$(VSAPPIDDIR)..\Tools\VsDevCmd.bat&quot;&#xD;&#xA;echo &quot;Signing this exe file after publishing. $(MSBuildProjectDirectory)\$(PublishDir)PixelStacker.exe&quot;&#xD;&#xA;signtool.exe sign /fd sha256 /t http://timestamp.comodoca.com/authenticode /n &quot;Open Source Developer, Taylor Love&quot; &quot;$(MSBuildProjectDirectory)\$(PublishDir)PixelStacker.exe&quot;" />
</Target>
</Target>-->
</Project>
7 changes: 4 additions & 3 deletions src/PixelStacker/Properties/PublishProfiles/publish.bat
Original file line number Diff line number Diff line change
@@ -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
::
::

Expand All @@ -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 ..\..\..\..\^
2 changes: 1 addition & 1 deletion src/PixelStacker/UI/MainForm.Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit b341710

Please sign in to comment.