Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Tutorials/Howto's > Tutorials--Outdated Use the Wiki > Tutorials::Discussion

Tutorials::Discussion Discuss Tutorials here. Do NOT POST tutorials here, they belong on the wiki.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-30-2004, 01:03 PM
Cans
Sarnak
 
Join Date: Mar 2003
Posts: 71
Default 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
When it asks for you to log in, don't type in anything and just hit Enter. Then, type in

Code:
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/eqemulator co EQEmuCVS
Once you do that, it will log into the server and begin downloading the source files. It should put the files to C:\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
Say no when it asks to configure manually.

Once it is done, type in

Code:
install IO::Scalar
When this is done, there should be an '-- Install OK'. If so, then the installation was successful.

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'.



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'.



3) Next, go to Buld -> Configuration Manager...

4) Under 'Active Solution Configuration:', select Release.



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:



-----------

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:



-----------

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:



-----------

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.



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'.



17) Go back to the 'Add Existing Item...' and type in 'perl*.*' this time. Select all files which come up and click Open.



18) Go to Build -> Build Zone

19) Wait for it to compile. When it is done, you should see:



-----------

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 :)'); 

alter table account add minilogin_ip varchar(32) not null;

insert into account (name,status, minilogin_ip) values('USERNAME_HERE',250,'127.0.0.1');
Replace USERNAME_HERE with your username.

3) Open up MiniLoginAccounts.ini (in your MiniLogin directory) and make it look like:

Code:
# Max 200 lines total (including comments and blank lines) 
# Blank lines may mess up the line # reported in error messages 
127.0.0.1 USERNAME_HERE PASSWORD_HERE
Replacing the USERNAME_HERE and PASSWORD_HERE for your Username and Password. Note: The username you inserted into the MySQL command must be this username as well! Also, make sure you lave one space after your password.

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]
ServerMode=MiniLogin
ServerPort=5999
5) Change your EQHost.txt file to:

Code:
[LoginServer]
Host=127.0.0.1:5999
6) Edit your Boot5Zones.bat file and put 127.0.0.1 or localhost in for BOTH of the IP addresses.

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 :)
__________________
Cans O`Whoop Ass
LOADING, PLEASE WAIT...
Reply With Quote
  #2  
Old 03-04-2005, 11:35 AM
Kaiyousei
Fire Beetle
 
Join Date: Jun 2004
Posts: 8
Default

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
Reply With Quote
  #3  
Old 03-04-2005, 04:39 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

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.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #4  
Old 03-16-2005, 02:45 PM
Cans
Sarnak
 
Join Date: Mar 2003
Posts: 71
Default 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.
__________________
Cans O`Whoop Ass
LOADING, PLEASE WAIT...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:42 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3