From 222cefa93c972786cb1a618a376e3e92b3a438a0 Mon Sep 17 00:00:00 2001 From: backlabs1 Date: Tue, 2 Jan 2024 22:32:23 +0000 Subject: [PATCH 1/2] Add RakNet/CrabNet dependency for MSVC builds --- CI/before_script.msvc.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index bb662c9de..e7f0e7a46 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -584,6 +584,17 @@ if [ -z $SKIP_DOWNLOAD ]; then git clone -b release-1.10.0 https://github.com/google/googletest.git fi fi + + # RakNet/CrabNet + echo "RakNet/CrabNet 19e66190e8 ..." + if [[ -d CrabNet ]]; then + echo " directory exists, skipping." + else + git clone https://github.com/TES3MP/CrabNet.git + cd CrabNet + git reset --hard 19e66190e83f53bcdcbcd6513238ed2e54878a21 + cd .. + fi fi cd .. #/.. @@ -987,6 +998,29 @@ if [ ! -z $TEST_FRAMEWORK ]; then echo Done. fi +cd $DEPS +echo +# RakNet/CrabNet +printf "RakNet/CrabNet... " +{ + if [[ -d $DEPS_INSTALL/CrabNet ]]; then + echo "already built" + else + cd CrabNet/ + rm -rf build + mkdir build + cd build/ + cmake -DCMAKE_BUILD_TYPE=Release .. + cmake --build . --target RakNetLibStatic --config Release \ + --clean-first -- -maxcpucount + cd ../.. + cp -r CrabNet/ $DEPS_INSTALL + echo Done. + fi + add_cmake_opts -DRakNet_INCLUDES=$DEPS_INSTALL/CrabNet/include + add_cmake_opts -DRakNet_LIBRARY_RELEASE=$DEPS_INSTALL/CrabNet/build/lib/Release/RakNetLibStatic.lib + add_cmake_opts -DRakNet_LIBRARY_DEBUG=$DEPS_INSTALL/CrabNet/build/lib/Release/RakNetLibStatic.lib +} echo cd $DEPS_INSTALL/.. From 43d64a857785569526d23a9ac200d8cc8723485f Mon Sep 17 00:00:00 2001 From: backlabs1 Date: Tue, 2 Jan 2024 22:30:18 +0000 Subject: [PATCH 2/2] Add LuaJit dependency for MSVC builds --- CI/before_script.msvc.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index e7f0e7a46..1aec675f8 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -595,6 +595,17 @@ if [ -z $SKIP_DOWNLOAD ]; then git reset --hard 19e66190e83f53bcdcbcd6513238ed2e54878a21 cd .. fi + + # LuaJIT + echo "LuaJit c525bcb902 ..." + if [[ -d LuaJIT ]]; then + printf " directory exists, skipping." + else + git clone https://luajit.org/git/luajit.git + cd luajit + git reset --hard c525bcb9024510cad9e170e12b6209aedb330f83 + cd .. + fi fi cd .. #/.. @@ -1021,6 +1032,28 @@ printf "RakNet/CrabNet... " add_cmake_opts -DRakNet_LIBRARY_RELEASE=$DEPS_INSTALL/CrabNet/build/lib/Release/RakNetLibStatic.lib add_cmake_opts -DRakNet_LIBRARY_DEBUG=$DEPS_INSTALL/CrabNet/build/lib/Release/RakNetLibStatic.lib } +cd $DEPS +echo +# LuaJIT +printf "LuaJIT... " +{ + if [[ -d $DEPS_INSTALL/luajit ]]; then + echo "already built" + else + cd $DEPS/luajit/ + mingw32-make -j $NUMBER_OF_PROCESSORS + tmp=$DEPS_INSTALL/tmp/luajit + mkdir -p $tmp/lua + cp src/luajit.exe $tmp + cp -r src/jit src/lua51.dll $tmp/lua/ + mv $tmp $DEPS_INSTALL + fi + add_cmake_opts -DLuaJit_INCLUDE_DIR=$DEPS_INSTALL/luajit/lua + add_cmake_opts -DLuaJit_LIBRARY=$DEPS_INSTALL/luajit/lua + for config in ${CONFIGURATIONS[@]}; do + add_runtime_dlls $config $DEPS_INSTALL/luajit/lua/lua51.dll + done +} echo cd $DEPS_INSTALL/..