From 56920ce5ad13f0f6c2436a22538a6254a85a5926 Mon Sep 17 00:00:00 2001 From: OCO_Omega <42233446+OCOtheOmega@users.noreply.github.com> Date: Thu, 26 Oct 2023 14:12:18 +0300 Subject: [PATCH] Scripts --- Scripts/bat/buildAllDebug.bat | 6 ++++++ Scripts/bat/buildAllRelease.bat | 6 ++++++ Scripts/bat/readme.txt | 10 ++++++++++ Scripts/bat/runQuickAll.bat | 4 ++++ Scripts/bat/runQuickClient.bat | 4 ++++ Scripts/bat/runQuickServer.bat | 4 ++++ Scripts/bat/runTestsIntegration.bat | 9 +++++++++ Scripts/bat/runTestsYAML.bat | 7 +++++++ Scripts/sh/buildAllDebug.sh | 12 ++++++++++++ Scripts/sh/buildAllRelease.sh | 12 ++++++++++++ Scripts/sh/readme.txt | 10 ++++++++++ Scripts/sh/runQuickAll.sh | 14 ++++++++++++++ Scripts/sh/runQuickClient.sh | 9 +++++++++ Scripts/sh/runQuickServer.sh | 9 +++++++++ 14 files changed, 116 insertions(+) create mode 100644 Scripts/bat/buildAllDebug.bat create mode 100644 Scripts/bat/buildAllRelease.bat create mode 100644 Scripts/bat/readme.txt create mode 100644 Scripts/bat/runQuickAll.bat create mode 100644 Scripts/bat/runQuickClient.bat create mode 100644 Scripts/bat/runQuickServer.bat create mode 100644 Scripts/bat/runTestsIntegration.bat create mode 100644 Scripts/bat/runTestsYAML.bat create mode 100644 Scripts/sh/buildAllDebug.sh create mode 100644 Scripts/sh/buildAllRelease.sh create mode 100644 Scripts/sh/readme.txt create mode 100644 Scripts/sh/runQuickAll.sh create mode 100644 Scripts/sh/runQuickClient.sh create mode 100644 Scripts/sh/runQuickServer.sh diff --git a/Scripts/bat/buildAllDebug.bat b/Scripts/bat/buildAllDebug.bat new file mode 100644 index 0000000000..a31bf249db --- /dev/null +++ b/Scripts/bat/buildAllDebug.bat @@ -0,0 +1,6 @@ +@echo off +cd ../../ +call python RUN_THIS.py +call git submodule update --init --recursive +call dotnet build -c Debug +pause \ No newline at end of file diff --git a/Scripts/bat/buildAllRelease.bat b/Scripts/bat/buildAllRelease.bat new file mode 100644 index 0000000000..f3cec04676 --- /dev/null +++ b/Scripts/bat/buildAllRelease.bat @@ -0,0 +1,6 @@ +@echo off +cd ../../ +call python RUN_THIS.py +call git submodule update --init --recursive +call dotnet build -c Release +pause \ No newline at end of file diff --git a/Scripts/bat/readme.txt b/Scripts/bat/readme.txt new file mode 100644 index 0000000000..bf401fe951 --- /dev/null +++ b/Scripts/bat/readme.txt @@ -0,0 +1,10 @@ +The files here will will, in order, build the game, copy the correct config file, launch the server, and launch the client. +There are some variations of files, explained here + +The debug vs release build is simply what people dev in vs the actual server. The release build contains various +optimizations, while the debug build contains debugging tools. +If you're mapping, use the release build as it will run smoother. + +The Server config file simply matches the actual server config, while the other two have some cvar tweaks that come in +handy for their specific tasks. +Essentially only saves you some commands when you load in, but very convenient none the less. \ No newline at end of file diff --git a/Scripts/bat/runQuickAll.bat b/Scripts/bat/runQuickAll.bat new file mode 100644 index 0000000000..c2d3438094 --- /dev/null +++ b/Scripts/bat/runQuickAll.bat @@ -0,0 +1,4 @@ +@echo off +start runQuickServer.bat %* +start runQuickClient.bat %* +exit diff --git a/Scripts/bat/runQuickClient.bat b/Scripts/bat/runQuickClient.bat new file mode 100644 index 0000000000..16e02d0ada --- /dev/null +++ b/Scripts/bat/runQuickClient.bat @@ -0,0 +1,4 @@ +@echo off +cd ../../ +call dotnet run --project Content.Client --no-build %* +pause diff --git a/Scripts/bat/runQuickServer.bat b/Scripts/bat/runQuickServer.bat new file mode 100644 index 0000000000..602d33663a --- /dev/null +++ b/Scripts/bat/runQuickServer.bat @@ -0,0 +1,4 @@ +@echo off +cd ../../ +call dotnet run --project Content.Server --no-build %* +pause diff --git a/Scripts/bat/runTestsIntegration.bat b/Scripts/bat/runTestsIntegration.bat new file mode 100644 index 0000000000..c771b862ec --- /dev/null +++ b/Scripts/bat/runTestsIntegration.bat @@ -0,0 +1,9 @@ +cd ..\..\ +dotnet restore +dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m +mkdir Scripts\logs +del Scripts\logs\Content.Tests.log +dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 > Scripts\logs\Content.Tests.log +del Scripts\logs\Content.IntegrationTests.log +dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed > Scripts\logs\Content.IntegrationTests.log +pause diff --git a/Scripts/bat/runTestsYAML.bat b/Scripts/bat/runTestsYAML.bat new file mode 100644 index 0000000000..ff89ca4ab5 --- /dev/null +++ b/Scripts/bat/runTestsYAML.bat @@ -0,0 +1,7 @@ +cd ..\..\ +dotnet restore +dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m +mkdir Scripts\logs +del Scripts\logs\Content.YAMLLinter.log +dotnet run --project Content.YAMLLinter/Content.YAMLLinter.csproj --no-build -- NUnit.ConsoleOut=0 > Scripts\logs\Content.YAMLLinter.log +pause diff --git a/Scripts/sh/buildAllDebug.sh b/Scripts/sh/buildAllDebug.sh new file mode 100644 index 0000000000..9e51c52d95 --- /dev/null +++ b/Scripts/sh/buildAllDebug.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +# make sure to start from script dir +if [ "$(dirname $0)" != "." ]; then + cd "$(dirname $0)" +fi + +cd ../../ + +python RUN_THIS.py +git submodule update --init --recursive +dotnet build -c Debug diff --git a/Scripts/sh/buildAllRelease.sh b/Scripts/sh/buildAllRelease.sh new file mode 100644 index 0000000000..d67628d1f1 --- /dev/null +++ b/Scripts/sh/buildAllRelease.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +# make sure to start from script dir +if [ "$(dirname $0)" != "." ]; then + cd "$(dirname $0)" +fi + +cd ../../ + +python RUN_THIS.py +git submodule update --init --recursive +dotnet build -c Release diff --git a/Scripts/sh/readme.txt b/Scripts/sh/readme.txt new file mode 100644 index 0000000000..bf401fe951 --- /dev/null +++ b/Scripts/sh/readme.txt @@ -0,0 +1,10 @@ +The files here will will, in order, build the game, copy the correct config file, launch the server, and launch the client. +There are some variations of files, explained here + +The debug vs release build is simply what people dev in vs the actual server. The release build contains various +optimizations, while the debug build contains debugging tools. +If you're mapping, use the release build as it will run smoother. + +The Server config file simply matches the actual server config, while the other two have some cvar tweaks that come in +handy for their specific tasks. +Essentially only saves you some commands when you load in, but very convenient none the less. \ No newline at end of file diff --git a/Scripts/sh/runQuickAll.sh b/Scripts/sh/runQuickAll.sh new file mode 100644 index 0000000000..879c3cf3ef --- /dev/null +++ b/Scripts/sh/runQuickAll.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env sh + +# make sure to start from script dir +if [ "$(dirname $0)" != "." ]; then + cd "$(dirname $0)" +fi + +echo "will run both server and client in the same terminal so will give you both outputs at once" +echo "dont mind fatl error relating to port 1212 does not seem to change anything" + +sh -e runQuickServer.sh & +sh -e runQuickClient.sh + +exit diff --git a/Scripts/sh/runQuickClient.sh b/Scripts/sh/runQuickClient.sh new file mode 100644 index 0000000000..080c78f27c --- /dev/null +++ b/Scripts/sh/runQuickClient.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +# make sure to start from script dir +if [ "$(dirname $0)" != "." ]; then + cd "$(dirname $0)" +fi + +cd ../../ +dotnet run --project Content.Client --no-build diff --git a/Scripts/sh/runQuickServer.sh b/Scripts/sh/runQuickServer.sh new file mode 100644 index 0000000000..b264ff6fc7 --- /dev/null +++ b/Scripts/sh/runQuickServer.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +# make sure to start from script dir +if [ "$(dirname $0)" != "." ]; then + cd "$(dirname $0)" +fi + +cd ../../ +dotnet run --project Content.Server --no-build