Add ability to run as a linux service

This commit is contained in:
SilicaAndPina 2022-04-15 00:07:28 +12:00
parent fb8eab0f8e
commit 1735c35a7c
30 changed files with 935 additions and 489 deletions

View file

@ -1,95 +1,95 @@
namespace HISP
{
partial class LoadingForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoadingForm));
this.StepName = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.StartProgress = new System.Windows.Forms.ProgressBar();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// StepName
//
this.StepName.AutoSize = true;
this.StepName.Location = new System.Drawing.Point(79, 22);
this.StepName.Name = "StepName";
this.StepName.Size = new System.Drawing.Size(92, 15);
this.StepName.TabIndex = 0;
this.StepName.Text = "Starting Server...";
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(61, 73);
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// StartProgress
//
this.StartProgress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.StartProgress.Location = new System.Drawing.Point(79, 40);
this.StartProgress.Maximum = 18;
this.StartProgress.Name = "StartProgress";
this.StartProgress.Size = new System.Drawing.Size(618, 23);
this.StartProgress.Step = 1;
this.StartProgress.TabIndex = 2;
//
// LoadingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(709, 101);
this.Controls.Add(this.StartProgress);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.StepName);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(725, 140);
this.MinimumSize = new System.Drawing.Size(725, 140);
this.Name = "LoadingForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Starting Server...";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label StepName;
private System.Windows.Forms.PictureBox pictureBox1;
public System.Windows.Forms.ProgressBar StartProgress;
}
namespace HISP.Noobs
{
partial class LoadingForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoadingForm));
this.StepName = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.StartProgress = new System.Windows.Forms.ProgressBar();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// StepName
//
this.StepName.AutoSize = true;
this.StepName.Location = new System.Drawing.Point(79, 22);
this.StepName.Name = "StepName";
this.StepName.Size = new System.Drawing.Size(92, 15);
this.StepName.TabIndex = 0;
this.StepName.Text = "Starting Server...";
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(61, 73);
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// StartProgress
//
this.StartProgress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.StartProgress.Location = new System.Drawing.Point(79, 40);
this.StartProgress.Maximum = 18;
this.StartProgress.Name = "StartProgress";
this.StartProgress.Size = new System.Drawing.Size(618, 23);
this.StartProgress.Step = 1;
this.StartProgress.TabIndex = 2;
//
// LoadingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(709, 101);
this.Controls.Add(this.StartProgress);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.StepName);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(725, 140);
this.MinimumSize = new System.Drawing.Size(725, 140);
this.Name = "LoadingForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Starting Server...";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label StepName;
private System.Windows.Forms.PictureBox pictureBox1;
public System.Windows.Forms.ProgressBar StartProgress;
}
}

View file

@ -8,7 +8,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HISP
namespace HISP.Noobs
{
public partial class LoadingForm : Form
{

View file

@ -1,148 +1,148 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<RootNamespace>HISP</RootNamespace>
<LangVersion>10.0</LangVersion>
<UseWindowsForms>true</UseWindowsForms>
<Platforms>x64;x86;AnyCPU</Platforms>
<Configurations>Debug;Windows</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\LibHISP\LibHISP.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<RootNamespace>HISP</RootNamespace>
<LangVersion>10.0</LangVersion>
<UseWindowsForms>true</UseWindowsForms>
<Platforms>x64;x86;AnyCPU</Platforms>
<Configurations>Debug;Windows</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\LibHISP\LibHISP.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="ResetForm.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<None Update="flash.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\*.swf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\map750.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\map750.png</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\mod\*.swf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\mod\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\tack\*.swf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\tack\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\breed\*.swf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\breed\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\resource\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\resource\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>false</GenerateBindingRedirectsOutputType>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<NoWin32Manifest>true</NoWin32Manifest>
<ApplicationIcon>icon.ico</ApplicationIcon>
<StartupObject>HISP.Program</StartupObject>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<DebugType>embedded</DebugType>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AnalysisLevel>none</AnalysisLevel>
<EnableNETAnalyzers>False</EnableNETAnalyzers>
<Copyright>Public Domain, 2022</Copyright>
<PackageProjectUrl>https://islehorse.com</PackageProjectUrl>
<RepositoryUrl>https://github.com/islehorse/HISP</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Windows|x86'">
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<Optimize>true</Optimize>
<PlatformTarget>x86</PlatformTarget>
<DefineConstants>OS_WINDOWS;ARCH_X86</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Windows|x64'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Optimize>true</Optimize>
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>OS_WINDOWS;ARCH_X86_64</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='All|AnyCPU'">
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
<Optimize>True</Optimize>
<DefineConstants>OS_ALL;ARCH_ANYCPU</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE;OS_DEBUG;ARCH_X86_64</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE;OS_DEBUG;ARCH_X86</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Windows|AnyCPU'">
<Optimize>False</Optimize>
<DefineConstants>OS_WINDOWS;ARCH_ANYCPU</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
<Optimize>False</Optimize>
</PropertyGroup>
</Project>
</Compile>
</ItemGroup>
<ItemGroup>
<None Update="flash.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\*.swf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\map750.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\map750.png</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\mod\*.swf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\mod\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\tack\*.swf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\tack\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\breed\*.swf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\breed\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\resource\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>client\resource\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>false</GenerateBindingRedirectsOutputType>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<NoWin32Manifest>true</NoWin32Manifest>
<ApplicationIcon>icon.ico</ApplicationIcon>
<StartupObject>HISP.Noobs.Program</StartupObject>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<DebugType>embedded</DebugType>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AnalysisLevel>none</AnalysisLevel>
<EnableNETAnalyzers>False</EnableNETAnalyzers>
<Copyright>Public Domain, 2022</Copyright>
<PackageProjectUrl>https://islehorse.com</PackageProjectUrl>
<RepositoryUrl>https://github.com/islehorse/HISP</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Windows|x86'">
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<Optimize>true</Optimize>
<PlatformTarget>x86</PlatformTarget>
<DefineConstants>OS_WINDOWS;ARCH_X86</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Windows|x64'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Optimize>true</Optimize>
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>OS_WINDOWS;ARCH_X86_64</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='All|AnyCPU'">
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
<Optimize>True</Optimize>
<DefineConstants>OS_ALL;ARCH_ANYCPU</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE;OS_DEBUG;ARCH_X86_64</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE;OS_DEBUG;ARCH_X86</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Windows|AnyCPU'">
<Optimize>False</Optimize>
<DefineConstants>OS_WINDOWS;ARCH_ANYCPU</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
<Optimize>False</Optimize>
</PropertyGroup>
</Project>

View file

@ -15,7 +15,7 @@ using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HISP
namespace HISP.Noobs
{
public static class Program
{
@ -117,7 +117,6 @@ namespace HISP
IncrementProgress();
// Start HI1 Server
Logger.SetCallback(Console.WriteLine);
IncrementProgress();
Entry.SetShutdownCallback(OnShutdown);

View file

@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace HISP.Properties {
namespace HISPCli.Properties {
using System;

View file

@ -1,4 +1,4 @@
namespace HISP
namespace HISP.Noobs
{
partial class RegisterForm
{

View file

@ -4,7 +4,7 @@ using System.Windows.Forms;
using HISP.Security;
using HISP.Server;
namespace HISP
namespace HISP.Noobs
{
public partial class RegisterForm : Form
{

View file

@ -1,4 +1,4 @@
namespace HISP
namespace HISP.Noobs
{
partial class ResetForm
{
@ -48,7 +48,7 @@
//
// Username
//
this.Username.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.Username.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.Username.Location = new System.Drawing.Point(12, 27);
this.Username.MaxLength = 16;
@ -61,7 +61,7 @@
//
// Password
//
this.Password.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.Password.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.Password.Location = new System.Drawing.Point(12, 56);
this.Password.MaxLength = 16;
@ -75,7 +75,7 @@
//
// ResetPassword
//
this.ResetPassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
this.ResetPassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ResetPassword.Enabled = false;
this.ResetPassword.Location = new System.Drawing.Point(12, 118);

View file

@ -4,7 +4,7 @@ using System.Windows.Forms;
using HISP.Security;
using HISP.Server;
namespace HISP
namespace HISP.Noobs
{
public partial class ResetForm : Form
{

View file

@ -1,4 +1,4 @@
namespace HISP
namespace HISP.Noobs
{
partial class SystemTrayIcon
{

View file

@ -4,7 +4,7 @@ using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
namespace HISP
namespace HISP.Noobs
{
public partial class SystemTrayIcon : Form
{