diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
| commit | 767cdc1f6f6a63ce997fc9476911e2c361f9d402 (patch) | |
| tree | 49add55976f895441167c66cfa95e5c7688d18ce /MediaBrowser.Server.Uninstall | |
| parent | 845554722efaed872948a9e0f7202e3ef52f1b6e (diff) | |
Pushing missing changes
Diffstat (limited to 'MediaBrowser.Server.Uninstall')
| -rw-r--r-- | MediaBrowser.Server.Uninstall/App.config | 6 | ||||
| -rw-r--r-- | MediaBrowser.Server.Uninstall/Globals.cs | 24 | ||||
| -rw-r--r-- | MediaBrowser.Server.Uninstall/MediaBrowser.Server.Uninstall.csproj | 65 | ||||
| -rw-r--r-- | MediaBrowser.Server.Uninstall/Program.cs | 30 | ||||
| -rw-r--r-- | MediaBrowser.Server.Uninstall/Properties/AssemblyInfo.cs | 35 |
5 files changed, 160 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Uninstall/App.config b/MediaBrowser.Server.Uninstall/App.config new file mode 100644 index 0000000000..8e15646352 --- /dev/null +++ b/MediaBrowser.Server.Uninstall/App.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" ?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> + </startup> +</configuration>
\ No newline at end of file diff --git a/MediaBrowser.Server.Uninstall/Globals.cs b/MediaBrowser.Server.Uninstall/Globals.cs new file mode 100644 index 0000000000..098420ccb0 --- /dev/null +++ b/MediaBrowser.Server.Uninstall/Globals.cs @@ -0,0 +1,24 @@ + +namespace MediaBrowser.Server.Uninstall +{ + /// <summary> + /// Class Globals + /// </summary> + public static class Globals + { + /// <summary> + /// The product name + /// </summary> + public static string ProductName = "Media Browser Server"; + + /// <summary> + /// The suite name + /// </summary> + public static string SuiteName = "Media Browser 3"; + + /// <summary> + /// The publisher name + /// </summary> + public static string PublisherName = "Media Browser Team"; + } +} diff --git a/MediaBrowser.Server.Uninstall/MediaBrowser.Server.Uninstall.csproj b/MediaBrowser.Server.Uninstall/MediaBrowser.Server.Uninstall.csproj new file mode 100644 index 0000000000..bce0138aff --- /dev/null +++ b/MediaBrowser.Server.Uninstall/MediaBrowser.Server.Uninstall.csproj @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{5443422F-9548-417A-90DD-2FC91F2B5999}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MediaBrowser.Server.Uninstall</RootNamespace> + <AssemblyName>MediaBrowser.Server.Uninstall</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup> + <NoWin32Manifest>true</NoWin32Manifest> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\MediaBrowser.Common\Updates\ClickOnceHelper.cs"> + <Link>ClickOnceHelper.cs</Link> + </Compile> + <Compile Include="Globals.cs" /> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project>
\ No newline at end of file diff --git a/MediaBrowser.Server.Uninstall/Program.cs b/MediaBrowser.Server.Uninstall/Program.cs new file mode 100644 index 0000000000..13f4e90f5a --- /dev/null +++ b/MediaBrowser.Server.Uninstall/Program.cs @@ -0,0 +1,30 @@ +using MediaBrowser.Common.Updates; +using System; +using System.IO; + +namespace MediaBrowser.Server.Uninstall +{ + /// <summary> + /// Class Program + /// </summary> + class Program + { + /// <summary> + /// Defines the entry point of the application. + /// </summary> + /// <param name="args">The args.</param> + static void Main(string[] args) + { + new ClickOnceHelper(Globals.PublisherName, Globals.ProductName, Globals.SuiteName).Uninstall(); + + // Delete all files from publisher folder and folder itself on uninstall + + var publisherFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Globals.PublisherName); + + if (Directory.Exists(publisherFolder)) + { + Directory.Delete(publisherFolder, true); + } + } + } +} diff --git a/MediaBrowser.Server.Uninstall/Properties/AssemblyInfo.cs b/MediaBrowser.Server.Uninstall/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..e5f0891ca7 --- /dev/null +++ b/MediaBrowser.Server.Uninstall/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +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("MediaBrowser.Server.Uninstall")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MediaBrowser.Server.Uninstall")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[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("468efe03-708c-4b38-b663-54f80b2edf83")] + +// 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")] |
