public void FetchFeatureInformation() { UpdateCacher.CheckPackage("eac3to"); initBackgroundWorker(); args = new eac3toArgs(); args.eac3toPath = MainForm.Instance.Settings.Eac3to.Path; args.resultState = ResultState.FeatureCompleted; args.args = string.Empty; args.workingFolder = System.IO.Path.GetDirectoryName(MainForm.Instance.Settings.Eac3to.Path); features = new List <Feature>(); backgroundWorker.ReportProgress(0, "Retrieving features..."); backgroundWorker.RunWorkerAsync(args); }
public void FetchStreamInformation(int iFeatureNumber) { UpdateCacher.CheckPackage("eac3to"); initBackgroundWorker(); args = new eac3toArgs(); args.eac3toPath = MainForm.Instance.Settings.Eac3to.Path; args.resultState = ResultState.StreamCompleted; args.args = iFeatureNumber.ToString(); args.featureNumber = iFeatureNumber.ToString(); args.workingFolder = System.IO.Path.GetDirectoryName(MainForm.Instance.Settings.Eac3to.Path); backgroundWorker.ReportProgress(0, "Retrieving streams..."); backgroundWorker.RunWorkerAsync(args); }
public Joiner(string exe) { UpdateCacher.CheckPackage("besplit"); executable = exe; }
/// <summary> /// Detects the AviSynth version/date and writes it into the log /// </summary> /// <param name="oLog">the version information will be added to the log if available</param> public static void CheckAviSynth(LogItem oLog) { string fileVersion = string.Empty; string fileDate = string.Empty; string fileProductName = string.Empty; bool bFoundInstalledAviSynth = false; // remove msvc files LSMASHFileActions(true); PortableAviSynthActions(true); // detect system installation string syswow64path = Environment.GetFolderPath(Environment.SpecialFolder.System).ToLowerInvariant().Replace("\\system32", "\\SysWOW64"); #if x86 // on a x86 MeGUI build try the SysWOW64 folder first if (GetFileInformation(Path.Combine(syswow64path, "avisynth.dll"), out fileVersion, out fileDate, out fileProductName)) { bFoundInstalledAviSynth = true; } else if (!Directory.Exists(syswow64path) && GetFileInformation(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "avisynth.dll"), out fileVersion, out fileDate, out fileProductName)) #endif #if x64 if (GetFileInformation(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "avisynth.dll"), out fileVersion, out fileDate, out fileProductName)) #endif bFoundInstalledAviSynth = true; if (bFoundInstalledAviSynth) { if (fileProductName.Contains("+") && !MainForm.Instance.Settings.AlwaysUsePortableAviSynth) { MainForm.Instance.Settings.AviSynthPlus = true; } if (oLog != null) { oLog.LogValue("AviSynth" + (fileProductName.Contains("+") ? "+" : String.Empty), fileVersion + " (" + fileDate + ")" + (!MainForm.Instance.Settings.AlwaysUsePortableAviSynth ? String.Empty : " (inactive)")); } if (!MainForm.Instance.Settings.AlwaysUsePortableAviSynth) { if (!MainForm.Instance.Settings.AviSynthPlus) { LSMASHFileActions(false); } return; } } // detects included avisynth MainForm.Instance.Settings.PortableAviSynth = false; if (GetFileInformation(MainForm.Instance.Settings.AviSynth.Path, out fileVersion, out fileDate, out fileProductName)) { if (oLog != null) { oLog.LogValue("AviSynth" + (fileProductName.Contains("+") ? "+" : String.Empty) + " portable", fileVersion + " (" + fileDate + ")" + (!bFoundInstalledAviSynth ? String.Empty : " (active)")); } if (!bFoundInstalledAviSynth || MainForm.Instance.Settings.AlwaysUsePortableAviSynth) { UpdateCacher.CheckPackage("avs"); MainForm.Instance.Settings.PortableAviSynth = true; PortableAviSynthActions(false); if (fileProductName.Contains("+")) { MainForm.Instance.Settings.AviSynthPlus = true; } } } else if (!bFoundInstalledAviSynth) { if (oLog != null) { oLog.LogValue("AviSynth", "not found", ImageType.Error); } } if (!MainForm.Instance.Settings.AviSynthPlus) { LSMASHFileActions(false); } }