From 3dcf3b071accc513487f09e21834018c7ea6de2e Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Wed, 20 Mar 2024 17:31:42 -0400 Subject: [PATCH 1/7] Update winget deployment template --- tools/Tgstation.Server.ReleaseNotes/Program.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/Tgstation.Server.ReleaseNotes/Program.cs b/tools/Tgstation.Server.ReleaseNotes/Program.cs index d5ac69e564..dff25a27c6 100644 --- a/tools/Tgstation.Server.ReleaseNotes/Program.cs +++ b/tools/Tgstation.Server.ReleaseNotes/Program.cs @@ -809,7 +809,7 @@ namespace Tgstation.Server.ReleaseNotes var versionsPropertyGroup = project.Elements().First(x => x.Name == xmlNamespace + "PropertyGroup"); var coreVersion = Version.Parse(versionsPropertyGroup.Element(xmlNamespace + "TgsCoreVersion").Value); - const string BodyForPRSha = "bec143988b4b8ddeb586ed97aaf0647803110d98"; + const string BodyForPRSha = "b64a9a24ec6b13c819b47304625a88864c3872e0"; var prBody = $@"# Automated Pull Request This pull request was generated by our [deployment pipeline]({actionUrl}) as a result of the release of [tgstation-server-v{coreVersion}](https://github.com/tgstation/tgstation-server/releases/tag/tgstation-server-v{coreVersion}). Validation was performed as part of the process. @@ -817,10 +817,12 @@ This pull request was generated by our [deployment pipeline]({actionUrl}) as a r The user account that created this pull request is available to correct any issues. - [x] Have you signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs)? +- [x] Is there a linked Issue? + - Shouldn't be possible as this release was just created. - [x] Have you checked that there aren't other open [pull requests](https://github.com/microsoft/winget-pkgs/pulls) for the same manifest update/change? - This PR is generated as a direct result of a new release of `tgstation-server` this should be impossible - [x] This PR only modifies one (1) manifest -- [x] Have you [validated](https://github.com/microsoft/winget-pkgs/blob/master/AUTHORING_MANIFESTS.md#validation) your manifest locally with `winget validate --manifest `? +- [x] Have you [validated](https://github.com/microsoft/winget-pkgs/blob/master/doc/Authoring.md#validation) your manifest locally with `winget validate --manifest `? - Validation is performed as a prerequisite to deployment. - [x] Have you tested your manifest locally with `winget install --manifest `? - Manifest installation and uninstallation is performed as a prerequisite to deployment. From 35f9051d5d5da8e2d855ccc26ede4b66622d1af6 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Wed, 20 Mar 2024 18:23:13 -0400 Subject: [PATCH 2/7] Generate logos in C# Fuck fucking JS, node, and yarn --- .../Tgstation.Server.Common.csproj | 11 +---- src/Tgstation.Server.Common/build_logo.js | 48 ------------------- tgstation-server.sln | 20 +++++++- .../Tgstation.Server.LogoGenerator/Program.cs | 34 +++++++++++++ .../Tgstation.Server.LogoGenerator.csproj | 14 ++++++ 5 files changed, 69 insertions(+), 58 deletions(-) delete mode 100644 src/Tgstation.Server.Common/build_logo.js create mode 100644 tools/Tgstation.Server.LogoGenerator/Program.cs create mode 100644 tools/Tgstation.Server.LogoGenerator/Tgstation.Server.LogoGenerator.csproj diff --git a/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj b/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj index b77bdc4dc1..631b5f35d4 100644 --- a/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj +++ b/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj @@ -16,20 +16,13 @@ - - - + - + - - - - - diff --git a/src/Tgstation.Server.Common/build_logo.js b/src/Tgstation.Server.Common/build_logo.js deleted file mode 100644 index c79a46903c..0000000000 --- a/src/Tgstation.Server.Common/build_logo.js +++ /dev/null @@ -1,48 +0,0 @@ -// Prereq packages: svg-to-ico@1.0.14 svg2img@1.0.0-beta.2 -// Usage: node ./build_logo.js -// Generates ../../artifacts/tgs.ico and ../../artifacts/tgs.ico - -const svg_to_img = require("svg-to-ico"); -const svg2img = require('svg2img'); -const fs = require('fs'); -const { exit } = require("process"); -if (!fs.existsSync("../../artifacts")) { - fs.mkdirSync("../../artifacts",'0777', true); -} - -const svg_bytes = fs.readFileSync("../../build/logo.svg"); -const svg = svg_bytes.toString(); -const white_bg_svg = svg - .replace(" - + From cbc9353fcbe4af842c2b509825af74c2f4efc60c Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 22 Mar 2024 10:07:13 -0400 Subject: [PATCH 7/7] Add missing libgdiplus dependency --- .github/CONTRIBUTING.md | 2 +- .github/workflows/ci-pipeline.yml | 6 +++--- build/Dockerfile | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 48b19a8566..2935d961a7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -34,7 +34,7 @@ You can of course, as always, ask for help at [#coderbus](irc://irc.rizon.net/co ### Development Environment -You need the .NET 8.0 SDK, node>=v20, and npm>=v5.7 (in your PATH) to compile the server. +You need the .NET 8.0 SDK, node>=v20, and npm>=v5.7 (in your PATH) to compile the server. On Linux, you also need the `libgdiplus` package installed to generate icons. The recommended IDE is Visual Studio 2022 or VSCode. diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 5db44392bb..cd3a842591 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -385,7 +385,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update - sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 libgcc-s1:i386 + sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 libgcc-s1:i386 libgdiplus - name: Setup dotnet uses: actions/setup-dotnet@v4 @@ -726,7 +726,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update - sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 gdb libgcc-s1:i386 + sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 gdb libgcc-s1:i386 libgdiplus - name: Setup dotnet uses: actions/setup-dotnet@v4 @@ -1130,7 +1130,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update - sudo apt-get install -y -o APT::Immediate-Configure=0 libstdc++6:i386 libgcc-s1:i386 gnupg2 xmlstarlet + sudo apt-get install -y -o APT::Immediate-Configure=0 libstdc++6:i386 libgcc-s1:i386 gnupg2 xmlstarlet libgdiplus - name: Import GPG Key if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev')) diff --git a/build/Dockerfile b/build/Dockerfile index 383df77bfb..cba330156e 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -16,6 +16,7 @@ RUN . $NVM_DIR/nvm.sh \ && apt-get update \ && apt-get install -y \ dos2unix \ + libgdiplus \ && rm -rf /var/lib/apt/lists/* # Build web control panel