mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
commit
a76d53a21b
@ -644,14 +644,32 @@ namespace MediaBrowser.ServerApplication
|
|||||||
|
|
||||||
private static async Task InstallVcredist2013IfNeeded(ApplicationHost appHost, ILogger logger)
|
private static async Task InstallVcredist2013IfNeeded(ApplicationHost appHost, ILogger logger)
|
||||||
{
|
{
|
||||||
|
// Reference
|
||||||
|
// http://stackoverflow.com/questions/12206314/detect-if-visual-c-redistributable-for-visual-studio-2012-is-installed
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var version = ImageMagickEncoder.GetVersion();
|
var subkey = Environment.Is64BitProcess
|
||||||
return;
|
? "SOFTWARE\\WOW6432Node\\Microsoft\\VisualStudio\\12.0\\VC\\Runtimes\\x64"
|
||||||
|
: "SOFTWARE\\Microsoft\\VisualStudio\\12.0\\VC\\Runtimes\\x86";
|
||||||
|
|
||||||
|
using (RegistryKey ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default)
|
||||||
|
.OpenSubKey(subkey))
|
||||||
|
{
|
||||||
|
if (ndpKey != null && ndpKey.GetValue("Version") != null)
|
||||||
|
{
|
||||||
|
var installedVersion = ((string)ndpKey.GetValue("Version")).TrimStart('v');
|
||||||
|
if (installedVersion.StartsWith("12", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
logger.ErrorException("Error loading ImageMagick", ex);
|
logger.ErrorException("Error getting .NET Framework version", ex);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -104,6 +104,9 @@
|
|||||||
<Content Include="dashboard-ui\components\apphost.js">
|
<Content Include="dashboard-ui\components\apphost.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="dashboard-ui\components\categorysyncbuttons.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="dashboard-ui\components\channelmapper\channelmapper.js">
|
<Content Include="dashboard-ui\components\channelmapper\channelmapper.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user