ui: windows installer

Created a windows installer (vs deployment project).
This commit is contained in:
Manuel Dobusch
2015-12-02 14:50:02 +01:00
parent 09bc453fb0
commit 04196db81d
34 changed files with 5491 additions and 6 deletions
@@ -0,0 +1,48 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace SetupRemoveCacheFiles
{
[RunInstaller(true)]
public partial class SetupRemoveCacheFiles : System.Configuration.Install.Installer
{
public SetupRemoveCacheFiles()
{
InitializeComponent();
}
protected override void OnAfterRollback(IDictionary savedState)
{
base.OnAfterRollback(savedState);
DeleteCacheFiles();
}
protected override void OnAfterUninstall(IDictionary savedState)
{
base.OnAfterUninstall(savedState);
DeleteCacheFiles();
}
private void DeleteCacheFiles()
{
try
{
string appDataCoatiPath = Environment.GetEnvironmentVariable("APPDATA") + "\\..\\local\\Coati Software\\Coati\\";
Directory.Delete(appDataCoatiPath, true);
}
catch(Exception e)
{
// well damn
}
}
}
}