From b50f78e5da6f3fdfc59e577ca61b88771da7d211 Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Thu, 12 Jul 2012 02:55:27 -0400 Subject: Initial check-in --- MediaBrowser.Program/App.config | 17 ++++++ MediaBrowser.Program/MediaBrowser.Program.csproj | 69 ++++++++++++++++++++++++ MediaBrowser.Program/Program.cs | 48 +++++++++++++++++ MediaBrowser.Program/Properties/AssemblyInfo.cs | 36 +++++++++++++ 4 files changed, 170 insertions(+) create mode 100644 MediaBrowser.Program/App.config create mode 100644 MediaBrowser.Program/MediaBrowser.Program.csproj create mode 100644 MediaBrowser.Program/Program.cs create mode 100644 MediaBrowser.Program/Properties/AssemblyInfo.cs (limited to 'MediaBrowser.Program') diff --git a/MediaBrowser.Program/App.config b/MediaBrowser.Program/App.config new file mode 100644 index 000000000..04df0f820 --- /dev/null +++ b/MediaBrowser.Program/App.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MediaBrowser.Program/MediaBrowser.Program.csproj b/MediaBrowser.Program/MediaBrowser.Program.csproj new file mode 100644 index 000000000..4031aaf0b --- /dev/null +++ b/MediaBrowser.Program/MediaBrowser.Program.csproj @@ -0,0 +1,69 @@ + + + + + Debug + AnyCPU + {78AEA637-AF42-4F43-8E2B-0F2F0E2931F3} + Exe + Properties + MediaBrowser.Program + MediaBrowser.Program + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {17e1f4e6-8abd-4fe5-9ecf-43d4b6087ba2} + MediaBrowser.Controller + + + {9b1ddd79-5134-4df3-ace3-d1957a7350d8} + MediaBrowser.Model + + + + + \ No newline at end of file diff --git a/MediaBrowser.Program/Program.cs b/MediaBrowser.Program/Program.cs new file mode 100644 index 000000000..668869685 --- /dev/null +++ b/MediaBrowser.Program/Program.cs @@ -0,0 +1,48 @@ +using System; +using System.Configuration; +using System.IO; +using MediaBrowser.Controller; + +namespace MediaBrowser.Program +{ + class Program + { + static void Main(string[] args) + { + LoadKernel(); + } + + private static void LoadKernel() + { + DateTime now = DateTime.Now; + + 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.Init(); + + var time = DateTime.Now - now; + Console.WriteLine("Done in " + time.TotalSeconds + " seconds"); + Console.WriteLine("Press Enter to quit."); + Console.ReadLine(); + } + } +} diff --git a/MediaBrowser.Program/Properties/AssemblyInfo.cs b/MediaBrowser.Program/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..f3ba9f028 --- /dev/null +++ b/MediaBrowser.Program/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("MediaBrowser.Program")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MediaBrowser.Program")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[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("4be8a93f-7491-48e4-9400-f3a95a7bbdb2")] + +// 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")] -- cgit v1.2.3