From 6cdc92e39d10788295335401c19f45a4b58290d7 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Sun, 11 Oct 2020 15:48:41 -0700 Subject: [PATCH] cmake server targets now use wrapper script --- .efrocachemap | 8 ++++---- Makefile | 14 ++++++++------ tools/batools/assetstaging.py | 3 +-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index b76048f9..bfcf9bf7 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3948,8 +3948,8 @@ "build/prefab/lib/linux_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/32/03/d4dd9c398eab7c7da62b2e7a4096", "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/11/f5/cb2b3a42e4384d6ac4dfe7a98213", "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/06/aa/fc55996ce9a1a3e898d1348873ff", - "build/prefab/lib/mac_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/18/f9/490e5f1e52e7e5aa119d1f4d2b40", - "build/prefab/lib/mac_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/df/79/37f928a3f1fd5a3219f0d80d6fbd", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ba/f3/b1bff5e3faeeacd03f9ae836c776", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5e/1e/3542fe128ce7b3c9aa727f02dcb9" + "build/prefab/lib/mac_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6b/16/c058434a86f13606cbd6bec7167c", + "build/prefab/lib/mac_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cc/e2/f1ef7e986d9b3cc9e5f2d392def7", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/bd/b3/3e5c54b74ce8f4d606e766823903", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5a/5a/077d74f31286ced414f08cbd1f94" } \ No newline at end of file diff --git a/Makefile b/Makefile index fcf7f453..2062ad68 100644 --- a/Makefile +++ b/Makefile @@ -719,22 +719,24 @@ cmake-build: assets-cmake resources code @${STAGE_ASSETS} -cmake build/cmake/$(CM_BT_LC) @cd build/cmake/$(CM_BT_LC) && test -f Makefile \ || cmake -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) \ - ../../../ballisticacore-cmake + ${PWD}/ballisticacore-cmake @cd build/cmake/$(CM_BT_LC) && ${MAKE} -j${CPUS} cmake-clean: rm -rf build/cmake/$(CM_BT_LC) cmake-server: cmake-server-build - @cd build/cmake/server-$(CM_BT_LC) && ./ballisticacore + @cd build/cmake/server-$(CM_BT_LC) && ./ballisticacore_server cmake-server-build: assets-cmake resources code - @tools/pcommand cmake_prep_dir build/cmake/server-$(CM_BT_LC) + @tools/pcommand cmake_prep_dir build/cmake/server-$(CM_BT_LC)/dist @${STAGE_ASSETS} -cmakeserver -${CM_BT_LC} build/cmake/server-$(CM_BT_LC) - @cd build/cmake/server-$(CM_BT_LC) && test -f Makefile \ + @cd build/cmake/server-$(CM_BT_LC)/dist && test -f Makefile \ || cmake -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) -DHEADLESS=true \ - ../../../ballisticacore-cmake - @cd build/cmake/server-$(CM_BT_LC) && ${MAKE} -j${CPUS} + ${PWD}/ballisticacore-cmake + @cd build/cmake/server-$(CM_BT_LC)/dist && ${MAKE} -j${CPUS} + @cd build/cmake/server-$(CM_BT_LC)/dist && test -f ballisticacore_headless \ + || ln -sf ballisticacore ballisticacore_headless cmake-server-clean: rm -rf build/cmake/server-$(CM_BT_LC) diff --git a/tools/batools/assetstaging.py b/tools/batools/assetstaging.py index 6d418694..a66ce5c3 100755 --- a/tools/batools/assetstaging.py +++ b/tools/batools/assetstaging.py @@ -457,8 +457,7 @@ def stage_server_file(projroot: str, mode: str, infilename: str, lines[2], 'dist\\\\python.exe ballisticacore_server.py', 'dist\\\\python_d.exe ballisticacore_server.py') - with open(outfilename, 'w') as outfile: - outfile.write('\n'.join(lines) + '\n') + _write_if_changed(outfilename, '\n'.join(lines) + '\n') else: raise RuntimeError(f"Unknown server file for staging: '{basename}'.")