In Memoriam: Tai'lahr
OpenUru.org, along with the rest of the Mystonline community, is mourning the loss of Tai'lahr on October 16th, 2019.
Rest in Peace, friend.
Difference between revisions of "Build the client with MSVC 2003"
(Created page with "== Items needed to compile == * Microsoft Visual Studio 2003 .NET * Microsoft Platform SDK February 2003 edition (build 5.2.3790.0) (see links and note below) * [http://www.micr...") |
(Note the deprecation of Visual Studio 2003 as a usable build tool after November 2020.) |
||
(22 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{UruDocProj}} | ||
+ | == Introduction == | ||
+ | This document provides steps to build the CWE client with minimal changes from the initial Cyan source release. It is assumed that you have the initial Cyan source commit, the four commits made by a'moaca (add jpeg-8c library, remove EAX, replace IJL with IJG, and remove Bink), and the one made by cjkelly1 (modify the MsDevProjects and add batch files) in your source tree. Be aware that subsequent commits by other developers may invalidate these instructions. | ||
+ | |||
+ | == Notes about Building with Visual Studio 2003 .NET == | ||
+ | As of November 2020, the main branch of the CWE client source code has ceased to be able to build with VS2003.NET by default. With alterations the current head of the repository might be able to compile with VS2003, but this no longer is guaranteed. Newer additions to the client need to take advantage of C++ features not available in VS2003. | ||
+ | |||
+ | The last revision (commit) in the repositories that were intended to be built with VS2003 are marked by the branch '''VS2003_FINAL'''. By checking out that branch, you should be able to follow the instructions below without issue. | ||
+ | |||
== Items needed to compile == | == Items needed to compile == | ||
* Microsoft Visual Studio 2003 .NET | * Microsoft Visual Studio 2003 .NET | ||
* Microsoft Platform SDK February 2003 edition (build 5.2.3790.0) (see links and note below) | * Microsoft Platform SDK February 2003 edition (build 5.2.3790.0) (see links and note below) | ||
− | * [http://www.microsoft.com/downloads/en/details.aspx?familyid=1c8dc451-2dbe-4ecc-8c57-c52eea50c20a&displaylang=en&pf=true Microsoft DirectX 9.0 SDK (October 2005)] | + | * [http://www.microsoft.com/downloads/en/details.aspx?familyid=1c8dc451-2dbe-4ecc-8c57-c52eea50c20a&displaylang=en&pf=true Microsoft DirectX 9.0 SDK (October 2005)] |
+ | ** Mirror: [https://archive.org/details/dxsdk_oct2005 Archive.org] | ||
* [http://www.openssl.org/source/openssl-0.9.8q.tar.gz OpenSSL 0.9.8q] | * [http://www.openssl.org/source/openssl-0.9.8q.tar.gz OpenSSL 0.9.8q] | ||
* [http://downloads.xiph.org/releases/ogg/libogg-1.2.0.zip libogg-1.2.0] | * [http://downloads.xiph.org/releases/ogg/libogg-1.2.0.zip libogg-1.2.0] | ||
* [http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.zip libvorbis-1.2.0] | * [http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.zip libvorbis-1.2.0] | ||
* [http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip OpenAL v1.1 SDK] | * [http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip OpenAL v1.1 SDK] | ||
− | * [http://developer.nvidia.com/ | + | * [http://developer.download.nvidia.com/PhysX/2.6.4/PhysX_2.6.4_SDK_Core.exe Ageia PhysX 2.6.4 Core SDK] |
== Instructions to obtain the Microsoft Platform SDK February 2003 edition == | == Instructions to obtain the Microsoft Platform SDK February 2003 edition == | ||
Line 32: | Line 42: | ||
− | '''Note on versions:''' I am using this older stuff because it is closest to what Cyan builds with. | + | '''Note on versions:''' I am using this older stuff because it is closest to what Cyan builds with. These instructions have only been tested with these specific versions. If you use other versions of the SDKs and such, you will have to adjust for the changes. If you do use different versions, it would be greatly appreciated if you would add a section to this document explaining what you had to do to use the newer versions, so everyone can benefit from your work. |
== Build steps == | == Build steps == | ||
<ol> | <ol> | ||
<li> Obtain CWE sources from the repository.</li> | <li> Obtain CWE sources from the repository.</li> | ||
− | <li> Install MS Platform SDK. You only need the "Core SDK" and the "Internet Development SDK". You do not need to use the setup.exe in the root of the SDK installer directory - this is merely a splash page and requires IE. Instead, go to the "setup" directory and run "CoreSDK-x86.msi" and then run "IESDK-x86.msi". Note that the "-ia64" installers are for Itanium 64 bit machines, and will not run in x64. | + | <li> Install MS Platform SDK. You only need the "Core SDK" and the "Internet Development SDK". You do not need to use the setup.exe in the root of the SDK installer directory - this is merely a splash page and requires IE. Instead, go to the "setup" directory and run "CoreSDK-x86.msi" and then run "IESDK-x86.msi". Note that the "-ia64" installers are for Itanium 64 bit machines, and will not run in x64. '''Note:''' Do not copy the .msi files somewhere else and run them. They need to be run in the same directory as all the *.cab files.</li> |
− | <li> Copy the include and lib directories from the SDK to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\PlatformSDK".<BR> | + | <li> Copy the include and lib directories from the SDK to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\PlatformSDK". '''Note:'''The directory where the SDK resides will be the one specified in the "Select An Installation Location" dialog when you ran the .msi files. This location will vary by platform.<BR><BR> |
− | Directory structure will look like this: | + | Directory structure in the CWE tree will look like this: |
<pre> | <pre> | ||
StaticSDKs | StaticSDKs | ||
Line 67: | Line 77: | ||
'''Note:''' Warnings in the build process are ogg/vorbis problems, and fixing an old release of ogg/vorbis is outside the scope of this document. Also, we are using the VC6 projects instead of the MSVC 2003 ones so that the file names and such will match what Cyan has in their projects. You can build the MSVC 2003 projects if you wish, but you will have to either change the output file names to match the VC6 ones, or change Cyan's projects to use the names the MSVC 2003 projects use. Building the VC6 ones required the less changing of the projects. | '''Note:''' Warnings in the build process are ogg/vorbis problems, and fixing an old release of ogg/vorbis is outside the scope of this document. Also, we are using the VC6 projects instead of the MSVC 2003 ones so that the file names and such will match what Cyan has in their projects. You can build the MSVC 2003 projects if you wish, but you will have to either change the output file names to match the VC6 ones, or change Cyan's projects to use the names the MSVC 2003 projects use. Building the VC6 ones required the less changing of the projects. | ||
− | <li>Copy the contents of your ogg directory and then vorbis directory into "CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\oggvorbis". It is okay to let it overwrite. Once that is done, copy the lib files you created above into "CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\oggvorbis\lib"<BR> | + | <li>Copy the contents of your ogg directory and then vorbis directory into "CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\oggvorbis". It is okay to let it overwrite. Once that is done, copy the lib files you created above into "CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\oggvorbis\lib"<BR><BR> |
− | Directory will look like this: | + | Directory structure in the CWE tree will look like this: |
<pre> | <pre> | ||
StaticSDKs | StaticSDKs | ||
Line 79: | Line 89: | ||
....</pre> | ....</pre> | ||
</li> | </li> | ||
− | <li>Install the OpenAL SDK and copy it to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\OpenAL 1.1 with EFX SDK"<BR> | + | <li>Install the OpenAL SDK and copy it to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\OpenAL 1.1 with EFX SDK"<BR><BR> |
− | Directory structure will look like this: | + | Directory structure in the CWE tree will look like this: |
<pre> | <pre> | ||
StaticSDKs | StaticSDKs | ||
Line 90: | Line 100: | ||
....</pre> | ....</pre> | ||
</li> | </li> | ||
− | <li>Install the DirectX 9.0c SDK and copy it to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\DX9.0c"<BR> | + | <li>Install the DirectX 9.0c SDK and copy it to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\DX9.0c"<BR><BR> |
− | Directory structure will look like this: | + | Directory structure in the CWE tree will look like this: |
<pre> | <pre> | ||
StaticSDKs | StaticSDKs | ||
Line 104: | Line 114: | ||
<li>Install "PhysX 2.6.4 SDK Core" (or, if you have or can obtain it, 2.6.0) and copy it to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\PhysX". You must use a 2.6.x version, because the mesh cooking format was changed in 2.7.x. | <li>Install "PhysX 2.6.4 SDK Core" (or, if you have or can obtain it, 2.6.0) and copy it to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\PhysX". You must use a 2.6.x version, because the mesh cooking format was changed in 2.7.x. | ||
− | You will copy subdirectories from "C:\Program Files\AGEIA Technologies\AGEIA PhysX SDK\v2.6.4\SDKs" and C:\Program Files (x86)\AGEIA Technologies\AGEIA PhysX SDK\v2.6.4\Bin"<BR> | + | You will copy subdirectories from "C:\Program Files\AGEIA Technologies\AGEIA PhysX SDK\v2.6.4\SDKs" and C:\Program Files (x86)\AGEIA Technologies\AGEIA PhysX SDK\v2.6.4\Bin"<BR><BR> |
− | Directory structure will look like this: | + | Directory structure in the CWE tree will look like this: |
<pre> | <pre> | ||
StaticSDKs | StaticSDKs | ||
Line 118: | Line 128: | ||
.....</pre> | .....</pre> | ||
</li> | </li> | ||
− | <li>Compile and install OpenSSL. | + | <li>Compile and install OpenSSL (see [[Build OpenSSL with MS Visual C++]]). You can choose either static or dynamic linking.<BR> '''Note:''' If you link it dynamically, it will cause the Uru client to require the OpenSSL DLLs to be present in the client directory or in the system path.<BR><BR> Copy the installed stuff to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\OpenSSL" (created by "make install" - you do not want your development tree here).<BR><BR> |
− | Directory structure will look like this: | + | Directory structure in the CWE tree will look like this: |
<pre> | <pre> | ||
StaticSDKs | StaticSDKs | ||
Line 130: | Line 140: | ||
</li> | </li> | ||
<li>Open up "Visual Studio .NET 2003 Command Prompt" and change to the "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\XPlatform\jpeg-8c-rgba directory." Copy makefile.vc to makefile.nmake, and jconfig.vc to jconfig.h and then run ''nmake nodebug=1 -f makefile.nmake''. This will build the library in non-debug mode. If you use a debug library, the linker will complain when we link the client executable.</li> | <li>Open up "Visual Studio .NET 2003 Command Prompt" and change to the "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\XPlatform\jpeg-8c-rgba directory." Copy makefile.vc to makefile.nmake, and jconfig.vc to jconfig.h and then run ''nmake nodebug=1 -f makefile.nmake''. This will build the library in non-debug mode. If you use a debug library, the linker will complain when we link the client executable.</li> | ||
− | <li>Once you have completed all the setup steps, open a "Visual Studio .NET 2003 Command Prompt" again, and change directory to the root of the CWE source. Run "build-allclient-solution.bat" and wait. If all is well, you will have a plClient.exe and UruLauncher.exe, along with the matching PhysX DLLs, in "CWE\ | + | <li>Install zlib and libpng<br /> |
+ | '''For Visual Studio 2003:''' | ||
+ | <ol><li>Download ''zlib127.zip'' (or a newer version) from [http://www.zlib.net/ http://www.zlib.net/], extract the ''zlib-1.2.7'' folder it contains and move/rename it to ''MOULOpenSourceClientPlugin/StaticSDKs/XPlatform/zlib''.</li> | ||
+ | <li>Download ''lpng1511.zip'' (or a newer version) from [http://libpng.org/pub/png/libpng.html http://libpng.org/pub/png/libpng.html], extract the ''lpng1511'' folder it contains and move/rename it to ''MOULOpenSourceClientPlugin/StaticSDKs/XPlatform/png''.</li> | ||
+ | <li>Open ''png/projects/visualc71/libpng.sln'' in Visual Studio 2003.</li> | ||
+ | <li>Right-click on the “libpng” project in the ''Solution Explorer'' and choose ''Properties''.</li> | ||
+ | <li>Select configuration “LIB Debug” in the popup menu at the top.</li> | ||
+ | <li>Select ''Configuration Properties'' > ''C/C++'' > ''Code Generation'' on the left.</li> | ||
+ | <li>Change the ''Runtime Library'' line to “Multi-threaded Debug DLL (/MDd)”. (This step avoids a warning in the final Plasma build. As far as I understand, leaving it out is harmless, but better do it to be sure.)</li> | ||
+ | <li>Choose the “LIB Release” configuration and set ''Runtime Library'' to “Multi-threaded DLL (/MD)”.</li> | ||
+ | <li>Repeat steps 4 to 8 for the other two projects “pngtest” and “zlib”.</li> | ||
+ | <li>Select “LIB Debug” from the ''Solution Configurations'' popup menu in the toolbar, then ''Build'' > ''Build Solution''.</li> | ||
+ | <li>Select the “LIB Release” configuration and build the solution.</li> | ||
+ | <li>Make a new folder ''png/lib'' and move ''png/projects/visualc71/Win32_LIB_Debug/libpngd.lib'' as well as ''png/projects/visualc71/Win32_LIB_Release/libpng.lib'' into it.</li> | ||
+ | <li>Make a new folder ''zlib/lib'' and move ''png/projects/visualc71/Win32_LIB_Debug/ZLib/zlibd.lib'' as well as ''png/projects/visualc71/Win32_LIB_Release/ZLib/zlib.lib'' into it.</li></ol> | ||
+ | '''For Visual Studio 2010:''' (if anyone ever makes a “Build with VS 2010” page, that could be moved there) | ||
+ | <ol><li>Download ''zlib127.zip'' (or a newer version) from [http://www.zlib.net/ http://www.zlib.net/], extract the ''zlib-1.2.7'' folder it contains and move/rename it to ''MOULOpenSourceClientPlugin/StaticSDKs/XPlatform/zlib''.</li> | ||
+ | <li>Download ''lpng1511.zip'' (or a newer version) from [http://libpng.org/pub/png/libpng.html http://libpng.org/pub/png/libpng.html], extract the ''lpng1511'' folder it contains and move/rename it to ''MOULOpenSourceClientPlugin/StaticSDKs/XPlatform/png''.</li> | ||
+ | <li>Open ''png/projects/vstudio/zlib.props'' in a text editor (Notepad or Visual Studio will do) and change the ''<ZLibSrcDir>'' element (third line from the bottom) to read | ||
+ | <code><ZLibSrcDir>..\..\..\..\zlib</ZLibSrcDir></code></li> | ||
+ | <li>Open ''png/projects/vstudio/vstudio.sln'' in Visual Studio 2010.</li> | ||
+ | <li>Right-click on the “zlib” project in the ''Solution Explorer'' and choose ''Properties''.</li> | ||
+ | <li>Select configuration “Debug Library” in the popup menu at the top.</li> | ||
+ | <li>Select ''Configuration Properties'' > ''C/C++'' > ''Preprocessor'' on the left.</li> | ||
+ | <li>Insert <code>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;</code> | ||
+ | into the ''Preprocessor Definitions'' line (so that it reads <code>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</code> afterwards).</li> | ||
+ | <li>Select ''Configuration Properties'' > ''C/C++'' > ''Code Generation'' on the left.</li> | ||
+ | <li>Change the ''Runtime Library'' line to “Multi-threaded Debug DLL (/MDd)”. (This step avoids a warning in the final Plasma build. As far as I understand, leaving it out is harmless, but better do it to be sure.)</li> | ||
+ | <li>Choose the “Release Library” configuration and repeat step 8 (so that the line reads <code>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE</code> afterwards).</li> | ||
+ | <li>Set ''Runtime Library'' to “Multi-threaded DLL (/MD)” like in step 10.</li> | ||
+ | <li>Close the ''zlib Property Pages'' dialog.</li> | ||
+ | <li>Repeat the ''Runtime Library'' setting (steps 10 and 12) on projects ''libpng'', ''pngtest'', ''pngvalid''.</li> | ||
+ | <li>Right-click on the “zlib” project and choose ''Add'' > ''Existing Item…''.</li> | ||
+ | <li>Navigate to ''StaticSDKs/XPlatform/zlib'', select all ''*.c'' files there (sort the list by file type to make this easier), and click ''Add''. This should add files ''gzclose.c'', ''gzlib.c'', ''gzread.c'', ''gzwrite.c'' to the project, the rest should have been there already.</li> | ||
+ | <li>Select “Debug Library” from the ''Solution Configurations'' popup menu in the toolbar, then ''Build'' > ''Build Solution''.</li> | ||
+ | <li>Select the “Release Library” configuration and build the solution.</li> | ||
+ | <li>Make new folders ''png/lib'' and ''zlib/lib'' and move and rename the following files into them: | ||
+ | <ul><li>png/projects/vstudio/Debug Library/libpng15.lib → png/lib/libpngd.lib</li> | ||
+ | <li>png/projects/vstudio/Debug Library/zlib.lib → zlib/lib/zlibd.lib</li> | ||
+ | <li>png/projects/vstudio/Release Library/libpng15.lib → png/lib/libpng.lib</li> | ||
+ | <li>png/projects/vstudio/Release Library/zlib.lib → zlib/lib/zlib.lib</li></ul></li></ol> | ||
+ | </li> | ||
+ | <li>Once you have completed all the setup steps, open a "Visual Studio .NET 2003 Command Prompt" again, and change directory to the root of the CWE source. Run "build-allclient-solution.bat" and wait. If all is well, you will have a plClient.exe and UruLauncher.exe, along with the matching PhysX DLLs, in "CWE\MOULOpenSourceClientPlugin\Plasma20\test". Rename plClient.exe to UruExplorer.exe, and copy the executables and DLLs to your "Uru Live" directory. You do not need to copy in the *.pdb. *.map, or sp.dll files for a live external build. Those are only used by the internal builds.</li> | ||
</ol> | </ol> | ||
<BR><BR> | <BR><BR> | ||
Line 137: | Line 189: | ||
* This is built as a '''PLASMA_EXTERNAL_RELEASE''', '''BUILD_TYPE_LIVE''' build. | * This is built as a '''PLASMA_EXTERNAL_RELEASE''', '''BUILD_TYPE_LIVE''' build. | ||
− | * Only the "Win32 | + | * Only the "Win32|Release" target will build with the changes I loaded to the repository. I did not modify any other build types, so if you wish to build those, you will have to fix them up first. |
* Crypto keys are located in "CWE\MOULOpenSourceClientPlugin\Plasma20\Sources\Plasma\NucleusLib\pnNetBase". Edit the *.hpp files with a text editor to replace the Cyan keys with your own server's keys. A future action item is to move the keys to an external INI and add a dialog which will allow the user to select the keys for the server they are connecting to. | * Crypto keys are located in "CWE\MOULOpenSourceClientPlugin\Plasma20\Sources\Plasma\NucleusLib\pnNetBase". Edit the *.hpp files with a text editor to replace the Cyan keys with your own server's keys. A future action item is to move the keys to an external INI and add a dialog which will allow the user to select the keys for the server they are connecting to. | ||
'''Important:''' Make sure to run "clean-allclient-solution.bat" and rebuild when you change crypto keys, to make sure they are updated. | '''Important:''' Make sure to run "clean-allclient-solution.bat" and rebuild when you change crypto keys, to make sure they are updated. | ||
− | * Server hostnames are located in the following files: | + | * Server hostnames, IP addresses, and ports are located in the following files: |
<u>The status URL: </u><BR> | <u>The status URL: </u><BR> | ||
Line 151: | Line 203: | ||
"CWE\MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp" | "CWE\MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp" | ||
+ | <u>The default client port</u><BR> | ||
+ | "CWE\MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbConstant.h" | ||
− | You '''*must*''' make sure your client is using the same versions of the PhysX DLLs that you built with. They | + | <big>'''IMPORTANT:'''</big> You '''*must*''' make sure your client is using the same versions of the PhysX DLLs that you built with. They |
are not compatible from version to version. | are not compatible from version to version. | ||
+ | |||
+ | [[Category:Cyan_Worlds]] |
Latest revision as of 09:39, 9 November 2020
Introduction
This document provides steps to build the CWE client with minimal changes from the initial Cyan source release. It is assumed that you have the initial Cyan source commit, the four commits made by a'moaca (add jpeg-8c library, remove EAX, replace IJL with IJG, and remove Bink), and the one made by cjkelly1 (modify the MsDevProjects and add batch files) in your source tree. Be aware that subsequent commits by other developers may invalidate these instructions.
Notes about Building with Visual Studio 2003 .NET
As of November 2020, the main branch of the CWE client source code has ceased to be able to build with VS2003.NET by default. With alterations the current head of the repository might be able to compile with VS2003, but this no longer is guaranteed. Newer additions to the client need to take advantage of C++ features not available in VS2003.
The last revision (commit) in the repositories that were intended to be built with VS2003 are marked by the branch VS2003_FINAL. By checking out that branch, you should be able to follow the instructions below without issue.
Items needed to compile
- Microsoft Visual Studio 2003 .NET
- Microsoft Platform SDK February 2003 edition (build 5.2.3790.0) (see links and note below)
- Microsoft DirectX 9.0 SDK (October 2005)
- Mirror: Archive.org
- OpenSSL 0.9.8q
- libogg-1.2.0
- libvorbis-1.2.0
- OpenAL v1.1 SDK
- Ageia PhysX 2.6.4 Core SDK
Instructions to obtain the Microsoft Platform SDK February 2003 edition
The old MS Platform SDK is no longer available as a single package from Microsoft. You will have to either order it for $10 from MS, or download the parts and build the install yourself. To build it yourself, download the files from the below links into the same directory.
PSDK-FULL.1.cab
PSDK-FULL.2.cab
PSDK-FULL.3.cab
PSDK-FULL.4.cab
PSDK-FULL.5.cab
PSDK-FULL.6.cab
PSDK-FULL.7.cab
PSDK-FULL.8.cab
PSDK-FULL.9.cab
PSDK-FULL.10.cab
PSDK-FULL.11.cab
PSDK-FULL.12.cab
PSDK-FULL.13.cab
PSDK-FULL.bat
Extract.exe
Run the batch file that is in the directory, and it will build the install. After doing this, you can either install the SDK directly, or burn it onto a CD so you will have it for later and install from there (I recommend burning to a CD, as this multi-part thing is a hassle).
Note on versions: I am using this older stuff because it is closest to what Cyan builds with. These instructions have only been tested with these specific versions. If you use other versions of the SDKs and such, you will have to adjust for the changes. If you do use different versions, it would be greatly appreciated if you would add a section to this document explaining what you had to do to use the newer versions, so everyone can benefit from your work.
Build steps
- Obtain CWE sources from the repository.
- Install MS Platform SDK. You only need the "Core SDK" and the "Internet Development SDK". You do not need to use the setup.exe in the root of the SDK installer directory - this is merely a splash page and requires IE. Instead, go to the "setup" directory and run "CoreSDK-x86.msi" and then run "IESDK-x86.msi". Note that the "-ia64" installers are for Itanium 64 bit machines, and will not run in x64. Note: Do not copy the .msi files somewhere else and run them. They need to be run in the same directory as all the *.cab files.
- Copy the include and lib directories from the SDK to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\PlatformSDK". Note:The directory where the SDK resides will be the one specified in the "Select An Installation Location" dialog when you ran the .msi files. This location will vary by platform.
Directory structure in the CWE tree will look like this:StaticSDKs Win32 PlatformSDK include lib
- Build libogg and libvorbis using MSVC 2003.
- Create a directory and then create two subdirectories under it called "ogg" and "vorbis".
- Unpack the sources into their respective directories. Make sure it does not do ogg\ogg-1.2.0, or some such thing. Vorbis depends on ogg, and it looks for the ogg stuff in ..\ogg.
- Fire up MSVC 2003.
- Do File -> Open -> Project, and select the ogg\win32\VS6\ogg_static.vcproj file. It will prompt to convert and open the project - click "Yes".
- On the drop down box on the top of the window, change it from "debug" to "release".
- Right-click on the "ogg_static" project and select build. Accept the "save file as" defaults in the box that pops up and just click "save".
- ogg build is done. Under win32\VS6\Static_Release, there will be a ogg_static.lib file.
- File -> Close Solution
- Do File -> Open -> Project and select the vorbis\win32\vorbis_static.dsp file. It will prompt to convert and open the project - click "Yes".
- On the drop down box on the top of the window, change it from "debug" to "release".
- Right-click on the "vorbis_static" project and select build. Accept the "save file as" defaults in the box that pops up and just click "save".
- vorbis build is done - under win32\Vorbis_Static_Release, there will be a vorbis_static.lib file.
- File -> Close Solution
- Start at step (i), and repeat the steps, choosing "vorbisfile_static.dsp" instead. You will have under vorbis\win32\VorbisFile_Static_Release a vorbisfile.static.lib file when done.
- Copy the contents of your ogg directory and then vorbis directory into "CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\oggvorbis". It is okay to let it overwrite. Once that is done, copy the lib files you created above into "CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\oggvorbis\lib"
Directory structure in the CWE tree will look like this:StaticSDKs win32 oggvorbis doc examples include lib ....
- Install the OpenAL SDK and copy it to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\OpenAL 1.1 with EFX SDK"
Directory structure in the CWE tree will look like this:StaticSDKs win32 OpenAL 1.1 with EFX SDK docs include libs ....
- Install the DirectX 9.0c SDK and copy it to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\DX9.0c"
Directory structure in the CWE tree will look like this:StaticSDKs Win32 DX9.0c Developer Runtime Documentation include Lib .....
- Install "PhysX 2.6.4 SDK Core" (or, if you have or can obtain it, 2.6.0) and copy it to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\PhysX". You must use a 2.6.x version, because the mesh cooking format was changed in 2.7.x.
You will copy subdirectories from "C:\Program Files\AGEIA Technologies\AGEIA PhysX SDK\v2.6.4\SDKs" and C:\Program Files (x86)\AGEIA Technologies\AGEIA PhysX SDK\v2.6.4\Bin"
Directory structure in the CWE tree will look like this:StaticSDKs Win32 PhysX Bin Cooking Docs Foundation Framework lib .....
- Compile and install OpenSSL (see Build OpenSSL with MS Visual C++). You can choose either static or dynamic linking.
Note: If you link it dynamically, it will cause the Uru client to require the OpenSSL DLLs to be present in the client directory or in the system path.
Copy the installed stuff to "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\Win32\OpenSSL" (created by "make install" - you do not want your development tree here).
Directory structure in the CWE tree will look like this:StaticSDKs Win32 OpenSSL bin include openssl lib
- Open up "Visual Studio .NET 2003 Command Prompt" and change to the "\CWE\MOULOpenSourceClientPlugin\StaticSDKs\XPlatform\jpeg-8c-rgba directory." Copy makefile.vc to makefile.nmake, and jconfig.vc to jconfig.h and then run nmake nodebug=1 -f makefile.nmake. This will build the library in non-debug mode. If you use a debug library, the linker will complain when we link the client executable.
- Install zlib and libpng
For Visual Studio 2003:- Download zlib127.zip (or a newer version) from http://www.zlib.net/, extract the zlib-1.2.7 folder it contains and move/rename it to MOULOpenSourceClientPlugin/StaticSDKs/XPlatform/zlib.
- Download lpng1511.zip (or a newer version) from http://libpng.org/pub/png/libpng.html, extract the lpng1511 folder it contains and move/rename it to MOULOpenSourceClientPlugin/StaticSDKs/XPlatform/png.
- Open png/projects/visualc71/libpng.sln in Visual Studio 2003.
- Right-click on the “libpng” project in the Solution Explorer and choose Properties.
- Select configuration “LIB Debug” in the popup menu at the top.
- Select Configuration Properties > C/C++ > Code Generation on the left.
- Change the Runtime Library line to “Multi-threaded Debug DLL (/MDd)”. (This step avoids a warning in the final Plasma build. As far as I understand, leaving it out is harmless, but better do it to be sure.)
- Choose the “LIB Release” configuration and set Runtime Library to “Multi-threaded DLL (/MD)”.
- Repeat steps 4 to 8 for the other two projects “pngtest” and “zlib”.
- Select “LIB Debug” from the Solution Configurations popup menu in the toolbar, then Build > Build Solution.
- Select the “LIB Release” configuration and build the solution.
- Make a new folder png/lib and move png/projects/visualc71/Win32_LIB_Debug/libpngd.lib as well as png/projects/visualc71/Win32_LIB_Release/libpng.lib into it.
- Make a new folder zlib/lib and move png/projects/visualc71/Win32_LIB_Debug/ZLib/zlibd.lib as well as png/projects/visualc71/Win32_LIB_Release/ZLib/zlib.lib into it.
For Visual Studio 2010: (if anyone ever makes a “Build with VS 2010” page, that could be moved there)
- Download zlib127.zip (or a newer version) from http://www.zlib.net/, extract the zlib-1.2.7 folder it contains and move/rename it to MOULOpenSourceClientPlugin/StaticSDKs/XPlatform/zlib.
- Download lpng1511.zip (or a newer version) from http://libpng.org/pub/png/libpng.html, extract the lpng1511 folder it contains and move/rename it to MOULOpenSourceClientPlugin/StaticSDKs/XPlatform/png.
- Open png/projects/vstudio/zlib.props in a text editor (Notepad or Visual Studio will do) and change the <ZLibSrcDir> element (third line from the bottom) to read
<ZLibSrcDir>..\..\..\..\zlib</ZLibSrcDir>
- Open png/projects/vstudio/vstudio.sln in Visual Studio 2010.
- Right-click on the “zlib” project in the Solution Explorer and choose Properties.
- Select configuration “Debug Library” in the popup menu at the top.
- Select Configuration Properties > C/C++ > Preprocessor on the left.
- Insert
_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;
into the Preprocessor Definitions line (so that it readsWIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)
afterwards). - Select Configuration Properties > C/C++ > Code Generation on the left.
- Change the Runtime Library line to “Multi-threaded Debug DLL (/MDd)”. (This step avoids a warning in the final Plasma build. As far as I understand, leaving it out is harmless, but better do it to be sure.)
- Choose the “Release Library” configuration and repeat step 8 (so that the line reads
_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE
afterwards). - Set Runtime Library to “Multi-threaded DLL (/MD)” like in step 10.
- Close the zlib Property Pages dialog.
- Repeat the Runtime Library setting (steps 10 and 12) on projects libpng, pngtest, pngvalid.
- Right-click on the “zlib” project and choose Add > Existing Item….
- Navigate to StaticSDKs/XPlatform/zlib, select all *.c files there (sort the list by file type to make this easier), and click Add. This should add files gzclose.c, gzlib.c, gzread.c, gzwrite.c to the project, the rest should have been there already.
- Select “Debug Library” from the Solution Configurations popup menu in the toolbar, then Build > Build Solution.
- Select the “Release Library” configuration and build the solution.
- Make new folders png/lib and zlib/lib and move and rename the following files into them:
- png/projects/vstudio/Debug Library/libpng15.lib → png/lib/libpngd.lib
- png/projects/vstudio/Debug Library/zlib.lib → zlib/lib/zlibd.lib
- png/projects/vstudio/Release Library/libpng15.lib → png/lib/libpng.lib
- png/projects/vstudio/Release Library/zlib.lib → zlib/lib/zlib.lib
- Once you have completed all the setup steps, open a "Visual Studio .NET 2003 Command Prompt" again, and change directory to the root of the CWE source. Run "build-allclient-solution.bat" and wait. If all is well, you will have a plClient.exe and UruLauncher.exe, along with the matching PhysX DLLs, in "CWE\MOULOpenSourceClientPlugin\Plasma20\test". Rename plClient.exe to UruExplorer.exe, and copy the executables and DLLs to your "Uru Live" directory. You do not need to copy in the *.pdb. *.map, or sp.dll files for a live external build. Those are only used by the internal builds.
Note: Warnings in the build process are ogg/vorbis problems, and fixing an old release of ogg/vorbis is outside the scope of this document. Also, we are using the VC6 projects instead of the MSVC 2003 ones so that the file names and such will match what Cyan has in their projects. You can build the MSVC 2003 projects if you wish, but you will have to either change the output file names to match the VC6 ones, or change Cyan's projects to use the names the MSVC 2003 projects use. Building the VC6 ones required the less changing of the projects.
Additional notes
- This is built as a PLASMA_EXTERNAL_RELEASE, BUILD_TYPE_LIVE build.
- Only the "Win32|Release" target will build with the changes I loaded to the repository. I did not modify any other build types, so if you wish to build those, you will have to fix them up first.
- Crypto keys are located in "CWE\MOULOpenSourceClientPlugin\Plasma20\Sources\Plasma\NucleusLib\pnNetBase". Edit the *.hpp files with a text editor to replace the Cyan keys with your own server's keys. A future action item is to move the keys to an external INI and add a dialog which will allow the user to select the keys for the server they are connecting to.
Important: Make sure to run "clean-allclient-solution.bat" and rebuild when you change crypto keys, to make sure they are updated.
- Server hostnames, IP addresses, and ports are located in the following files:
The status URL:
"CWE\MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/winmain.cpp"
"CWE\MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plUruLauncher/Main.cpp"
The auth/gatekeeper address
"CWE\MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp"
The default client port
"CWE\MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbConstant.h"
IMPORTANT: You *must* make sure your client is using the same versions of the PhysX DLLs that you built with. They are not compatible from version to version.