Exemple #1
0
        private static void CopyFFmpeg(string destination, bool include32bit, bool include64bit)
        {
            if (include32bit)
            {
                if (!File.Exists(FFmpeg32bit))
                {
                    string filename = SetupHelpers.DownloadFile("https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-4.0-win32-static.zip");
                    ZipManager.Extract(filename, ".", false, new List <string>()
                    {
                        "ffmpeg.exe"
                    });
                    File.Move("ffmpeg.exe", FFmpeg32bit);
                }

                SetupHelpers.CopyFile(FFmpeg32bit, destination);
            }

            if (include64bit)
            {
                if (!File.Exists(FFmpeg64bit))
                {
                    string filename = SetupHelpers.DownloadFile("https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.0-win64-static.zip");
                    ZipManager.Extract(filename, ".", false, new List <string>()
                    {
                        "ffmpeg.exe"
                    });
                    File.Move("ffmpeg.exe", FFmpeg64bit);
                }

                SetupHelpers.CopyFile(FFmpeg64bit, destination);
            }
        }
Exemple #2
0
        private static void CopyFFmpeg(string destination, bool include32bit, bool include64bit)
        {
            if (include32bit)
            {
                if (!File.Exists(FFmpeg32bit))
                {
                    string filename = SetupHelpers.DownloadFile("https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-4.3.1-win32-static.zip");
                    ZipManager.Extract(filename, ".", false, entry => entry.Name.Equals("ffmpeg.exe", StringComparison.OrdinalIgnoreCase), 1_000_000_000);
                    File.Move("ffmpeg.exe", FFmpeg32bit);
                }

                SetupHelpers.CopyFile(FFmpeg32bit, destination);
            }

            if (include64bit)
            {
                if (!File.Exists(FFmpeg64bit))
                {
                    string filename = SetupHelpers.DownloadFile("https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.3.1-win64-static.zip");
                    ZipManager.Extract(filename, ".", false, entry => entry.Name.Equals("ffmpeg.exe", StringComparison.OrdinalIgnoreCase), 1_000_000_000);
                    File.Move("ffmpeg.exe", FFmpeg64bit);
                }

                SetupHelpers.CopyFile(FFmpeg64bit, destination);
            }
        }
Exemple #3
0
        private static void CopyFFmpeg(string destination, bool include32bit, bool include64bit)
        {
            if (include32bit)
            {
                if (!File.Exists(FFmpeg32bit))
                {
                    string filePath = SetupHelpers.DownloadFile("https://github.com/ShareX/FFmpeg/releases/download/v4.3.1/ffmpeg-4.3.1-win32.zip");
                    ZipManager.Extract(filePath, ".", false, entry => entry.Name.Equals("ffmpeg.exe", StringComparison.OrdinalIgnoreCase), 100_000_000);
                    File.Move("ffmpeg.exe", FFmpeg32bit);
                }

                SetupHelpers.CopyFile(FFmpeg32bit, destination);
            }

            if (include64bit)
            {
                if (!File.Exists(FFmpeg64bit))
                {
                    string filePath = SetupHelpers.DownloadFile("https://github.com/ShareX/FFmpeg/releases/download/v4.3.1/ffmpeg-4.3.1-win64.zip");
                    ZipManager.Extract(filePath, ".", false, entry => entry.Name.Equals("ffmpeg.exe", StringComparison.OrdinalIgnoreCase), 100_000_000);
                    File.Move("ffmpeg.exe", FFmpeg64bit);
                }

                SetupHelpers.CopyFile(FFmpeg64bit, destination);
            }
        }