Build server and client from SVN

Topics related to the server software (not campaign)

Moderators: Torren, Moderators

Post Reply
Posts: 6
Joined: Mon Nov 01, 2010 8:17 am

Build server and client from SVN

Post by Flinx »

Below is a list of commands run on an Ubuntu 10 system for downloading and building both client and server from the SVN.

Note: at this time this provides versions

This may not be right, but it is a good start...

Prepare your system, installing required items:
cd ~
sudo apt-get install ant
sudo apt-get install sun-java6-jdk
sudo apt-get install subversion

Download the Subversion repositories:
mkdir -p SVN MW3/client MW3/server
cd SVN
svn export
svn export

Build the JAR files:
cd mekwars
ant tracker-jar opEditor-jar server-jar MekWarsAutoUpdate-jar client-jar
cp -pr client-dist ~/MW3/client
cp -pr server-dist ~/MW3/server
cp *.jar ~/MW3/server/
cp *.jar ~/MW3/client/
cd ~SVN/megamek/trunk/megamek

Now fix all the blk/MTF file issues:
cd data/mechfiles
find . -name \*.zip -exec unzip {} \;
rm *.zip

This will find all the blk files... concentrate on the Mechs...
find . -name \*.blk -print
cd <relevant>
find . -name \*.mtf -print |sed -e 's/^\(.*\).mtf$/mv \"\1.mtf\" \"\1.MTF\"/' | sh
cd ..
Repeat for each directory..
cd ../..
(Takes you back to the megamek directory)

Copy the fixed data files:
cp -pr data ~/MW3/client/
cp -pr data ~/MW3/server/

Now fix the build tables:
cd ~/MW3/server/data/buildtables/
(for each of the rare, reward, standard directories, fix the files)
cd <relevant>
for n in `ls -1 *{Light,Assault,Medium,Heavy,Light_ORIGINAL}.txt` ; do sed -e 's/\.blk/.MTF/' $n > temp ; cat temp > $n ; rm temp ; done

At this point the server will run, and the client will connect...

Issues outstanding: <Any>
Creating an OpList.txt file (without this no one can get out of Solaris training or do anything except fight from Reserve)..
Other server configs

Files still apparently broken:
Jenner JR7-C.blk
Black Knight BL-7-KNT.blk

Posts: 6
Joined: Mon Nov 01, 2010 8:17 am

To build operations:

Post by Flinx »

To build operations, use the MekWarsOpEditor.jar

In the interface, you need to set various parameters to your choice then find the option to allow missions for SOL, otherwise your starting characters will not see it.

Any guidance, or a physical source of good operations files would be helpful.

Mekwars Server Operator
Posts: 138
Joined: Sun Feb 17, 2008 3:02 am

Post by Ravage »

Well done, a nicely formatted well written instruction on how to prepare and build a server! The guys have done a great job coding the server, but, unless your intimate with developing java applications, its a bit of a mine field - I managed to figure it out through some help ages ago, but I have had about 0 time to sit down and play let alone host a server like Ive been threatening to! ;)

(The gang here will try and help when they can, hell they've even helped me - even though I can be a bit of a prick!)

In the end, make backups, and try, try, try! And you will find you will learn how everything goes together. Can I suggest perhaps this gets stickied?

Post Reply