mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 14:06:41 +01:00
Merge pull request #1604 from tgstation/1603-MariaDBBundled
Bundle MariaDB (remotely) in installer as an option
This commit is contained in:
@@ -8,14 +8,12 @@
|
||||
|
||||
This is a toolset to manage production BYOND servers. It includes the ability to update the server without having to stop or shutdown the server (the update will take effect on a "reboot" of the server), the ability to start the server and restart it if it crashes, as well as systems for managing code and game files, and locally merging GitHub Pull Requests for test deployments.
|
||||
|
||||
### Legacy Servers
|
||||
|
||||
Older server versions can be found in the V# branches of this repository. Note that the current server fully incompatible with installations before version 4. Only some static files may be copied over: https://github.com/tgstation/tgstation-server#static-files
|
||||
|
||||
## Setup
|
||||
|
||||
### Pre-Requisites
|
||||
|
||||
_Note: If you opt to use the Windows installer, all pre-requisites (including MariaDB) are provided out of the box._
|
||||
|
||||
tgstation-server needs a relational database to store it's data.
|
||||
|
||||
If you're just a hobbyist server host, you can probably get away with using SQLite for this. SQLite is bundled with TGS and simply requires you to specify where on your machine you want to store the data.
|
||||
@@ -50,7 +48,7 @@ Note that the Windows Service and installer executables require administrative p
|
||||
|
||||
[Download the latest release's tgstation-server-installer.exe](https://github.com/tgstation/tgstation-server/releases/latest). Executing it will take you through the process of installing and configuring your server. The required dotnet runtime may be installed as a pre-requisite.
|
||||
|
||||
Note: If you use the `/silent` or `/passive` arguments to the installer, you will need to either pre-configure TGS or configure and start the `tgstation-server` service after installing. A shortcut will be placed on your desktop and in your start menu to assist with this.
|
||||
Note: If you use the `/silent` or `/passive` arguments to the installer, you will not be able to install MariaDB using it. In addition, if those arguments are present, you'll need to either pre-configure TGS or configure and start the `tgstation-server` service after installing. A shortcut will be placed on your desktop and in your start menu to assist with this.
|
||||
|
||||
##### winget (Windows 10 or later)
|
||||
|
||||
@@ -79,7 +77,7 @@ Once winget is installed, simply run the following commands, accepting any promp
|
||||
winget install tgstation-server
|
||||
```
|
||||
|
||||
The required dotnet runtime may be installed as a pre-requisite.
|
||||
The required dotnet runtime may be installed as a pre-requisite. MariaDB will not be installed.
|
||||
|
||||
Note: If you use the `-h` or `--disable-interactivity` winget arguments, you will need to either pre-configure TGS or configure and start the `tgstation-server` service after installing. A shortcut will be placed on your desktop and in your start menu to assist with this.
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
<PackageReference Include="Moq" Version="4.18.4" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.0.4" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.0.4" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
<!-- Integration tests will ensure they match across the board -->
|
||||
<Import Project="ControlPanelVersion.props" />
|
||||
<PropertyGroup>
|
||||
<TgsCoreVersion>5.13.3</TgsCoreVersion>
|
||||
<TgsCoreVersion>5.14.0</TgsCoreVersion>
|
||||
<TgsConfigVersion>4.7.1</TgsConfigVersion>
|
||||
<TgsApiVersion>9.11.0</TgsApiVersion>
|
||||
<TgsCommonLibraryVersion>6.0.0</TgsCommonLibraryVersion>
|
||||
@@ -14,10 +14,10 @@
|
||||
<TgsHostWatchdogVersion>1.3.0</TgsHostWatchdogVersion>
|
||||
<TgsContainerScriptVersion>1.2.1</TgsContainerScriptVersion>
|
||||
<TgsMigratorVersion>1.0.2</TgsMigratorVersion>
|
||||
<TgsNetMajorVersion>6</TgsNetMajorVersion>
|
||||
<TgsNugetNetFramework>netstandard2.0</TgsNugetNetFramework>
|
||||
<TgsNetMajorVersion>6</TgsNetMajorVersion>
|
||||
<!-- Update this frequently with dotnet runtime patches. MAJOR MUST MATCH ABOVE! -->
|
||||
<!-- You also need to update the .Bundle project's ExePackagePayload hash and file size after changing it -->
|
||||
<TgsRedistUrl>https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/6.0.19/dotnet-hosting-6.0.19-win.exe</TgsRedistUrl>
|
||||
<TgsDotnetRedistUrl>https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/6.0.20/dotnet-hosting-6.0.20-win.exe</TgsDotnetRedistUrl>
|
||||
<TgsMariaDBRedistUrl>https://ftp.osuosl.org/pub/mariadb/mariadb-11.0.2/winx64-packages/mariadb-11.0.2-winx64.msi</TgsMariaDBRedistUrl>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<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">
|
||||
<BootstrapperApplication>
|
||||
<bal:WixStandardBootstrapperApplication LicenseUrl="https://github.com/tgstation/tgstation/tree/tgstation-server-v$(var.ProductVersion)" Theme="hyperlinkLicense" LogoFile="../../../tgs.ico" ShowVersion="yes" SuppressOptionsUI="yes" />
|
||||
<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" />
|
||||
</BootstrapperApplication>
|
||||
|
||||
|
||||
<netfx:DotNetCoreSearch RuntimeType="aspnet" Platform="x64" MajorVersion="$(var.NetMajorVersion)" Variable="AspNetCorex64Status" />
|
||||
<netfx:DotNetCoreSearch RuntimeType="aspnet" Platform="x86" MajorVersion="$(var.NetMajorVersion)" Variable="AspNetCorex86Status" />
|
||||
|
||||
|
||||
<netfx:DotNetCoreSearch RuntimeType="core" Platform="x64" MajorVersion="$(var.NetMajorVersion)" Variable="NetCorex64Status" />
|
||||
<netfx:DotNetCoreSearch RuntimeType="core" Platform="x86" MajorVersion="$(var.NetMajorVersion)" Variable="NetCorex86Status" />
|
||||
|
||||
<WixVariable Id="AspNetCoreDetectCondition" Value="(NetCorex64Status AND AspNetCorex64Status) OR (NetCorex86Status AND AspNetCorex86Status)" />
|
||||
|
||||
<Chain>
|
||||
<ExePackage PerMachine="yes" DetectCondition="!(wix.AspNetCoreDetectCondition)" Vital="yes" Permanent="yes" Protocol="burn" InstallArguments="/install /quiet /norestart /log [HOSTING_BUNDLE_LOG_PATH]" RepairArguments="/repair /quiet /norestart /log [HOSTING_BUNDLE_LOG_PATH]" UninstallArguments="/uninstall /quiet /norestart /log [HOSTING_BUNDLE_LOG_PATH]" Cache="remove" LogPathVariable="HOSTING_BUNDLE_LOG_PATH" RepairCondition="FALSE">
|
||||
<ExePackagePayload Name="Microsoft.DotNet.HostingBundle.$(var.NetMajorVersion)" DownloadUrl="$(var.AspNetRedistUrl)" Hash="FADC48A76561A7ABD5CC599DB737AFC2B1638013C95E29CFC8955CACA1D57004BD9078C6EF9696BECFD75BAA2983FDC2FF4382C9EBDF833A11316C2DEC218884" Size="71391856" Compressed="no" />
|
||||
</ExePackage>
|
||||
<MsiPackage InstallCondition="InstallMariaDBCheckbox=1" RepairCondition="FALSE" Visible="yes" Permanent="yes" DownloadUrl="$(var.MariaDBRedistUrl)" Compressed="no" SourceFile="mariadb.msi" bal:DisplayInternalUICondition="1" />
|
||||
<ExePackage PerMachine="yes" DetectCondition="!(wix.AspNetCoreDetectCondition)" Permanent="yes" Protocol="burn" InstallArguments="/install /quiet /norestart /log [HOSTING_BUNDLE_LOG_PATH]" RepairArguments="/repair /quiet /norestart /log [HOSTING_BUNDLE_LOG_PATH]" UninstallArguments="/uninstall /quiet /norestart /log [HOSTING_BUNDLE_LOG_PATH]" Cache="remove" LogPathVariable="HOSTING_BUNDLE_LOG_PATH" RepairCondition="FALSE" DownloadUrl="$(var.DotnetRedistUrl)" SourceFile="hosting-bundle.exe" Compressed="no" />
|
||||
<MsiPackage SourceFile="$(var.Tgstation.Server.Host.Service.Wix.TargetPath)">
|
||||
<MsiProperty Name="WIX_BOOTSTRAPPER_UILEVEL" Value="[WixBundleUILevel]" />
|
||||
<MsiProperty Name="MARIADB_INSTALLED" Value="TRUE" Condition="InstallMariaDBCheckbox=1" />
|
||||
</MsiPackage>
|
||||
</Chain>
|
||||
|
||||
|
||||
+7
-3
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="WixToolset.Sdk/4.0.1" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
|
||||
<Import Project="../../../Common.props" />
|
||||
<PropertyGroup>
|
||||
<DefineConstants>ProductVersion=$(TgsCoreVersion);NetMajorVersion=$(TgsNetMajorVersion);AspNetRedistUrl=$(TgsRedistUrl)</DefineConstants>
|
||||
<DefineConstants>ProductVersion=$(TgsCoreVersion);NetMajorVersion=$(TgsNetMajorVersion);DotnetRedistUrl=$(TgsDotnetRedistUrl);MariaDBRedistUrl=$(TgsMariaDBRedistUrl)</DefineConstants>
|
||||
<OutputType>Bundle</OutputType>
|
||||
<Platforms>x86</Platforms>
|
||||
<OutputName>tgstation-server-installer</OutputName>
|
||||
@@ -13,12 +13,16 @@
|
||||
</PropertyGroup>
|
||||
<Target Name="SignBundleEngine">
|
||||
<Message Importance="high" Text="SignBundleEngine: @(SignBundleEngine)" />
|
||||
<Exec Command='powershell.exe –NonInteractive –ExecutionPolicy Unrestricted –Command "Set-AuthenticodeSignature %(SignBundleEngine.FullPath) -Certificate (Get-ChildItem Cert:\CurrentUser\My | Where-Object { $_.Thumbprint -eq \"$(CertificateThumbprint)\" }) -TimestampServer http://timestamp.digicert.com"' />
|
||||
<Exec Command="powershell.exe –NonInteractive –ExecutionPolicy Unrestricted –Command "Set-AuthenticodeSignature %(SignBundleEngine.FullPath) -Certificate (Get-ChildItem Cert:\CurrentUser\My | Where-Object { $_.Thumbprint -eq \"$(CertificateThumbprint)\" }) -TimestampServer http://timestamp.digicert.com"" />
|
||||
</Target>
|
||||
<Target Name="SignBundle">
|
||||
<Message Importance="high" Text="SignBundle: @(SignBundle)" />
|
||||
<Exec Command='powershell.exe –NonInteractive –ExecutionPolicy Unrestricted –Command "Set-AuthenticodeSignature %(SignBundle.FullPath) -Certificate (Get-ChildItem Cert:\CurrentUser\My | Where-Object { $_.Thumbprint -eq \"$(CertificateThumbprint)\" }) -TimestampServer http://timestamp.digicert.com"' />
|
||||
<Exec Command="powershell.exe –NonInteractive –ExecutionPolicy Unrestricted –Command "Set-AuthenticodeSignature %(SignBundle.FullPath) -Certificate (Get-ChildItem Cert:\CurrentUser\My | Where-Object { $_.Thumbprint -eq \"$(CertificateThumbprint)\" }) -TimestampServer http://timestamp.digicert.com"" />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<BindPath Include="../../../../artifacts" />
|
||||
<Content Include="Theme.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WixToolset.Bal.wixext" Version="4.0.1" />
|
||||
<PackageReference Include="WixToolset.Netfx.wixext" Version="4.0.1" />
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<!-- https://github.com/wixtoolset/wix/blob/e0641f1479c6f67f6ec119d448b66a74ad5d6b88/src/ext/Bal/wixstdba/Resources/HyperlinkTheme.wxl -->
|
||||
|
||||
<WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl">
|
||||
<String Id="MariaDBCheckbox" Value="Install MariaDB for use as the TGS backing database. x64 only. Works well with SS13 servers."/>
|
||||
<String Id="Title" Value="[WixBundleName] v[WixBundleVersion]" />
|
||||
|
||||
<String Id="Caption" Value="[WixBundleName] Setup" />
|
||||
<String Id="CheckingForUpdatesLabel" Value="Checking for updates" />
|
||||
<String Id="UpdateButton" Value="&Update to version [WixStdBAUpdateAvailable]" />
|
||||
<String Id="InstallHeader" Value="Welcome" />
|
||||
<String Id="InstallMessage" Value="Setup will install [WixBundleName] on your computer. Click Install to continue or Cancel to exit." />
|
||||
<String Id="InstallMessageOptions" Value="Setup will install [WixBundleName] on your computer. Click Install to continue, Options to set installation options, or Cancel to exit." />
|
||||
<String Id="InstallVersion" Value="Version [WixBundleVersion]" />
|
||||
<String Id="ConfirmCancelMessage" Value="Are you sure you want to cancel?" />
|
||||
<String Id="ExecuteUpgradeRelatedBundleMessage" Value="Previous version" />
|
||||
<String Id="HelpHeader" Value="Setup Help" />
|
||||
<String Id="HelpText" Value="/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or
 creates a complete local copy of the bundle in directory. Install is the default.

/passive | /quiet - displays minimal UI with no prompts or displays no UI and
 no prompts. By default UI and all prompts are displayed.

/norestart - suppress any attempts to restart. By default UI will prompt before restart.
/log log.txt - logs to a specific file. By default a log file is created in %TEMP%." />
|
||||
<String Id="HelpCloseButton" Value="&Close" />
|
||||
<String Id="InstallLicenseLinkText" Value="[WixBundleName] <a href="#">license terms (AGPL-3.0)</a>." />
|
||||
<String Id="InstallAcceptCheckbox" Value="I &agree to the license terms and conditions" />
|
||||
<String Id="InstallOptionsButton" Value="&Options" />
|
||||
<String Id="InstallInstallButton" Value="&Install" />
|
||||
<String Id="InstallCancelButton" Value="&Cancel" />
|
||||
<String Id="OptionsHeader" Value="Setup Options" />
|
||||
<String Id="OptionsLocationLabel" Value="Install location:" />
|
||||
<String Id="OptionsBrowseButton" Value="&Browse" />
|
||||
<String Id="OptionsOkButton" Value="&OK" />
|
||||
<String Id="OptionsCancelButton" Value="&Cancel" />
|
||||
<String Id="ProgressHeader" Value="Setup Progress" />
|
||||
<String Id="ProgressLabel" Value="Processing:" />
|
||||
<String Id="OverallProgressPackageText" Value="Initializing..." />
|
||||
<String Id="ProgressCancelButton" Value="&Cancel" />
|
||||
<String Id="ModifyHeader" Value="Modify Setup" />
|
||||
<String Id="ModifyRepairButton" Value="&Repair" />
|
||||
<String Id="ModifyUninstallButton" Value="&Uninstall" />
|
||||
<String Id="ModifyCancelButton" Value="&Cancel" />
|
||||
<String Id="SuccessHeader" Value="Setup Successful" />
|
||||
<String Id="SuccessCacheHeader" Value="Cache Successfully Completed" />
|
||||
<String Id="SuccessInstallHeader" Value="Installation Successfully Completed" />
|
||||
<String Id="SuccessLayoutHeader" Value="Layout Successfully Completed" />
|
||||
<String Id="SuccessModifyHeader" Value="Modify Successfully Completed" />
|
||||
<String Id="SuccessRepairHeader" Value="Repair Successfully Completed" />
|
||||
<String Id="SuccessUninstallHeader" Value="Uninstall Successfully Completed" />
|
||||
<String Id="SuccessUnsafeUninstallHeader" Value="Uninstall Successfully Completed" />
|
||||
<String Id="SuccessLaunchButton" Value="&Launch" />
|
||||
<String Id="SuccessRestartText" Value="You must restart your computer before you can use the software." />
|
||||
<String Id="SuccessUninstallRestartText" Value="You must restart your computer to complete the removal of the software." />
|
||||
<String Id="SuccessRestartButton" Value="&Restart" />
|
||||
<String Id="SuccessCloseButton" Value="&Close" />
|
||||
<String Id="FailureHeader" Value="Setup Failed" />
|
||||
<String Id="FailureCacheHeader" Value="Cache Failed" />
|
||||
<String Id="FailureInstallHeader" Value="Setup Failed" />
|
||||
<String Id="FailureLayoutHeader" Value="Layout Failed" />
|
||||
<String Id="FailureModifyHeader" Value="Modify Failed" />
|
||||
<String Id="FailureRepairHeader" Value="Repair Failed" />
|
||||
<String Id="FailureUninstallHeader" Value="Uninstall Failed" />
|
||||
<String Id="FailureUnsafeUninstallHeader" Value="Uninstall Failed" />
|
||||
<String Id="FailureHyperlinkLogText" Value="One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>." />
|
||||
<String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." />
|
||||
<String Id="FailureRestartButton" Value="&Restart" />
|
||||
<String Id="FailureCloseButton" Value="&Close" />
|
||||
<String Id="FilesInUseTitle" Value="Files In Use" />
|
||||
<String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" />
|
||||
<String Id="FilesInUseNetfxCloseRadioButton" Value="Close the &applications." />
|
||||
<String Id="FilesInUseCloseRadioButton" Value="Close the &applications and attempt to restart them." />
|
||||
<String Id="FilesInUseDontCloseRadioButton" Value="&Do not close applications. A reboot will be required." />
|
||||
<String Id="FilesInUseRetryButton" Value="&Retry" />
|
||||
<String Id="FilesInUseIgnoreButton" Value="&Ignore" />
|
||||
<String Id="FilesInUseExitButton" Value="E&xit" />
|
||||
</WixLocalization>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- https://github.com/wixtoolset/wix/blob/e0641f1479c6f67f6ec119d448b66a74ad5d6b88/src/ext/Bal/wixstdba/Resources/HyperlinkTheme.xml -->
|
||||
<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
|
||||
<Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
|
||||
<Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
|
||||
<Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
|
||||
<Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
|
||||
|
||||
<Window Width="514" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
|
||||
<ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
|
||||
<Label X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
|
||||
|
||||
<Page Name="Help">
|
||||
<Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
|
||||
<Label X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
|
||||
<Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
|
||||
<Text>#(loc.HelpCloseButton)</Text>
|
||||
<CloseWindowAction />
|
||||
</Button>
|
||||
</Page>
|
||||
<Page Name="Loading">
|
||||
<Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes" Visible="no" Name="CheckingForUpdatesLabel" />
|
||||
</Page>
|
||||
<Page Name="Install">
|
||||
<Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="25" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
|
||||
<Checkbox Name="InstallMariaDBCheckbox" X="11" Y="146" Width="500" Height="26" TabStop="yes" FontId="3">#(loc.MariaDBCheckbox)</Checkbox>
|
||||
<Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
|
||||
<Button Name="InstallUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
|
||||
<Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
|
||||
<Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
|
||||
<Text>#(loc.InstallCancelButton)</Text>
|
||||
<CloseWindowAction />
|
||||
</Button>
|
||||
</Page>
|
||||
<Page Name="Progress">
|
||||
<Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
|
||||
<Label X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
|
||||
<Label Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
|
||||
<Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
|
||||
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Modify">
|
||||
<Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
|
||||
<Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
|
||||
<Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
|
||||
<Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
|
||||
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
|
||||
<Text>#(loc.ModifyCancelButton)</Text>
|
||||
<CloseWindowAction />
|
||||
</Button>
|
||||
</Page>
|
||||
<Page Name="Success">
|
||||
<Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
|
||||
<Text>#(loc.SuccessHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 3">#(loc.SuccessUnsafeUninstallHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 4">#(loc.SuccessUninstallHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 5">#(loc.SuccessCacheHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 6">#(loc.SuccessInstallHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 7">#(loc.SuccessModifyHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 8">#(loc.SuccessRepairHeader)</Text>
|
||||
</Label>
|
||||
<Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
|
||||
<Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
|
||||
<Text>#(loc.SuccessRestartText)</Text>
|
||||
<Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
|
||||
</Label>
|
||||
<Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
|
||||
<Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
|
||||
<Text>#(loc.SuccessCloseButton)</Text>
|
||||
<CloseWindowAction />
|
||||
</Button>
|
||||
</Page>
|
||||
<Page Name="Failure">
|
||||
<Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
|
||||
<Text>#(loc.FailureHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 3">#(loc.FailureUnsafeUninstallHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 4">#(loc.FailureUninstallHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 5">#(loc.FailureCacheHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 6">#(loc.FailureInstallHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 7">#(loc.FailureModifyHeader)</Text>
|
||||
<Text Condition="WixBundleAction = 8">#(loc.FailureRepairHeader)</Text>
|
||||
</Label>
|
||||
<Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
|
||||
<Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
|
||||
<Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
|
||||
<Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
|
||||
<Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
|
||||
<Text>#(loc.FailureCloseButton)</Text>
|
||||
<CloseWindowAction />
|
||||
</Button>
|
||||
</Page>
|
||||
</Window>
|
||||
</Theme>
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
<CustomAction Id="DetachStopTgsServiceIfRunningAction" BinaryRef="InstallerExtensionsBinary" DllEntry="DetachStopTgsServiceIfRunning" Execute="deferred" />
|
||||
<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"" />
|
||||
|
||||
<Icon Id="tgs.ico" SourceFile="../../../tgs.ico" />
|
||||
|
||||
@@ -15,7 +16,8 @@
|
||||
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="DetachStopTgsServiceIfRunningAction" Condition="UPGRADINGPRODUCTCODE OR REINSTALL" Before="StopServices" />
|
||||
<Custom Action="RunTgsConfigure" Before="StartServices" Condition="(NOT REMOVE~="ALL") AND (NOT PRODUCTIONAPPSETTINGSPRESENT) AND ((WIX_BOOTSTRAPPER_UILEVEL >= 4) OR (UILevel >= 4))" />
|
||||
<Custom Action="RunTgsConfigure" Before="StartServices" Condition="(NOT MARIADB_INSTALLED) AND (NOT REMOVE~="ALL") AND (NOT PRODUCTIONAPPSETTINGSPRESENT) AND ((WIX_BOOTSTRAPPER_UILEVEL >= 4) OR (UILevel >= 4))"/>
|
||||
<Custom Action="RunTgsConfigureMariaDB" Before="StartServices" Condition="MARIADB_INSTALLED AND (NOT REMOVE~="ALL") AND (NOT PRODUCTIONAPPSETTINGSPRESENT) AND ((WIX_BOOTSTRAPPER_UILEVEL >= 4) OR (UILevel >= 4))"/>
|
||||
<StartServices Condition="(NOT REMOVE~="ALL") AND ((WIX_BOOTSTRAPPER_UILEVEL >= 4) OR (UILevel >= 4) OR PRODUCTIONAPPSETTINGSPRESENT)"/>
|
||||
</InstallExecuteSequence>
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ try
|
||||
Remove-Item -Recurse -Force build/package/winget/Tgstation.Server.Host.Service.Wix.Bundle/obj -ErrorAction SilentlyContinue
|
||||
|
||||
[XML]$versionXML = Get-Content build/Version.props -ErrorAction Stop
|
||||
$redistUrl = $versionXML.Project.PropertyGroup.TgsRedistUrl
|
||||
$redistUrl = $versionXML.Project.PropertyGroup.TgsDotnetRedistUrl
|
||||
$dbRedistUrl = $versionXML.Project.PropertyGroup.TgsMariaDBRedistUrl
|
||||
|
||||
mkdir artifacts
|
||||
$previousProgressPreference = $ProgressPreference
|
||||
@@ -20,6 +21,7 @@ try
|
||||
try
|
||||
{
|
||||
Invoke-WebRequest -Uri $redistUrl -OutFile artifacts/hosting-bundle.exe
|
||||
Invoke-WebRequest -Uri $dbRedistUrl -OutFile artifacts/mariadb.msi
|
||||
} finally {
|
||||
$ProgressPreference = $previousProgressPreference
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-ef": {
|
||||
"version": "7.0.7",
|
||||
"version": "7.0.9",
|
||||
"commands": [
|
||||
"dotnet-ef"
|
||||
]
|
||||
|
||||
@@ -24,5 +24,10 @@
|
||||
/// The base path for the app settings configuration files.
|
||||
/// </summary>
|
||||
public string AppSettingsBasePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Coerce the <see cref="Setup.SetupWizard"/> to select <see cref="DatabaseType.MariaDB"/>.
|
||||
/// </summary>
|
||||
public bool MariaDBSetup { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,6 +362,12 @@ namespace Tgstation.Server.Host.Setup
|
||||
{
|
||||
if (firstTime)
|
||||
{
|
||||
if (internalConfiguration.MariaDBSetup)
|
||||
{
|
||||
await console.WriteAsync("It looks like you just installed MariaDB. Selecting it as the database type.", true, cancellationToken);
|
||||
return DatabaseType.MariaDB;
|
||||
}
|
||||
|
||||
await console.WriteAsync(String.Empty, true, cancellationToken);
|
||||
await console.WriteAsync(
|
||||
"NOTE: If you are serious about hosting public servers, it is HIGHLY reccommended that TGS runs on a database *OTHER THAN* Sqlite.",
|
||||
@@ -413,19 +419,30 @@ namespace Tgstation.Server.Host.Setup
|
||||
{
|
||||
DatabaseType = await PromptDatabaseType(firstTime, cancellationToken),
|
||||
};
|
||||
firstTime = false;
|
||||
|
||||
string serverAddress = null;
|
||||
ushort? serverPort = null;
|
||||
|
||||
bool isSqliteDB = databaseConfiguration.DatabaseType == DatabaseType.Sqlite;
|
||||
var definitelyLocalMariaDB = firstTime && internalConfiguration.MariaDBSetup;
|
||||
var isSqliteDB = databaseConfiguration.DatabaseType == DatabaseType.Sqlite;
|
||||
IPHostEntry serverAddressEntry = null;
|
||||
if (!isSqliteDB)
|
||||
do
|
||||
{
|
||||
await console.WriteAsync(null, true, cancellationToken);
|
||||
await console.WriteAsync("Enter the server's address and port [<server>:<port> or <server>] (blank for local): ", false, cancellationToken);
|
||||
serverAddress = await console.ReadLineAsync(false, cancellationToken);
|
||||
if (definitelyLocalMariaDB)
|
||||
{
|
||||
await console.WriteAsync("Enter the server's port (blank for 3306): ", false, cancellationToken);
|
||||
var enteredPort = await console.ReadLineAsync(false, cancellationToken);
|
||||
if (!String.IsNullOrWhiteSpace(enteredPort) && enteredPort.Trim() != "3306")
|
||||
serverAddress = $"localhost:{enteredPort}";
|
||||
}
|
||||
else
|
||||
{
|
||||
await console.WriteAsync("Enter the server's address and port [<server>:<port> or <server>] (blank for local): ", false, cancellationToken);
|
||||
serverAddress = await console.ReadLineAsync(false, cancellationToken);
|
||||
}
|
||||
|
||||
if (String.IsNullOrWhiteSpace(serverAddress))
|
||||
serverAddress = null;
|
||||
else if (databaseConfiguration.DatabaseType == DatabaseType.SqlServer)
|
||||
@@ -463,7 +480,7 @@ namespace Tgstation.Server.Host.Setup
|
||||
while (true);
|
||||
|
||||
await console.WriteAsync(null, true, cancellationToken);
|
||||
await console.WriteAsync($"Enter the database {(isSqliteDB ? "file path" : "name")} (Can be from previous installation. Otherwise, should not exist): ", false, cancellationToken);
|
||||
await console.WriteAsync($"Enter the database {(isSqliteDB ? "file path" : "name")} ({(definitelyLocalMariaDB ? "leave blank for \"tgs\")" : "Can be from previous installation. Otherwise, should not exist")}): ", false, cancellationToken);
|
||||
|
||||
string databaseName;
|
||||
bool dbExists = false;
|
||||
@@ -484,6 +501,8 @@ namespace Tgstation.Server.Host.Setup
|
||||
null,
|
||||
cancellationToken);
|
||||
}
|
||||
else if (definitelyLocalMariaDB)
|
||||
databaseName = "tgs";
|
||||
|
||||
if (String.IsNullOrWhiteSpace(databaseName))
|
||||
await console.WriteAsync("Invalid database name!", true, cancellationToken);
|
||||
@@ -510,8 +529,17 @@ namespace Tgstation.Server.Host.Setup
|
||||
if (!isSqliteDB)
|
||||
if (!useWinAuth)
|
||||
{
|
||||
await console.WriteAsync("Enter username: ", false, cancellationToken);
|
||||
username = await console.ReadLineAsync(false, cancellationToken);
|
||||
if (definitelyLocalMariaDB)
|
||||
{
|
||||
await console.WriteAsync("Using username: root", true, cancellationToken);
|
||||
username = "root";
|
||||
}
|
||||
else
|
||||
{
|
||||
await console.WriteAsync("Enter username: ", false, cancellationToken);
|
||||
username = await console.ReadLineAsync(false, cancellationToken);
|
||||
}
|
||||
|
||||
await console.WriteAsync("Enter password: ", false, cancellationToken);
|
||||
password = await console.ReadLineAsync(true, cancellationToken);
|
||||
}
|
||||
@@ -625,6 +653,11 @@ namespace Tgstation.Server.Host.Setup
|
||||
await console.WriteAsync(e.Message, true, cancellationToken);
|
||||
await console.WriteAsync(null, true, cancellationToken);
|
||||
await console.WriteAsync("Retrying database configuration...", true, cancellationToken);
|
||||
|
||||
if (definitelyLocalMariaDB)
|
||||
await console.WriteAsync("No longer assuming MariaDB is the target.", true, cancellationToken);
|
||||
|
||||
firstTime = false;
|
||||
}
|
||||
}
|
||||
while (true);
|
||||
|
||||
@@ -70,19 +70,19 @@
|
||||
<!-- Usage: git interop -->
|
||||
<PackageReference Include="LibGit2Sharp" Version="0.27.2" />
|
||||
<!-- Usage: JWT injection into HTTP pipeline -->
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.19" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.20" />
|
||||
<!-- Usage: Support ""legacy"" Newotonsoft.Json in HTTP pipeline. The rest of our codebase uses Newtonsoft. -->
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.19" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.20" />
|
||||
<!-- Usage: Database ORM -->
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
|
||||
<!-- Usage: Automatic migration generation using command line -->
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.8">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<!-- Usage: Sqlite ORM plugin -->
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.9" />
|
||||
<!-- Usage: MSSQL ORM plugin -->
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
|
||||
<!-- Usage: POSIX support for syscalls, signals, and symlinks -->
|
||||
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
|
||||
<!-- Usage: YAML config plugin -->
|
||||
@@ -90,7 +90,7 @@
|
||||
<!-- Usage: PostgresSQL ORM plugin -->
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
|
||||
<!-- Usage: GitHub.com interop -->
|
||||
<PackageReference Include="Octokit" Version="7.0.0" />
|
||||
<PackageReference Include="Octokit" Version="7.0.1" />
|
||||
<!-- Usage: MYSQL/MariaDB ORM plugin -->
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
||||
<!-- Usage: Discord interop -->
|
||||
@@ -114,11 +114,11 @@
|
||||
<!-- Usage: Windows authentication plugin allowing searching for users by name -->
|
||||
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="7.0.0" />
|
||||
<!-- Usage: JWT plugin needed to undo some Microsoft meddling in the HTTP pipeline -->
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.31.0" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.32.0" />
|
||||
<!-- Usage: Identifying owning user of Windows Process objects -->
|
||||
<PackageReference Include="System.Management" Version="7.0.2" />
|
||||
<!-- Usage: .DeleteAsync() support for IQueryable<T>s -->
|
||||
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="7.22.3" />
|
||||
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="7.22.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="octokit" Version="7.0.0" />
|
||||
<PackageReference Include="octokit" Version="7.0.1" />
|
||||
<PackageReference Include="Octokit.GraphQL" Version="0.2.0-beta" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user