EverythingWindows

Version 29 (zasdman, 05/17/2010 12:26 am)

1 9 zasdman
h1. *BuildConfRunWindows*
2 1 Phaelae
3 9 zasdman
h1. Building, Configuring and Running the Ryzom Core for Windows(x86)
4 1 Phaelae
5 9 zasdman
_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._
6 1 Phaelae
7 1 Phaelae
8 9 zasdman
h2. *The following is a list of everything you will need to download.*
9 9 zasdman
10 1 Phaelae
TortoiseHg - http://tortoisehg.bitbucket.org/download/index.html
11 1 Phaelae
DirectX SDK (February 2010) - http://www.microsoft.com/downloads/details.aspx?FamilyID=2c7da5fb-ffbb-4af6-8c66-651cbd28ca15&displaylang=en
12 11 zasdman
External_stlport - http://dev.ryzom.com/attachments/download/593/external_stlport_lua51.7z
13 1 Phaelae
Qt - http://qt.nokia.com/downloads/windows-cpp-vs2008
14 10 zasdman
XAMPP - http://www.apachefriends.org/download.php?xampplite-win32-1.7.3.exe
15 1 Phaelae
Apache - http://apache.mirrors.hoobly.com/httpd/binaries/win32/httpd-2.2.15-win32-x86-no_ssl.msi
16 1 Phaelae
MySQL - http://www.mysql.com/downloads/mysql/
17 1 Phaelae
Visual C++ 2008 (90 Day Trial) - http://download.microsoft.com/download/8/1/d/81d3f35e-fa03-485b-953b-ff952e402520/VS2008ProEdition90dayTrialENUX1435622.iso
18 1 Phaelae
Visual C++ 2008 SP1 - http://www.microsoft.com/downloads/thankyou.aspx?familyId=27673c47-b3b5-4c67-bd99-84e525b5ce61&displayLang=en
19 1 Phaelae
PHP - http://windows.php.net/downloads/releases/php-5.3.2-Win32-VC6-x86.zip
20 29 zasdman
21 1 Phaelae
22 1 Phaelae
23 9 zasdman
24 9 zasdman
h2. *1. Getting the source code*
25 9 zasdman
26 1 Phaelae
Download and install TortoiseHg - http://tortoisehg.bitbucket.org/download/index.html
27 1 Phaelae
28 1 Phaelae
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).
29 1 Phaelae
30 1 Phaelae
_Example: x:/ryzom_
31 1 Phaelae
32 16 zasdman
33 18 zasdman
> !http://dev.ryzom.com/attachments/648/1.jpg!
34 14 zasdman
35 16 zasdman
36 1 Phaelae
Navigate to this directory and right click on the folder that you just made.
37 1 Phaelae
38 1 Phaelae
Highlight *TortoiseHg* in the menu and select *Clone* from the list that appears to the side.
39 1 Phaelae
40 16 zasdman
41 18 zasdman
> !http://dev.ryzom.com/attachments/649/clone.jpg!
42 16 zasdman
43 15 zasdman
44 1 Phaelae
In the TortoiseHg Clone window, in the *Source path:* box put in
45 1 Phaelae
http://ryzom.hg.sourceforge.net:8000/hgroot/ryzom/ryzom
46 1 Phaelae
47 1 Phaelae
For destination path, you want the path to the folder you just right clicked on, which it should default to.
48 1 Phaelae
49 1 Phaelae
Leave everything else the default (unchecked) and hit *Clone* at the bottom.
50 1 Phaelae
51 18 zasdman
> !http://dev.ryzom.com/attachments/650/tortoisehg_clone.jpg!
52 17 zasdman
53 1 Phaelae
54 9 zasdman
55 13 zasdman
h2. *2a. Configuring Visual C++ 2008*
56 9 zasdman
57 24 zasdman
First install the DirectX SDK (February 2010)- http://www.microsoft.com/downloads/details.aspx?FamilyID=2c7da5fb-ffbb-4af6-8c66-651cbd28ca15&displaylang=en
58 25 zasdman
Second install Visual C++ 2008 (90 Day Trial) - http://download.microsoft.com/download/8/1/d/81d3f35e-fa03-485b-953b-ff952e402520/VS2008ProEdition90dayTrialENUX1435622.iso
59 25 zasdman
Third install Visual C++ 2008 SP1 - http://www.microsoft.com/downloads/thankyou.aspx?familyId=27673c47-b3b5-4c67-bd99-84e525b5ce61&displayLang=en
60 25 zasdman
61 25 zasdman
The first time installing Visual C++ 2008 can take a while.
62 1 Phaelae
63 13 zasdman
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).
64 1 Phaelae
65 19 zasdman
> !http://dev.ryzom.com/attachments/651/external.jpg! 
66 19 zasdman
67 1 Phaelae
Download this file
68 11 zasdman
http://dev.ryzom.com/attachments/download/593/external_stlport_lua51.7z
69 1 Phaelae
70 12 zasdman
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._
71 1 Phaelae
72 20 zasdman
> !http://dev.ryzom.com/attachments/652/stlport.jpg!
73 20 zasdman
74 4 kervala
Copy _code\tool\visual_studio_macros\autoexp.dat_ into the following directory: 
75 1 Phaelae
C:\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger
76 1 Phaelae
77 21 zasdman
> !http://dev.ryzom.com/attachments/653/autoexp.jpg!
78 22 zasdman
> !http://dev.ryzom.com/attachments/654/autoexp2.jpg!
79 21 zasdman
80 1 Phaelae
Download and install this file
81 1 Phaelae
http://qt.nokia.com/downloads/windows-cpp-vs2008
82 1 Phaelae
83 1 Phaelae
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.
84 1 Phaelae
85 23 zasdman
> !http://dev.ryzom.com/attachments/655/properties.jpg!
86 23 zasdman
> !http://dev.ryzom.com/attachments/656/systemsettings.jpg!
87 23 zasdman
> !http://dev.ryzom.com/attachments/657/evironment.jpg!
88 23 zasdman
89 13 zasdman
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.
90 23 zasdman
91 23 zasdman
> !http://dev.ryzom.com/attachments/658/qtlib.jpg!
92 23 zasdman
> !http://dev.ryzom.com/attachments/659/qtlib2.jpg!
93 1 Phaelae
94 28 zasdman
95 26 zasdman
h1. *_Note: You will need to restart your computer at this point._*
96 1 Phaelae
97 28 zasdman
98 13 zasdman
99 13 zasdman
h2. *2b. Configuring Visual C++ 2008*
100 13 zasdman
101 1 Phaelae
Now navigate to the directory we created at the beginning where all the source code is.
102 1 Phaelae
103 1 Phaelae
Go into _code\nel\_ and double click on *nel.sln*. This should open up the project in Visual V++ 2008.
104 1 Phaelae
105 13 zasdman
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*.
106 1 Phaelae
107 3 Phaelae
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.
108 1 Phaelae
109 1 Phaelae
Now you want to add a few more lines with the following directories:
110 13 zasdman
_(Note: Your drive letters and folder names may be different than shown here.)_
111 1 Phaelae
x:\external\include\stlport
112 1 Phaelae
x:\external\include
113 1 Phaelae
x:\external\bin
114 1 Phaelae
x:\ryzom\code\nel\src
115 1 Phaelae
x:\ryzom\code\nel\include
116 1 Phaelae
117 1 Phaelae
Now go back to the drop down box under *Show directories for:* and select *Library files*.
118 1 Phaelae
119 1 Phaelae
Add the following lines:
120 13 zasdman
_(Once again your drive letters and the name of your directories may be different than shown here.)_
121 1 Phaelae
C:\Program Files\Microsoft DirectX SDK (February 2010)\Lib\x86
122 1 Phaelae
x:\external\lib
123 1 Phaelae
x:\ryzom\code\nel\lib
124 1 Phaelae
125 13 zasdman
This finishes this part. Go ahead and hit OK at the bottom.
126 1 Phaelae
127 1 Phaelae
128 9 zasdman
129 9 zasdman
h2. *3. Compiling NeL, Client/Server, and Tools.*
130 9 zasdman
131 1 Phaelae
If you don’t already have *nel.sln* open, navigate to _code\nel\_ directory in the source code we downloaded earlier and open it.
132 1 Phaelae
133 1 Phaelae
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*.
134 1 Phaelae
135 1 Phaelae
Now hit F7 and wait. You are now compiling, and this could take awhile…
136 1 Phaelae
137 1 Phaelae
When that’s done, hopefully you will get a message along the bottom saying that everything was successful.
138 1 Phaelae
139 1 Phaelae
Now let’s move on to the Client/Server. 
140 1 Phaelae
141 1 Phaelae
Navigate to the directory you have the source code and go to _code\ryzom\server_. Double click on *server.sln*. Make sure to change *Debug* to *Release* like we did before in this project and then press F7 once again to compile. This will take even longer than when you compiled NeL.
142 1 Phaelae
143 3 Phaelae
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. Once again wait and it should all compile successfully.
144 1 Phaelae
145 1 Phaelae
146 9 zasdman
147 9 zasdman
h2. *4. Setting up Apache/MySQL/PHP*
148 9 zasdman
149 5 Phaelae
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.
150 5 Phaelae
151 5 Phaelae
Download and install this:
152 5 Phaelae
http://www.apachefriends.org/download.php?xampplite-win32-1.7.3.exe
153 5 Phaelae
154 5 Phaelae
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:
155 5 Phaelae
_xampplite -> apache -> conf -> extra_
156 5 Phaelae
157 5 Phaelae
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:
158 5 Phaelae
_Note: The drive letter and directory may be different then mine so you may need to change the the directory and documentroot lines to match what you have._
159 5 Phaelae
160 6 Phaelae
Listen 40916
161 5 Phaelae
<VirtualHost *:40916>
162 5 Phaelae
  <Directory "x:/source/code/ryzom/tools/server/">
163 5 Phaelae
     Options -Indexes FollowSymLinks MultiViews
164 5 Phaelae
     IndexOptions FancyIndexing FoldersFirst NameWidth=*
165 5 Phaelae
     AllowOverride All
166 5 Phaelae
     Order allow,deny
167 5 Phaelae
     Allow from all
168 5 Phaelae
  </Directory> 
169 5 Phaelae
  ServerAdmin admin@localhost
170 8 MMOInteractive
  DocumentRoot "x:/source/code/ryzom/tools/server/www"
171 5 Phaelae
  ServerName localhost
172 5 Phaelae
</VirtualHost>
173 5 Phaelae
<VirtualHost *:80>
174 5 Phaelae
  <Directory "x:/source/code/ryzom/tools/server/">
175 5 Phaelae
     Options -Indexes FollowSymLinks MultiViews
176 5 Phaelae
     IndexOptions FancyIndexing FoldersFirst NameWidth=*
177 5 Phaelae
     AllowOverride All
178 5 Phaelae
     Order allow,deny
179 1 Phaelae
     Allow from all
180 1 Phaelae
  </Directory> 
181 1 Phaelae
  ServerAdmin admin@localhost
182 5 Phaelae
  DocumentRoot "x:/source/code/ryzom/tools/server/admin"
183 5 Phaelae
  ServerName localhost
184 8 MMOInteractive
</VirtualHost>
185 5 Phaelae
186 6 Phaelae
Save that file and you are done configuring Apache. Now I want you to open up the XAMPP Control Panel again (there should be an icon for it down by your clock).
187 5 Phaelae
188 9 zasdman
This time click on the *Start* button to the right of where it says *Apache*.
189 9 zasdman
190 9 zasdman
When that is done 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.
191 5 Phaelae
192 5 Phaelae
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_.
193 5 Phaelae
194 7 Phaelae
Minimize your browser now 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.
195 7 Phaelae
196 7 Phaelae
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_.
197 7 Phaelae
198 7 Phaelae
Open back up 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_.
199 7 Phaelae
200 7 Phaelae
201 7 Phaelae
*To be continued...*