Skip to content

Commit

Permalink
Merge pull request #1652 from tgstation/dev [TGSDeploy]
Browse files Browse the repository at this point in the history
v5.16.0 Release
  • Loading branch information
Cyberboss authored Sep 14, 2023
2 parents 7d20223 + 6328674 commit c8967ec
Show file tree
Hide file tree
Showing 16 changed files with 77 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion build/ControlPanelVersion.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- This is in it's own file to help incremental building, changing it causes a complete rebuild of the web panel -->
<TgsControlPanelVersion>4.24.0</TgsControlPanelVersion>
<TgsControlPanelVersion>4.25.2</TgsControlPanelVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion build/NugetCommon.props
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion build/Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Integration tests will ensure they match across the board -->
<Import Project="ControlPanelVersion.props" />
<PropertyGroup>
<TgsCoreVersion>5.15.1</TgsCoreVersion>
<TgsCoreVersion>5.16.0</TgsCoreVersion>
<TgsConfigVersion>4.7.1</TgsConfigVersion>
<TgsApiVersion>9.12.0</TgsApiVersion>
<TgsCommonLibraryVersion>6.0.1</TgsCommonLibraryVersion>
Expand Down
2 changes: 2 additions & 0 deletions build/package/deb/MakeInstall
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=&quot;--appsettings-base-path=[APPLICATIONDATADIRECTORY] --Internal:MariaDBSetup=true --Internal:MariaDBDefaultRootPassword=\&quot;[MARIADB_PASSWORD]\&quot;&quot;" />

<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=&quot;&quot;" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
<ItemGroup>
<ProjectReference Include="..\Tgstation.Server.Host.Service.Wix.Extensions\Tgstation.Server.Host.Service.Wix.Extensions.csproj" />
</ItemGroup>
</Project>
</Project>
6 changes: 5 additions & 1 deletion build/package/winget/prepare_installer_input_artifacts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file removed build/tgs.ico
Binary file not shown.
Binary file removed build/tgs.png
Binary file not shown.
17 changes: 17 additions & 0 deletions src/Tgstation.Server.Common/Tgstation.Server.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] [email protected]" />
<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>
40 changes: 40 additions & 0 deletions src/Tgstation.Server.Common/build_logo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Prereq packages: [email protected] [email protected]
// 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);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public override async Task<Func<string, string, Task<Func<bool, Task>>>> SendUpd
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
{
Expand Down
3 changes: 1 addition & 2 deletions tgstation-server.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c8967ec

Please sign in to comment.