How To: Compile Using Microsoft VS .NET
This tutorial covers how to compile the EQEmulator source into EmuShareMem.dll, Zone.exe, and World.exe using VS.net.
First, what you need: 1) Microsoft Visual Studio .NET - In this tutorial, I am using the 2003 version. 2) EQEmu Source Code 3) MySQL Installed 4) Perl Installed (if you want Perl) 5) Zlib **Note: I will be using C:\EQEmu\ as my EQEmulator directory. Be sure to change this if yours is in a different location!** ---- Setting Up: 1) VS .net Purchase at a store. 2) EQEmu Source Code As of now, I believe the easiest way to get the latest Source Code is through Anonymous CVS. To get the source through this, open up a command prompt and type in Code:
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/eqemulator login Code:
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/eqemulator co EQEmuCVS 3) MySQL Installed Go here and download MySQL. You should have this in already if you are compiling source, but just incase you don't, there it is. It should default to install in C:\MySQL\. 4) Perl Installed If you don't want Perl on your system, and want nothing to do with it whatsoever, skip this step, and all steps dealing with Perl. Get Perl 5.8 and NMAKE.EXE. Once downloaded, install Perl. Once installed, put NMAKE.exe in your perl\bin folder (default is C:\perl\bin). Next, open up a command prompt and type Code:
perl -MCPAN -e shell Once it is done, type in Code:
install IO::Scalar Zlib Download Zlib, and extract it to your Emu directory. Set Up - Part 2 Now that you have downloaded and installed everything, we are going to put everything in a similar location. 1) Take the source from the Anonymous CVS download and put it in your main EQEmu directory. For mine, it would be C:\EQEmu\source. 2) Copy the entire MySQL folder which was installed to your main EQEmu Directory. For mine, it would be C:\EQEmu\mysql. 3) If you are working with Perl, also move that directory into your EQEmu Directory. For mine, it would be C:\EQEmu\Perl. ---------------- Compiling Program Set Up: 1) Open up VS .NET. 2) Select Tool -> Options... 3) Click on the Folder 'Projects' and then click the sub-selection 'VC++ Directories'. http://www.angelfire.com/ab7/gsig/directories.jpg 4) From that window, select Include Files, under the 'Show Directories For'. --Add the following lines: C:\EQEMu\MySQL\include C:\EQEmu\zlib C:\EQEmu\zlib\include Replace C:\EQEmu with your EQEmu directory path. If you don't, it will not work. 5) Next, go back the the 'Show Directories For' and select Library Files. --Add the following lines: C:\eqemu\mysql\lib\opt C:\eqemu\mysql\lib Again, replace C:\EQEmu with your EQEmu directory path. If you don't, it will not work. 6) Once done, click 'Ok' to close the window. ----------- Compiling EmuShareMem.dll 1) Go to File -> Open -> Project... 2) Target your source\EmuShareMem\ folder in your Emu directory. Type in 'EmuShareMem.dsw' and click open. If it asks you to convert, click 'Yes To All'. http://www.angelfire.com/ab7/gsig/yestoall.jpg 3) Next, go to Buld -> Configuration Manager... 4) Under 'Active Solution Configuration:', select Release. http://www.angelfire.com/ab7/gsig/activeconfig.jpg 5) Click 'Close' to close the window. 6) Go to Build -> Build EmuShareMem 7) Wait. This shouldn't take extremely long on an average computer. When it finishes, you should get: http://www.angelfire.com/ab7/gsig/emusharemem.jpg ----------- Compiling World.exe 1) Go to File -> Close Solution. 2) Go to File -> Open -> Project... 3) Target your source\World\ folder in your Emu directory. Type in 'world.dsw' and click open. If it asks you to convert, click 'Yes To All'. 4) Go to Buld -> Configuration Manager... 5) Under 'Active Solution Configuration:', select Release. 6) Click 'Close' to close the window. 7) Go to Build -> Build World 8) Wait for it to compile. This one takes longer than EmuShareMem, but still not a very long time. When finished, it should look like: http://www.angelfire.com/ab7/gsig/world.jpg ----------- Compiling Zone.exe - Without Perl 1) Go to File -> Close Solution. 2) Go to File -> Open -> Project... 3) Target your source\Zone\ folder in your Emu directory. Type in 'zone.dsw' and click open. If it asks you to convert, click 'Yes To All'. 4) Go to Buld -> Configuration Manager... 5) Under 'Active Solution Configuration:', select Release. 6) Click 'Close' to close the window. 7) Go to Build -> Build World 8) Wait for it to compile. I find this one takes the longest to compile, simply because it has a lot to do. Just sit back, take a bathroom break, and come back..It'll finish. When it is done, you should see: http://www.angelfire.com/ab7/gsig/zone.jpg ----------- Compiling Zone.exe - With Perl 1) Go to File -> Close Solution. 2) Go to File -> Open -> Project... 3) Target your source\Zone\ folder in your Emu directory. Type in 'zone.dsw' and click open. If it asks you to convert, click 'Yes To All'. 4) Go to Build -> Configuration Manager.... 5) Select from 'Active Solution Configuration', '<New...>'. 6) In the new window, type in 'Perl' for the Solution Configuration Name, and 'Copy Settings From' -> Release. Also, be sure the box is checked. http://www.angelfire.com/ab7/gsig/nsc.jpg 7) Click 'Ok', and then 'Close'. 8) Now go to 'Project -> Properties...'. 9) Go to the C/C++ folder and select the General sub-selection. 10) In this window, go to the 'Additional Include Directories', and type in: Code:
c:\eqemu\perl\lib\core 11) Next, go to the sub-selection 'Preprocessor' and go to the line 'Preprocessor Definitions'. On this line, add to the end of everything: Code:
,EMBPERL,EMBPERL_PLUGIN 12) Now, go to the Linker folder, and select the 'General' tab. In this window, go to the 'Additional Library Directories' line, and type in: Code:
c:\eqemu\perl\lib\core 13) Click 'Apply', and the 'Ok' to close the window. 14) Go to Project -> Add Existing Item... 15) Type in the 'File name:' box: emb*.* 16) Select all files that come up, and click on 'Open'. http://www.angelfire.com/ab7/gsig/emb.jpg 17) Go back to the 'Add Existing Item...' and type in 'perl*.*' this time. Select all files which come up and click Open. http://www.angelfire.com/ab7/gsig/perl.jpg 18) Go to Build -> Build Zone 19) Wait for it to compile. When it is done, you should see: http://www.angelfire.com/ab7/gsig/zoneperl.jpg ----------- For Minilogin: 1) If you want to play using MiniLogin, first download it here. 2) Now, log into your MySQL database and insert the following commands: Code:
INSERT INTO variables (varname, value, information) VALUES ('LoginType', 'Minilogin', 'Set this to Minilogin to login using a minilogin server :)'); 3) Open up MiniLoginAccounts.ini (in your MiniLogin directory) and make it look like: Code:
# Max 200 lines total (including comments and blank lines) 4) Next, in your LoginServer.ini put '127.0.0.1' or 'localhost' in the loginserver and worldaddress fields, and put the loginport to 5999. Also, make sure this is in there as well: Code:
[LoginConfig] Code:
[LoginServer] 7) Launch MiniLogin.exe, then World.Exe, and then Boot5zones.bat. When everything is loaded, you can login using the username and password you entered in before. ------ Now you should have all three files compiled (EmuShareMem.dll, Zone.exe, and World.exe) and MiniLogin set up for you if you wanted it. All three of the compiled files can be found in the C:\EQEmuDirectory\source\build directory. And there you have it! If you have any questions, feel free to E-Mail or PM me. I'll see if I can compile a FAQ type thing. Edit: Added in MiniLogin section per request of Muuss :) |
Your link for the Zlib download is no longer correct because the latest release version is 1.2.2 rather than 1.2.1... you might consider updating the link to either reflect this change or simply to direct people to the main web page so that they can find the download regardless of version.
Kaiyousei |
If you're having issues with IO::Scalar, you can not include EMBPERL_PLUGIN in your definitions. You will still have quests, but you wont have the rarely used plugin.pl.
|
Can't update
I can't seem to update my post because i have more than 10000 characters plus i have images and such being linked. Hopefully people will just realize to just go to the Zlib homepage.
|
All times are GMT -4. The time now is 11:31 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.