From 4f04ef4d39e3bb12438dc338d99808745bee7c2f Mon Sep 17 00:00:00 2001 From: Simon Bussmann Date: Thu, 25 Mar 2021 01:27:24 +0100 Subject: [PATCH] made deployment easier --- deployment/client/data/files/startClient.bat | 13 ++++++++ deployment/client/data/index.css | 35 ++++++++++++++++++++ deployment/client/data/index.html | 28 ++++++++++++++++ deployment/client/deployClient | 5 ++- deployment/client/package/startClient.bat | 2 -- deployment/client/startClient | 4 +-- 6 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 deployment/client/data/files/startClient.bat create mode 100644 deployment/client/data/index.css create mode 100644 deployment/client/data/index.html delete mode 100644 deployment/client/package/startClient.bat diff --git a/deployment/client/data/files/startClient.bat b/deployment/client/data/files/startClient.bat new file mode 100644 index 0000000..925c683 --- /dev/null +++ b/deployment/client/data/files/startClient.bat @@ -0,0 +1,13 @@ +@echo off +IF exist javafx-sdk-11.0.2 ( goto launch ) ELSE ( goto create_enviorment && goto launch) + +:create_enviorment +powershell -command "Expand-Archive -Force 'openjfx-11.0.2_windows-x64_bin-sdk.zip' 'library' +cd library +move javafx-sdk-11.0.2 ../ +cd ../ +rmdir library + +:launch +set /p playerName="Gebe deinen Spielernamen ein: " +java -jar --module-path javafx-sdk-11.0.2\lib --add-modules javafx.controls TicTacToe_Client.jar %playerName% \ No newline at end of file diff --git a/deployment/client/data/index.css b/deployment/client/data/index.css new file mode 100644 index 0000000..c78d8c2 --- /dev/null +++ b/deployment/client/data/index.css @@ -0,0 +1,35 @@ +/* Style buttons */ +.btn { + background-color: DodgerBlue; + border: none; + color: white; + padding: 12px 30px; + margin: 10px 5px; + border-radius: 12px; + cursor: pointer; + font-size: 20px; + } + + /* Darker background on mouse-over */ + .btn:hover { + background-color: RoyalBlue; + } + + .object-wrapper { + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; + } + + .object-div { + max-width: 420px; + width: 100%; + } + + .object { + padding: 20px; + display: inline-block; + width: 100%; + text-align: center; + } \ No newline at end of file diff --git a/deployment/client/data/index.html b/deployment/client/data/index.html new file mode 100644 index 0000000..eb81e15 --- /dev/null +++ b/deployment/client/data/index.html @@ -0,0 +1,28 @@ + + + + + Client download + + +
+ +
+
+

TicTacToe_Client:

+ + + + + + + + + + +

Run startClient.bat to start the application in Windows

+
+
+
+ + \ No newline at end of file diff --git a/deployment/client/deployClient b/deployment/client/deployClient index 6dbe2b4..d47aaba 100755 --- a/deployment/client/deployClient +++ b/deployment/client/deployClient @@ -1,6 +1,5 @@ #!/bin/sh -cp ~/Code/ArcadeMachine/out/artifacts/Client_jar/Client.jar ~/Code/ArcadeMachine/deployment/client/package cd /var/www/html scp index.css index.html root@server:/var/www/html/ -scp files/Client.jar files/startClient.bat root@server:/var/www/html/files -ssh root@server systemctl restart apache2 \ No newline at end of file +scp ~/Code/ArcadeMachine/out/artifacts/Client_jar/Client.jar files/startClient.bat root@server:/var/www/html/files +ssh root@server systemctl restart apache2 diff --git a/deployment/client/package/startClient.bat b/deployment/client/package/startClient.bat deleted file mode 100644 index 469a5ab..0000000 --- a/deployment/client/package/startClient.bat +++ /dev/null @@ -1,2 +0,0 @@ -set /p playerName=Gebe deinen Spielernamen ein: -java -jar --module-path openjfx-11.012_windows-x64_bin-sdk\javafx-sdk-11.0.2\lib --add-modules javafx.controls TicTacToe_Client.jar playerName diff --git a/deployment/client/startClient b/deployment/client/startClient index 5564d07..76ea70c 100755 --- a/deployment/client/startClient +++ b/deployment/client/startClient @@ -1,3 +1,3 @@ #!/bin/sh -cd ~/Code/ArcadeMachine/deployment/client -java -jar package/TicTacToe_Client.jar linux +cd /var/www/html/files +java -jar Client.jar linux \ No newline at end of file