Difference between revisions of "MW Server Tutorial"
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
## Get a JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html | ## Get a JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html | ||
## Install the JDK | ## Install the JDK | ||
− | |||
# Eclipse | # Eclipse | ||
## Download eclipse from https://eclipse.org/downloads/ and install | ## Download eclipse from https://eclipse.org/downloads/ and install | ||
## Start eclipse and set up an initial workspace | ## Start eclipse and set up an initial workspace | ||
− | |||
# Subclipse | # Subclipse | ||
## Point your browser to https://marketplace.eclipse.org/content/subclipse#group-external-install-button | ## Point your browser to https://marketplace.eclipse.org/content/subclipse#group-external-install-button | ||
Line 21: | Line 19: | ||
### Expand Team -> SVN | ### Expand Team -> SVN | ||
### Change SVN interface to SVNKit (Pure Java) | ### Change SVN interface to SVNKit (Pure Java) | ||
− | |||
# Set up the MekWars repository | # Set up the MekWars repository | ||
## Open the SVN Resource Exploring perspectie (Window -> Perspective -> Open Perspective -> Other) | ## Open the SVN Resource Exploring perspectie (Window -> Perspective -> Open Perspective -> Other) | ||
## Right-click in the SVN Repositories area and choose New -> Repository Location | ## Right-click in the SVN Repositories area and choose New -> Repository Location | ||
## For the URL, enter svn://svn.code.sf.net/p/mekwars/code/trunk | ## For the URL, enter svn://svn.code.sf.net/p/mekwars/code/trunk | ||
− | |||
# Check out the MekWars repository | # Check out the MekWars repository | ||
## From the SVN Repositories screen, right-click the MekWars repository you set up and select "Check Out" | ## From the SVN Repositories screen, right-click the MekWars repository you set up and select "Check Out" | ||
Line 43: | Line 39: | ||
### Choose "Add JARs" again and select MegaMek.jar | ### Choose "Add JARs" again and select MegaMek.jar | ||
### Select OK and Finish | ### Select OK and Finish | ||
− | |||
## This may now give you an error about the Motif Look and Feel. If so: | ## This may now give you an error about the Motif Look and Feel. If so: | ||
### Open properties back up | ### Open properties back up |
Revision as of 08:51, 9 November 2016
How to Build a MekWars Server
Step 1: Learn to compile
This is really not an optional step. TubeAlloy taught you how to set up IntelliJ, so I'm going to teach you how to set up Eclipse.
- Java
- Get a JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Install the JDK
- Eclipse
- Download eclipse from https://eclipse.org/downloads/ and install
- Start eclipse and set up an initial workspace
- Subclipse
- Point your browser to https://marketplace.eclipse.org/content/subclipse#group-external-install-button
- Drag the install button to your open eclipse window
- Follow the prompts to install
- Change the SSH Connector (probably not necessary unless you have Write permissions to the repository, but it doesn't hurt anything)
- Windows -> Preferences
- Expand Team -> SVN
- Change SVN interface to SVNKit (Pure Java)
- Set up the MekWars repository
- Open the SVN Resource Exploring perspectie (Window -> Perspective -> Open Perspective -> Other)
- Right-click in the SVN Repositories area and choose New -> Repository Location
- For the URL, enter svn://svn.code.sf.net/p/mekwars/code/trunk
- Check out the MekWars repository
- From the SVN Repositories screen, right-click the MekWars repository you set up and select "Check Out"
- Choose "Check out as a project configured using the New Project Wizard" and hit Finish
- Select Java -> Java Project
- Hit "Next"
- Give the project a name ("MekWars" works for me) and hit "Next"
- Finish
- Click Yes and OK
- When the project is downloaded:
- Right-click the project and choose properties
- Go to Java Build Path
- Under Libraries, choose "Add JARs"
- Select all jar files in client-dist/lib
- Choose "Add JARs" again and select all jar files in server-dist/lib
- Choose "Add JARs" again and select MegaMek.jar
- Select OK and Finish
- This may now give you an error about the Motif Look and Feel. If so:
- Open properties back up
- Go to Java Build Path -> Libraries
- Select the JRE System Library and Remove
- Select Add Library
- Select JRE System Library
- Select your Java 8 JRE (mine is listed under workspace default)
- Select Finish
You now have a functional build environment.
- Build MekWars
- Update the repository
- Right-click the project
- Choose Team -> Update to HEAD
- Build
- Right-click build.xml
- Select Run As -> Ant Build...
- Choose your targets and put them in order:
- init
- clean
- compile
- server-jar
- client-jar
- opEditor-jar
- MekWarsAutoUpdate-jar
- Click Run
- Update the repository
Step 2: Set up the initial environment
Step 3: First server start
Step 4: Logs, logs, logs
(obviously a work in progress)