diff --git a/MediaBrowser.Installer/App.config b/MediaBrowser.Installer/App.config index 8e15646352..eb69b68d0d 100644 --- a/MediaBrowser.Installer/App.config +++ b/MediaBrowser.Installer/App.config @@ -1,5 +1,9 @@  + + + + diff --git a/MediaBrowser.Installer/Icon.ico b/MediaBrowser.Installer/Icon.ico new file mode 100644 index 0000000000..4acd8f9219 Binary files /dev/null and b/MediaBrowser.Installer/Icon.ico differ diff --git a/MediaBrowser.Installer/MainWindow.xaml.cs b/MediaBrowser.Installer/MainWindow.xaml.cs index efa2c71774..00b314b54b 100644 --- a/MediaBrowser.Installer/MainWindow.xaml.cs +++ b/MediaBrowser.Installer/MainWindow.xaml.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Configuration; using System.Diagnostics; using System.IO; using System.Net; @@ -19,7 +20,7 @@ namespace MediaBrowser.Installer public partial class MainWindow : Window { protected PackageVersionClass PackageClass = PackageVersionClass.Release; - protected Version PackageVersion = new Version(10,0,0,0); + protected Version PackageVersion = new Version(4,0,0,0); protected string PackageName = "MBServer"; protected string RootSuffix = "-Server"; protected string TargetExe = "MediaBrowser.ServerApplication.exe"; @@ -64,29 +65,26 @@ namespace MediaBrowser.Installer protected void GetArgs() { - var args = Environment.GetCommandLineArgs(); + var product = ConfigurationManager.AppSettings["product"] ?? "server"; + PackageClass = (PackageVersionClass) Enum.Parse(typeof (PackageVersionClass), ConfigurationManager.AppSettings["class"] ?? "Release"); - - var parameters = new Dictionary(StringComparer.OrdinalIgnoreCase); - foreach (var arg in args) + switch (product.ToLower()) { - var nameValue = arg.Split('='); - try - { - parameters[nameValue[0]] = nameValue[1]; - } - catch // let it default below - { - } + case "mbt": + PackageName = "MBTheater"; + RootSuffix = "-UI"; + TargetExe = "MediaBrowser.UI.exe"; + FriendlyName = "Media Browser Theater"; + break; + + default: + PackageName = "MBServer"; + RootSuffix = "-Server"; + TargetExe = "MediaBrowser.ServerApplication.exe"; + FriendlyName = "Media Browser Server"; + break; } - // fill in our arguments if there - PackageName = parameters.GetValueOrDefault("package","MBServer"); - PackageClass = (PackageVersionClass)Enum.Parse(typeof(PackageVersionClass), parameters.GetValueOrDefault("class","Release")); - PackageVersion = new Version(parameters.GetValueOrDefault("version","10.0.0.0")); - RootSuffix = parameters.GetValueOrDefault("suffix", "-Server"); - TargetExe = parameters.GetValueOrDefault("target", "MediaBrowser.ServerApplication.exe"); - FriendlyName = parameters.GetValueOrDefault("name", PackageName); RootPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MediaBrowser" + RootSuffix); } diff --git a/MediaBrowser.Installer/MediaBrowser.Installer.csproj b/MediaBrowser.Installer/MediaBrowser.Installer.csproj index ff6537b21f..ae7277abec 100644 --- a/MediaBrowser.Installer/MediaBrowser.Installer.csproj +++ b/MediaBrowser.Installer/MediaBrowser.Installer.csproj @@ -28,8 +28,8 @@ Media Browser Installer Media Browser Team Media Browser - true - 10 + false + 11 0.1.1.%2a false true @@ -61,7 +61,7 @@ MediaBrowser.Installer_1_TemporaryKey.pfx - false + true true @@ -72,6 +72,9 @@ Properties\app.manifest + + Icon.ico + ..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll @@ -80,6 +83,7 @@ ..\packages\ServiceStack.Text.3.9.37\lib\net35\ServiceStack.Text.dll + @@ -145,6 +149,7 @@ ResXFileCodeGenerator Resources.Designer.cs + @@ -196,6 +201,9 @@ True + + +