mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-26 22:48:20 +01:00
36 lines
890 B
C#
36 lines
890 B
C#
using System.ComponentModel;
|
|
using System.Configuration.Install;
|
|
using System.ServiceProcess;
|
|
|
|
namespace TGS.Server.Service
|
|
{
|
|
/// <summary>
|
|
/// This tells the .msi there is a Windows <see cref="ServiceBase"/> in this <see cref="System.Reflection.Assembly"/> that needs installation
|
|
/// </summary>
|
|
[RunInstaller(true)]
|
|
public sealed class ProjectInstaller : Installer
|
|
{
|
|
/// <summary>
|
|
/// Construct a <see cref="ProjectInstaller"/>
|
|
/// </summary>
|
|
public ProjectInstaller()
|
|
{
|
|
Installers.AddRange(new Installer[] {
|
|
new ServiceProcessInstaller
|
|
{
|
|
Account = ServiceAccount.LocalSystem,
|
|
Password = null,
|
|
Username = null
|
|
},
|
|
new ServiceInstaller
|
|
{
|
|
Description = "/tg/station Server Service",
|
|
DisplayName = "TG Station Server",
|
|
ServiceName = "TG Station Server",
|
|
StartType = ServiceStartMode.Automatic
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|