mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-23 21:16:52 +01:00
Integrate new SVG icon into build pipeline
Uploading generated tgs.png to my personal Discord for hosting purposes.
Using logo source commit of 7d202238c5 for
new Discord embed logo
This commit is contained in:
@@ -27,3 +27,6 @@ changelog.yml
|
||||
*nupkg
|
||||
*.sqlite3
|
||||
packaging/
|
||||
/src/Tgstation.Server.Common/node_modules
|
||||
/src/Tgstation.Server.Common/package.json
|
||||
/src/Tgstation.Server.Common/yarn.lock
|
||||
|
||||
@@ -31,6 +31,6 @@
|
||||
<ItemGroup>
|
||||
<None Include="README.md" Pack="true" PackagePath="" />
|
||||
<None Include="../../LICENSE" Pack="true" PackagePath="" />
|
||||
<None Include="../../build/tgs.png" Pack="true" PackagePath="" />
|
||||
<None Include="../../artifacts/tgs.png" Pack="true" PackagePath="" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
install:
|
||||
rm artifacts/tgs.png
|
||||
rm artifacts/tgs.ico
|
||||
build/package/deb/install_artifacts.sh "$(DESTDIR)"
|
||||
install -D build/package/appsettings.Initial.yml "$(DESTDIR)/etc/tgstation-server/appsettings.Production.yml"
|
||||
install src/Tgstation.Server.Host/appsettings.yml "$(DESTDIR)/etc/tgstation-server/appsettings.yml"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:netfx="http://wixtoolset.org/schemas/v4/wxs/netfx">
|
||||
<Bundle Name="tgstation-server" Manufacturer="/tg/station 13" Version="$(var.ProductVersion)" AboutUrl="https://github.com/tgstation/tgstation-server/blob/tgstation-server-v$(var.ProductVersion)/LICENSE" IconSourceFile="../../../tgs.ico" HelpUrl="https://github.com/tgstation/tgstation-server/discussions/categories/q-a" UpdateUrl="https://github.com/tgstation/tgstation-server/releases/latest" UpgradeCode="542535f4-49ad-45c4-9b96-6d8235ed8b87">
|
||||
<Bundle Name="tgstation-server" Manufacturer="/tg/station 13" Version="$(var.ProductVersion)" AboutUrl="https://github.com/tgstation/tgstation-server/blob/tgstation-server-v$(var.ProductVersion)/LICENSE" IconSourceFile="../../../artifacts/tgs.ico" HelpUrl="https://github.com/tgstation/tgstation-server/discussions/categories/q-a" UpdateUrl="https://github.com/tgstation/tgstation-server/releases/latest" UpgradeCode="542535f4-49ad-45c4-9b96-6d8235ed8b87">
|
||||
<BootstrapperApplication>
|
||||
<bal:WixStandardBootstrapperApplication LicenseUrl="https://github.com/tgstation/tgstation/tree/tgstation-server-v$(var.ProductVersion)" LocalizationFile="Theme.wxl" Theme="hyperlinkLicense" LogoFile="../../../tgs.ico" ShowVersion="yes" SuppressOptionsUI="yes" ThemeFile="Theme.xml" LaunchTarget="http://127.0.0.1:5000" />
|
||||
<bal:WixStandardBootstrapperApplication LicenseUrl="https://github.com/tgstation/tgstation/tree/tgstation-server-v$(var.ProductVersion)" LocalizationFile="Theme.wxl" Theme="hyperlinkLicense" LogoFile="../../../../artifacts/tgs.ico" ShowVersion="yes" SuppressOptionsUI="yes" ThemeFile="Theme.xml" LaunchTarget="http://127.0.0.1:5000" />
|
||||
</BootstrapperApplication>
|
||||
|
||||
<netfx:DotNetCoreSearch RuntimeType="aspnet" Platform="x64" MajorVersion="$(var.NetMajorVersion)" Variable="AspNetCorex64Status" />
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<CustomAction Id="RunTgsConfigure" Execute="deferred" FileRef="ServiceExecutableFile" ExeCommand="-c -p=--appsettings-base-path=[APPLICATIONDATADIRECTORY]" />
|
||||
<CustomAction Id="RunTgsConfigureMariaDB" Execute="deferred" FileRef="ServiceExecutableFile" ExeCommand="-c -p="--appsettings-base-path=[APPLICATIONDATADIRECTORY] --Internal:MariaDBSetup=true --Internal:MariaDBDefaultRootPassword=\"[MARIADB_PASSWORD]\""" />
|
||||
|
||||
<Icon Id="tgs.ico" SourceFile="../../../tgs.ico" />
|
||||
<Icon Id="tgs.ico" SourceFile="../../../../artifacts/tgs.ico" />
|
||||
|
||||
<SetProperty Id="WIX_BOOTSTRAPPER_UILEVEL" Value="[UILevel]" After="CostFinalize" Condition="WIX_BOOTSTRAPPER_UILEVEL=""" />
|
||||
|
||||
|
||||
+1
-1
@@ -31,4 +31,4 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Tgstation.Server.Host.Service.Wix.Extensions\Tgstation.Server.Host.Service.Wix.Extensions.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -26,7 +26,11 @@ try
|
||||
$ProgressPreference = $previousProgressPreference
|
||||
}
|
||||
|
||||
cd src/Tgstation.Server.Host
|
||||
# Generating icons
|
||||
Set-Location src/Tgstation.Server.Common
|
||||
dotnet msbuild -t:IconGeneration
|
||||
|
||||
Set-Location ../Tgstation.Server.Host
|
||||
dotnet publish -c Release --no-build -o ../../artifacts/Tgstation.Server.Host
|
||||
if (-Not $?) {
|
||||
exit $lastexitcode
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 120 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.0 KiB |
@@ -9,4 +9,21 @@
|
||||
<PackageReleaseNotes>$(TGS_NUGET_RELEASE_NOTES_COMMON)</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- This is here because I know we have node as a build dep so this just works -->
|
||||
<Target Name="IconGeneration" BeforeTargets="ResolveAssemblyReferences" Inputs="../../build/logo.svg" Outputs="../../artifacts/tgs.ico;../../artifacts/tgs.png">
|
||||
<Message Text="Restoring yarn packages..." Importance="high" />
|
||||
<Exec Command="npx --yes yarn add svg-to-ico@1.0.14 svg2img@1.0.0-beta.2" />
|
||||
<Message Text="Generating icons from SVG..." Importance="high" />
|
||||
<Exec Command="node ./build_logo.js" />
|
||||
</Target>
|
||||
|
||||
<Target Name="IconClean" AfterTargets="Clean">
|
||||
<Message Text="Cleaning icons..." Importance="high" />
|
||||
<Delete Files="../../artifacts/tgs.ico;../../artifacts/tgs.png" />
|
||||
</Target>
|
||||
|
||||
<Target Name="IconNodeCleanup" AfterTargets="IconGeneration;IconClean">
|
||||
<RemoveDir Directories="node_modules" />
|
||||
<Delete Files="package.json;yarn.lock" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// 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);
|
||||
}
|
||||
|
||||
svg_to_img({
|
||||
input_name: "../../build/logo.svg",
|
||||
output_name: "../../artifacts/tgs.ico",
|
||||
sizes: [ 160 ]
|
||||
}).then(() => {
|
||||
// this package sucks, path separators are fucked
|
||||
svg2img(
|
||||
"../../build/logo.svg",
|
||||
{
|
||||
resvg: {
|
||||
fitTo: {
|
||||
mode: 'width', // or height
|
||||
value: 64,
|
||||
}
|
||||
}
|
||||
},
|
||||
function(error, buffer) {
|
||||
if(error) {
|
||||
console.error(`PNG conversion failed: ${error}`);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
fs.writeFileSync("../../artifacts/tgs.png", buffer);
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.error(`ICO conversion failed: ${error}`);
|
||||
exit(1);
|
||||
});
|
||||
@@ -9,7 +9,7 @@
|
||||
<Version>$(TgsCoreVersion)</Version>
|
||||
<!-- DO NOT ENABLE THIS, It makes the service require the desktop runtime instead of the ASP NET Core Hosting Bundle -->
|
||||
<UseWindowsForms>false</UseWindowsForms>
|
||||
<ApplicationIcon>../../build/tgs.ico</ApplicationIcon>
|
||||
<ApplicationIcon>../../artifacts/tgs.ico</ApplicationIcon>
|
||||
<ApplicationManifest>../../build/uac_elevation_manifest.xml</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
|
||||
var author = new EmbedAuthor(assemblyInformationProvider.VersionPrefix)
|
||||
{
|
||||
Url = "https://github.com/tgstation/tgstation-server",
|
||||
IconUrl = "https://avatars0.githubusercontent.com/u/1363778?s=280&v=4",
|
||||
IconUrl = "https://cdn.discordapp.com/attachments/1114451486374637629/1151650846019432448/tgs.png",
|
||||
};
|
||||
var embed = new Embed
|
||||
{
|
||||
|
||||
@@ -29,14 +29,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6FF654E6
|
||||
build\ControlPanelVersion.props = build\ControlPanelVersion.props
|
||||
build\Dockerfile = build\Dockerfile
|
||||
build\GenerateMigrations.sh = build\GenerateMigrations.sh
|
||||
build\logo.svg = build\logo.svg
|
||||
build\NugetCommon.props = build\NugetCommon.props
|
||||
build\OpenApiValidationSettings.json = build\OpenApiValidationSettings.json
|
||||
build\SrcCommon.props = build\SrcCommon.props
|
||||
build\stylecop.json = build\stylecop.json
|
||||
build\TestCommon.props = build\TestCommon.props
|
||||
build\tgs.docker.sh = build\tgs.docker.sh
|
||||
build\tgs.ico = build\tgs.ico
|
||||
build\tgs.png = build\tgs.png
|
||||
build\tgstation-server.service = build\tgstation-server.service
|
||||
build\uac_elevation_manifest.xml = build\uac_elevation_manifest.xml
|
||||
build\Version.props = build\Version.props
|
||||
|
||||
Reference in New Issue
Block a user