made deployment easier
This commit is contained in:
13
deployment/client/data/files/startClient.bat
Normal file
13
deployment/client/data/files/startClient.bat
Normal file
@@ -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%
|
||||||
35
deployment/client/data/index.css
Normal file
35
deployment/client/data/index.css
Normal file
@@ -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;
|
||||||
|
}
|
||||||
28
deployment/client/data/index.html
Normal file
28
deployment/client/data/index.html
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<head>
|
||||||
|
<!-- Add icon library -->
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<link rel="stylesheet" href="index.css">
|
||||||
|
<title>Client download</title>
|
||||||
|
</head>
|
||||||
|
<body style="background-color: #36393e;">
|
||||||
|
<div class="object-wrapper">
|
||||||
|
<!-- Place any object -->
|
||||||
|
<div class="object-div">
|
||||||
|
<div class="object">
|
||||||
|
<h1 style="color: antiquewhite;">TicTacToe_Client:</h1>
|
||||||
|
<!-- Auto width -->
|
||||||
|
<a href="files/Client.jar" download="TicTacToe_Client.jar">
|
||||||
|
<button class="btn"><i class="fa fa-download"></i> Download TicTacToe_Client.jar</button>
|
||||||
|
</a>
|
||||||
|
<a href="files/startClient.bat" download="startClient.bat">
|
||||||
|
<button class="btn"><i class="fa fa-download"></i> Download startClient.bat</button>
|
||||||
|
</a>
|
||||||
|
<a href="files/openjfx-11.0.2_windows-x64_bin-sdk.zip" download="openjfx-11.0.2_windows-x64_bin-sdk.zip">
|
||||||
|
<button class="btn"><i class="fa fa-download"></i> Download library</button>
|
||||||
|
</a>
|
||||||
|
<h4 style="color: #99aab5;">Run startClient.bat to start the application in Windows</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cp ~/Code/ArcadeMachine/out/artifacts/Client_jar/Client.jar ~/Code/ArcadeMachine/deployment/client/package
|
|
||||||
cd /var/www/html
|
cd /var/www/html
|
||||||
scp index.css index.html root@server:/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
|
scp ~/Code/ArcadeMachine/out/artifacts/Client_jar/Client.jar files/startClient.bat root@server:/var/www/html/files
|
||||||
ssh root@server systemctl restart apache2
|
ssh root@server systemctl restart apache2
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ~/Code/ArcadeMachine/deployment/client
|
cd /var/www/html/files
|
||||||
java -jar package/TicTacToe_Client.jar linux
|
java -jar Client.jar linux
|
||||||
Reference in New Issue
Block a user