mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	Switch to using config file for installer
We will just build separate installers with the two different config files and publish once
This commit is contained in:
		
							parent
							
								
									844121acc9
								
							
						
					
					
						commit
						e43f66ef07
					
				@ -1,5 +1,9 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8" ?>
 | 
					<?xml version="1.0" encoding="utf-8" ?>
 | 
				
			||||||
<configuration>
 | 
					<configuration>
 | 
				
			||||||
 | 
					  <appSettings>
 | 
				
			||||||
 | 
					    <add key="product" value="server" />
 | 
				
			||||||
 | 
					    <add key="class" value="Release" />
 | 
				
			||||||
 | 
					  </appSettings>
 | 
				
			||||||
    <startup> 
 | 
					    <startup> 
 | 
				
			||||||
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
 | 
					        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
 | 
				
			||||||
    </startup>
 | 
					    </startup>
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								MediaBrowser.Installer/Icon.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								MediaBrowser.Installer/Icon.ico
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 138 KiB  | 
@ -1,5 +1,6 @@
 | 
				
			|||||||
using System;
 | 
					using System;
 | 
				
			||||||
using System.Collections.Generic;
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Configuration;
 | 
				
			||||||
using System.Diagnostics;
 | 
					using System.Diagnostics;
 | 
				
			||||||
using System.IO;
 | 
					using System.IO;
 | 
				
			||||||
using System.Net;
 | 
					using System.Net;
 | 
				
			||||||
@ -19,7 +20,7 @@ namespace MediaBrowser.Installer
 | 
				
			|||||||
    public partial class MainWindow : Window
 | 
					    public partial class MainWindow : Window
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        protected PackageVersionClass PackageClass = PackageVersionClass.Release;
 | 
					        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 PackageName = "MBServer";
 | 
				
			||||||
        protected string RootSuffix = "-Server";
 | 
					        protected string RootSuffix = "-Server";
 | 
				
			||||||
        protected string TargetExe = "MediaBrowser.ServerApplication.exe";
 | 
					        protected string TargetExe = "MediaBrowser.ServerApplication.exe";
 | 
				
			||||||
@ -64,29 +65,26 @@ namespace MediaBrowser.Installer
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        protected void GetArgs()
 | 
					        protected void GetArgs()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            var args = Environment.GetCommandLineArgs();
 | 
					            var product = ConfigurationManager.AppSettings["product"] ?? "server";
 | 
				
			||||||
 | 
					            PackageClass = (PackageVersionClass) Enum.Parse(typeof (PackageVersionClass), ConfigurationManager.AppSettings["class"] ?? "Release");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            switch (product.ToLower())
 | 
				
			||||||
            var parameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
 | 
					 | 
				
			||||||
            foreach (var arg in args)
 | 
					 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                var nameValue = arg.Split('=');
 | 
					                case "mbt":
 | 
				
			||||||
                try
 | 
					                    PackageName = "MBTheater";
 | 
				
			||||||
                {
 | 
					                    RootSuffix = "-UI";
 | 
				
			||||||
                    parameters[nameValue[0]] = nameValue[1];
 | 
					                    TargetExe = "MediaBrowser.UI.exe";
 | 
				
			||||||
                }
 | 
					                    FriendlyName = "Media Browser Theater";
 | 
				
			||||||
                catch // let it default below
 | 
					                    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);
 | 
					            RootPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MediaBrowser" + RootSuffix);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
@ -28,8 +28,8 @@
 | 
				
			|||||||
    <ProductName>Media Browser Installer</ProductName>
 | 
					    <ProductName>Media Browser Installer</ProductName>
 | 
				
			||||||
    <PublisherName>Media Browser Team</PublisherName>
 | 
					    <PublisherName>Media Browser Team</PublisherName>
 | 
				
			||||||
    <SuiteName>Media Browser</SuiteName>
 | 
					    <SuiteName>Media Browser</SuiteName>
 | 
				
			||||||
    <TrustUrlParameters>true</TrustUrlParameters>
 | 
					    <OpenBrowserOnPublish>false</OpenBrowserOnPublish>
 | 
				
			||||||
    <ApplicationRevision>10</ApplicationRevision>
 | 
					    <ApplicationRevision>11</ApplicationRevision>
 | 
				
			||||||
    <ApplicationVersion>0.1.1.%2a</ApplicationVersion>
 | 
					    <ApplicationVersion>0.1.1.%2a</ApplicationVersion>
 | 
				
			||||||
    <UseApplicationTrust>false</UseApplicationTrust>
 | 
					    <UseApplicationTrust>false</UseApplicationTrust>
 | 
				
			||||||
    <PublishWizardCompleted>true</PublishWizardCompleted>
 | 
					    <PublishWizardCompleted>true</PublishWizardCompleted>
 | 
				
			||||||
@ -61,7 +61,7 @@
 | 
				
			|||||||
    <ManifestKeyFile>MediaBrowser.Installer_1_TemporaryKey.pfx</ManifestKeyFile>
 | 
					    <ManifestKeyFile>MediaBrowser.Installer_1_TemporaryKey.pfx</ManifestKeyFile>
 | 
				
			||||||
  </PropertyGroup>
 | 
					  </PropertyGroup>
 | 
				
			||||||
  <PropertyGroup>
 | 
					  <PropertyGroup>
 | 
				
			||||||
    <GenerateManifests>false</GenerateManifests>
 | 
					    <GenerateManifests>true</GenerateManifests>
 | 
				
			||||||
  </PropertyGroup>
 | 
					  </PropertyGroup>
 | 
				
			||||||
  <PropertyGroup>
 | 
					  <PropertyGroup>
 | 
				
			||||||
    <SignManifests>true</SignManifests>
 | 
					    <SignManifests>true</SignManifests>
 | 
				
			||||||
@ -72,6 +72,9 @@
 | 
				
			|||||||
  <PropertyGroup>
 | 
					  <PropertyGroup>
 | 
				
			||||||
    <ApplicationManifest>Properties\app.manifest</ApplicationManifest>
 | 
					    <ApplicationManifest>Properties\app.manifest</ApplicationManifest>
 | 
				
			||||||
  </PropertyGroup>
 | 
					  </PropertyGroup>
 | 
				
			||||||
 | 
					  <PropertyGroup>
 | 
				
			||||||
 | 
					    <ApplicationIcon>Icon.ico</ApplicationIcon>
 | 
				
			||||||
 | 
					  </PropertyGroup>
 | 
				
			||||||
  <ItemGroup>
 | 
					  <ItemGroup>
 | 
				
			||||||
    <Reference Include="Ionic.Zip">
 | 
					    <Reference Include="Ionic.Zip">
 | 
				
			||||||
      <HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
 | 
					      <HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
 | 
				
			||||||
@ -80,6 +83,7 @@
 | 
				
			|||||||
      <HintPath>..\packages\ServiceStack.Text.3.9.37\lib\net35\ServiceStack.Text.dll</HintPath>
 | 
					      <HintPath>..\packages\ServiceStack.Text.3.9.37\lib\net35\ServiceStack.Text.dll</HintPath>
 | 
				
			||||||
    </Reference>
 | 
					    </Reference>
 | 
				
			||||||
    <Reference Include="System" />
 | 
					    <Reference Include="System" />
 | 
				
			||||||
 | 
					    <Reference Include="System.Configuration" />
 | 
				
			||||||
    <Reference Include="System.Data" />
 | 
					    <Reference Include="System.Data" />
 | 
				
			||||||
    <Reference Include="System.Web" />
 | 
					    <Reference Include="System.Web" />
 | 
				
			||||||
    <Reference Include="System.Xml" />
 | 
					    <Reference Include="System.Xml" />
 | 
				
			||||||
@ -145,6 +149,7 @@
 | 
				
			|||||||
      <Generator>ResXFileCodeGenerator</Generator>
 | 
					      <Generator>ResXFileCodeGenerator</Generator>
 | 
				
			||||||
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
 | 
					      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
 | 
				
			||||||
    </EmbeddedResource>
 | 
					    </EmbeddedResource>
 | 
				
			||||||
 | 
					    <None Include="mbt.config" />
 | 
				
			||||||
    <None Include="MediaBrowser.Installer_1_TemporaryKey.pfx" />
 | 
					    <None Include="MediaBrowser.Installer_1_TemporaryKey.pfx" />
 | 
				
			||||||
    <None Include="Properties\app.manifest" />
 | 
					    <None Include="Properties\app.manifest" />
 | 
				
			||||||
    <None Include="Properties\Settings.settings">
 | 
					    <None Include="Properties\Settings.settings">
 | 
				
			||||||
@ -196,6 +201,9 @@
 | 
				
			|||||||
      <EmbedInteropTypes>True</EmbedInteropTypes>
 | 
					      <EmbedInteropTypes>True</EmbedInteropTypes>
 | 
				
			||||||
    </COMReference>
 | 
					    </COMReference>
 | 
				
			||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <Resource Include="Icon.ico" />
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 | 
					  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 | 
				
			||||||
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
 | 
					  <!-- 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.
 | 
					       Other similar extension points exist, see Microsoft.Common.targets.
 | 
				
			||||||
 | 
				
			|||||||
@ -19,8 +19,8 @@
 | 
				
			|||||||
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
 | 
					        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
 | 
				
			||||||
      </requestedPrivileges>
 | 
					      </requestedPrivileges>
 | 
				
			||||||
      <applicationRequestMinimum>
 | 
					      <applicationRequestMinimum>
 | 
				
			||||||
        <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
 | 
					 | 
				
			||||||
        <defaultAssemblyRequest permissionSetReference="Custom" />
 | 
					        <defaultAssemblyRequest permissionSetReference="Custom" />
 | 
				
			||||||
 | 
					        <PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" Unrestricted="true" />
 | 
				
			||||||
      </applicationRequestMinimum>
 | 
					      </applicationRequestMinimum>
 | 
				
			||||||
    </security>
 | 
					    </security>
 | 
				
			||||||
  </trustInfo>
 | 
					  </trustInfo>
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										10
									
								
								MediaBrowser.Installer/mbt.config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								MediaBrowser.Installer/mbt.config
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8" ?>
 | 
				
			||||||
 | 
					<configuration>
 | 
				
			||||||
 | 
					  <appSettings>
 | 
				
			||||||
 | 
					    <add key="product" value="mbt" />
 | 
				
			||||||
 | 
					    <add key="class" value="Release" />
 | 
				
			||||||
 | 
					  </appSettings>
 | 
				
			||||||
 | 
					    <startup> 
 | 
				
			||||||
 | 
					        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
 | 
				
			||||||
 | 
					    </startup>
 | 
				
			||||||
 | 
					</configuration>
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user