BuildForWindowsCmake

Version 47 (Botanic, 09/11/2011 02:00 am)

1 1 kervala
h1. Building Ryzom Core including NeL with CMake under Windows
2 1 kervala
3 15 kervala
{{>toc}}
4 15 kervala
5 17 kervala
h1. Downloading prerequisites
6 1 kervala
7 1 kervala
First, you need to download all these files:
8 1 kervala
9 14 kervala
# "Microsoft Visual C++ 2008 Express":http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f3fbb04e-92c2-4701-b4ba-92e26e408569
10 1 kervala
# "Microsoft DirectX SDK":http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba
11 1 kervala
# "Tortoise Hg":http://tortoisehg.bitbucket.org
12 16 kervala
# "CMake":http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe
13 1 kervala
# "7-Zip":http://www.7-zip.org
14 38 Lukan
# "External_stlport.7z (3rd party libraries)":https://sourceforge.net/projects/ryzom/files/external_stlport.7z/download
15 43 Geringer
# "external.7z (3rd party libraries)":http://sourceforge.net/projects/ryzom/files/external.7z/download
16 1 kervala
17 1 kervala
h1. Installing prerequisites
18 1 kervala
19 1 kervala
Install *Microsoft Visual C++ 2008 Express*, *Microsoft DirectX SDK*, *CMake*, *Tortoise Hg* and *7-Zip* in your desired locations. If you don't use the default path, you'll have to put your specific path in the following commands.
20 18 kervala
21 40 JarHead
If you have problems installing the .net framework you may have other installations of the .net framework installed
22 40 JarHead
which are preventing you.Use the .net cleanup tool at the bottom of this page if this is the case.
23 40 JarHead
24 39 JarHead
If you plan to use CMake from command line check this option:
25 18 kervala
!cmake_path.png!
26 1 kervala
27 23 kervala
h3. From GUI
28 23 kervala
29 24 kervala
[[Getting_Source|Get the sources]]
30 1 kervala
31 43 Geringer
Decompress downloaded *external_stlport.7z* and *external.7z* inside *C:\ryzom\*.
32 23 kervala
33 43 Geringer
After that, you can delete *external_stlport.7z*, *external.7z*.
34 23 kervala
35 23 kervala
You should have this structure :
36 23 kervala
37 23 kervala
<pre>
38 23 kervala
C:\
39 23 kervala
|
40 23 kervala
+-- Ryzom
41 23 kervala
    |
42 23 kervala
    +-- code
43 23 kervala
    |   |
44 23 kervala
    |   +-- nel
45 23 kervala
    |   |
46 23 kervala
    |   +-- ryzom
47 23 kervala
    |   |
48 23 kervala
    |   +-- ...
49 1 kervala
    |
50 1 kervala
    +-- external_stlport
51 43 Geringer
    |   |
52 43 Geringer
    |   +-- bin
53 43 Geringer
    |   |
54 43 Geringer
    |   +-- bin64
55 43 Geringer
    |   |
56 43 Geringer
    |   +-- include
57 43 Geringer
    |   |
58 43 Geringer
    |   +-- lib
59 43 Geringer
    |   |
60 43 Geringer
    |   +-- lib64
61 43 Geringer
    |
62 43 Geringer
    +-- external
63 23 kervala
        |
64 23 kervala
        +-- bin
65 23 kervala
        |
66 23 kervala
        +-- bin64
67 23 kervala
        |
68 23 kervala
        +-- include
69 23 kervala
        |
70 23 kervala
        +-- lib
71 23 kervala
        |
72 23 kervala
        +-- lib64
73 23 kervala
    
74 23 kervala
</pre>
75 23 kervala
76 17 kervala
h2. From command line
77 6 kervala
78 17 kervala
h3. Open a Visual Studio command line
79 3 vl
80 3 vl
In *Start Menu* -> *All Programs* -> *Microsoft Visual C++ 2008 Express Edition* -> *Visual Studio Tools*, launch *Visual Studio 2008 Command Prompt*
81 1 kervala
82 1 kervala
h3. Getting the sources
83 3 vl
84 1 kervala
In the command line, type:
85 19 kervala
86 19 kervala
<pre>
87 19 kervala
c:
88 19 kervala
cd \
89 8 kervala
md ryzom
90 22 kervala
cd ryzom
91 22 kervala
hg clone http://ryzom.hg.sourceforge.net:8000/hgroot/ryzom/ryzom .
92 22 kervala
</pre>
93 1 kervala
94 1 kervala
h3. Installing external
95 1 kervala
96 1 kervala
Put the downloaded *external_stlport.7z* inside *C:\ryzom\* and in the command line, type:
97 22 kervala
98 1 kervala
<pre>
99 1 kervala
"c:\Program Files\7-Zip\7z.exe" x external_stlport.7z -oexternal_stlport
100 1 kervala
del external_stlport.7z
101 43 Geringer
"c:\Program Files\7-Zip\7z.exe" x external.7z -oexternal
102 43 Geringer
del external.7z
103 1 kervala
</pre>
104 1 kervala
105 1 kervala
h3. Installing Jom (optional)
106 43 Geringer
_Jom already is in external\bin._
107 1 kervala
108 37 kervala
Download *Jom* from "Nokia FTP":ftp://ftp.qt.nokia.com/jom/jom.zip.
109 1 kervala
110 37 kervala
Put the downloaded *jom.zip* inside *C:\ryzom\* and in the command line, type:
111 22 kervala
112 22 kervala
<pre>
113 37 kervala
"c:\Program Files\7-Zip\7z.exe" x jom.zip -oexternal_stlport\bin
114 37 kervala
del jom.zip
115 1 kervala
set PATH=%PATH%;C:\ryzom\external_stlport\bin
116 17 kervala
</pre>
117 1 kervala
118 23 kervala
h1. Compiling
119 1 kervala
120 42 molator
You will need to set FINAL_VERSION to OFF to build the client and add PatchWanted = 0; in client.cfg or you would receive an error.
121 27 sm3
122 42 molator
Alternatively, you could edit code\ryzom\client\src\client_cfg.cpp. Change PatchWanted to false where it says "only force patching under Windows by default" (around line 422).
123 34 molator
124 23 kervala
h2. With GUI
125 8 kervala
126 23 kervala
You should launch *CMake (cmake-gui)* which is located in your *Start menu* in *CMake* sub-menu.
127 8 kervala
128 23 kervala
Fill in required fields:
129 8 kervala
130 23 kervala
* Where is the source code:  *C:/ryzom/code*
131 23 kervala
* Where to build the binaries: *C:/ryzom/code/build*
132 8 kervala
133 23 kervala
Now click on *Configure*, it will ask you to choose a generator, select *Visual Studio 9 2008* and click on *Finish*.
134 23 kervala
!cmake_generator.png!
135 8 kervala
136 29 kervala
Other generators could work too such as: *Visual Studio 9 2008 Win64 (if you installed Windows SDK 64 bits compilers)* or *other versions of Visual Studio*.
137 23 kervala
138 23 kervala
If there is any error (text in red in the text area), check it in the text area at the bottom and try to fix it, if there is no error, click again on *Configure*, the *Generate* button should be enabled now, finally click on *Generate*.
139 23 kervala
140 23 kervala
If you want to enable or disable options, you will need to click again on *Configure* and *Generate*.
141 23 kervala
!cmake_gui_options.png!
142 23 kervala
143 30 kervala
The solution *C:\ryzom\code\build\RyzomCore.sln* has been generated, you can double-click to open it in Visual C++ and press *F7* to compile all projects.
144 23 kervala
145 9 kervala
h2. With command line using nmake (installed by Visual C++)
146 3 vl
147 3 vl
In the command line, type:
148 17 kervala
149 3 vl
<pre>
150 1 kervala
cd code
151 1 kervala
md build
152 2 kervala
cd build
153 2 kervala
cmake ..
154 2 kervala
nmake
155 3 vl
</pre>
156 2 kervala
157 2 kervala
h2. With command line using jom (not installed by Visual C++)
158 12 kervala
159 2 kervala
In the command line, type:
160 2 kervala
161 2 kervala
<pre>
162 2 kervala
cd code
163 2 kervala
md build
164 2 kervala
cd build
165 11 kervala
cmake .. -G "NMake Makefiles JOM"
166 26 sm3
jom
167 26 sm3
</pre>
168 26 sm3
169 26 sm3
170 27 sm3
h2. Additional Step Necessary for Server Startup
171 25 Lukan
172 46 dfighter
For connecting to a running game-server you have to install apache and mysql, as in http://dev.ryzom.com/projects/Ryzom/wiki/EverythingWindows#Setting-up-ApachePHP and thereafter.
173 32 ragnar-gd
Please note that the first part of that page about compiling etc. is outdated, ignore it, until the wiki is corrected.
174 1 kervala
175 45 molator
Please continue on to: http://dev.ryzom.com/projects/ryzom/wiki/FixingWindowsBatch
176 36 molator
177 36 molator
CMake Options:
178 44 molator
http://dev.ryzom.com/projects/ryzom/wiki/CMakeOptions
179 47 Botanic
180 47 Botanic
h2. Additional Step for QT
181 47 Botanic
182 47 Botanic
install http://get.qt.nokia.com/qt/source/qt-win-opensource-4.7.0-vs2008.exe
183 47 Botanic
184 47 Botanic
replace c:\qt\4.7.0 with https://docs.google.com/leaf?id=0B3LX3q7MsUEGMWFkN2FlYjEtMTAwOC00YmZjLWI5Y2ItNWQ4MDFmODJlMjdl