After the first few times everyone gets used to the procedure and never needs to look at this guide ever again.
Important: As the TrinityCore project is highly active, portions of the guide may be outdated. In case something fails, please check the forum, which will usually have the answer already.
Also, if you are planning on compiling on Windows 2000, there is a page with special setup instructions that you should use here
Software Required
- GitExtensions
- Includes Git, MySYSGit, and KDiff - be sure to install all three
- View this thread for important details on how to install Git for best results.
- Default install options for KDiff and MySYSGit are acceptable
- Choose one compiler:
- Visual C++ 2008 Express (Download and run vcsetup.exe)
- Visual C++ 2010 Express.
- Beware: Express editions do not support 64-bit compilation by default and making them do so is arduous at best. It is recommended to choose 32-bit versions instead.
- MySQL Server Community Edition (We recommend to use the most recent 5.5.x version)
- Download the Windows (x86, 32-bit), MSI Installer
- Scroll down to the bottom and click on "No thanks, just take me to the downloads!"
- When installing MySQL Server, remember the username and password. You will need them to log into your chosen database management tool (below) in order to import SQL files later.
- Choose one of these database management tools:
- SQLYog Community Edition (Fastest and most efficient)
- MySQL GUI Tools
- HeidiSQL (Best for beginners)
- DO NOT USE NAVICAT : Due to NaviCat not being able to handle // style comments (standard SQL), including incidents of failed imports despite positive feedback from the program itself, we advise all users to stay VERY clear of this product - you have been warned.
- .NET Framework 3.5 or above (you should already have it via your Windows updates)
- CMake
- Download and install the win32-x86.exe file
- OpenSSL 1.0.0d Download-32bit Download-64bit
- Download the 32bit version if you have a 32bit compiler and the 64bit bit version if you have a 64bit compiler. Or you can get both if you plan to compile both 32 and 64bit, they can coexist side by side.
- If you use different PCs to compile/run Trinity, install one of the following packages on your Server-PC to avoid missing dependencies (dependig on your Visual Studio Version and your Server-PC Operating System)
PULLING AND COMPILING THE SOURCE
Pulling the Source
- Create a directory in which Core files will be pulled (for example: C:\Trinity).
- Right-click on the directory and click on Git Extensions -> Clone.
- Fill in the data as follows:
Repository to clone: https://github.com/TrinityCore/TrinityCore.git Destination: C:\Trinity Subdirectory to create: <none> Branch: master Personal Repository: YesClick Clone. Within a few minutes all of the TrinityCore source files will be pulled into the directory C:\Trinity.
Configuring and Generating Visual C++ solutions with CMake
Before you begin, create an empty directory called Build. In this example, we will use D:\Build.- 1. Open the CMake GUI (default install directory is C:\Program Files (x86)\CMake 2.8\bin).
- The two top text areas are used to tell where CMake should look for the source tree, and also where to put the build files.
- 2. Click Browse Source... -> Select the source directory (C:/Trinity)
- 3. Click Browse Build... -> Select the build directory (D:/Build)
- 4. Click Configure
- 5. Make sure Use default native compilers is checked
- 6. In the drop-down menu, choose the version of the compiler you downloaded in the Software Required section (which version of Visual C++ Express did you install?).
- Note: CMake is not a compiler. It merely generates the build files required for the compiler you choose, so choose wisely.
- 7. Click Finish. CMake will begin chewing through the source code and analyzing the CMakeLists.txt spread all over the source tree.
- 8. CMake shows you a list of options for selecting different components of the build.
- Check "Tools". This will compile the map extractors needed later in the setup.
- All other default selections are OK in most cases, however, if your MySQL server version is different than 5.5.x, we strongly recommend to uncheck the USE_MYSQL_SOURCES option. This tells CMake to look for include files and client libraries in your MySQL server installation instead of using the MySQL source files provided with TrinityCore. This also requires that your selected compiler is for the same architecture (32bit or 64bit) as your MySQL Server Community Edition.
- 9. When your selection is done, click Configure again.
Here are some useful things to learn about the information in the large white text box at the bottom of the window (your configuration may be slightly different):
- It detected that we're on a 64-bit platform
- It detected that we have a proper version of MySQL
- It detected that we have properly installed OpenSSL libraries/headers
- 10. Click Generate. This will install the selected build files into your D:/Build folder.
Compiling the Source
- Browse into your D:\Build folder and open TrinityCore.sln with Visual C++ Express.
- On the menu at the top, click Build and select Configuration Manager.
- Set Active Solution Configuration to Release
- Set Active Solution Platform to Win32 (if you set 64-bit compilation during the CMake configuration, select Win64)
- With Visual C++ 2010, simply use the list menus below the "Help" menu and make the same changes explained above (though it should already be done by default).
- Click Build -> Clean Solution.
- Visual C++ 2010: Right-click ALL_BUILD in the Solution Explorer on the left sidebar and select Clean.
- Unless you are just testing a compilation, it is always best to clean your build before compiling your new Trinity revision.
- Visual C++ 2010: Right-click ALL_BUILD in the Solution Explorer on the left sidebar and select Clean.
- Click Build -> Build Solution.
- Visual C++ 2010: Right-click ALL_BUILD and select Build.
- Compilation length differs from machine to machine, you should expect it to take 5-30 minutes.
- If you are asked to Reload build files during the compile, do so.
- Visual C++ 2010: Right-click ALL_BUILD and select Build.
========== Build: 14 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========You will find your freshly compiled binaries in the D:\Build\bin\release folder. These are all used to run your server at the end of this instruction.
You will need the following files in order for the core to function properly. These are located in your D:\Build\bin\release folder:
ACE.dll libeay32.dll libmySQL.dll ssleay32.dll worldserver.conf.dist worldserver.exe authserver.conf.dist authserver.exelibeay32.dll, libmySQL.dll, and ssleay32.dll will need to be manually added to this folder, and you need to copy them over from the following installation/bin directories:
- libmySQL.dll: C:\Program Files\MySQL\MySQL Server 5.x\lib
- libeay32.dll and ssleay32.dll: C:\OpenSSL-Win32\bin
If this is your first time installing TrinityCore, skip ahead to INSTALLING THE DATABASES
Keeping the Source Up-to-Date
TrinityCore Developers are always at work fixing and adding new features to the core. You can always check them here, or by viewing them from within Git Extensions:- Open Git Extensions by finding the big bull icon (default install directory is at C:\Program Files (x86)\GitExtensions).
- Click Open Repository and browse to your C:\Trinity source directory. This will open the commit view which will show all the changes made to the core.
- Your own revision will be in bold, and you can find your Commit hash by selecting it and clicking the Commit tab in the bottom half of the window.
- Also take note of the date of the commit, as this will assist with which database updates need to be applied later.
- In the commit view, click on the blue down arrow at the top of the window called Pull.
- Make the following selections to update your core to the latest revision: screenshot
- Pull from Remote: origin
- Local Branch: master
- Merge remote branch to current branch
- Finally, click the Pull button, and it will pull the latest source and merge it with your existing source. Your bold commit will move to the latest (topmost) commit.
- Alternatively, you can switch Merge remote branch to current branch to Do not merge, only fetch remote branch in order to simply see the new updates and not merge them with yours or make any changes to your source. This also removes the need to recompile, and thus allows you to ignore the next step. If you find a specific commit you wish to merge with (such as the monthly revision commit), right-click it and select Checkout revision (or select Reset current branch to here -> Hard if you've made changes to the source that you want to have reverted/reset).
- Continue with both Compiling the Source and Keeping the DB up to date
INSTALLING THE DATABASES
About once per month all of the updates made from all previous months are combined into a few bulk .sql files to easily import them into your databases. These updates are similar to how Service Packs are released for Windows. Furthermore, smaller, individual .sql updates are occasionally added as the core is fixed by the developers (these can be seen in Git Extensions while selecting individual commits in the commit view with the Diff tab selected). This offers two options:- (Beginner) It is highly recommended to keep your current revision (the commit in bold text in Git Extensions) on a commit with a description similar to "DB: TrinityDB revision XX: move SQL updates to the old directory" (example). These commit descriptions mark each monthly compilation, and are also useful for knowing when a new compilation is released and can be downloaded/imported. Doing this will keep your databases 100% up-to-date each month.
- (Advanced) If you decide to update your revision outside of a commit with the above description, you must also import all of the smaller .sql updates (C:\Trinity\sql\updates folder) that have been done with EACH commit up to yours, if there are any. Not importing these additional updates cause a majority of user errors. This will ensure that your databases are 100% up-to-date.
Downloading the Database
- Download the latest database compilation from TrinityCore Github Downloads.
- The Download Packages at the top are the ones you want. Find the package with the latest date and download it.
- For example, a file such as TDB_full_335.11.42_2011_08_27.rar tells us three things:
- TDB: Trinity Database
- 335.11.42: The version of the database and the client it belongs to. 335 = WoW version 3.3.5, 42 = the 42th full revision.
- 2011_08_27: The date - Aug 27th, 2011
- For example, a file such as TDB_full_335.11.42_2011_08_27.rar tells us three things:
- The file is in .rar format, so you will need an archive program like 7zip to unpack it.
- The Download Packages at the top are the ones you want. Find the package with the latest date and download it.
Installing The Trinity Databases
Trinity needs three databases to run - Auth, Characters, and World:auth - holds account data - usernames, passwords, GM access, realm information, etc. characters - holds character data - created characters, inventory, bank items, auction house, tickets, etc. world - holds game-experience content such as NPCs, quests, objects, etc.Note: The auth database was previously named "realmd". If you are having trouble and searching the forum for solutions, try searching for realmd instead of auth.
The following steps are done using your database management program (ex. HeidiSQL or SQLYog):
- Create the three databases by importing C:\Trinity\sql\create\create_mysql.sql. You now have three databases - auth, characters, and world.
- Import auth database structure by importing C:\Trinity\sql\base\auth_database.sql to the auth DB.
- Import characters database structure by importing C:\Trinity\sql\base\character_database.sql to the characters DB.
- Import the world database structure by extracting and importing the "TDB_full" .sql file you downloaded from the Downloading the Database section.
Keeping the DB up to date
Trinity developers are always at work fixing and adding new data to the DB. Both core and DB fixes will be committed to the TrinityCore repository. Pending fixes can be found on our tracker with data from the developers and contributors.As mentioned earlier, it is recommended to stay on the same revision as the TDB_full database, but if in any case you decide to update beyond this revision, there are additional database updates that are sometimes supplied in a commit.
Note: You can run the following query on the World database to see your current DB and core revision:
SELECT * FROM `version`;
- (Beginner)
- Check to see if a new monthly compilation has been created either by updating the source and looking for a commit with a description similar to "DB: TrinityDB revision XX: move SQL updates to the old directory", or by keeping your eye on the TrinityCore Repository (which shows the same commits).
- If you see a new compilation commit, right-click on the commit in Git Extensions with the above description and select Checkout revision. If the compilation commit turns bold, your source is now perfectly aligned with the database compilation you are about to import.
- Download the new compilation
- Note: You may wish to backup (export) your databases before performing the next few steps.
- Extract and import all "world_" .sql files from the archive into your world database.
- Extract and import all "characters_" .sql files from the archive into your characters database.
- Compile the new source
- (Advanced)
yyyy_mm_dd_id_world_tablename.sql -> World DB yyyy_mm_dd_id_character_tablename.sql -> Characters DB yyyy_mm_dd_id_auth_tablename.sql -> Auth DB (yyyy - the year; mm - month; dd - day; id - incremental daily id (starts at 0))It is imperative to know the date of your previous revision when updating in order to import all of the updates from that revision to your current one. The easiest way to accomplish this is the following:
- Open Git Extensions. It should auto-open the Trinity repository you pulled ealier and show you the commit view that lists each commit.
- Remember: Your current revision is in bold text, but you need to find your previous revision and select it. The bottom half split of the window will populate with data about that particular commit.
- Click on the Commit tab and find "Date". This is the date you need in order to identify which updates need to be done from the C:\Trinity\sql\updates folder. Remember it.
- Browse into your C:\Trinity\sql\updates\world folder and import all *_world_*.sql files into your world DB that have a date later than the date you found above.
- Now browse into the C:\Trinity\sql\updates\auth_char folder and import all *_character_*.sql files into your characters DB that have a date later than the date you found above.
- Last, import all *_auth_*.sql files into your auth DB that have a date later than the date you found above.
Your database is now 100% up-to-date with your core, and your server is almost ready.
Tip: If your world database is ever corrupted (ex. creatures or objects are accidentally deleted), it is easy to revert it back to its original state by re-importing the full TDB downloaded from the Downloading the Database section. If you updated your core using the Advanced instructions, make sure you also import all of the C:\Trinity\sql\updates again, also.
SETTING UP THE SERVER
Now that you have the Source compiled and the Databases installed, you need to set up the server.Downloading the Extractors
Trinity requires dbc and map files. It is optional but highly recommended to also extract vmaps, which enable Line-of-Sight rules (casting through walls, etc) and Sanctuary areas (like Dalaran).Warning: use Trinity's extractors. If you use extractors from other projects it is almost certain that your TrinityCore will not recognize the extracted data!
There are two ways in which you can obtain the extractors. If you compiled them while installing CMake (Step 8 in Configuring and Generating Visual C++ solutions with CMake), you already have them in your D:\Build\bin\Release\ folder. Otherwise, you can download the Maptools here.
Extracting DBC/Maps/VMaps
- Browse into your D:\Build\bin\Release\ folder and copy these files into your root World of Warcraft folder: mapextractor.exe, vmap3extractor.exe, vmap3assembler.exe, and makevmaps3_simple.bat
- If you do not have makevmaps3_simple.bat, create it inside your root World of Warcraft folder.
- Once created, open it in Notepad and copy/paste the following inside it:
vmap3extractor.exe md vmaps vmap3assembler.exe Buildings vmaps pause
- Run your WoW client once (the login screen is enough). You need to do this so that the mapextractor.exe knows where your WoW Client is and where to extract the files from.
- Run mapextractor.exe and wait until it is finished.
- Move the dbc and maps folders to the location of your TrinityCore worldserver.exe and authserver.exe binaries (D:\Build\bin\Release\).
- (Optional, but highly recommended) Run makevmaps3_simple.bat. It will create two new folders: buildings and vmaps. The buildings folder is completely useless and can be safely deleted.
- Move the vmaps folder to the same directory as dbc, maps, and the TrinityCore binaries.
CONFIGURING THE SERVER
- Browse into your D:\Build\bin\Release\ folder and delete the .dist extensions from worldserver.conf.dist and authserver.conf.dist. You should now have worldserver.conf and authserver.conf files in your D:\Build\bin\Release\ folder.
- Open worldserver.conf
worldserver.conf
- Scroll down to the LoginDatabaseInfo, WorldDatabaseInfo, and CharacterDatabaseInfo config options and enter MySQL Server login information for the server to be able to connect to your database.
LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth" WorldDatabaseInfo = "127.0.0.1;3306;trinity;trinity;world" CharacterDatabaseInfo = "127.0.0.1;3306;trinity;trinity;characters"
- Either use the same root username and password you used when you installed MySQL Server Community Edition (not safe - not recommended if the server is public), or create a new login with the User Manager settings in your chosen database management tool (commonly identified by an icon that looks like a person or people) and give it necessary permissions (SELECT, INSERT, UPDATE, DELETE permissions are sufficient, and is much safer).
- The hostname (127.0.0.1) can stay the same if Trinity is being installed on the same computer that you run WoW on. Otherwise, follow the instruction in Realmlist Table if this is not the case.
- All other default options should be sufficient, but it is recommended that you take some time after your server is finished to read through the configs and see all the ways to customize your server.
- IMPORTANT - If you choose NOT to use vmaps, you must edit the following in the worldserver.conf or your server will not start:
- vmap.enableLOS = 1 -- set this to 0
- vmap.enableHeight = 1 -- set this to 0
- vmap.petLOS = 1 -- set this to 0
- vmap.enableIndoorCheck = 1 -- set this to 0
Pro Tip: For most settings, you can simply type ".reload config" in-game to see changes instantly without restarting the server.
authserver.conf
- Scroll down to the LoginDatabaseInfo and enter MySQL Server login information.
LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth"
Realmlist Table
You need to make sure that authserver.exe directs incoming connections to your realm.- Run your chosen database management tool (ex. SQLYog or HeidiSQL)
- Open the auth database and find the realmlist table. You need to edit the address field according to your needs:
- 127.0.0.1 -- Also known as "localhost". Leave this setting alone here and in your configs if you've installed TrinityCore on the same computer you run WoW on, and only you are connecting to it.
- LAN IP (192.168.x.x)-- If you are installing TrinityCore on a different computer from where you run WoW, but all the computers involved are on the same network (router) use that computer's Local Area Network IP.
- External IP -- If you want other people to connect to your server, use your external IP. Visit http://www.whatismyip.com/ to find your external IP address.
RUNNING & CONNECTING TO YOUR SERVER
After completing all the steps listed above you can now start your server.- Run the authserver.exe and worldserver.exe to run your server. Both must stay running for your server to accept connections to it.
- Tip: The authserver allows you to enter your username/password to connect to the Realm Selection screen, and the worldserver allows you to connect to the realm itself. Once you are in-game, and assuming no one else will need to connect to your server, you can safely close the authserver if you wish.
- Open the realmlist.wtf file inside your World of Warcraft\Data folder. The IP in the realmlist.wtf file should be exactly the same as the IP address you entered in the realmlist table above.
- Change the first line to: set realmlist <IP address used in realmlist table> Example: set realmlist 127.0.0.1
- (Optional) If you wish to use the WoW Launcher.exe to run your client then you must change your set patchlist to the same ip/dns name as your realmlist.
Final Steps
You can type commands inside the worldserver program, similar to a command prompt.- Type account create <user> <pass>. Example: account create test test
- Type account set gmlevel <user> 3 -1. Example: account set gmlevel test 3 -1
- The "3" is the GM account level (higher numbers = more access), and the "-1" is the realm ID that stands for "all realms".
- Tip: Open the world database in your database management tool and find the command table. This table shows a full list of GM commands, their descriptions, and the security (GM level) needed to use them. You will not find a more accurate list of current GM commands anywhere else (assuming you keep your database up-to-date). The security level for a given command identifies that THAT GM level can use the command, along with all GM levels above it.
- Minimize your authserver and worldserver and run WoW.exe (never run WoW using the Launcher unless you edited the realmlist.wtf's patchlist option above).
- Log in using the user/pass you just created (test/test)
- The Trinity realm should be selectable. Log in, create a character, and you're all done!
Keine Kommentare:
Kommentar veröffentlichen