Windows Binary Compiling Guide
Ok, compiling has become a nightmare for most of our Windows users and I would like to make a step forward in making the process as painless as possible.
How to compile your own binaries... Pre-requisites: Windows Compiler: - This is needed to compile code into an executable binary (.exe) which will result in World.exe/Zone.exe/Chatserver.exe/queryserv.exe and eqemusharemem.dll
Note: Visual Studio is made for several language and project types. You will really only need the C++ environment so if you get asked what part of the applications you want to install or setup you can keep this in mind. SVN: TortoiseSVN Download - This will be needed to check out the source code. You can check out the source code at this link: Accompanied Software Version (Not Required, but listed here to pair with the Perl versions) 32-Bit Compiles - Perl 5.12 Download 64-Bit Compiles - Perl 5.14 Download Simplified Howto:
* Assuming you have VS2010 installed right now 1) Checking out Source Code: http://projecteqemu.googlecode.com/svn/trunk/ For those not familiar with checking out source code to a folder: CLICK HERE 2) Open the solution: Open up EQEmuServer\Server10.sln 3) Choose your configuration: http://i.imgur.com/LcRtz.pnghttp://i.imgur.com/aScFQ.png
Done! It was that simple! You can thank me later... Or not whatever I don't care LOL * Visual Studio 08 - Not recommended, but can still use (Perl 5.12) x84 (32-bit) Tools -> Options -> VC++ Directories -> Show Directories for: Include Files: Make the following entries in the same order: ../perl_x86/CORE ../zlib_x86/include ../mysql_x86/include Tools -> Options -> VC++ Directories -> Show Directories for: Library Files: Make the following entries in the same order: ../perl_x86/CORE ../zlib_x86/lib ../mysql_x86/lib Choose your configuration build and build your solution. Other Details: Includes & Libraries - These are needed to supplement the source code with instructions on how to use Perl/mysql/zlib etc. Traditionally, this is something that you would have to set up in Visual Studio before you would be able to compile EQEmulator successfully. As of last commit all you will need to do is make sure you have the following in your EQEmu SVN folder: mysql perl zlib - x64 and x86 zlib included through the SVN *Note: You can use whatever version of Perl you want, but the SVN will be already setup for 5.12 in 32-bit and 5.14 in 64-bit. You can set your perlxxx.lib in (Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies), you typically set these on World and Zone. You will have to have the library to match the version that you compile with. So for example, let's say you downloaded Perl 5.15 and you wanted to replace 5.14, you will need to go into configuration properties listed above to change it to perl515.lib and you will have to add the library folder to the project in the same file structure. Just for reference, this is where you setup your library and include paths VS2010: (You shouldn't have to change these in VS2010 if you put them in the EQEmu SVN folder mentioned above) Includes: Properties -> Configuration Properties -> C/C++ -> General http://i.imgur.com/eLifP.png Libraries: Properties -> Configuration Properties -> Linker -> General http://i.imgur.com/v7QaS.png |
Bump, this should be good to go now. Let me know if I missed things.
|
Thanks for doing this Akkadius. I went ahead and installed VS2010 again and it compiled right away without having to do anything.
One note, for the life of me I can not get it to compile using VS2008 at all anymore but hell with VS2010 being a simple "open project -> build" I dont see that as a serious issue. |
Choosing Release x64 leaves the QueryServ project in Win32, and it will fail to build. Changing that to x64 prior to building and it all works. Switched back to Release and set it to Win32 and that one built fine.
No I just need to dig Perl 5.10 out of my archive to install on my 32-bit test server. |
Quote:
http://i.imgur.com/VZuO7.png Quote:
|
I know to change the platform, was just mentioning that when I opened the clean SVN solution and switched from Release to Release x64 all of the projects switched to x64 except queryserv, in case there was a setting you missed. It is possible the settings were left over from a previous compile of a different solution. I do not recall the last server type I built from my Parallels Win7 VM.
|
Fixed VS08 compiles. See first post on accompanied Perl version downloads.
|
hmmm I just tried to compile the 32 bit version using VS2010 and I get this error:
eqemuserver\perl_x86\core\cop.h(138): fatal error C1083: Cannot open include file: 'mydtrace.h': No such file or directory I do have perl 5.12 installed. |
Ran into it earlier, if you already have perl 5.12 installed you can change cop.h until its added to the svn.
#include "mydtrace.h" --> #include "c:/perl/lib/core/mydtrace.h" I just changed world and zone Additional Dependencies perl512.lib to point to my install and it compiled fine. or you can copy mydtrace.h to source\trunk\EQEmuServer\perl_x86\CORE and it may/may not work from there. My second compile doing that did work but you never know. |
I'll fix it when iI get home. not every Perl file made it obviously
|
This is fixed. Update your SVN and try again
|
Installed VS10, ran it with 32bit compile on Perl 5.10 and it worked fine. I thought I needed 5.12 but apparently it doesnt. Cool.
Summary ======= Win 7 Ultimate 64bit VC++ 2010 Express Perl 5.10 Successful 32bit compile |
With the current SVN you do not need ANY version of Perl or MySQL actually installed on the computer that is compiling the executables.
You will need to install Perl and MySQL on the computer that will be actually running the executables. I never tried to run the executables on a system with running a different version of perl than it was compiled with, so it might work. The version of MySQL on the server running the executables is does not matter. I have used the current 5.6.X test builds successfully with something compiled with 5.1 libraries. |
Looks like http://www.activestate.com is only providing perl 5.16 unless you sign up for their business license.
http://strawberryperl.com/releases.html has older ones you can still get if needed. Only noticed this today when someone asked me why my mirror of the install guide with links to download perl didnt work. - |
Quote:
|
I was pretty surprised to see the links go dead so fast.
I'll be moving my boards pretty soon to a host instead of keeping it local and will post a link for people that might want files. Tho I know at least a half dozen people that frequent this board already mirror all the files for others. |
http://www.activestate.com/activeperl/downloads shows 5.14 and 5.16 when i just checked. but yeah 5.12 was there a couple days ago
|
Links updated
|
Alright. So I've fiddled with EQEmu a little while, previously running Win32 versions without a hitch (well, ok, small hitches here and there, but never in the compiling stage) so I decided I would have a go at a new install (as in everything installed, Win64 versions of everything), but this time going with VS2010 Prof and the guide in this thread (which honestly, Akkadius has made this so simple, I think, that the guide itself isn't needed, it all compiles just fine -- for the most part?).
However, I'm having an issue with World.exe Here is the compile log for World.exe (and of course its dependency): Code:
1>------ Build started: Project: EMuShareMem, Configuration: Release x64 x64 ------ Code:
The application was unable to start correctly (0xc000007b). Click OK to close the application. Well.. All I know is, my EMuShareMem.DLL is being compiled into the /x64/Release x64" directory and my World.exe is being compiled into my /x64/ReleaseBots x64" where I would think they should be. So, I'm at a loss. As you may have assumed, I am indeed attempting to compile a ReleaseBots x64 version (bots version). I did take notice though configuration manager in VS2010 that "queryserv" defaulted on a "Release" configuration and not "Release x64". But I noticed this after the first and second attempt (after cleaning and rebuilding, just in case) to build the project. So I changed it to "Release x64", even though I believe it would make little to no difference to World.exe or the .DLL since they don't depend on it, but, figured, what the heck. At any rate.. 4 hours in, I'm just as clueless as to the issue as I was when I first received the error. Any ideas? |
Make sure you clean your solution before you compile and that you are pulling fresh binaries and the .dll from each of the target directories.
The target directories could probably be changed so it all makes sense but that is the way it was created initially by Secrets. I thought about changing that stuff as well but didn't get around to it. I might look at it but I have a ton of stuff going on right now, lots of personal stuff as well as some huge stuff that I've been working on for PEQ as well. |
Cleans = always done before building, just gives me a peace of mind if nothing else
Target Directories = eh, it didn't hurt my brain to figure out where to find them, the queryserv however was in "Release" (32 bit) because by default in the configuration manager it was selected as only "release" (which I assume is 32 bit). A quick simple change to "Release x64" compiled it in 64 bit and it ended up then in the "Release x64" directory I'm compiling and running on the same machine. I'm using the following: Windows 7 Home x64 MySQL 5.5 x64 Perl 5.14.2 Build 1402 Then again, I think I see the problem, maybe? For the 5.14 download link you have for "64 bit builds" you have: Code:
http://projecteqemu.googlecode.com/files/ActivePerl-5.14.2.1402-MSWin32-x86-295342.msi Code:
http://downloads.activestate.com/ActivePerl/releases/5.14.2.1402/ActivePerl-5.14.2.1402-MSWin32-x64-295342.msi I'll download the 64 bit version of 5.14.2 of Perl, install that and see if World.exe still vomits or not. |
Yes that would do it, I was totally distracted while updating these links. They are updated again. My fault.
|
Quote:
Just glad it was that and not some long serious issue on my end. I about stuck with 32bit. |
Akkadius box.com is a great site for uploaded items if its allowed by admin for posting the url link.
|
Is it normal to receive a flood of warnings about deprecated functions?
VS 2010 C++ Express using pre-packed perl/zlib/sql libs and includes on a freshly imaged Win Srv. 2008 R2 machine. It would seem that a good 70-80% of the compile log states either "Possible Loss of Data" or "(Performance Loss)". |
Yes, the warnings are normal.
|
Just a thought, what about using CMake (like TrinityCore does for their WoW emu)?
I don't know if that's been discussed anywhere, and I don't know a thing about getting it set up - just how to use it, so I don't know if it would simplify or complicate things. The CMake for windows GUI is pretty easy and it should help to build the required files for any compiler |
Quote:
|
CMake can create the Visual Studio solutions and then you can use those to compile and have the nice IDE. Unfortunately for those that have trouble compiling in the first place, adding CMake to the mix is just one more step to get wrong.
|
My thought on CMake was that at least you'll have a visual checklist or what needs to be included and error list for what is missing, ie mysql lib, perl lib, etc etc.
at least how TC is set up, you select the source path, then point it to your mysql files (and for them openSSL, but for us would be perl and zlib) and generate. it'll spit out what's missing if the user forgot to set something up. i always thought that was an easier way to get things to compile than we've currently got implemented. especially since different compilers (ie versions of VS) get set up differently. just my $0.02 Edit: If i'm not mistaken, if new source is pulled and cmake is not run, when compiling VS will attemt to run CMake to generate the updated solution. At least 2010 does. |
thx its help me!!!
i finaly could make me a server^^ |
thank you for the work you have done here.. compilling has been made simple as can be now. and thanks to sorvani and others who have done work with the 64 bit compiling. literally takes just minutes to update and compile servers. outstanding job to you all
|
Just finished a fresh server install, thank you for your hard work!! It went very smooth!
|
Random bump, not that anyone would really care...
You can compile x64 using Visual C++ 2010 express if you really wanted to. Things just need to be installed in the correct order. [1] Visual Studio C++ 2010 Express [2] Windows Software Development Kit Version 7.1 (SDK 7.1) [3] Visual Studio 2010 SP1 (will fail to install on VSC++2010 Express without SDK 7.1 installed) [4] Visual Studio C++ 2010 SP1 Compiler Update for Windows SDK 7.1 I already had 2010 Express installed and some redistributable packages so I had to do the following. [i] Open Control panel and open remove programs. Find and remove the following: Microsoft Visual C++ 2010 x86 Redistributable 10.0.4xxxx (anything newer then 10.0.3) Microsoft Visual C++ 2010 x64 Redistributable 10.0.4xxxx (anything newer then 10.0.3) [II] Download and install the Windows Software Development Kit version 7.1 [III] Download Visual Studio 2010 SP1 and Redistributable from windows update I had to manually download VSC++2010 SP1 and install. Windows Update froze on it. [IV] Download Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1 Code:
Open Visual Studio C++ 2010 Express and load the server project If anyone wanted to do this just make sure you install x64 perl or your quests will not work. |
Quote:
|
Ahh I knew it was one of those required for native x64 compile but I did not wish to pay for it since I only compile emu source and home brewed applications.
Also I don't ever object to tinkering with stuff until I have a definable yes/no answer instead of a "I don't think you can do that." |
just did not want a person with professional thinking they needed ultimate.
|
Quote:
|
Thank you for posting this, very helpful. Compiled X64 build with vc2010 pretty easily. Tried 2012 express first but got hung on winnt.h errors.
|
Hello,
I've been out of the Emu business for a couple years now. I'm very glad it's back as my boys are old enough to start playing and my server is starting to take shape; some custom content and rules etc.. I decided to go to the svn and get the latest revisions back going, I ran into gobs and gobs of problems, then I read this guide.. downloaded VC++ 2010 and compiled it first try. I know you did a lot of work on this, I for one, appreciate it TREMENDOUSLY, you have allowed me to continue to my work without further hassle. Just a plain ol, sincere THANK YOU is in order. Laxa |
All times are GMT -4. The time now is 07:39 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.