From c8738ff4370a526cddef2c38721688498c14cd75 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Tue, 21 Apr 2020 19:25:57 -0700 Subject: [PATCH] Windows prefab server fix --- Makefile | 4 ++-- tools/stage_assets | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 1040c1b1..a95346fb 100644 --- a/Makefile +++ b/Makefile @@ -291,7 +291,7 @@ build/prefab/windows/release/BallisticaCore.exe: .efrocachemap @tools/snippets efrocache_get $@ prefab-windows-server-debug: prefab-windows-server-debug-build - build/prefab/windows-server/debug/dist/Python.exe \ + build/prefab/windows-server/debug/dist/python.exe \ build/prefab/windows-server/debug/ballisticacore_server.py prefab-windows-server-debug-build: prereqs \ @@ -319,7 +319,7 @@ build/prefab/windows-server/debug/config_template.yaml: \ cp $< $@ prefab-windows-server-release: prefab-windows-server-release-build - build/prefab/windows-server/release/dist/Python.exe \ + build/prefab/windows-server/release/dist/python.exe \ build/prefab/windows-server/release/ballisticacore_server.py prefab-windows-server-release-build: prereqs \ diff --git a/tools/stage_assets b/tools/stage_assets index ad39ed74..6bad425a 100755 --- a/tools/stage_assets +++ b/tools/stage_assets @@ -232,11 +232,11 @@ def _sync_windows_extras(cfg: Config) -> str: # It'll technically be possible to orphaned top level # files in dst, but we should be pulling those into dists # individually by name anyway so it should be safe. + assert cfg.dst is not None for dirname in ('DLLs', 'Lib'): # We also need to be more particular about which pyc files we pull # over. The Python stuff in Extras is also used by some scripts # so there may be arbitrary non-opt pycs hanging around. - assert cfg.dst is not None _run(f'mkdir -p "{cfg.dst}/{dirname}"') cmd = ("rsync --recursive --update --delete --delete-excluded " " --prune-empty-dirs" @@ -248,11 +248,15 @@ def _sync_windows_extras(cfg: Config) -> str: "\"" + cfg.dst + "/" + dirname + "/\"") _run(cmd) - # Now sync the top level individual files. - cmd = ("rsync --update " + cfg.win_extras_src + "/*.dll " + - cfg.win_extras_src + "/*.exe" - " \"" + cfg.dst + "/\"") - _run(cmd) + # Now sync the top level individual files. + cmd = ("rsync --update " + cfg.win_extras_src + "/*.dll " + + cfg.win_extras_src + "/*.exe" + " \"" + cfg.dst + "/\"") + _run(cmd) + + # If we're running under WSL we won't be able to launch these .exe files + # unless they're marked executable, so do that here. + _run(f'chmod +x {cfg.dst}/*.exe') # We may want to add some site-packages on top; say where they should go. return 'Lib'