Add VSIX Installer project

This commit is contained in:
SilicaAndPina 2022-03-19 01:36:18 +13:00
parent 567b848eea
commit 6891561263
37 changed files with 2517 additions and 859 deletions

View file

@ -0,0 +1,43 @@
using HISP.Server;
using System;
using System.IO;
namespace HISP
{
public static class Program
{
public static bool ShuttingDown = false;
public static string LogFile;
public static string BaseDir;
public static void OnShutdown()
{
ShuttingDown = true;
}
public static void LogToFile(string text)
{
File.AppendAllTextAsync(text, LogFile);
}
public static void LogStdout(string text)
{
Console.Out.WriteAsync(text + Console.Out.NewLine);
}
public static void Main(string[] args)
{
string BaseDir = Directory.GetCurrentDirectory();
#if DEB_PACKAGE
ConfigReader.ConfigurationFileName = "/etc/hisp.conf"
LogFile = "/var/log/hisp.log"
Logger.SetCallback(LogToFile);
#else
Logger.SetCallback(LogStdout);
#endif
Entry.SetShutdownCallback(OnShutdown);
Entry.Start();
while (!ShuttingDown) { /* Allow asyncronous operations to happen. */ };
}
}
}