diff --git a/ShareX.Setup/Program.cs b/ShareX.Setup/Program.cs index d3fc5cdcf..ace63b9cf 100644 --- a/ShareX.Setup/Program.cs +++ b/ShareX.Setup/Program.cs @@ -402,7 +402,13 @@ private static void DownloadFFmpeg() { if (!File.Exists(FFmpegPath)) { - string filePath = SetupHelpers.DownloadFile(FFmpegDownloadURL); + string fileName = Path.GetFileName(FFmpegDownloadURL); + string filePath = Path.Combine(OutputDir, fileName); + + Console.WriteLine("Downloading: " + FFmpegDownloadURL); + URLHelpers.DownloadFile(FFmpegDownloadURL, filePath); + + Console.WriteLine("Extracting: " + filePath); ZipManager.Extract(filePath, OutputDir, false, entry => entry.Name.Equals("ffmpeg.exe", StringComparison.OrdinalIgnoreCase)); } } diff --git a/ShareX.Setup/SetupHelpers.cs b/ShareX.Setup/SetupHelpers.cs index 8a4a85ed5..b9a0e0268 100644 --- a/ShareX.Setup/SetupHelpers.cs +++ b/ShareX.Setup/SetupHelpers.cs @@ -33,18 +33,6 @@ namespace ShareX.Setup { internal class SetupHelpers { - public static string DownloadFile(string url) - { - string fileName = Path.GetFileName(url); - string filePath = Path.GetFullPath(fileName); - - Console.WriteLine($"Downloading: \"{url}\" -> \"{filePath}\""); - - URLHelpers.DownloadFile(url, filePath); - - return filePath; - } - public static void CopyFile(string path, string toFolder) { CopyFiles(new string[] { path }, toFolder);