Difference between revisions of "Building Ryzom Client On Windows"

From Ryzom Forge Wiki

Jump to: navigation, search
 
Line 1: Line 1:
 
== Downloading prerequisites ==
 
== Downloading prerequisites ==
  
Even if Ryzom Core supports Visual C++ 2008, 2010, 2012 and 2015, we recommend to use the last one because it supports most features and needs less steps to configure. It also supports Qt 5 with an available extension.
+
Even if Ryzom Core supports Visual C++ 2008, 2010, 2012, 2015 and 2017, we recommend to use the last one because it supports most features and needs less steps to configure. It also supports Qt 5 with an available extension.
  
  
Line 7: Line 7:
 
* CMake: https://cmake.org/download/
 
* CMake: https://cmake.org/download/
 
* 7-Zip: http://www.7-zip.org
 
* 7-Zip: http://www.7-zip.org
 +
* External for Visual C++ 2017: https://sourceforge.net/projects/ryzom/files/external_vc141.7z/download
 
* External for Visual C++ 2015: https://sourceforge.net/projects/ryzom/files/external_vc14.7z/download
 
* External for Visual C++ 2015: https://sourceforge.net/projects/ryzom/files/external_vc14.7z/download
 
* DirectX 9 SDK: https://www.microsoft.com/en-us/download/details.aspx?id=6812
 
* DirectX 9 SDK: https://www.microsoft.com/en-us/download/details.aspx?id=6812
Line 13: Line 14:
 
* WinMerge 2011 (optional to compare files, don't forget to rename to .exe): https://bitbucket.org/jtuc/winmerge2011/downloads
 
* WinMerge 2011 (optional to compare files, don't forget to rename to .exe): https://bitbucket.org/jtuc/winmerge2011/downloads
  
 
+
To download the latest version of '''Visual Studio Community Edition''' : https://www.visualstudio.com/downloads/
To download '''Visual Studio Community 2015 with Update 3 (7.19 GB)''' click to download https://stackoverflow.com/questions/38134857/visual-studio-2015-update-3-offline-installer-iso .
 
 
 
A popup will appear with '''vs_community.exe''' (the online installer) and '''vs2015.3com_XXX.iso''' the ISO file if you want to download everything at once (easier if you need to install it several times). You don't need to mount the ISO file, you can uncompress it with '''7-Zip''' you downloaded and installed earlier.
 
 
 
 
Warning! Be sure to check '''Visual C++''' components.
 
Warning! Be sure to check '''Visual C++''' components.
 
Unlike '''Visual Studio 2010''', you don't need to download separately 64 bits compilers and '''Windows SDK''' since they are included.
 
  
  
 
== Installing prerequisites ==
 
== Installing prerequisites ==
  
Install '''Tortoise Hg''', '''CMake''', '''7-Zip''', '''DirectX 9 SDK''', '''Qt 5''', '''Notepad++''', '''WinMerge 2011''' and '''Microsoft Visual Studio Community 2015'''. Don't forget to check all '''C++''' components for this last one.
+
Install '''Tortoise Hg''', '''CMake''', '''7-Zip''', '''DirectX 9 SDK''', '''Qt 5''', '''Notepad++''', '''WinMerge 2011''' and '''Microsoft Visual Studio Community 2017'''. Don't forget to check all '''C++''' components for this last one.
  
 
If you got an error '''S1023''' when installing the '''DirectX 9 SDK''', please check : https://support.microsoft.com/en-us/kb/2728613
 
If you got an error '''S1023''' when installing the '''DirectX 9 SDK''', please check : https://support.microsoft.com/en-us/kb/2728613
Line 87: Line 82:
 
== Installing external ==
 
== Installing external ==
  
Create an '''external''' directory in '''ryzomcore''' and uncompress '''external_vc14.7z''' here.
+
Create an '''external''' directory in '''ryzomcore''' and uncompress '''external_vc141.7z''' here.
  
 
== Configuring Ryzom project ==
 
== Configuring Ryzom project ==
Line 93: Line 88:
 
* Launch '''CMake (cmake-gui)''' and define '''Where is the source code''' to <your path>/Ryzom/ryzomcore/code and '''Where to build the binaries''' to <your path>/Ryzom/ryzomcore/build
 
* Launch '''CMake (cmake-gui)''' and define '''Where is the source code''' to <your path>/Ryzom/ryzomcore/code and '''Where to build the binaries''' to <your path>/Ryzom/ryzomcore/build
 
* Press '''Configure'''
 
* Press '''Configure'''
* Select '''Visual Studio 14 2015 (Win64)''' (64 bits) or '''Visual Studio 14 2015''' (32 bits)
+
* Select '''Visual Studio 15 2017 (Win64)''' (64 bits) or '''Visual Studio 15 2017''' (32 bits)
 
* Press '''Finish'''
 
* Press '''Finish'''
 
* Uncheck : '''WITH_LUA51''', '''WITH_NEL_SAMPLES''', '''WITH_NEL_TESTS''', '''WITH_NEL_TOOLS''', '''WITH_RYZOM_SERVER''', '''WITH_RYZOM_TOOLS'''
 
* Uncheck : '''WITH_LUA51''', '''WITH_NEL_SAMPLES''', '''WITH_NEL_TESTS''', '''WITH_NEL_TOOLS''', '''WITH_RYZOM_SERVER''', '''WITH_RYZOM_TOOLS'''

Latest revision as of 13:50, 3 October 2017

Downloading prerequisites

Even if Ryzom Core supports Visual C++ 2008, 2010, 2012, 2015 and 2017, we recommend to use the last one because it supports most features and needs less steps to configure. It also supports Qt 5 with an available extension.


To download the latest version of Visual Studio Community Edition : https://www.visualstudio.com/downloads/ Warning! Be sure to check Visual C++ components.


Installing prerequisites

Install Tortoise Hg, CMake, 7-Zip, DirectX 9 SDK, Qt 5, Notepad++, WinMerge 2011 and Microsoft Visual Studio Community 2017. Don't forget to check all C++ components for this last one.

If you got an error S1023 when installing the DirectX 9 SDK, please check : https://support.microsoft.com/en-us/kb/2728613

Getting source

Create a new folder called Ryzom somewhere where you have write access, go in it with Explorer. Click with right mouse button, then on TortoiseHg -> Clone, you will get a dialog. In Source enter https://bitbucket.org/ryzom/ryzomcore and Destination will be filled automatically with ryzomcore. Finally, click on Clone to download all Ryzom Core files.

Configure TortoiseHg

We need to configure TortoiseHg to simplify code update later. Right click on your new directory ryzomcore and click on Hg Workbench, it should launch TortoiseHg.

Select the last commit line where appears compatibility-develop in Branch column, right-click on it and Update....

Now go to Files -> Settings and define different options :

  • in TortoiseHg tab :
  1. Three-way Merge Tool : winmergeu
  2. Visual Diff Tool : winmergeu
  3. Visual Editor : notepad++
  • in Commit tab, Username : Put your username if you want to commit something
  • in Sync tab, After Pull Operation : update

If you want to edit these options later, you can also directly edit the file C:\Users\<Login>\mercurial.ini. Mine is :

[ui]
username = <username>
merge = winmergeu

[tortoisehg]
ui.language = en
vdiff = winmergeu
editor = notepad++
autoresolve = True
postpull = update
shell = windows_command_prompt
vdiff = winmergeu
engmsg = True

[extensions]
mercurial_keyring = 
purge = 
eol = 
transplant = 
hggit = 
strip = 

[eol]
native = LF

[auth]
bitbucket.prefix = bitbucket.org
bitbucket.username = <login>
bitbucket.password = <password>
bitbucket.schemes = https

Installing external

Create an external directory in ryzomcore and uncompress external_vc141.7z here.

Configuring Ryzom project

  • Launch CMake (cmake-gui) and define Where is the source code to <your path>/Ryzom/ryzomcore/code and Where to build the binaries to <your path>/Ryzom/ryzomcore/build
  • Press Configure
  • Select Visual Studio 15 2017 (Win64) (64 bits) or Visual Studio 15 2017 (32 bits)
  • Press Finish
  • Uncheck : WITH_LUA51, WITH_NEL_SAMPLES, WITH_NEL_TESTS, WITH_NEL_TOOLS, WITH_RYZOM_SERVER, WITH_RYZOM_TOOLS
  • Check : WITH_LUA53
  • I suggest to click on File -> Delete Cache
  • Press Configure
  • Press Generate

Cmake example.png

Launch project

Double-click on RyzomCore.sln file in build directory.

Visual Studio 2010

If you want to compile for 64-bit, you'll additionally need:

  • Microsoft .NET Framework 4
  • Microsoft Windows SDK 7.1
  • Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1

If Windows SDK installer complains about a beta version of .NET Framework 4 being installed:

open regedit and edit these two strings:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Client\Version
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Full\Version

You might have to give yourself ownership of Client and Full folder and then all access rights to be able to edit the Version label... replace the version with '4.0.30319'. Relaunch the Microsoft Windows SDK installer, and when it's finished restore the original value into the version field and change permissions back.
Solution taken from: http://stackoverflow.com/questions/32091593/cannot-install-windows-sdk-7-1-on-windows-10/32322920#32322920


With Visual Studio 2010 you'll normally encounter following error:

error C2719: '_Val': formal parameter with __declspec(align('16')) won't be aligned


You have to edit the header file C:\Programs\Microsoft Visual Studio 10.0\VC\include\vector

change line 869
from:

void resize(size_type _Newsize, _Ty _Val)

to:

void resize(size_type _Newsize, const _Ty& _Val)