From 962f3ea4cd9b10cde584137ab5798bc426ef6529 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Fri, 22 Jul 2022 13:35:23 +0200 Subject: [PATCH] Fix setup script --- Tools/download_ffmpeg.py | 12 ++++++------ Tools/setup.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Tools/download_ffmpeg.py b/Tools/download_ffmpeg.py index 39d2e736..703fa10c 100644 --- a/Tools/download_ffmpeg.py +++ b/Tools/download_ffmpeg.py @@ -99,12 +99,9 @@ def download_prebuild_ffmpeg_windows(extraction_path: str): extract_zip_executables(extraction_path, ffmpeg_path_and_filename) - -if __name__ == "__main__": - +def execute(): # Make sure the script is always started from the same folder root_path = cd_repo_root_path() - tools_path = os.path.join(root_path, "Tools") extraction_path = os.path.join(root_path, "Common/ffmpeg") if os.path.exists(extraction_path): @@ -112,8 +109,11 @@ if __name__ == "__main__": os.makedirs(extraction_path) - if platform.system() == "Windows": download_prebuild_ffmpeg_windows(extraction_path) - elif platform.os.system() == "Darwin": + elif platform.system() == "Darwin": download_prebuild_ffmpeg_mac(extraction_path) + + +if __name__ == "__main__": + execute() diff --git a/Tools/setup.py b/Tools/setup.py index 5b5c56b6..bab3a9e9 100755 --- a/Tools/setup.py +++ b/Tools/setup.py @@ -78,12 +78,13 @@ without the ScreenPlay-vcpkg folder (E.g. py .\setup.py --path "D:/Backup/Code/Q "libarchive" ] + download_ffmpeg.execute() + if system() == "Windows": vcpkg_command = "vcpkg.exe" vcpkg_packages_list.append("infoware[d3d]") vcpkg_packages_list.append("sentry-native") platform_command.add("bootstrap-vcpkg.bat", vcpkg_path, False) - download_ffmpeg.download_prebuild_ffmpeg_windows() vcpkg_triplet = ["x64-windows"] elif system() == "Darwin": vcpkg_command = "./vcpkg" @@ -93,7 +94,6 @@ without the ScreenPlay-vcpkg folder (E.g. py .\setup.py --path "D:/Backup/Code/Q platform_command.add("./bootstrap-vcpkg.sh", vcpkg_path, False) platform_command.add("chmod +x vcpkg", vcpkg_path) vcpkg_triplet = ["x64-osx", "arm64-osx"] - download_ffmpeg.download_prebuild_ffmpeg_mac() elif system() == "Linux": vcpkg_command = "./vcpkg" #vcpkg_packages_list.append("infoware[opengl]")