Bench
Bench provides a easy-to-use patch-environment for games and apps.
How does it work?
Bench uses three main contexts for sharing data.
| Context | Description |
|---|---|
/hash |
Returns a plain text listing all files and their proper MD5-checksums seperated with a dollar-sign |
/files |
Represents the /files directory on the server |
/package |
Returns the zip file for complete new game installations |
Using the release archives
A step by step introduction for using the release jars.
Deploying a patch
- Create a server root folder
- Copy the JAR-files into the folder
- Copy the ZIP-file with the game files into the folder
- Rename the pasted ZIP-file for example to release.zip
- Open a terminal (cmd, bash or something)
- Enter
java -jar PatchDeployer.jar release.zip - Close the terminal if everything was successful
When you want to use the server without the ZIP-file, you can just copy all your game files into the files folder, open a terminal and run the PatchDeployer.jar without any command line argument.
Running the server
- After the deploying the patch you have to open a new terminal
- Type in
java -jar PatchServer.jar - Now you should see some log messages
- Open your webbrowser and enter the URL
localhost/hash - When everything works fine, you should see a list of files and their attached hashes (only when the release.zip isn't empty)
- You can customize the server by editing the config.properties file
Building the project
- Clone the repository using
git clone https://github.com/mooxmirror/Bench.git - Run
maven package - If successful, you get a file named
bench-x.x.x-jar-with-dependencies.jar - Copy this file to the folder, where you want to run the server
- To use the patch deployer, enter
java -cp bench-x.x.x-jar-with-dependencies.jar io.mooxmirror.bench.deployer.PatchDeployer [archive file] - To use the patch server, enter
java -cp bench-x.x.x-jar-with-dependencies.jar io.mooxmirror.bench.system.HttpPatchServer - Continue with the steps you find above
Example configuration file
Here is a example configuration file (config.properties) with fully annotated settings:
# Bench configuration file
# Enable /hash context
hash.context=true
# Enabled /package context
package.context=true
# Enable /files context
files.context=true
# Port for the listener
server.port=80
# Cache lifetime in milliseconds (600000ms = 600s = 10m)
cache.lifetime=600000
You successfully set up a new Bench server!