« Previous -
Version 72/82
(diff) -
Next » -
Current version
molator, 09/30/2010 07:11 pm
Building, Configuring and Running the Ryzom Core for Windows(x86)¶
VS solution currently broken with the latest change set, CMAKE conversion in progress.¶
This guide is intended to give a step by step process for setting up and running the Ryzom Core for those that may not be as technically gifted as others, This is being written assuming that the reader isn't familiar with the tools and software used here.
- Building, Configuring and Running the Ryzom Core for Windows(x86)
- VS solution currently broken with the latest change set, CMAKE conversion in progress.
- List of everything you will need to download & install
- Getting the source code
- Configuring Visual C++ 2008
- Configuring Visual C++ 2008
- Compiling NeL, NeL Tools, Client/Server, and Ryzom Tools
- Setting up Apache/PHP
- Setting up MySQL
- ALTERNATE STEPS TO CREATE USER AND PRIVILEGES (using the MySQL command line instead of phpMyAdmin)
- Load default data into database
- Setting up MySQL (Alternative)
- Edit Configuration Files
- Start Ryzom Server
- Client login errors
Verified working on¶
Windows 7 x64 Ultimate
Windows Vista x64 Home Premium SP2
List of everything you will need to download & install¶
- TortoiseHg
- DirectX SDK
- External_stlport
- Qt
- XAMPP
- Apache
- MySQL
- Visual C++ 2008
- Visual C++ 2008 SP1
- PHP
Getting the source code¶
Download and install TortoiseHg - http://tortoisehg.bitbucket.org/download/index.html
Create a folder on your computer and name it whatever you want (choose something easy to remember and easy to get to because you will be referring to this a lot).
Example: x:/ryzom
Navigate to this directory and right click on the folder that you just made.
Highlight TortoiseHg in the menu and select Clone from the list that appears to the side.
In the TortoiseHg Clone window, in the Source path: box put in
http://ryzom.hg.sourceforge.net:8000/hgroot/ryzom/ryzom
For destination path, you want the path to the folder you just right clicked on, which it should default to.
Leave everything else the default (unchecked) and hit Clone at the bottom.
Configuring Visual C++ 2008¶
- First install the DirectX SDK (February 2010)- http://www.microsoft.com/downloads/details.aspx?FamilyID=2c7da5fb-ffbb-4af6-8c66-651cbd28ca15&displaylang=en
- Second install Visual C++ 2008 (90 Day Trial) - http://download.microsoft.com/download/8/1/d/81d3f35e-fa03-485b-953b-ff952e402520/VS2008ProEdition90dayTrialENUX1435622.iso
- Third install Visual C++ 2008 SP1 - http://www.microsoft.com/downloads/thankyou.aspx?familyId=27673c47-b3b5-4c67-bd99-84e525b5ce61&displayLang=en
The first time installing Visual C++ 2008 can take a while.
Now create a new folder. This can go wherever you want and can be called anything you want, Example x:/external (Replace "x" with your drive letter).
Download this file
https://sourceforge.net/projects/ryzom/files/external_stlport.7z/download
Extract the contents to the folder you just created. This comes with both x86 and x64 folders, you only need "bin", "include", and "lib" for the x86 build.
Copy code\tool\visual_studio_macros\autoexp.dat into the following directory:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger
Download and install this file
http://qt.nokia.com/downloads/windows-cpp-vs2008
On your desktop or in your start menu, right click on My Computer and go to Properties. On the left side go to Advanced System Settings and in that window click on Environment Variables… at the bottom.
Under the second box labeled System variables click the New… button. In the box that pops up type in QTLIB for the variable name and put in the directory where Qt installed and \lib after that. So it should look something like C:\QT\4.6.2\lib in the Variable value: field.
Note: You will need to restart your computer at this point.
Configuring Visual C++ 2008¶
Now navigate to the directory we created at the beginning where all the source code is.
Go into code\nel\ and double click on nel.sln. This should open up the project in Visual V++ 2008.
Once that opens, go to the Tools drop down menu at the top and select Options at the bottom. On the left side of that window, expand Projects and Solutions and then select VC++ Directories.
On the right side where it says Show directories for: click on the drop down list there and select Include files. Below that click on the icon that looks like a yellow folder (when you hover over it, it says New Line. A new line pops up at the top of the list down below. You want to hit the … button to the right of that whitespace. Browse to the include directory where the DirectX SDK installed. By default, it installs to C:\Program Files\Microsoft DirectX SDK (February 2010)\Include.
Now you want to add a few more lines with the following directories:
(Note: Your drive letters and folder names may be different than shown here.)
x:\external\include\stlport x:\external\include x:\external\bin x:\ryzom\code\nel\src x:\ryzom\code\nel\include
Now go back to the drop down box under Show directories for: and select Library files.
Add the following lines:
(Once again your drive letters and the name of your directories may be different than shown here.)
C:\Program Files\Microsoft DirectX SDK (February 2010)\Lib\x86
x:\external\lib
x:\ryzom\code\nel\lib
*note "\code\nel\lib" the directory does not exist until after you compile NeL, it is not needed for NeL to compile, but is needed for the ryzom client.
This finishes this part. Go ahead and hit OK at the bottom.
Compiling NeL, NeL Tools, Client/Server, and Ryzom Tools¶
If you don’t already have nel.sln open, navigate to code\nel\ directory in the source code we downloaded earlier and open it.
Along the top of your Visual C++ 2008 window below the Help drop down menu click on the arrow next to where it says Debug and select Release.
Now hit F7 and wait. You are now compiling, and this could take awhile…
When that’s done, hopefully you will get a message along the bottom saying that everything was successful.
If you are interested in doing any world editing, then you will want to build the NeL tools. Navigate to your source code directory and go to code\nel\tools. Double click on all.sln. Change Debug to Release like we did before for Nel and then press F7 to compile. Wait and it should all compile succesfully.
Now let’s move on to the Client/Server.
Navigate to the directory you have the source code and go to code\ryzom\server. Double click on server.sln. Change Debug to Release and then press F7 once again to compile. This will take even longer than when you compiled NeL.
Ryzom tools are not required to run the server.
When that’s done, go ahead and exit out and navigate once again to your source code directory and browse to code\ryzom\tools. Double click on all.sln. Once again change Debug to Release and hit F7.
for the discussion and fixes to five of the issues.
Setting up Apache/PHP¶
To make things less complicated, we're going to use a piece of software called XAMPP Lite that comes pre-configured with Apache, MySQL, and PHP with phpMyAdmin that gives you a web interface to your MySQL server.
Download and install this:
http://www.apachefriends.org/download.php?xampplite-win32-1.7.3.exe
After it's installed I want you to run XAMPP Lite. With the control panel open you want to click on the Explore button on the right side. This should open up the XAMPP directory. Navigate to:
xampplite -> apache -> conf -> extra
note about xampplite, if your on vista or win7 it needs to be run as admin unless you have UAC off. You can do this by right clicking on the Xampplite Control Panel shortcut, click over to compatibility and check the box to "run as admin" You won't need to do this on XP.
Open the file called httpd-vhosts.conf with your favorite text editor. At the very bottom of that document I want you to copy and paste these lines into it:
Note: The drive letter and directory may be different than mine so you may need to change the directory and documentroot lines to match what you have.
Listen 40916
<VirtualHost *:40916>
<Directory "x:/source/code/ryzom/tools/server/">
Options -Indexes FollowSymLinks MultiViews
IndexOptions FancyIndexing FoldersFirst NameWidth=*
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin admin@localhost
DocumentRoot "x:/source/code/ryzom/tools/server/www"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
<Directory "x:/source/code/ryzom/tools/server/">
Options -Indexes FollowSymLinks MultiViews
IndexOptions FancyIndexing FoldersFirst NameWidth=*
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin admin@localhost
DocumentRoot "x:/source/code/ryzom/tools/server/admin"
ServerName localhost
</VirtualHost>
NOTE:
You will probably need to add these lines:
AddType text/html .php .phps AddHandler application/x-httpd-php .php AddHandler application/x-httpd-php-source .phps
to the <directory></directory> section of each virtual host so that apache will know to execute your .php files instead of just display them as text.
The final changes to your httpd-vhosts.conf file should look something like this:
Listen 40916
<VirtualHost *:40916>
<Directory "x:/source/code/ryzom/tools/server/">
Options -Indexes FollowSymLinks MultiViews
IndexOptions FancyIndexing FoldersFirst NameWidth=*
AllowOverride All
Order allow,deny
Allow from all
AddType text/html .php .phps
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps
</Directory>
ServerAdmin admin@localhost
DocumentRoot "x:/source/code/ryzom/tools/server/www"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
<Directory "x:/source/code/ryzom/tools/server/">
Options -Indexes FollowSymLinks MultiViews
IndexOptions FancyIndexing FoldersFirst NameWidth=*
AllowOverride All
Order allow,deny
Allow from all
AddType text/html .php .phps
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps
</Directory>
ServerAdmin admin@localhost
DocumentRoot "x:/source/code/ryzom/tools/server/admin"
ServerName localhost
</VirtualHost>
Save that file and you are done configuring Apache.
Now open up the XAMPP Control Panel again (there should be an icon for it down by your clock).
This time click on the Start button to the right of where it says Apache.
Set NELTOOL_SITEBASE to your server address and NELTOOL_SYSTEMBASE to your path in x:/source/code/ryzom/tools/server/admin/config.php.
Create x:/source/code/ryzom/server/save_shard/rrd_graphs/ directory.
Change $LogRelativePath to 'logs/' in x:/source/code/ryzom/tools/server/www/login/config.php (NOTE: log directory has to be writeable by webserver and it's not wise to give it write access to the directory where script is).
$LogRelativePath = 'logs/';
Create x:/source/code/ryzom/tools/server/www/login/logs/ directory.
Setting up MySQL¶
Open up the XAMPP Control Panel again (there should be an icon for it down by your clock).
Hit the Start button next to MySQL.
Now you should be able to click on the Admin button next to that Start button you just clicked on for MySQL.
A web browser should open up taking you to your phpMyAdmin website.
On that main screen in phpMyAdmin underneath where it says MySQL localhost you should see something that says Create new database. In the box below that type in nel and hit the Create button over to the right. Now go to the top of the screen and click on Server: localhost and it will take you back to the main screen. In the Create new database field put in nel_tool. Once again go back to the main screen and this time create ring_open.
Next, you will need to create a user for your new databases and grant that user privileges on all tables for each database: nel, nel_tool, and ring_open.
NOTE:
The configuration files in code/ryzom/server expect your user to be named 'shard' with NO PASSWORD. If you decide to use a different name for your MySQL user, or assign it a password, you will need to go through the .cfg files and change these values from 'shard' and "" wherever they appear. (they appear in several of the .cfg files)
- Go to the top of the browser and click on Server: localhost and it will take you back to the main page.
- Under the word localhost, find the link Privilges and click it. You will see a page displaying your user table.
- Along the top now you will see a bunch of tabs. Find the tab labeled SQL. Click it.
- You will now see a large text box captioned Run SQL query/queries on server "localhost": @. In this text box, enter the following:
GRANT ALL ON nel.* TO shard@localhost; GRANT ALL ON nel_tool.* TO shard@localhost; GRANT ALL ON ring_open.* TO shard@localhost; - Now click the word Go at bottom right corner of the page.
- You should now see the main page again, with the message "Your SQL query has been executed successfully..." at the very top.
- Now find the link Reload Privileges and click it.
- You should now see the main page again, with the message "The privileges were reloaded successfully..." at the very top.
Congratulations, you have created your new user with privileges on the Ryzom databases!
ALTERNATE STEPS TO CREATE USER AND PRIVILEGES (using the MySQL command line instead of phpMyAdmin)¶
If you prefer using the Windows command window, you can use the following commands to create your databases and add your user (user added here will be named 'shard' with no password):
* Login to the MySQL database server using the command line:> mysql -uroot -p * Create your databases ( nel, nel_tool, and ring_open ): CREATE DATABASE nel; CREATE DATABASE nel_tool; CREATE DATABASE ring_open; * Create the new user and grant privileges for that user on your new databases: GRANT ALL ON nel.* TO shard@localhost; GRANT ALL ON nel_tool.* TO shard@localhost; GRANT ALL ON ring_open.* TO shard@localhost; * Flush privileges, to commit the changes FLUSH PRIVILEGES;
If STRICT_TRANS_TABLES is in your sql_mode, you need to remove it.¶
Check for STRICT_TRANS_TABLES mode in the sql_mode variable in your MySQL configuration.- On the phpMyAdmin home page, find the link Show MySQL system variables and click it.
- Locate the sql_mode variable and look for STRICT_TRANS_TABLES in the Session Value/Global Value column
- If you prefer the command line, you can use this alternative:
* Check for STRICT_TRANS_TABLES mode in the sql_mode variable in your MySQL configuration, using this command:
SHOW VARIABLES WHERE Variable_name='sql_mode';
To remove STRICT_TRANS_TABLES you will need to edit your MySQL configuration and restart the MySQL Server:If your MySQL server is running on the Windows platform:
- Open the my.ini file in a text editor and search for the line starting with sql_mode=.
- Remove STRICT_TRANS_TABLES from the comma-separated-list
i.e.: change sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" to sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" - Restart your MySQL Server
- Open the my.cnf file to edit, and look for the line starting with sql_mode=.
- Remove STRICT_TRANS_TABLES from the comma-separated-list
i.e.: change sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" to sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" - Restart your MySQL Server
Load default data into database¶
Once you have created your user and privileges, minimize your browser and navigate to your source code folder and go to code/ryzom/tools/server/sql.- Open up ryzom_admin_default_data.sql in a text editor. Do a search for /home/nevrax/code/ryzom/server/save_shard/rrd_graphs and change that so it matches your source code directory. I changed mine to: x:/source/code/ryzom/server/save_shard/rrd_graphs. Save and close out of that file.
- Open up ryzom_default_data.sql in a text editor. Change all occurences of open.ryzom.com in code/ryzom/tools/server/sql/ryzom_default_data.sql to your address (e.g. 192.168.0.1), but remember to keep ports (:4999 etc) as is.
Now go to your source code directory and navigate to code/ryzom/server/save_shard and create a new folder in there and call it rrd_graphs.
Copy the code/ryzom/tools/server/admin/templates/default folder and rename the copy to code/ryzom/tools/server/admin/templates/default_c
Open your browser that you minimized earlier that is open to phpMyAdmin.- On the left pane click on where it says nel click on that.
- Along the top now you will see a bunch of tabs. You want to click on the Import tab.
- Under File to import click on the Choose File button. In the window that pops up browse to your source code directory and to code/ryzom/tools/server/sql and select the one called ryzom_tables.sql and hit Open at the bottom.
- Now at the bottom right of that screen hit the Go button and it will import the file.
- Now go back to the Import tab once again under the nel database and do the same process but this time import ryzom_default_data.sql which is in the same directory.
- Now go to the nel_tool database and Import the file called ryzom_admin_default_data.sql.
- navigate to the nel_tool database, then to the neltool_domains table, find the record with a domain_id of "12"
- then edit that row by clicking on the little pencil icon to the left, and change the domain_as_host field to the address of your server.
If you prefer, you can just enter the SQL directly on the SQL tab of the _neltool_domains_ table. Here is the SQL query you will need: UPDATE neltool_domains SET domain_as_host='_your server address goes here_' where domain_id=12;
Setting up MySQL (Alternative)¶
Download the following sql file:
https://docs.google.com/leaf?id=0B3LX3q7MsUEGMmZkMTdlZDEtMTUwYS00MWY4LTkxZGYtZDM0ZGE2MTU5MTUy
Edit the file and replace the following path with your own:
/home/ryzom/code/ryzom/server/save_shard/rrd_graphs
Import in phpMyAdmin.
Edit Configuration Files¶
Once you have the databases set up, you need to make a minor change to one of the .cfg files in code/ryzom/server:- Open code/ryzom/server/frontend_service.cfg in a text editor and do a search for FSListenHost.
- Change FSListenHost to = the address your server is running on (e.g. 192.168.0.1).
Start Ryzom Server¶
At this point, you should be able to start the server using the shard_start.bat file in the code/ryzom/server directory.
Several console windows will open up. Give everything a few minutes to start, then you should be able to start your client and connect to your new server using the instructions found here: RunClientOnWindows
Client login errors¶
- If your client gives you error messages on connect, check http://dev.ryzom.com/wiki/ryzom/ClientConnectErrors
To be continued...


















