Implemented ExtensionManager

This commit is contained in:
erri120 2019-10-28 15:27:13 +01:00
parent 73e9408ed2
commit 5ffca32581
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135

View File

@ -85,6 +85,21 @@ namespace Wabbajack
Environment.Exit(1); Environment.Exit(1);
} }
var appPath = Assembly.GetExecutingAssembly().Location;
var iconPath = Path.Combine(Path.GetDirectoryName(appPath), "wabbajack.ico");
if(!File.Exists(iconPath))
{
using (var s = Utils.GetResourceStream("Wabbajack.UI.Icons.icon-embedded.ico"))
using (var fs = new FileStream(iconPath, FileMode.Create))
{
s.CopyTo(fs);
}
}
if (!ExtensionManager.IsExtensionAssociated() || ExtensionManager.IsAssociationOutdated(iconPath, appPath))
{
ExtensionManager.AssociateExtension(iconPath, appPath);
}
Mode = mode; Mode = mode;
// Define commands // Define commands