From 8031fe00c7093ec4b6753594df55edc85e4024d5 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 5 Feb 2014 14:27:31 -0800 Subject: Delete C# service... going C++, probably integrating with core. --- windows/ZeroTierOne.sln | 71 ------------ windows/ZeroTierOneService/App.config | 6 - windows/ZeroTierOneService/Program.cs | 25 ----- .../ZeroTierOneService/Properties/AssemblyInfo.cs | 36 ------ windows/ZeroTierOneService/Service.Designer.cs | 41 ------- windows/ZeroTierOneService/Service.cs | 110 ------------------ windows/ZeroTierOneService/Service.resx | 123 --------------------- .../ZeroTierOneService/ZeroTierOneService.csproj | 116 ------------------- 8 files changed, 528 deletions(-) delete mode 100644 windows/ZeroTierOneService/App.config delete mode 100644 windows/ZeroTierOneService/Program.cs delete mode 100644 windows/ZeroTierOneService/Properties/AssemblyInfo.cs delete mode 100644 windows/ZeroTierOneService/Service.Designer.cs delete mode 100644 windows/ZeroTierOneService/Service.cs delete mode 100644 windows/ZeroTierOneService/Service.resx delete mode 100644 windows/ZeroTierOneService/ZeroTierOneService.csproj (limited to 'windows') diff --git a/windows/ZeroTierOne.sln b/windows/ZeroTierOne.sln index 3c7b4d79..7bf5ecc2 100644 --- a/windows/ZeroTierOne.sln +++ b/windows/ZeroTierOne.sln @@ -13,11 +13,6 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroTierOne", "ZeroTierOne\ZeroTierOne.vcxproj", "{B00A4957-5977-4AC1-9EF4-571DC27EADA2}" EndProject Project("{6141683F-8A12-4E36-9623-2EB02B2C2303}") = "ZeroTierOneInstaller", "ZeroTierOneInstaller\ZeroTierOneInstaller.isproj", "{C4424647-0581-47D1-918B-575BFF735CAA}" - ProjectSection(ProjectDependencies) = postProject - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3} = {63D28112-9A56-42FA-9C3E-EF6C58AF09B3} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZeroTierOneService", "ZeroTierOneService\ZeroTierOneService.csproj", "{63D28112-9A56-42FA-9C3E-EF6C58AF09B3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -511,72 +506,6 @@ Global {C4424647-0581-47D1-918B-575BFF735CAA}.Win8 Release|Win32.Build.0 = SingleImage {C4424647-0581-47D1-918B-575BFF735CAA}.Win8 Release|x64.ActiveCfg = SingleImage {C4424647-0581-47D1-918B-575BFF735CAA}.Win8 Release|x64.Build.0 = SingleImage - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.CD_ROM|Any CPU.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.CD_ROM|Any CPU.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.CD_ROM|Mixed Platforms.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.CD_ROM|Win32.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.CD_ROM|x64.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Debug|Win32.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Debug|x64.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.DVD-5|Any CPU.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.DVD-5|Any CPU.Build.0 = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.DVD-5|Mixed Platforms.Build.0 = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.DVD-5|Win32.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.DVD-5|x64.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Release|Any CPU.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Release|Win32.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Release|x64.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.SingleImage|Any CPU.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.SingleImage|Any CPU.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.SingleImage|Mixed Platforms.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.SingleImage|Mixed Platforms.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.SingleImage|Win32.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.SingleImage|x64.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Debug|Any CPU.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Debug|Any CPU.Build.0 = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Debug|Win32.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Debug|x64.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Release|Any CPU.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Release|Any CPU.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Release|Mixed Platforms.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Release|Win32.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Vista Release|x64.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Debug|Any CPU.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Debug|Any CPU.Build.0 = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Debug|Win32.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Debug|x64.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Release|Any CPU.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Release|Any CPU.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Release|Mixed Platforms.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Release|Win32.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win7 Release|x64.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Debug|Any CPU.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Debug|Any CPU.Build.0 = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Debug|Win32.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Debug|x64.ActiveCfg = Debug|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Release|Any CPU.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Release|Any CPU.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Release|Mixed Platforms.Build.0 = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Release|Win32.ActiveCfg = Release|Any CPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3}.Win8 Release|x64.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/windows/ZeroTierOneService/App.config b/windows/ZeroTierOneService/App.config deleted file mode 100644 index 8e156463..00000000 --- a/windows/ZeroTierOneService/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/windows/ZeroTierOneService/Program.cs b/windows/ZeroTierOneService/Program.cs deleted file mode 100644 index b09884e5..00000000 --- a/windows/ZeroTierOneService/Program.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.ServiceProcess; -using System.Text; -using System.Threading.Tasks; - -namespace ZeroTierOneService -{ - static class Program - { - /// - /// The main entry point for the application. - /// - static void Main() - { - ServiceBase[] ServicesToRun; - ServicesToRun = new ServiceBase[] - { - new Service() - }; - ServiceBase.Run(ServicesToRun); - } - } -} diff --git a/windows/ZeroTierOneService/Properties/AssemblyInfo.cs b/windows/ZeroTierOneService/Properties/AssemblyInfo.cs deleted file mode 100644 index 058e8067..00000000 --- a/windows/ZeroTierOneService/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ZeroTierOneService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ZeroTierOneService")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("540d1a89-f952-4927-a99a-cb0fb4d9d619")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/windows/ZeroTierOneService/Service.Designer.cs b/windows/ZeroTierOneService/Service.Designer.cs deleted file mode 100644 index 5fcf6d9c..00000000 --- a/windows/ZeroTierOneService/Service.Designer.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace ZeroTierOneService -{ - partial class Service - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - // - // Service - // - this.ServiceName = "Service1"; - - } - - #endregion - - } -} diff --git a/windows/ZeroTierOneService/Service.cs b/windows/ZeroTierOneService/Service.cs deleted file mode 100644 index 306e8e4d..00000000 --- a/windows/ZeroTierOneService/Service.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Data; -using System.Diagnostics; -using System.ServiceProcess; -using System.Threading; - -namespace ZeroTierOneService -{ - public partial class Service : ServiceBase - { - public Service() - { - InitializeComponent(); - - this.ztHome = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + Path.DirectorySeparatorChar + "ZeroTier" + Path.DirectorySeparatorChar + "One"; - this.ztUpdatesFolder = this.ztHome + Path.DirectorySeparatorChar + "updates.d"; - this.ztBinary = this.ztHome + Path.DirectorySeparatorChar + (Environment.Is64BitOperatingSystem ? "zerotier-one_x64.exe" : "zerotier-one_x86.exe"); - - this.ztService = null; - this.ztKiller = null; - } - - protected override void OnStart(string[] args) - { - startZeroTierDaemon(); - } - - protected override void OnStop() - { - stopZeroTierDaemon(); - } - - private void startZeroTierDaemon() - { - if (ztService != null) - return; - ztService = new Process(); - try - { - ztService.StartInfo.UseShellExecute = false; - ztService.StartInfo.FileName = ztBinary; - ztService.StartInfo.Arguments = ""; - ztService.StartInfo.CreateNoWindow = true; - ztService.Exited += ztService_Exited; - ztService.Start(); - } - catch (Exception e) - { - Console.WriteLine(e.ToString()); - ztService = null; - } - } - - private void stopZeroTierDaemon() - { - while (ztKiller != null) - Thread.Sleep(250); - - ztKiller = new Process(); - try - { - ztKiller.StartInfo.UseShellExecute = false; - ztKiller.StartInfo.FileName = ztBinary; - ztKiller.StartInfo.Arguments = "-q terminate ServiceShutdown"; - ztKiller.StartInfo.CreateNoWindow = true; - ztKiller.Exited += ztKiller_Exited; - ztKiller.Start(); - } - catch (Exception e) - { - ztKiller = null; - } - - int waited = 0; - while (ztKiller != null) - { - Thread.Sleep(250); - if (++waited > 100) - break; - } - - if (ztService != null) - { - ztService.Kill(); - ztService = null; - } - } - - // Event generated when ztService exits - private void ztService_Exited(object sender, System.EventArgs e) - { - ztService = null; - } - - // Event generated when ztKiller is done - private void ztKiller_Exited(object sender, System.EventArgs e) - { - ztKiller = null; - } - - private string ztHome; - private string ztUpdatesFolder; - private string ztBinary; - - private volatile Process ztService; - private volatile Process ztKiller; - } -} diff --git a/windows/ZeroTierOneService/Service.resx b/windows/ZeroTierOneService/Service.resx deleted file mode 100644 index e5858cc2..00000000 --- a/windows/ZeroTierOneService/Service.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/windows/ZeroTierOneService/ZeroTierOneService.csproj b/windows/ZeroTierOneService/ZeroTierOneService.csproj deleted file mode 100644 index f409bbb8..00000000 --- a/windows/ZeroTierOneService/ZeroTierOneService.csproj +++ /dev/null @@ -1,116 +0,0 @@ - - - - - Debug - AnyCPU - {63D28112-9A56-42FA-9C3E-EF6C58AF09B3} - WinExe - Properties - ZeroTierOneService - ZeroTierOneService - v4.5 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - ZeroTierOneService.Program - - - false - - - false - - - 5809BB3255B4F32DD93619C1CF26A7DF6C282A89 - - - - - - - - - - - - - - - Component - - - Service.cs - - - - - - - - - - Service.cs - - - - - False - Microsoft .NET Framework 4.5 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - - - \ No newline at end of file -- cgit v1.2.3