A few tool fixes for running under WSL

This commit is contained in:
efroemling 2019-10-20 16:07:27 -07:00
parent b4edd9a9cd
commit 30ea7e3508
2 changed files with 13 additions and 6 deletions

View File

@ -646,17 +646,23 @@ def make_prefab() -> None:
system = platform.system()
machine = platform.machine()
if system == 'Darwin':
# Currently there's just x86_64 on mac; will need to revisit when arm
# cpus happen.
base = 'mac'
elif system == 'Linux':
# We currently only support x86_64 linux.
if machine == 'x86_64':
base = 'linux'
# If it looks like we're in Windows Subsystem for Linux,
# go with the Windows version.
if 'microsoft' in platform.uname()[3].lower():
base = 'windows'
else:
raise RuntimeError(f'make_prefab: unsupported linux machine type:'
f' {machine}.')
# We currently only support x86_64 linux.
if machine == 'x86_64':
base = 'linux'
else:
raise RuntimeError(f'make_prefab: unsupported linux machine type:'
f' {machine}.')
else:
raise RuntimeError(f'make_prefab: unrecognized platform:'
f' {platform.system()}.')

View File

@ -250,7 +250,8 @@ def _sync_windows_extras(cfg: Config) -> str:
_run(cmd)
# Now sync the top level individual files.
cmd = ("rsync --update " + cfg.win_extras_src + "/{*.dll,*.exe}"
cmd = ("rsync --update " + cfg.win_extras_src + "/*.dll " +
cfg.win_extras_src + "/*.exe"
" \"" + cfg.dst + "/\"")
_run(cmd)