From 8c1b3a608e30c535d200e6d1cf15de4dd4d56202 Mon Sep 17 00:00:00 2001
From: Uleat This guide provides instructions for compiling 32-bit Windows server binaries and setting up a local development server. Read through this guide before starting to ensure an understanding of the process. Please direct any questions to our server support channel in [discord].
+## Compiler Setup
-
+The current c/c++ support standard of the EQEmulator server code base mandates the use of Visual Studio 2013 or later compilers.
-Compiler Setup
The current c/c++ support standard of the EQEmulator server code base mandates the use of Visual Studio 2013 or later compilers.
+If your system does not meet the above requirements, or you are/would like to use an older version of Visual Studio, check the minimum system requirements for the version you plan to use. (It must still meet the Visual Studio 2013 or later requirement of the code base.) -Visual Studio 2017 is the current EQEmulator standard for binary compilation. Please ensure that your system meets the Visual Studio 2017 Minimum System Requirements.
+This setup assumes an install on a 64-bit Windows operating system with 32-bit target binaries. -If your system does not meet the above requirements, or you are/would like to use an older version of Visual Studio, check the minimum system requirements for the version you plan to use. (It must still meet the Visual Studio 2013 or later requirement of the code base.)
+* ### Verify System Environment Variable %Path% Length -This setup assumes an install on a 64-bit Windows operating system with 32-bit target binaries.
+ Sometimes an automated server installation will fail due to the %Path% variable being full. This can happen with a manual installation as well. -Sometimes an automated server installation will fail due to the %Path% variable being full. This can happen with a manual installation as well.
- -Since this guide installs more programs than are required for server operation, verifying the length of %Path% is critical before we start.
- -The easiest way to find it is to:
- -Click on your start button
Type 'environment variable' into your search programs and files text box
Click on 'Edit system environment variables'
Click the 'Environment Variables' button on the window that pops up
Ensure the variable 'Path' is selected in the system variables section (bottom text box)
Click the 'Edit' button
You may check the length of your %Path% variable by copying the 'Variable value' contents and pasting them into a text editor that supports 'selection' count.
- -
-
-Registry values are only allocated 1024 bytes of storage. However, environmental variables may contain up to 2048 bytes through the use of an alias.
- -If your selection count is greater than 768 characters, you may need to setup an alias to prevent corruption of the %Path% variable.
- -Some of the pre-requisites for compiling binaries are the same as running a server.
- -If you have already installed any of the following, the download and installation requirement should be omitted:
- -Visual Studio 2017 Community Edition [select Visual Studio 2017 Community Edition]
MariaDB (64-bit) [download]
Perl v5.12.3.1204 (32-bit) [download]
CMake (64-bit) [download]
TortoiseGit (64-bit - optional - see note under install) [download]
Note: Microsoft now requires a user account to download Visual Studio. Clicking the Visual Studio link above will take you to the 'older versions' page. Clicking the download button on this page will prompt you to log in or create an account. [back]
- -Note: TortoiseGit is a menu-driven, add-on gui interface for Git. Though optional, this instructional provides for its use.
- -Some programs may be able to use newer versions, or even the lastest releases, without issue. But, this is not the case with Perl and (later) dependencies.
- -The above list of programs is known to work for compiling working server binaries.
- -During the install process, ensure the option for 'Desktop development with C++' is checked.
- -This package is required to compile c/c++ code and by CMake to determine available compiler options. It will cause CMake file generation to fail, if not enabled.
- -
-
-[need specifics on what settings to use]
- -At the end of the installation process, you will be prompted to install HeidiSQL. It is HIGHLY recommended that you install this program.
- -This installation is self-explanatory.
- -Note: It is recommended that you install in the root directory ("c:\") to avoid possible issues.
- -This installation is self-explanatory.
- -This installation is self-explanatory.
- -Note: Should you wish to download the repository code with no further chance of updating or restoration, this requirement may be omitted. [back]
- -This installation is self-explanatory.
- -Note: If Git is not installed, this installation should be omitted. [back]
- -You will need to restart your computer to ensure that all of the %Path% additions are loaded into memory.
- -At this point, you will need to make a decision on how you want to manage your code.
- -There are three options:
- -Option 1, Retrieve the code as a one-time download (unmanaged - not recommended)
Option 2, Create a local repository from the parent EQEmulator project that can be updated, managed and maintained (recommended)
Option 3, Create a local repository from a fork of the EQEmulator project that you manage (optional - only if you want to contribute back to the parent project)
Note: If you choose to create a fork of the EQEmulator repository, you will need to create a [github.com] account.
- -If you choose options 1 or 2, create a sub-directory called 'git-eqemulator' in the root directory of c: drive.
- -If you choose option 3, create a sub-directory called 'git-<git-username>' in the root directory of c: drive. (example: git username is 'Pavlov', directory name would be 'git-pavlov')
- -The purpose of this directory is to facilitate code management. We'll refer to this as the 'account' directory.
- -For option 1:
- -Download [Server-master.zip]
Place it inside of the account directory
Unpack its contents
Rename the local code directory from 'Server-master' to 'Server'
Move on to Download Dependencies
For options 2 & 3, go to the EQEmulator server code repository web page at https://github.com/EQEmu/Server
- -If you chose option 3 and are creating a fork, click on the fork button to add the repository to your github account. You should be redirected to your fork's main repository page.
- -
-
-Finally, click the 'Clone or download' button, then 'Open in Desktop' button to create a local code repository on your computer. When prompted for where to create it, select the account directory created above.
- -
-
-You should now have a managed local code repository on your computer.
- -Note: It is helpful to create a shortcut to the account directory and place it on your desktop.
- -Library dependencies can be downloaded from [here].
- -Inside of your local code directory, you will find a sub-directory called 'dependencies`.
- -Just place this download inside of the 'dependencies' folder and unpack its contents.
- -CMake's default options are adequate to configure and generate the files needed for Visual Studio.
- -There are two directory locations that you will need to provide:
- -Where is the source code:
Where to build the binaries:
For the source code, type-in or navigate to your 'c:/<account>/Server' directory.
- -The easiest way to define the build directory is to copy the source and paste it in. Then, add '/build' to the end of the path so that you have 'c:/<account>/Server/build'.
- -Once CMake knows where to look, click the 'Configure' button. You will get a pop-up window stating that the 'build' directory does not exist. Click 'OK' to create it.
- -The next window will be for the compiler selection. Ensure that 'Visual Studio 15 2017' is selected.
- -
-
-You should now have a list of unconfigured options (in red) showing in the main window of CMake:
- -
-
-The follow list contains pertinent options that most users will want to change:
- -Once you have set the options that you would like for your server, click 'Configure' again.
- -Since we set an option (login server) that requires additional settings, more unconfigured options have appeared. In this case, the open ssl library:
- -
-
-Since these new options are only file path declarations, no changes need to be made. Click 'Configure' one last time.
- -
-
-Note: Regardless of option settings, anytime that you have red (unconfigured) entries in your options list, you will need to click 'Configure' to ensure that the settings are applied to the current CMake file generation template.
- -You can now click the 'Generate' button.
- -If file generation was successful, you should see 'Generating done' at the bottom of the CMake window.
- -You are now ready to open Visual Studio and compile your code!
- -[walk-through]
- -[final thoughts...]
- -