/fiveserver

Open-Source network server for PES5 and PES6 families of the game

Primary LanguagePythonBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Fiveserver 0.4.11
Copyright (C) 2011-2018 juce and reddwarf
License: BSD-style



ABOUT
=====


Fiveserver is a pure-Python implementation of network server for the
following games:

Pro Evolution Soccer 5 
Winning Eleven 9
Winning Eleven 9 Liveware Evolution
Pro Evolution Soccer 6
Winning Eleven 2007


Notable features:

* Full support for network play, including 2-vs-2 for PES6
* Persistent accounts and full game statistics, stored in MySQL database
* Administrative web-interface
* REST api to retrieve live stats



INSTALL
=======


The following three-step installation sequence should work as is on any Unix OS,
such as Linux (any flavour), FreeBSD or Mac OSX. If you are using Windows, then
it is recommended that you download a pre-built Windows-specific package from 
http://sites.google.com/site/fiveservercom/

1. Prerequisites
   Make sure you have development packages installed for Python and libmysqlclient.
   You will also need gcc and make. Depending on which Linux distribution you have,
   the command is going to be different, but for example, on Ubuntu:

   sudo apt-get -y update
   sudo apt-get install libmysqlclient-dev python-dev gcc make

2. Install Python 2.6 (or later), if your system doesn't have it.
   Go to http://python.org/download/ and get the installer that is appropriate
   for your operating system. (If you are on Linux, you can also use yum or apt-get)

3. Install virtualenv
   Download the source tarball from http://pypi.python.org/pypi/virtualenv/
   unzip the archive, switch to virtualenv source directory, 
   then build and install with this command:

   sudo python2.6 setup.py install

4. Return to fiveserver source directory and install all the necessary dependencies
   by issuing this command (as yourself, not root):

   make install

   This will create an isolated Python environment and install all Python packages
   needed to run Fiveserver/Sixserver



CONFIGURE MYSQL DATABASES
=========================


The following instructions assume that you can use a command-line mysql client 
utility to connect to your MySQL server with a root account.

For Fiveserver (PES5/WE9/WE9LE), you will need to create a databases, and grant
appropriate permissions. If you use default database name and login/password 
(you can change all of those in ./etc/conf/fiveserver.yaml), then it would be this:

mysql> create database fiveserver;
mysql> grant select, insert, update on fiveserver.* to 'fiveserver'@'%' identified by 'we9le';

Create the tables and apply alters:

mysql> use fiveserver;
mysql> source ./sql/schema.sql
mysql> source ./sql/alter_001_add_settings.sql


For Sixserver (PES6/WE2007), you will need to create a databases, and grant
appropriate permissions. If you use default database name and login/password 
(you can change all of those in ./etc/conf/sixserver.yaml), then it would be this:

mysql> create database sixserver;
mysql> grant select, insert, update on sixserver.* to 'sixserver'@'%' identified by 'proevo';

Create the tables and apply alters:

mysql> use sixserver;
mysql> source ./sql/schema6.sql
mysql> source ./sql/alter6_001_modify_profiles.sql



USAGE
=====


The service.sh script can be used to run both services (fiveserver and sixserver) or
to launch them in the background. Just run the script without any arguments to see
all available options:

$ ./service.sh 
Usage ./service.sh {fiveserver|sixserver} {run|start|stop|status}

For example, to start fiveserver service, you would do:

$ ./service.sh fiveserver start