From eca10642945f23d031a5c716b9d50f83356b31d1 Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Fri, 16 Jul 2021 17:23:12 +0200 Subject: [PATCH] script: added script to start server locally --- startServerLocally.ps1 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 startServerLocally.ps1 diff --git a/startServerLocally.ps1 b/startServerLocally.ps1 new file mode 100644 index 0000000..e6d3343 --- /dev/null +++ b/startServerLocally.ps1 @@ -0,0 +1,23 @@ +Write-Host "Trying to start server locally" + +if ($Args[0] -eq "-r") { + Write-Host "Rebuilding application" + $build = $true +} else { + Write-Host "No rebuild flag (-r) given. Starting directly..." + $build = $false +} + +if ($build) { + try { + .\gradlew Server:jar + } catch { + Write-Host "Gradle doesn't seem to be installed." + } +} + +try { + java -jar Server/build/libs/Server.jar -c .\configs\marvelheros.character.json -m.\configs\matchconfig_1.game.json -s .\configs\asgard.scenario.json -v +} catch { + Write-Host "Couldn't execute. Is Java installed?" +} \ No newline at end of file