aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/mach_bootstrap.py4
-rw-r--r--python/servo/platform/windows.py30
2 files changed, 20 insertions, 14 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py
index 41cf6dc810d..43690c3d951 100644
--- a/python/mach_bootstrap.py
+++ b/python/mach_bootstrap.py
@@ -215,8 +215,8 @@ def bootstrap(topdir):
topdir = os.path.abspath(topdir)
# We don't support paths with spaces for now
- # https://github.com/servo/servo/issues/9442
- if ' ' in topdir:
+ # https://github.com/servo/servo/issues/9616
+ if ' ' in topdir and (not _is_windows()):
print('Cannot run mach in a path with spaces.')
print('Current path:', topdir)
sys.exit(1)
diff --git a/python/servo/platform/windows.py b/python/servo/platform/windows.py
index 394dc649493..dced63a8fb5 100644
--- a/python/servo/platform/windows.py
+++ b/python/servo/platform/windows.py
@@ -17,14 +17,13 @@ import zipfile
from .. import util
from .base import Base
-DEPS_URL = "https://github.com/servo/servo-build-deps/releases/download/msvc-deps/"
+DEPS_URL = "https://github.com/servo/servo-build-deps/releases/download/msvc-deps"
DEPENDENCIES = {
"moztools": "4.0",
}
-URL_BASE = "https://github.com/servo/servo-build-deps/releases/download/msvc-deps/"
-GSTREAMER_URL = f"{URL_BASE}/gstreamer-1.0-msvc-x86_64-1.22.8.msi"
-GSTREAMER_DEVEL_URL = f"{URL_BASE}/gstreamer-1.0-devel-msvc-x86_64-1.22.8.msi"
+GSTREAMER_URL = f"{DEPS_URL}/gstreamer-1.0-msvc-x86_64-1.22.8.msi"
+GSTREAMER_DEVEL_URL = f"{DEPS_URL}/gstreamer-1.0-devel-msvc-x86_64-1.22.8.msi"
DEPENDENCIES_DIR = os.path.join(util.get_target_dir(), "dependencies")
@@ -44,7 +43,7 @@ class Windows(Base):
@classmethod
def download_and_extract_dependency(cls, zip_path: str, full_spec: str):
if not os.path.isfile(zip_path):
- zip_url = f"{DEPS_URL}{urllib.parse.quote(full_spec)}.zip"
+ zip_url = f"{DEPS_URL}/{urllib.parse.quote(full_spec)}.zip"
util.download_file(full_spec, zip_url, zip_path)
zip_dir = os.path.dirname(zip_path)
@@ -65,7 +64,7 @@ class Windows(Base):
choco_config = os.path.join(util.SERVO_ROOT, "support", "windows", "chocolatey.config")
# This is the format that PowerShell wants arguments passed to it.
- cmd_exe_args = f"'/K','choco','install','-y','{choco_config}'"
+ cmd_exe_args = f"'/K','choco','install','-y', '\"{choco_config}\"'"
if force:
cmd_exe_args += ",'-f'"
@@ -158,12 +157,19 @@ class Windows(Base):
print(f"Installing GStreamer packages to {DEPENDENCIES_DIR}...")
os.makedirs(DEPENDENCIES_DIR, exist_ok=True)
- common_args = [
- f"TARGETDIR={DEPENDENCIES_DIR}", # Install destination
- "/qn", # Quiet mode
- ]
- subprocess.check_call(["msiexec", "/a", libs_msi] + common_args)
- subprocess.check_call(["msiexec", "/a", devel_msi] + common_args)
+
+ for installer in [libs_msi, devel_msi]:
+ arguments = [
+ "/a",
+ f'"{installer}"'
+ f'TARGETDIR="{DEPENDENCIES_DIR}"', # Install destination
+ "/qn", # Quiet mode
+ ]
+ quoted_arguments = ",".join((f"'{arg}'" for arg in arguments))
+ subprocess.check_call([
+ "powershell", "exit (Start-Process", "-PassThru", "-Wait", "-verb", "runAs",
+ "msiexec.exe", "-ArgumentList", f"@({quoted_arguments})", ").ExitCode"
+ ])
assert self.is_gstreamer_installed(cross_compilation_target=None)
return True