Added a BaseKernel for the UI and Server to share, and made some other minor re-organizations.

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-07-21 14:39:47 -04:00
parent 3f55707755
commit 0a48b5e31a
41 changed files with 255 additions and 397 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="DataPath" value="..\..\..\ProgramData" />
<add key="ProgramDataPath" value="..\..\..\ProgramData" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />

View File

@@ -1,6 +1,4 @@
using System;
using System.Configuration;
using System.IO;
using MediaBrowser.Controller;
namespace MediaBrowser.Program
@@ -18,24 +16,7 @@ namespace MediaBrowser.Program
Console.WriteLine("Loading");
string installDir = ConfigurationManager.AppSettings["DataPath"];
if (!Path.IsPathRooted(installDir))
{
string path = System.Reflection.Assembly.GetExecutingAssembly().Location;
path = Path.GetDirectoryName(path);
installDir = Path.Combine(path, installDir);
installDir = Path.GetFullPath(installDir);
}
if (!Directory.Exists(installDir))
{
Directory.CreateDirectory(installDir);
}
Kernel kernel = new Kernel(installDir);
Kernel kernel = new Kernel();
kernel.Init();