As a pre-requisite, you will need the following programs:
TortoiseSVN 2.4.6
Visual Studios (2003, 2005, or 200
Any Good Text Editor (I recommend EditPlus)
Introduction
This is a pretty basic guide. Many of you have edited the source of a DLL and want to compile your own version, no problem. But I'll have to say this now guys, this isn't easy to grasp, but it isn't hard to learn. In this guide we will be compiling the GlobalNPC i made. I will also be using Visual Studios 2003. Let's Begin.
Legend
Bold - Examples or Refrences
Orange - Pictures and Screenshots
Green - Very Important Note
Next, unpack the contents of my GlobalNPC files (or the source of any other addon) and place them anywhere for now. Go into your ascent source folders, and browse to the \Trunk\src\scripts\src\ Folder (Ascent Source -> src -> scripts -> src). Drag and Drop the folder "GlobalNPC" from the RAR (The folder that contains the source) and drop it in the src folder. You know you have done this step correctly if you see the following folders in the src folder: AscentStats - GossipScripts - InstanceScripts - ServerStatsPlugin - SpellHandlers - GlobalNPC. EXAMPLE OF SCRIPTS FOLDER
In the same folder, you will also see Makefile.am
Open it and you will see:
Code:
SUBDIRS = GossipScripts InstanceScripts ServerStatusPlugin SpellHandlers
All you have to do is add a space and then "GlobalNPC" to look like this:
Code:
SUBDIRS = GossipScripts InstanceScripts ServerStatusPlugin SpellHandlers GlobalNPC
Now, go into the \Trunk\src\scripts\projects\ folder of your ascent source. This folder contains all of the project files for the scripts and addons. Drag and Drop "GlobalNPC2003.sln" and "GlobalNPC2003.vcproj" from the RAR, into the folder. If you have a different source, drag and drop the project files into the project folder. These files usually end with the .sln and .vcproj extensions. EXAMPLE OF PROJECTS FOLDER
Once you have edited the source and are ready to compile, open "GlobalNPC2003.sln" in Visual Studios 2003. On the top of the screen, underneath the File Menus, you will see the buttons for saving, new projects, and other fun stuff. Go to the dropdown box with "Debug" in it. Click that and select Release. EXAMPLE
Then right click on the folder called "Main Resources" underneath the Solution Explorer (to the right of your screen) Then go to Add -> Add Existing Item...
and browse to the "Setup.cpp" file in the scripts folder. (\Trunk\src\scripts\src\GlobalNPC\Setup.cpp) Do the same for Setup.h
Now right click on the "scripts" folder and add "GlobalNPC.cpp" to that folder.
This is what it should look like: Example
Once you are ready, and made sure it is set to Release, right click on "Solution 'GlobalNPC2003' (1 Project)" and click Build.
When it has finished compiling, your DLL will be found in \Trunk\bin\release\script_bin\