From e8d83c6e9b2ca2b1fb178d4e2898a1eb78c2240f Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Thu, 14 Sep 2023 20:42:00 -0400 Subject: [PATCH] Background fill the .ico - Add additional ignores/msbuild deletes to icon gen script --- .gitignore | 2 ++ build/logo.svg | 6 +++++- .../Tgstation.Server.Common.csproj | 4 ++-- src/Tgstation.Server.Common/build_logo.js | 18 +++++++++++++----- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 770d2a28d4..32a0e7ad23 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ packaging/ /src/Tgstation.Server.Common/node_modules /src/Tgstation.Server.Common/package.json /src/Tgstation.Server.Common/yarn.lock +/src/Tgstation.Server.Common/logo_bg_white.svg +yarn-error.log* diff --git a/build/logo.svg b/build/logo.svg index 58b432ac35..a3b75b7af6 100644 --- a/build/logo.svg +++ b/build/logo.svg @@ -118,4 +118,8 @@ style="stroke:#ffffff;stroke-width:1;stroke-dasharray:none;stroke-opacity:1" /> + id="path10" /> diff --git a/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj b/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj index 972ee6b33c..9ff1909f7f 100644 --- a/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj +++ b/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj @@ -10,7 +10,7 @@ - + @@ -24,6 +24,6 @@ - + diff --git a/src/Tgstation.Server.Common/build_logo.js b/src/Tgstation.Server.Common/build_logo.js index caf3f2eb7b..c79a46903c 100644 --- a/src/Tgstation.Server.Common/build_logo.js +++ b/src/Tgstation.Server.Common/build_logo.js @@ -1,6 +1,6 @@ // 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 +// Generates ../../artifacts/tgs.ico and ../../artifacts/tgs.ico const svg_to_img = require("svg-to-ico"); const svg2img = require('svg2img'); @@ -10,12 +10,19 @@ 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("