aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Program
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Program')
-rw-r--r--MediaBrowser.Program/App.config17
-rw-r--r--MediaBrowser.Program/MediaBrowser.Program.csproj69
-rw-r--r--MediaBrowser.Program/Program.cs48
-rw-r--r--MediaBrowser.Program/Properties/AssemblyInfo.cs36
4 files changed, 170 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <appSettings>
+ <add key="DataPath" value="..\..\..\ProgramData" />
+ </appSettings>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+ </startup>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ 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 @@
+<?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>{78AEA637-AF42-4F43-8E2B-0F2F0E2931F3}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MediaBrowser.Program</RootNamespace>
+ <AssemblyName>MediaBrowser.Program</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>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Configuration" />
+ <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="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj">
+ <Project>{17e1f4e6-8abd-4fe5-9ecf-43d4b6087ba2}</Project>
+ <Name>MediaBrowser.Controller</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj">
+ <Project>{9b1ddd79-5134-4df3-ace3-d1957a7350d8}</Project>
+ <Name>MediaBrowser.Model</Name>
+ </ProjectReference>
+ </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.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")]