diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-07-02 15:01:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-02 15:01:08 -0400 |
| commit | d199052e1005fbac552c9a76891575795834f95b (patch) | |
| tree | cf85ed81c16bcdf565997e959c2f7e7fc055d96c /MediaBrowser.ServerApplication | |
| parent | a382c6363f4693c53425a556f621a1ca9be55868 (diff) | |
| parent | c4a271534e603224ece366dcfa976012d5750fbe (diff) | |
Merge pull request #2742 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.ServerApplication')
| -rw-r--r-- | MediaBrowser.ServerApplication/MainStartup.cs | 44 | ||||
| -rw-r--r-- | MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj | 4 | ||||
| -rw-r--r-- | MediaBrowser.ServerApplication/packages.config | 4 |
3 files changed, 38 insertions, 14 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index 6b100b86d9..bc38476ca4 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -678,7 +678,7 @@ namespace MediaBrowser.ServerApplication _logger.Info("Calling Application.Exit"); //Application.Exit(); - + Environment.Exit(0); } @@ -770,19 +770,43 @@ namespace MediaBrowser.ServerApplication try { - var subkey = Environment.Is64BitProcess - ? "SOFTWARE\\WOW6432Node\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\x64" - : "SOFTWARE\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\x86"; + RegistryKey key; - using (RegistryKey ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default) - .OpenSubKey(subkey)) + if (Environment.Is64BitProcess) { - if (ndpKey != null && ndpKey.GetValue("Version") != null) + key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default) + .OpenSubKey("SOFTWARE\\Classes\\Installer\\Dependencies\\{d992c12e-cab2-426f-bde3-fb8c53950b0d}"); + + if (key == null) { - var installedVersion = ((string)ndpKey.GetValue("Version")).TrimStart('v'); - if (installedVersion.StartsWith("14", StringComparison.OrdinalIgnoreCase)) + key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default) + .OpenSubKey("SOFTWARE\\WOW6432Node\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\x64"); + } + } + else + { + key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default) + .OpenSubKey("SOFTWARE\\Classes\\Installer\\Dependencies\\{e2803110-78b3-4664-a479-3611a381656a}"); + + if (key == null) + { + key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default) + .OpenSubKey("SOFTWARE\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\x86"); + } + } + + if (key != null) + { + using (key) + { + var version = key.GetValue("Version"); + if (version != null) { - return; + var installedVersion = ((string)version).TrimStart('v'); + if (installedVersion.StartsWith("14", StringComparison.OrdinalIgnoreCase)) + { + return; + } } } } diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj index e918e0883f..591ac0fba0 100644 --- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj +++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj @@ -92,11 +92,11 @@ <HintPath>..\packages\SkiaSharp.1.58.0\lib\net45\SkiaSharp.dll</HintPath> </Reference> <Reference Include="SQLitePCLRaw.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1488e028ca7ab535, processorArchitecture=MSIL"> - <HintPath>..\packages\SQLitePCLRaw.core.1.1.6\lib\net45\SQLitePCLRaw.core.dll</HintPath> + <HintPath>..\packages\SQLitePCLRaw.core.1.1.7\lib\net45\SQLitePCLRaw.core.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="SQLitePCLRaw.provider.sqlite3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=62684c7b4f184e3f, processorArchitecture=MSIL"> - <HintPath>..\packages\SQLitePCLRaw.provider.sqlite3.net45.1.1.6\lib\net45\SQLitePCLRaw.provider.sqlite3.dll</HintPath> + <HintPath>..\packages\SQLitePCLRaw.provider.sqlite3.net45.1.1.7\lib\net45\SQLitePCLRaw.provider.sqlite3.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="System" /> diff --git a/MediaBrowser.ServerApplication/packages.config b/MediaBrowser.ServerApplication/packages.config index 2b0d503a47..0fa93db828 100644 --- a/MediaBrowser.ServerApplication/packages.config +++ b/MediaBrowser.ServerApplication/packages.config @@ -5,6 +5,6 @@ <package id="SharpCompress" version="0.14.0" targetFramework="net462" /> <package id="SimpleInjector" version="4.0.8" targetFramework="net462" /> <package id="SkiaSharp" version="1.58.0" targetFramework="net462" /> - <package id="SQLitePCLRaw.core" version="1.1.6" targetFramework="net462" /> - <package id="SQLitePCLRaw.provider.sqlite3.net45" version="1.1.6" targetFramework="net462" /> + <package id="SQLitePCLRaw.core" version="1.1.7" targetFramework="net462" /> + <package id="SQLitePCLRaw.provider.sqlite3.net45" version="1.1.7" targetFramework="net462" /> </packages>
\ No newline at end of file |
