Difference between revisions of "CWE:Getting Started"

(Mention Git GUIs for the command-line-averse.)
(Prerequisites)
Line 5: Line 5:
  
 
== Prerequisites ==
 
== Prerequisites ==
You'll need the following software to successfully build CWE:
+
=== Basic ===
* [http://code.google.com/p/msysgit/downloads/list?can=3 Git] (if you prefer working on the command line) or a Git GUI such as [http://www.sourcetreeapp.com/ SourceTree] (if you prefer graphical user interfaces) for fetching the source code. If you're not familiar with Git, you might want to read up on it thanks to some of [http://help.github.com/ Github's excellent articles].
+
You will need the following software as minimum requirements to build Plasma:
* [http://cmake.org CMake] to configure your build of CWE for Visual Studio. When you install, make sure you tell the installer to add CMake to the system PATH.
+
* [http://cmake.org CMake] for configuring the project. When you install, make sure you tell the installer to add CMake to the system PATH.
 
* PhysX 2.6.4. This is available from NVIDIA's [http://www.nvidia.com/object/physx_archives.html#SDK PhysX Archives]. Please use 2.6.4. ''Newer versions will not work correctly.''
 
* PhysX 2.6.4. This is available from NVIDIA's [http://www.nvidia.com/object/physx_archives.html#SDK PhysX Archives]. Please use 2.6.4. ''Newer versions will not work correctly.''
* [http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip Creative Labs' OpenAL SDK 1.1] [http://sourceforge.net/projects/foobar-openal/files/foo_dsp_openal/OpenAL%20SDK%20%28by%20Creative%29/OpenAL11CoreSDK.7z/download (mirror)]
 
 
* The June 2010 [http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba DirectX SDK]
 
* The June 2010 [http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba DirectX SDK]
* Microsoft Visual Studio 2010 to compile CWE.
+
* Microsoft Visual Studio 2013 Express Edition for Windows Desktop. Available as a [http://www.microsoft.com/en-ca/download/details.aspx?id=40787 free download] from Microsoft.
** '''Students''': Download the full version from [https://www.dreamspark.com/default.aspx Microsoft DreamSpark] for free.
+
** '''Everyone Else''': [http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express Visual C++ 2010 Express Edition] can be downloaded for free.
+
* The [http://guildofwriters.org/tools/devlibs.zip CWE development libraries bundle]
+
  
The sources for CWE (also called Plasma) can be found [https://github.com/H-uru/Plasma on Github]. To download them, either
+
You can [https://github.com/H-uru/Plasma/archive/master.zip download the Plasma source code as a zip file].
* use Git on the command line as follows:
+
*# Start git-bash in a folder where the source repository should be downloaded.
+
*# Enter: <pre>git clone https://github.com/H-uru/Plasma</pre>
+
*or use whatever ''clone'' command your GUI offers (''File'' > ''New / Clone'' in SourceTree) to clone from URL <code>https://github.com/H-uru/Plasma</code>.
+
  
This will download the source code to a folder named <code>Plasma</code> in the aforementioned directory.
+
=== Advanced ===
 +
In addition to the basic requirements, if you are planning to contribute to Plasma development, you should also familiarize yourself with Git. We recommend reading some of [http://help.github.com/ GitHub's excellent articles].
 +
There are several options for Git tools, including a [http://code.google.com/p/msysgit/downloads/list?can=3 command-line git client], the graphical [http://www.sourcetreeapp.com/ SourceTree from Atlassian], and the [https://windows.github.com/ GitHub client for Windows].
  
Also, do not forget to update your client's build ID to match the build ID of the server (e.g. as of this writing, MO:ULa's build ID is 906). This number is set in <code>Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.cpp</code> under "#define BUILD_ID XXX" where XXX is the actual build ID.
+
You should also download the [http://guildofwriters.org/tools/devlibs.zip CWE development libraries bundle].
 +
 
 +
To get a copy of the Plasma code, you should clone it using Git.
 +
 
 +
For the command-line git tool, start git-bash in the folder where the source should be downloaded, and run
 +
git clone https://github.com/H-uru/Plasma
 +
 
 +
For SourceTree, use ''File'' > ''New / Clone'' to clone from URL <code>https://github.com/H-uru/Plasma</code>.
 +
 
 +
This will download the source code to a folder named <code>Plasma</code> in the aforementioned directory.
  
 
== Building an Internal Client ==
 
== Building an Internal Client ==

Revision as of 23:33, 20 April 2014

Disambig gray.png

This is a tutorial page.
 

This tutorial will help you compile your very own CWE client.

If you need an Internal client to connect to MO:ULa, you can use the GoW-provided CWE Testing Build bundle. Simply run the plclient_moula.vbs script after copying the dat and sfx files from your Uru Live installation.

Prerequisites

Basic

You will need the following software as minimum requirements to build Plasma:

  • CMake for configuring the project. When you install, make sure you tell the installer to add CMake to the system PATH.
  • PhysX 2.6.4. This is available from NVIDIA's PhysX Archives. Please use 2.6.4. Newer versions will not work correctly.
  • The June 2010 DirectX SDK
  • Microsoft Visual Studio 2013 Express Edition for Windows Desktop. Available as a free download from Microsoft.

You can download the Plasma source code as a zip file.

Advanced

In addition to the basic requirements, if you are planning to contribute to Plasma development, you should also familiarize yourself with Git. We recommend reading some of GitHub's excellent articles. There are several options for Git tools, including a command-line git client, the graphical SourceTree from Atlassian, and the GitHub client for Windows.

You should also download the CWE development libraries bundle.

To get a copy of the Plasma code, you should clone it using Git.

For the command-line git tool, start git-bash in the folder where the source should be downloaded, and run

git clone https://github.com/H-uru/Plasma

For SourceTree, use File > New / Clone to clone from URL https://github.com/H-uru/Plasma.

This will download the source code to a folder named Plasma in the aforementioned directory.

Building an Internal Client

If you want to build only a client useful for testing, for example, you might want to build the Internal Client.

Compiling

The first step is to compile the source code:

  1. Start Cmake
  2. Set the Where is the source code option to the location where you cloned the repository.
  3. Set the Where to build the binaries option to a subfolder of the aforementioned location called build.
  4. Check the Grouped and Advanced options.
  5. Press Configure. Select Visual Studio 10 2010 as the generator.
  6. Set the CMAKE_INSTALL_PREFIX option under Cmake to the cwe-prefix folder that you extracted from the development libraries bundle.
  7. Press Configure again.
  8. Set the OpenAL include and library path options under OpenAL.
    • Default Include Path: C:\Program Files (x86)\OpenAL 1.1 SDK\include
    • Default Library Path: C:\Program Files (x86)\OpenAL 1.1 SDK\libs\Win32\OpenAL32.lib
  9. Press Configure again.
  10. Set the PHYSX_SDK_PATH option under PHYSX. The default value is C:\Program Files (x86)\AGEIA Technologies\AGEIA PhysX SDK\v2.6.4\SDKs.
  11. Press Configure... For the last time!
  12. Press Generate. You will now have a Visual Studio solution file (.sln) in the folder that you specified to build the binaries in under the name Plasma.sln.
  13. Open the solution in Visual Studio. You can compile CyanWorlds.com Engine by pressing Build -> Build Solution. This will take some time. Choose "Release" as build-type (there's a drop-down menu at the top of the window) to make dll hell slightly less worse.

You now have a fully functional client under BUILD FOLDER\bin\Release. plClient.exe is the actual game client whereas plUruLauncher.exe is the patcher for your shard and plCrashHandler.exe is the executable used to handle crashes by outputting to a crash.dmp file.

Setting Up

Once you have your three executables, you'll need to setup a directory from which you can actually use it:

  1. Create a folder on your computer (e.g. "Documents\Internal") and copy into this folder all three executables (if you're only going to use the client in "-LocalData" mode, you just need to copy plClient.exe and plCrashHandler.exe).
  2. Copy from your Uru Live installation the dat and sfx folders.
  3. Copy the dat, Python and SDL folders from the moul-scripts repository (clone it as you did for the client).
  4. Copy the server.ini file for the shard you are trying to connect to into your client's folder.
  5. Obtain and copy the following files into your client's folder (you can copy them from the CWE Testing Build bundle if links aren't provided):
    • NxCharacter.dll,
    • PhysXLoader.dll,
    • python27.dll,
    • resource.dat.

You can now start your client by starting plUruLauncher.exe, which will connect to the appropriate server and download the latest files; to use only the data files available on your local computer (which is useful if you don't want the server to overwrite your own files when you connect to it), start plClient.exe instead with the option "-LocalData".

As an additional note, if you have a TOS.txt file in your client's folder, the client, after having succesfully logged in the user, will display the contents of this file.

Building an External Client

The steps required to build such a client are more or less the same as for an Internal client.

Compiling

Compiling follows the exact same procedure, except that you'll need to check under CMake the option PLASMA_EXTERNAL_RELEASE under PLASMA. Also note that the three files you'll obtain in the end are UruExplorer.exe, UruLauncher.exe and UruCrashHandler.exe.

Setting Up

The process for setting up your External client is the same as for an Internal client. The only difference is in the execution: you cannot run an External client in "-LocalData" mode, and starting UruExplorer.exe (plClient.exe's equivalent) will force you to use UruLauncher.exe. The External client will thus always use the latest files as provided by the server.

Editing server.ini

For your client to be able to connect to your own Shard, you'll need to provide it with a server.ini file. The options are entered in the following form:

Server.Option Value

This file will need to contain the following options:

  • Server.Auth.N, Server.Auth.X, Server.Game.N, Server.Game.X, Server.Gate.N and Server.Gate.X: if you followed these instructions, you'll have to use the keys provided by the keygen new command. If you are following the minimal setup guide, you don't need to provide these keys.
  • Server.Gate.Host: your Shard's IP address or domain name.
  • Server.DispName (optional): the name of the client displayed to the user.
  • Server.Status (optional): a URL for the status message of your Shard.
  • Server.Signup (optional): a URL for a signup page to your Shard, linked to by the appropriately-named button.