Quote:
Originally Posted by pfyon
Short answer, no it is not much more than modifying the .cpp file. You just have to change it and recompile.
|
Oh god, this turned into a lot of text. I'm sorry.
I'm not sure what all you have, so here's the basics. Obviously, skip everything you already have!
First, you need
Visual C++ 2008 Express. This is for compiling the source code (including .cpp files).
While it's downloading, get the other stuff too. You'll need to get the source from SVN, and the typical SVN client is
TortoiseSVN.
With TortoiseSVN installed, you'll want to make a new folder, right-click it, and click "SVN Checkout...". Set the URL of the repository to "http://projecteqemu.googlecode.com/svn/trunk/EQEmuServer" (without quotes), make sure the checkout directory is set to the one you right-clicked, and hit ok. It'll download lots of stuff, this is all the up to date source code and such.
When it's done and you have VC++ 2008 express installed, double-click the Server.sln file in the folder you checked out into. It'll open the solution for the entire emulator's code. Click the + next to Zone in the left panel, this will open up the tree for the Zone project, which compiles to Zone.exe and does pretty much all of the in-game emulation stuff. Open the "Source Files" folder with another click of a +, and scroll down until you find "spdat.cpp". You'll want to make my changes as I've suggested, by double-clicking the file so it appears in the main window. You should see line numbers, so just follow my post instructions and use a little copy and pasting.
At the top area in a toolbar, there should be a drop-down box that says something like "Debug", "DebugBots", "Release", or "ReleaseBots". You'll want to set it to "ReleaseBots". If there isn't a toolbar for it, go into the Build menu at the top and click "Configuration manager...". The top left dropdown box should be like the one I described, so set it to ReleaseBots if it isn't already and hit ok.
Now go back to that left panel where it says "Zone" that you clicked the + to early on. This part might be a bit annoying. We've gotta link up the directories for various dependencies that are required for Zone to compile. Right-click Zone and click Properties way at the bottom. Now, to run the server you've already got perl and mysql installed, so those directories just need to get linked to. Under "Configuration Properties" -> "C/C++" -> "General" in the left panel, select "Additional Include Directories" in the right panel. A little "..." button should (?) appear with your version on the far right side of that list, so click it. If not, I guess you get to type into the text box. I'm guessing that place-holder directories are already there, but they may not be. If they are, you'll see something that goes to "...\some perl folder\lib\core". You'll want to change that "...\some perl folder\" part to your perl directory, and I'm pretty sure you'll have lib\core in it. So set it to that. Same for the mysql part, you want it to go to "...\MySQL Server x.x\include". If you don't have these 2 things, add them in but with your directories for those 2 things. Hit ok if you're in that box and get out of there.
Now you need to get into "Configuration Properties" -> "Linker" -> "General" and find "Additional Library Directories" on the right. Again, there may or may not be placeholders, I dunno, but what you need to add/edit are 2 directories for perl and mysql again. It's "...\your perl folder\lib\core" and "...\MySQL Server x.x\lib\opt" that you need. Click ok for that whole properties dialog; you're out of there!
Finally, you just need to do one more annoying step... You need to get zlib. Personally, I grabbed it from
here. Extract that into your Common folder at the root of your SVN repository, so the Common folder is in the same folder as Server.sln and the zone folder, among others. I was getting pretty bored with setting stuff up at this point, so I just copied the files out of the extracted "include" and "lib" folders from zlib123-dll.zip and put them directly inside the Common folder (overwriting, without errors, zlib.h, I think). You'll need these files directly inside your Common folder for compiling to work, too. I think you need zlib1.dll there too, but I don't remember. I was sort of throwing files at things at this point.
Ok, the awful part is over if you've survived this far. Now cross your fingers, it's time to compile!
Find that nasty "Zone" in the left panel of VC++ again, it's time to show it who's boss. Right-click it, go into "Project Only", and click "Build Only Zone". It'll start spamming stuff at the bottom with hopefully no errors! Eventually it should say it is done. Your shiny new Zone.exe will be in the Build folder, which is in the same folder as Server.sln. Shut down your server if it is running and over-write your current Zone.exe wherever your server is (or back it up if you're extra-cautious, but it shouldn't be a prob). You're good to go.
If it says you're missing files, post that stuff here and I'll (or someone actually involved in the project will) sort it out, I probably forgot about things. There
shouldn't be actual errors in the code, but who knows, it's always an adventure.
Once this is all working properly, you can right-click that folder you checked out into and click "SVN Update" whenever you feel like it, and it'll update the folder to the latest version of the emu. Then you can go and recompile things if they get changed instead of waiting for the occasional pre-compiled releases. It's worth it.