From 60bf972c2606d0825bc90e388e0b088c66b20199 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Fri, 25 Jun 2021 12:32:19 +0200 Subject: [PATCH] Fix vcpkg command call --- Tools/setup.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Tools/setup.py b/Tools/setup.py index 99e1f53d..a555ca47 100644 --- a/Tools/setup.py +++ b/Tools/setup.py @@ -42,15 +42,16 @@ if __name__ == "__main__": ] vcpkg_triplet = "" - executable_file_suffix = "" + vcpkg_command = "" if sys.platform == "win32": + vcpkg_command = "vcpkg.exe" vcpkg_packages_list.append("infoware[d3d]") - executable_file_suffix = ".exe" execute("download_ffmpeg.bat", project_source_path + "/Tools", False) execute("bootstrap-vcpkg.bat", vcpkg_path, False) vcpkg_triplet = "x64-windows" elif sys.platform == "darwin": + vcpkg_command = "./vcpkg" vcpkg_packages_list.append("infoware[opencl]") vcpkg_packages_list.append("curl") # Hidden dependency from sentry execute("chmod +x bootstrap-vcpkg.sh", vcpkg_path) @@ -58,6 +59,7 @@ if __name__ == "__main__": execute("chmod +x vcpkg", vcpkg_path) vcpkg_triplet = "x64-osx" elif sys.platform == "linux": + vcpkg_command = "./vcpkg" vcpkg_packages_list.append("infoware[opencl]") execute("chmod +x bootstrap-vcpkg.sh", vcpkg_path) execute("./bootstrap-vcpkg.sh", vcpkg_path, False) @@ -65,8 +67,8 @@ if __name__ == "__main__": vcpkg_triplet = "x64-linux" vcpkg_packages = " ".join(vcpkg_packages_list) - execute("./vcpkg{} update".format(executable_file_suffix), vcpkg_path, False) - execute("./vcpkg{} upgrade --no-dry-run".format(executable_file_suffix), + execute("{} update".format(vcpkg_command), vcpkg_path, False) + execute("{} upgrade --no-dry-run".format(vcpkg_command), vcpkg_path, False) - execute("./vcpkg{} install {} --triplet {} --recurse".format(executable_file_suffix, + execute("{} install {} --triplet {} --recurse".format(vcpkg_command, vcpkg_packages, vcpkg_triplet), vcpkg_path, False)