From 5a07d36f569820e67752eb6282a585bdd17199af Mon Sep 17 00:00:00 2001 From: Horst Beham Date: Sun, 25 Apr 2021 18:41:53 +0200 Subject: [PATCH] removed DependencyChecker code that was used to ensure VC2010 Redist x86 is installed --- source/ChanSort.Api/ChanSort.Api.csproj | 1 - .../ChanSort.Api/Utils/DependencyChecker.cs | 21 ------------------- .../ChannelDb/ChannelDbSerializer.cs | 2 -- .../ServicelistDb/ServicelistDbSerializer.cs | 2 -- .../ChanSort.Loader.Panasonic/Serializer.cs | 2 -- .../BinarySerializer.cs | 3 --- .../Zip/DbSerializer.cs | 2 -- .../ChmgtDbSerializer.cs | 2 -- .../SettingsDbSerializer.cs | 2 -- source/ChanSort/MainForm.cs | 17 --------------- 10 files changed, 54 deletions(-) delete mode 100644 source/ChanSort.Api/Utils/DependencyChecker.cs diff --git a/source/ChanSort.Api/ChanSort.Api.csproj b/source/ChanSort.Api/ChanSort.Api.csproj index 3d315a1b..8dd499de 100644 --- a/source/ChanSort.Api/ChanSort.Api.csproj +++ b/source/ChanSort.Api/ChanSort.Api.csproj @@ -91,7 +91,6 @@ Resources.resx - diff --git a/source/ChanSort.Api/Utils/DependencyChecker.cs b/source/ChanSort.Api/Utils/DependencyChecker.cs deleted file mode 100644 index 21dad119..00000000 --- a/source/ChanSort.Api/Utils/DependencyChecker.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.IO; - -namespace ChanSort.Api -{ - public static class DepencencyChecker - { - public static bool IsVc2010RedistPackageX86Installed() - { - object value = Microsoft.Win32.Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86", - "Installed", null); - return value != null && Convert.ToInt32(value) == 1; - } - - public static void AssertVc2010RedistPackageX86Installed() - { - if (!IsVc2010RedistPackageX86Installed()) - throw new FileLoadException("Please download and install the Microsoft Visual C++ 2010 Redistributable Package (x86)"); - } - } -} diff --git a/source/ChanSort.Loader.Hisense/ChannelDb/ChannelDbSerializer.cs b/source/ChanSort.Loader.Hisense/ChannelDb/ChannelDbSerializer.cs index ec329c37..90e53c82 100644 --- a/source/ChanSort.Loader.Hisense/ChannelDb/ChannelDbSerializer.cs +++ b/source/ChanSort.Loader.Hisense/ChannelDb/ChannelDbSerializer.cs @@ -89,8 +89,6 @@ internal enum DvbLinkageMask public ChannelDbSerializer(string inputFile) : base(inputFile) { - DepencencyChecker.AssertVc2010RedistPackageX86Installed(); - this.Features.ChannelNameEdit = ChannelNameEditMode.All; this.Features.DeleteMode = DeleteMode.NotSupported; this.Features.CanSkipChannels = false; diff --git a/source/ChanSort.Loader.Hisense/ServicelistDb/ServicelistDbSerializer.cs b/source/ChanSort.Loader.Hisense/ServicelistDb/ServicelistDbSerializer.cs index fad8ba78..008eb94f 100644 --- a/source/ChanSort.Loader.Hisense/ServicelistDb/ServicelistDbSerializer.cs +++ b/source/ChanSort.Loader.Hisense/ServicelistDb/ServicelistDbSerializer.cs @@ -98,8 +98,6 @@ public class ServicelistDbSerializer : SerializerBase public ServicelistDbSerializer(string inputFile) : base(inputFile) { - DepencencyChecker.AssertVc2010RedistPackageX86Installed(); - Features.ChannelNameEdit = ChannelNameEditMode.All; Features.DeleteMode = DeleteMode.FlagWithPrNr; Features.CanSkipChannels = true; diff --git a/source/ChanSort.Loader.Panasonic/Serializer.cs b/source/ChanSort.Loader.Panasonic/Serializer.cs index 77101311..ab171772 100644 --- a/source/ChanSort.Loader.Panasonic/Serializer.cs +++ b/source/ChanSort.Loader.Panasonic/Serializer.cs @@ -39,8 +39,6 @@ enum CypherMode #region ctor() public Serializer(string inputFile) : base(inputFile) { - DepencencyChecker.AssertVc2010RedistPackageX86Installed(); - this.Features.ChannelNameEdit = ChannelNameEditMode.None; // due to the chaos with binary data inside the "sname" string column, writing back a name has undesired side effects this.Features.DeleteMode = DeleteMode.Physically; this.Features.CanSkipChannels = true; diff --git a/source/ChanSort.Loader.Philips/BinarySerializer.cs b/source/ChanSort.Loader.Philips/BinarySerializer.cs index 040d4f33..d1553d5e 100644 --- a/source/ChanSort.Loader.Philips/BinarySerializer.cs +++ b/source/ChanSort.Loader.Philips/BinarySerializer.cs @@ -97,9 +97,6 @@ public override void Load() this.chanLstBin.Load(this.FileName, msg => this.logMessages.AppendLine(msg)); this.dataFilePaths.Add(this.FileName); - if (chanLstBin.VersionMajor >= 25 && chanLstBin.VersionMajor <= 45) // need VC2010 Redist for the SQLite library - DepencencyChecker.AssertVc2010RedistPackageX86Installed(); - var dir = Path.GetDirectoryName(this.FileName) ?? ""; var channellib = Path.Combine(dir, "channellib"); var s2channellib = Path.Combine(dir, "s2channellib"); diff --git a/source/ChanSort.Loader.Samsung/Zip/DbSerializer.cs b/source/ChanSort.Loader.Samsung/Zip/DbSerializer.cs index 27c2de66..973b8301 100644 --- a/source/ChanSort.Loader.Samsung/Zip/DbSerializer.cs +++ b/source/ChanSort.Loader.Samsung/Zip/DbSerializer.cs @@ -24,8 +24,6 @@ private enum FileType { Unknown, SatDb, ChannelDbDvb, ChannelDbAnalog, ChannelDb #region ctor() public DbSerializer(string inputFile) : base(inputFile) { - DepencencyChecker.AssertVc2010RedistPackageX86Installed(); - this.Features.ChannelNameEdit = ChannelNameEditMode.All; this.Features.DeleteMode = DeleteMode.Physically; this.Features.CanSkipChannels = true; diff --git a/source/ChanSort.Loader.Toshiba/ChmgtDbSerializer.cs b/source/ChanSort.Loader.Toshiba/ChmgtDbSerializer.cs index 7521857d..bf126710 100644 --- a/source/ChanSort.Loader.Toshiba/ChmgtDbSerializer.cs +++ b/source/ChanSort.Loader.Toshiba/ChmgtDbSerializer.cs @@ -21,8 +21,6 @@ internal class ChmgtDbSerializer : SerializerBase public ChmgtDbSerializer(string inputFile) : base(inputFile) { - DepencencyChecker.AssertVc2010RedistPackageX86Installed(); - Features.ChannelNameEdit = ChannelNameEditMode.All; Features.DeleteMode = DeleteMode.Physically; Features.CanSkipChannels = false; diff --git a/source/ChanSort.Loader.Toshiba/SettingsDbSerializer.cs b/source/ChanSort.Loader.Toshiba/SettingsDbSerializer.cs index d6ecdf0f..5ae3115c 100644 --- a/source/ChanSort.Loader.Toshiba/SettingsDbSerializer.cs +++ b/source/ChanSort.Loader.Toshiba/SettingsDbSerializer.cs @@ -22,8 +22,6 @@ class SettingsDbSerializer : SerializerBase #region ctor() public SettingsDbSerializer(string inputFile) : base(inputFile) { - DepencencyChecker.AssertVc2010RedistPackageX86Installed(); - this.Features.ChannelNameEdit = ChannelNameEditMode.All; this.Features.DeleteMode = DeleteMode.Physically; this.Features.CanSkipChannels = false; diff --git a/source/ChanSort/MainForm.cs b/source/ChanSort/MainForm.cs index 2b29bd87..8c2fbc6b 100644 --- a/source/ChanSort/MainForm.cs +++ b/source/ChanSort/MainForm.cs @@ -141,23 +141,6 @@ private bool IsLeftGridSortedByNewProgNr private void InitAppAfterMainWindowWasShown() { - if (!DepencencyChecker.IsVc2010RedistPackageX86Installed()) - { - if (XtraMessageBox.Show(this, - "Some channel list file formats can only be read when the\n" + - "Microsoft Visual C++ 2010 Redistributable Package (x86) is installed.\n" + - "\nDo you want to open the download page and quit ChanSort?", - "ChanSort", - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1) == DialogResult.Yes) - { - System.Diagnostics.Process.Start("https://www.microsoft.com/en-us/download/details.aspx?id=5555"); - Application.Exit(); - return; - } - } - if (Config.Default.CheckForUpdates) this.BeginInvoke((Action) UpdateCheck.CheckForNewVersion); }