Installation (Windows): Difference between revisions

From Project Skyfire
Jump to navigation Jump to search
m (decat)
 
(20 intermediate revisions by 3 users not shown)
Line 10: Line 10:
== INTRODUCTION  ==
== INTRODUCTION  ==
<p>Before you get scared by this long guide, we assure you the procedure is quite simple. Most of the following steps are to be performed only the first time you install SkyFireEMU and only the SkyFireEMU updating procedures will need to be run from time to time.</p>
<p>Before you get scared by this long guide, we assure you the procedure is quite simple. Most of the following steps are to be performed only the first time you install SkyFireEMU and only the SkyFireEMU updating procedures will need to be run from time to time.</p>
<p>After the first few times everyone gets used to the procedure and never needs to look at this guide ever again.</p>
<p>After the first few times everyone gets used to the procedure and never needs to look at this guide ever again.</p><br>


=== Software Required  ===
=== Software Required  ===
<p><ol>
<p><ol>
<li>[http://git-scm.com/download Git]</li>
<li>[http://git-scm.com/download Git]<br>You can also use TortoiseGit that is more compatible with Windows (8).<br>[http://code.google.com/p/tortoisegit/ TortoiseGIT]</li><br>


<li>C++/C# Compiler: [http://www.microsoft.com/downloads/details.aspx?familyid=F3FBB04E-92C2-4701-B4BA-92E26E408569&displaylang=en#filelist Visual Studio 2008 Express] / [http://www.microsoft.com/express/Downloads/#2010-Visual-CPP Visual Studio 2010 Express] (Both free)
<li>C++/C# Compiler: [http://www.microsoft.com/downloads/details.aspx?familyid=F3FBB04E-92C2-4701-B4BA-92E26E408569&displaylang=en#filelist Visual Studio 2008 Express] / [http://www.microsoft.com/express/Downloads/#2010-Visual-CPP Visual Studio 2010 Express] (Both free)
*'''Beware''', Express editions do not support 64-bit compilation by default and making them do so is arduous at best.
*'''Beware''', Express editions do not support 64-bit compilation by default and making them do so is arduous at best.
*You will need C++ for the Core and C# for the wow.exe patcher. (The patcher is now pre-compiled if you do not want to install C#)</li><br>
*You will need C++ for the Core and C# for the wow.exe patcher. (The patcher is now pre-compiled if you do not want to install C#)
*<span style="color:#FF0000">NOTE: Currently there is a bug with CMake & Some Versions of Visual Studio 2010. If you experience problems (errors) with CMake Configure using VS 2010, it might be better to use the 2008 OR 2012 version.</span>
**For Visual Studios 2012 Express (Recommended for Beginners), download here [http://www.microsoft.com/visualstudio/eng/downloads Visual Studio 2012 Express].
**You will need to select the best option for your platform (most likely "Visual Studio 2012 Express for Windows Desktop").
**Once Installed, you will be required to register the software or the program will only work for 30 days.
**<span style="color:#FF0000">NOTE: Currently Visual Studios 2012 does NOT support C++ Compiling for Windows XP Environment. This means if you compile on your Windows 7 Machine, the server will NOT operate on your Windows XP Machine!.</span></li><br>


<li>[http://www.slproweb.com/products/Win32OpenSSL.html OpenSSL]
<li>[http://www.slproweb.com/products/Win32OpenSSL.html OpenSSL]
*'''Do NOT use the light version!'''
*'''Do NOT use the light version!'''
*Download the 32bit version if you have a 32bit compiler and the 64bit bit version if you have a 64bit compiler.
*Download the 32bit version if you have a 32bit compiler or the 64bit bit version if you have a 64bit compiler.
Note: If you have a 32-bit compiler, but a 64-bit OS and use the OpenSSL MSI installer for 32-bit, you will need to use the "?:\Program Files\OpenSSL" directory instead of the default "?:\Program Files (x86)\OpenSSL" setting in the installer.
*You may have to download and install one of the Microsoft Visual C++ Redistributable Packages for OpenSSL to work.</li><br>
*You may have to download and install one of the Microsoft Visual C++ Redistributable Packages for OpenSSL to work.</li><br>


<li>[http://www.cmake.org/cmake/resources/software.html CMake]</li>
<li>[http://www.cmake.org/cmake/resources/software.html CMake]</li><br>


<li>MySQL Server
<li>MySQL Server
Line 32: Line 38:
*Current SkyFire core MySQL header version: 5.5.9
*Current SkyFire core MySQL header version: 5.5.9
*'''Do NOT download the Essentials package''' or compiling will NOT happen and you will have problems. ''As quoted on the MySQL page:''<pre>The Windows "msi-essential-*" installers do not include: Instance Manager tool, Documentation, Development headers etc.</pre>
*'''Do NOT download the Essentials package''' or compiling will NOT happen and you will have problems. ''As quoted on the MySQL page:''<pre>The Windows "msi-essential-*" installers do not include: Instance Manager tool, Documentation, Development headers etc.</pre>
*Download the 32bit version if you have a 32bit compiler and the 64bit version if you have a 64bit compiler.
*Download the 32bit version if you have a 32bit compiler or the 64bit version if you have a 64bit compiler.
*If you are just planning on updating the MySQL header source and plan on using another server or package like [http://www.wampserver.com WAMP] or [http://www.apachefriends.org/en/xampp.html XAMPP], all you need to install is '''Client C API library (shared)''' under '''Development Components''' when doing a '''Custom Setup'''.</li><br>
*If you are just planning on updating the MySQL header source and plan on using another server or package like [http://www.wampserver.com WAMP] or [http://www.apachefriends.org/en/xampp.html XAMPP], all you need to install is '''Client C API library (shared)''' under '''Development Components''' when doing a '''Custom Setup'''.</li><br>


<li>[http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en .NET Framework 3.5] (You should already have this via your Windows updates.)</li>
<li>[http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en .NET Framework 3.5] (You should already have this via your Windows updates.)</li><br>


<li>SQL Client: [http://www.heidisql.com/download.php HeidiSQL] [http://dev.mysql.com/downloads/gui-tools/5.0.html MySQL GUI Tools]
<li>SQL Client: [http://www.heidisql.com/download.php HeidiSQL] [http://dev.mysql.com/downloads/gui-tools/5.0.html MySQL GUI Tools]
Line 57: Line 63:
<p>
<p>
*If you use different PCs for compile/run SkyFireEMU, 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)<br>Microsoft Visual C++ 2008 Redistributable Package SP1 MFC Security Update [[http://www.microsoft.com/downloads/en/details.aspx?familyid=05ce856d-8128-408b-96fa-5e1f57b097d8&displaylang=en x86 / x64 / ia64]]<br>Microsoft Visual C++ 2010 Redistributable Package SP1 [[http://www.microsoft.com/downloads/details.aspx?familyid=C32F406A-F8FC-4164-B6EB-5328B8578F03&displaylang=en x86]] / [[http://www.microsoft.com/downloads/details.aspx?familyid=C68CCBB6-75EF-4C9D-A326-879EAB4FCDF8&displaylang=en x64]] / [[http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=647A8A36-A058-41A4-88B2-D4A05CC0B6B3 ia64]]
*If you use different PCs for compile/run SkyFireEMU, 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)<br>Microsoft Visual C++ 2008 Redistributable Package SP1 MFC Security Update [[http://www.microsoft.com/downloads/en/details.aspx?familyid=05ce856d-8128-408b-96fa-5e1f57b097d8&displaylang=en x86 / x64 / ia64]]<br>Microsoft Visual C++ 2010 Redistributable Package SP1 [[http://www.microsoft.com/downloads/details.aspx?familyid=C32F406A-F8FC-4164-B6EB-5328B8578F03&displaylang=en x86]] / [[http://www.microsoft.com/downloads/details.aspx?familyid=C68CCBB6-75EF-4C9D-A326-879EAB4FCDF8&displaylang=en x64]] / [[http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=647A8A36-A058-41A4-88B2-D4A05CC0B6B3 ia64]]
<br><br></p>
<br></p>


== PULLING AND COMPILING THE SOURCE  ==
== PULLING AND COMPILING THE SOURCE  ==
Line 69: Line 75:
<li>Right-click on the directory and click on '''Git GUI Here''' or open Git GUI from the Start menu</li>
<li>Right-click on the directory and click on '''Git GUI Here''' or open Git GUI from the Start menu</li>
<li>Then click '''Clone Existing Repository''' when the Git GUI dialog comes up.</li>
<li>Then click '''Clone Existing Repository''' when the Git GUI dialog comes up.</li>
<li>Fill in the data as follows:  
<li>Fill in the data as follows:</li><br>
<pre>Source Location: https://github.com/ProjectSkyFire/SkyFireEMU
 
Target Directory: C:\SkyFireEMU\Core
Source Location:
</pre></li>
<pre>git://github.com/ProjectSkyfire/SkyFireEMU.git</pre>
<li>Click on '''clone'''. Wait a few minutes (or less) and all the source files will be pulled in the directory '''C:\SkyFireEMU\Core'''.</li>
 
Target Directory:  
<pre>C:\SkyFireEMU\Core</pre>
<br>
 
<li>Click on '''Clone Existing Repository'''. Wait a few minutes (or less) and all the source files will be pulled in the directory '''C:\SkyFireEMU\Core'''.</li>
</ol></p>
</ol></p>


=== Configuring and Generating Visual C++ solutions with CMake  ===
=== Configuring and Generating Visual C++ solutions with CMake  ===
<p><ol>
<p><ol>
<li>Create a new directory in you C:\SkyFireEMU\ called "Build"
<li>Create a new directory in your '''C:\SkyFireEMU\''' called "Build".
<li>Open CMake (cmake-gui)</li>
<li>Open CMake. (cmake-gui)</li>
<li>Fill in the data as follows:  
<li>Fill in the data as follows:</li><br>
<pre>Where the the source code: C:\SkyFireEMU\Core
 
Where to build the binaries: C:\SkyFireEMU\Build</pre></li>  
Where the the source code:  
<pre>C:\SkyFireEMU\Core</pre>
 
Where to build the binaries:  
<pre>C:\SkyFireEMU\Build</pre>
<br>
 
<li>Click '''Configure'''.</li>
<li>Click '''Configure'''.</li>
<li>It should ask you if you want to create the directory, '''click yes'''.</li>
<li>It should ask you if you want to create the directory, '''click yes'''.</li>
<li>A dialog should pop up asking you what compiler you will be using. Select the appropriate compiler and select '''Use default native compilers''' then click '''Finish'''.</li>
<li>A dialog should pop up asking you what compiler you will be using. Select the appropriate compiler and select '''Use default native compilers''' then click '''Finish'''.
*NOTE: You MUST select the appropriate compiler!
**If you are using Visual Studio 2008, your compiler would be "Visual Studio 9"
**If you are using Visual Studio 2010, your compiler would be "Visual Studio 10"
**If you are using Visual Studio 2012, your compiler would be "Visual Studio 11"</li>
<li>When done, it will show you a list of options which it wants you to confirm (the top red part with the check boxes.)<br>
<li>When done, it will show you a list of options which it wants you to confirm (the top red part with the check boxes.)<br>
Go through them and check/uncheck those you want enabled/disabled (you can hover the options to see what they are used for).<br><br>
Make sure these are the ones selected:
For now we will keep it all default except '''Tools'''. Tools will provide us with the files to make our dbc, maps and vmaps.<br><br>
So we have the following selected:
<pre>
<pre>
SCRIPTS
SCRIPTS
SERVERS
SERVERS
TOOLS (If you want to make extractor.exe, vmap3assembler.exe, vmap3extractor.exe)
TOOLS
USE_COREPCH
USE_COREPCH
USE_MYSQL_SOURCES (If you are NOT updating the MySQL header sources.)
USE_MYSQL_SOURCES (If you are NOT updating the MySQL header sources.)
USE_SCRIPTPCH
USE_SCRIPTPCH
</pre>
</pre>
*'''Do not worry about setting CMAKE_INTALL_PREFIX it's not used. Just keep it at it's default value (C:/Program Files/SkyFire)'''
*'''Do not worry about setting CMAKE_INTALL_PREFIX it's not used. Just keep it at it's default value (C:/Program Files/SkyFire)'''
*'''(If you are updating MySQL header source):''' If you have installed MySQL version other than 5.5, be sure to UNCHECK the WITH_MYSQL_SOURCES option. This tells CMake to look for include files and libraries in your MySQL installation instead of using the MySQL source files provided with SkyFireEMU (which are 5.5.9). Remember, unchecking WITH_MYSQL_SOURCES requires that you have full MySQL package (not Essentials) and that your selected compiler is for the same architecture (32bit/64bit) as your MySQL. If you have 5.5.x, you need not worry - just leave WITH_MYSQL_SOURCES checked.</li>
*'''(If you are updating MySQL header source):''' If you have installed MySQL version other than 5.5, be sure to UNCHECK the WITH_MYSQL_SOURCES option. This tells CMake to look for include files and libraries in your MySQL installation instead of using the MySQL source files provided with SkyFireEMU (which are 5.5.9). Remember, unchecking WITH_MYSQL_SOURCES requires that you have full MySQL package (not Essentials) and that your selected compiler is for the same architecture (32bit/64bit) as your MySQL. If you have 5.5.x, you need not worry - just leave WITH_MYSQL_SOURCES checked.</li>
Line 108: Line 128:
=== Compiling the Source  ===
=== Compiling the Source  ===
<p><ol>
<p><ol>
<li>Open '''SkyFire.sln''' located in your build folder with your chosen compiler.</li>
<li>Open '''SkyFireEMU.sln''' located in your '''build''' folder with your chosen compiler.</li>
<li>Go on the top menu and click '''Build''' then click on '''Configuration Manager'''. Make sure you set the build to '''Release''' and to '''Win32''' or '''x64''' depending on the Operating System SkyFire will be running on and what you have set during CMake configuration.<br>
<li>Go on the top menu and click '''Build''' then click on '''Configuration Manager'''. Make sure you set the build to '''Release''' and to '''Win32''' or '''x64'''.<br>
*Warning: Visual Studio 2008/2010 Express editions do not support the 64 bit platform. You will need to install the full Visual Studio, as well as additional components to enable 64 bit support. Refer to Microsoft's website and documentation for more details.</li><br>
*Warning: Visual Studio 2008/2010 Express editions do not support the 64 bit platform. You will need to install the full Visual Studio, as well as additional components to enable 64 bit support. Refer to Microsoft's website and documentation for more details.</li><br>
<li>Now go back to the '''Build''' menu and click on '''Clean Solution'''. Unless you are just testing a compilation, it is always best to '''clean your build before compiling.''' Compilation length differs from machine to machine, you should expect it to take 15-30 minutes. </li>
<li>Now go back to the '''Build''' menu and click on '''Clean Solution'''. Unless you are just testing a compilation, it is always best to '''clean your build before compiling.''' Compilation length differs from machine to machine, you should expect it to take 15-30 minutes. </li>
*You will find the following message once the compilation has finished successfully:  
*You will find the following message once the compilation has finished successfully:  
<pre>========== Build: 19 completed, 0 failed, 0 up-to-date, 1 skipped ==========
<pre>========== Build: 22 completed, 0 failed, 0 up-to-date, 1 skipped ==========
</pre>
</pre>
*'''Do not worry if you get something like 5823 warnings from vmap3extractor and extractor.'''
*You will find your freshly compiled binaries in your '''C:\SkyFireEMU\Build\bin\Release''' folder:  
*You will find your freshly compiled binaries in your '''C:\SkyFireEMU\Build\bin\Release''' folder.
*You will need the following files in order for the core to function properly:  
<pre>ace.dll
<pre>ace.dll
authserver.conf.dist
authserver.conf.dist
Line 124: Line 142:
worldserver.conf.dist
worldserver.conf.dist
worldserver.exe
worldserver.exe
</pre>
</pre><br>
 
<li>Cut and Paste these files from '''C:\SkyFireEMU\Build\bin\Release''' to where ever your server will be runned from.<br>For demonstration\instruction purposes, we will move them to '''C:\SkyFireEMU\Server\'''. Leave the rest there for now.<br></li>


*The following files will only be needed to make the dbc, maps and vmaps:
<li>Rename authserver.conf.dist to authserver.conf and worldserver.conf.dist to worldserver.conf<br>These are your config files. Go through and edit each one to match your prefered settings.</li><br>
<pre>extractor.exe
vmap3assembler.exe
vmap3extractor.exe
</pre>
*Delete any other file which is not in the above lists, you will not need them.<br><br>


<li>Move the files from both lists to where ever your server will be runned from.<br>For demonstration\instruction purposes, we will move them to C:\SkyFireEMU\Server\<br>
*You may delete C:\SkyFireEMU\Build after you've move the files if you'd like.</li>
<br>
<li>Rename authserver.conf.dist to authserver.conf and worldserver.conf.dist to worldserver.conf<br>These are your config files. Go through and edit each one to match your prefered settings.</li>
<li>You will also need '''libeay32.dll''' & '''ssleay32.dll''' to run your server.
<li>You will also need '''libeay32.dll''' & '''ssleay32.dll''' to run your server.
This file is found in your '''OpenSSL folder''' which is usually located '''C:\OpenSSL-Win*'''<br>Just copy and paste '''libeay32.dll''' & '''ssleay32.dll''' along with your other files in your '''C:\SkyFireEMU\Server''' folder.</li>
This file is found in your '''OpenSSL folder''' which is usually located '''C:\OpenSSL-Win*'''<br>Just copy and paste '''libeay32.dll''' & '''ssleay32.dll''' along with your other files in your '''C:\SkyFireEMU\Server''' folder.</li><br>
 
<li>'''(If you are updating MySQL header source):''' You will also need '''libmysql.dll''' to run your server.
<li>'''(If you are updating MySQL header source):''' You will also need '''libmysql.dll''' to run your server.
This file is found in your '''MySQL folder''' which is usually located '''C:\Program Files*\MySQL\MySQL Server *\lib'''<br>Just copy and paste '''libmysql.dll''' along with your other files in your '''C:\SkyFireEMU\Server''' folder.</li>
This file is found in your '''MySQL folder''' which is usually located '''C:\Program Files*\MySQL\MySQL Server *\lib'''<br>Just copy and paste '''libmysql.dll''' along with your other files in your '''C:\SkyFireEMU\Server''' folder.</li><br>
</ol></p>
</ol></p>


Line 149: Line 161:
<li>Simply right-click on your '''C:\SkyFireEMU\Core''' folder and click on '''Git GUI Here'''.</li>
<li>Simply right-click on your '''C:\SkyFireEMU\Core''' folder and click on '''Git GUI Here'''.</li>
<li>Click on the '''Remote>Fetch from>origin''' when you see green line with text '''success''' hit '''Close'''.</li>
<li>Click on the '''Remote>Fetch from>origin''' when you see green line with text '''success''' hit '''Close'''.</li>
<li>Then Click on the '''Merge>Local Merge...''' when you see the green line with text '''success''' hit '''Close'''!</li>
<li>Then Click on the '''Merge>Local Merge...''' another window will popup, choose '''origin/master'''. When you see the green line with text '''success''' hit '''Close'''!</li>
</ol>
</ol>


*Now you can repeat the compiling procedure above.<br>
*Now you can repeat the compiling procedure above.<br>
*<u>'''And remember to clean your build everytime!'''</u>
*<u>'''And remember to clean your build everytime!'''</u>
<br>
<br></p>
<br></p>


Line 173: Line 184:
==== Importing Auth and Characters Databases ====
==== Importing Auth and Characters Databases ====
<p>Using your chosen SQL Client,
<p>Using your chosen SQL Client,
import both the auth_database.sql and characters_database.sql files located in '''C:\SkyFireEMU\Core\<u>sql\base</u>''' to their respective places in your MySQL database.
import both the '''auth_database.sql''' and '''characters_database.sql''' files located in '''C:\SkyFireEMU\Core\<u>sql\base</u>''' to their respective places in your MySQL database.</p>
*'''DO NOT IMPORT WORLD_DATABASE.SQL FROM THIS DIRECTORY UNLESS YOU WANT A COMPLETELY BLANK WORLD.'''</p>
 


==== Importing World Database ====
==== Importing World Database ====
<p><ol>
<p><ol>
<li>Open '''Database_Installer_Updater.bat''' found in '''C:\SkyFireEMU\Core\<u>database</u>'''</li>
----
 
Grab the latest version of SkyFireDB using Git Extensions or Git Gui:
 
<pre>git://github.com/ProjectSkyfire/SkyFireDB.git</pre>
 
This will create a directory called SkyFireDB that will contain the world database files that the server will need.
<li>Open '''Database_Installer_Updater.bat''' found in '''SkyFireDB'''</li>
<li>Follow the dialog and enter in your info.</li>
<li>Follow the dialog and enter in your info.</li>


Line 187: Line 205:
MySQL Password: pass
MySQL Password: pass


World Database: world
World Database: World
</pre></li>
</pre></li>
<li>Press '''1''' to install the World Database and all current updates when asked.</li>
<li>Press '''1''' to install the World Database and all current updates when asked.</li>
Line 214: Line 232:


=== Auth Database Accounts and Passwords ===
=== Auth Database Accounts and Passwords ===
<p>It is '''highly advised''' you change the passwords or delete these accounts
<p>It is '''highly advised''' you change the passwords or delete these accounts.
*'''NOTE''': These may not exist.
<pre>User: Administrator
<pre>User: Administrator
Pass: Administrator
Pass: Administrator
Line 245: Line 264:
**You can only add Administrator (gmlevel 4) with your SQL client
**You can only add Administrator (gmlevel 4) with your SQL client
*RealmID is usually 1 or -1 for all realms
*RealmID is usually 1 or -1 for all realms
<br>
<br></p>
<br></p>


== DBC, MAPS AND VMAPS ==
== DBC, MAPS, VMAPS, and MMAPS ==
<p>
<p>
*You can also download a copy of these tools which are already compiled from https://github.com/ProjectSkyfire/SkyFire-Community-Tools<br><br>
*'''Project Skyfire, for legal reasons, CANNOT and will NOT provide download links to already extracted DBCs, MAPS, VMAPS, or MMAPS... so please do NOT ask!'''
<ol>
*We will, however, help you through the extraction process with step-by-step instructions
<li>'''Before you begin to do anything,''' make sure you change '''SET accounttype "<u>LK</u>"''' to '''SET accounttype "<u>CT</u>"''' in your '''Config.wtf & launcher.wtf''' files located in your WTF folder. It's usually found '''C:\Program Files (x86)\World of Warcraft\WTF'''
*'''NOTE: Contrary to popular belief, your client does NOT have to have been on the live server to extract DBCs, MAPS, VMAPS, or MMAPS.'''
*'''Then run launcher.exe and allow it to update your data files to the Cataclysm expansion, must download fully.'''
<ol></li><br>
*If you still have problems delete your whole WTF folder and rerun launcher to generate both .wtf files again then redo the whole step above.
 
<li>Move extractor.exe, vmap3assembler.exe and vmap3extractor.exe to your wow directory (C:\Program Files (x86)\World of Warcraft)</li>
<li>The '''VERY FIRST THING''' you need is a WoW client fully patched to version 4.0.6a (build 13623)
<li>Open a command prompt to your wow directory (cd C:\Program Files (x86)\World of Warcraft)</li>
*'''NOTE:''' Your client has NOT been fully patched unless you have completed the following steps:
</ol></p>
**Ensure your '''config.wtf''' AND '''launcher.wtf''' are set at '''SET accounttype "<u>CT</u>"''', NOT "<u>LK</u>".
**'''Then run launcher.exe and allow it to update your data files to the Cataclysm expansion, must download fully.'''
**'''DO NOT ALLOW THE LAUNCHER TO BEGIN DOWNLOADING THE NEXT PATCH... CLOSE IMMEDIATELY AFTER DOWNLOADING TOOLS!'''
**If you still have problems delete your whole WTF folder and rerun launcher to generate both .wtf files again then redo the whole step above.</li><br>
 
<li>Copy and Paste '''extractor.exe''', '''vmap3assembler.exe''', '''vmap3extractor.exe''', '''ace.dll''', '''Simple_Extractor.bat''', and '''mmaps_generator.exe''' from '''C:\SkyFireEMU\Build\bin\Release''' to your wow directory (C:\Program Files (x86)\World of Warcraft)</li><br>
 
<li>Locate your '''bin''' file in your '''MySQL installation directory''' (Example: C:\Program Files\MySQL\MySQL Server 5.5\lib\ OR C:\Program Files(x86)\MySQL\MySQL Server 5.5\lib\ if you have a 32 bit MySQL installed on an 64 bit system).
*Locate file named '''"libmysql.dll"'''.
*Copy this file and Paste it into your wow directory (ONLY COPY, do NOT move this file!).
</ol>
<br></p>


=== dbc and maps ===
=== Manual Extraction Method ===
<p><ol>
<p><ol>
<li>Open a command prompt to your wow directory (cd C:\Program Files (x86)\World of Warcraft).</li>
*To open a command prompt hold down shift and right-click inside the folder and then select: Open command window here. </li><br>
<u><b>Dbc and Maps:</b></u>
<li>In your command prompt type '''extractor.exe''' and hit enter.</li>
<li>In your command prompt type '''extractor.exe''' and hit enter.</li>
<li>Wait until finished.</li>
<li>Wait until finished.</li>
<li>It should have made two new directories, '''dbc''' and '''maps'''.</li>
<li>It should have made two new directories, '''dbc''' and '''maps'''.</li><br>
<li>Move both of these folders to your Server folder/machine. (C:\SkyFireEMU\Server if you have been following from above.)</li>
<u><b>VMaps:</b></u>
</ol></p>
 
=== vmaps ===
<p><ol>
<li>In your command prompt type '''vmap3extractor.exe''' and hit enter.</li>
<li>In your command prompt type '''vmap3extractor.exe''' and hit enter.</li>
<li>Wait until finished.</li>
<li>Wait until finished.</li>
<li>It should have made a new directory named '''Buildings'''.</li>
<li>It should have made a new directory named '''Buildings'''.</li>
<li>In your command prompt type '''mkdir vmaps''' or simply make a '''new folder''' and rename it to '''vmaps'''.</li>
<li>In your command prompt type '''mkdir vmaps''' (or simply make a '''new folder''' and rename it to '''vmaps''').</li>
<li>Then in your command prompt again, type '''vmap3assembler.exe Buildings vmaps''' and hit enter.</li>
<li>Then in your command prompt again, type '''vmap3assembler.exe Buildings vmaps''' and hit enter.</li>
<li>Wait until finished.</li>
<li>Wait until finished.</li>
<li>Move your '''vmaps''' folder to your Server folder/machine where your '''dbc''' and '''maps''' folder are. (Again, C:\SkyFireEMU\Server if you have been following from above.)</li>
<li>It should have made a new directory, '''vmaps'''.</li><br>
</ol><br>
<u><b>MMaps:</b></u>
*You may delete your '''Buildings''' folder if you want. It is not needed.
<li>Move the entire contents of your '''buildings''' folder into your '''vmaps''' folder ('''The contents <u>ONLY</u>'''. You do NOT want the folder named '''buildings''' inside your '''vmaps''' folder).</li>
<br>
<li>You may now Delete the empty '''buildings''' folder.</li>
<li>Create a new folder named '''mmaps'''.</li>
<li>Now execute the '''mmaps_generator.exe'''.
*'''NOTE''': The generation of mmaps will take anywhere from 4 hours to 20 or MORE hours depending upon the speed of your machine. Please consider this before starting the mmaps generating!</li>
</ol>
<br></p>
 
=== Completion (For Both Methods) ===
<p><ol>
<li>Move folders named '''mmaps''', '''vmaps''', '''dbc''', '''maps''', as well as the '''"libmysql.dll"''' to your server directory (where your worldserver.exe will be ran from).</li>
<li>You may now delete files '''extractor.exe''', '''vmap3assembler.exe''', '''vmap3extractor.exe''', '''ace.dll''', '''Simple_Extractor.bat''', and '''mmaps_generator.exe''' from your WoW installation directory as you should no longer need them.</li>
</ol>
<br></p>
<br></p>


Line 285: Line 324:
</p>
</p>


=== Pulling ===
=== Patching ===
<p>You should be an expert with pulling sources by now. So just do the same thing here.
Pull the latest version of SkyFire-Community-Tools from
https://github.com/SkyFire/SkyFire-Community-Tools
<pre>git://github.com/ProjectSkyfire/SkyFire-Community-Tools.git</pre>
*The patcher is already pre-compiled in directory: ''''..\SkyFire Patcher\406a'''. So after you pull, you can skip the compiling steps below.
You now have what you need to patch your wow. Choose one of the methods below to patch your wow.
</p>
<br>
 
=== Pre-Patched Method (Easy Method)===
<p>Open SkyFire-Community-Tools\SkyFire Patcher\ and skip to '''Moving and Patching'''.
</p><br>


=== Compile ===
=== Manuel Compile Method (Not really needed but will keep this for now)===
<p>
<p>
*'''Note: The patcher is made in C# and not C++. You need a C# compiler to compile it.'''
*'''Note: The patcher is made in C# and not C++. You need a C# compiler to compile it.'''
Line 306: Line 349:
</p>
</p>


=== Keeping the code up to date ===
<p>Again, you should be an expert by now with this pulling the source stuff. It's basically the same thing.</p>
=== Moving and Patching ===
<p>
<p>
*After you compiled it, you should have SkyFirePatcher.exe in your '''..Sources\Patcher\SkyFirePatcher\bin\Release''' folder.<br>(You can delete the rest if you like.)
*After you compiled it, you should have SkyFirePatcher.exe in your '''..Sources\Patcher\SkyFirePatcher\bin\Release''' folder.<br>(You can delete the rest if you like.)
</p>
</p>
==== Keeping the code up to date ====
<p>Again, you should be an expert by now with this pulling the source stuff. It's basically the same thing.</p><br>
=== Moving and Patching ===
<ol>
<ol>
<li>Move SkyFirePatcher.exe into your Wow directory.<br>(Usually something like C:\Program Files (x86)\World of Warcraft)</li>
<li>Move SkyFirePatcher.exe into your Wow directory.<br>(Usually something like C:\Program Files (x86)\World of Warcraft)</li><br>


<li>Now run SkyFirePatcher.exe and a dialog should pop up with:
<li>Now run SkyFirePatcher.exe and a dialog should pop up with:
Line 320: Line 364:
Success!
Success!
Ready to patch Wow.exe.</pre>
Ready to patch Wow.exe.</pre>
And "Status: Ready!" at the bottom.</li>
And "Status: Ready!" at the bottom.</li><br>


<li>Click "Patch" at the bottom to patch your Wow.exe<br>
<li>Click "Patch" at the bottom to patch your Wow.exe<br>
It will make a backup of your original Wow.exe as well. (Something like wow-original.exe)</li>
It will make a backup of your original Wow.exe as well. (Something like wow-original.exe)</li><br>
</ol>
</ol>
=== Play! ===
=== Play! ===
*Use your new patched Wow.exe file to play on your server and the backed up original Wow.exe to play to retail.
*Use your new patched Wow.exe file to play on your server and the backed up original Wow.exe to play on retail.
<br>
<br>
<br>
<br>

Latest revision as of 11:56, 5 January 2013


INTRODUCTION

Before you get scared by this long guide, we assure you the procedure is quite simple. Most of the following steps are to be performed only the first time you install SkyFireEMU and only the SkyFireEMU updating procedures will need to be run from time to time.

After the first few times everyone gets used to the procedure and never needs to look at this guide ever again.


Software Required

  1. Git
    You can also use TortoiseGit that is more compatible with Windows (8).
    TortoiseGIT

  2. C++/C# Compiler: Visual Studio 2008 Express / Visual Studio 2010 Express (Both free)
    • Beware, Express editions do not support 64-bit compilation by default and making them do so is arduous at best.
    • You will need C++ for the Core and C# for the wow.exe patcher. (The patcher is now pre-compiled if you do not want to install C#)
    • NOTE: Currently there is a bug with CMake & Some Versions of Visual Studio 2010. If you experience problems (errors) with CMake Configure using VS 2010, it might be better to use the 2008 OR 2012 version.
      • For Visual Studios 2012 Express (Recommended for Beginners), download here Visual Studio 2012 Express.
      • You will need to select the best option for your platform (most likely "Visual Studio 2012 Express for Windows Desktop").
      • Once Installed, you will be required to register the software or the program will only work for 30 days.
      • NOTE: Currently Visual Studios 2012 does NOT support C++ Compiling for Windows XP Environment. This means if you compile on your Windows 7 Machine, the server will NOT operate on your Windows XP Machine!.

  3. OpenSSL
    • Do NOT use the light version!
    • Download the 32bit version if you have a 32bit compiler or the 64bit bit version if you have a 64bit compiler.
    Note: If you have a 32-bit compiler, but a 64-bit OS and use the OpenSSL MSI installer for 32-bit, you will need to use the "?:\Program Files\OpenSSL" directory instead of the default "?:\Program Files (x86)\OpenSSL" setting in the installer.
    • You may have to download and install one of the Microsoft Visual C++ Redistributable Packages for OpenSSL to work.

  4. CMake

  5. MySQL Server
    • You can use MySQL Community Server or third party packages such as WAMP or XAMPP
    • It's recommended that your MySQL server and the MySQL header source versions match.
    • Current SkyFire core MySQL header version: 5.5.9
    • Do NOT download the Essentials package or compiling will NOT happen and you will have problems. As quoted on the MySQL page:
      The Windows "msi-essential-*" installers do not include: Instance Manager tool, Documentation, Development headers etc.
    • Download the 32bit version if you have a 32bit compiler or the 64bit version if you have a 64bit compiler.
    • If you are just planning on updating the MySQL header source and plan on using another server or package like WAMP or XAMPP, all you need to install is Client C API library (shared) under Development Components when doing a Custom Setup.

  6. .NET Framework 3.5 (You should already have this via your Windows updates.)

  7. SQL Client: HeidiSQL MySQL GUI Tools
    • DO NOT USE NAVICAT: Due to NaviCat not being able to handle // style comments (standard SQL), we advice all users to stay VERY clear of the product - you have been warned.


Software Recommended

git command help:

  • gitextensions
    • most popular with the community
  • tortoisegit
    • Makes pulling and cloning sources easier with right mouse clicks.
    • Also adds symbols over your folder and file icons to indicate if your source is inaccurate.
    • Note: You still need to install Git for this to work.


Microsoft Visual C++ Redistributable Packages

  • If you use different PCs for compile/run SkyFireEMU, 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)
    Microsoft Visual C++ 2008 Redistributable Package SP1 MFC Security Update [x86 / x64 / ia64]
    Microsoft Visual C++ 2010 Redistributable Package SP1 [x86] / [x64] / [ia64]


PULLING AND COMPILING THE SOURCE

  • Before you start this phase you need to have installed Git, OpenSSL, CMake, Visual Studio, .NET Framework 3.5 (if needed) and MySQL (If you are updating the MySQL Header Source.)

Pulling the Source

  1. Create a directory in which Core files will be pulled (for example: C:\SkyFireEMU).
  2. Right-click on the directory and click on Git GUI Here or open Git GUI from the Start menu
  3. Then click Clone Existing Repository when the Git GUI dialog comes up.
  4. Fill in the data as follows:

  5. Source Location:
    git://github.com/ProjectSkyfire/SkyFireEMU.git

    Target Directory:

    C:\SkyFireEMU\Core


  6. Click on Clone Existing Repository. Wait a few minutes (or less) and all the source files will be pulled in the directory C:\SkyFireEMU\Core.

Configuring and Generating Visual C++ solutions with CMake

  1. Create a new directory in your C:\SkyFireEMU\ called "Build".
  2. Open CMake. (cmake-gui)
  3. Fill in the data as follows:

  4. Where the the source code:
    C:\SkyFireEMU\Core

    Where to build the binaries:

    C:\SkyFireEMU\Build


  5. Click Configure.
  6. It should ask you if you want to create the directory, click yes.
  7. A dialog should pop up asking you what compiler you will be using. Select the appropriate compiler and select Use default native compilers then click Finish.
    • NOTE: You MUST select the appropriate compiler!
      • If you are using Visual Studio 2008, your compiler would be "Visual Studio 9"
      • If you are using Visual Studio 2010, your compiler would be "Visual Studio 10"
      • If you are using Visual Studio 2012, your compiler would be "Visual Studio 11"
  8. When done, it will show you a list of options which it wants you to confirm (the top red part with the check boxes.)
    Make sure these are the ones selected:
    SCRIPTS
    SERVERS
    TOOLS
    USE_COREPCH
    USE_MYSQL_SOURCES (If you are NOT updating the MySQL header sources.)
    USE_SCRIPTPCH
    
    • Do not worry about setting CMAKE_INTALL_PREFIX it's not used. Just keep it at it's default value (C:/Program Files/SkyFire)
    • (If you are updating MySQL header source): If you have installed MySQL version other than 5.5, be sure to UNCHECK the WITH_MYSQL_SOURCES option. This tells CMake to look for include files and libraries in your MySQL installation instead of using the MySQL source files provided with SkyFireEMU (which are 5.5.9). Remember, unchecking WITH_MYSQL_SOURCES requires that you have full MySQL package (not Essentials) and that your selected compiler is for the same architecture (32bit/64bit) as your MySQL. If you have 5.5.x, you need not worry - just leave WITH_MYSQL_SOURCES checked.
  9. Click on Configure again to verify your selection. (Most of the red should now go away.)
  10. Click on Generate and it will start chugging away and creating the solutionfiles/projectfiles/makefiles it requires to build for that specific compiler.
  11. When done, it'll state "Generating done"
  12. Close CMake and continue below with Compiling the Source.

Compiling the Source

  1. Open SkyFireEMU.sln located in your build folder with your chosen compiler.
  2. Go on the top menu and click Build then click on Configuration Manager. Make sure you set the build to Release and to Win32 or x64.
    • Warning: Visual Studio 2008/2010 Express editions do not support the 64 bit platform. You will need to install the full Visual Studio, as well as additional components to enable 64 bit support. Refer to Microsoft's website and documentation for more details.

  3. Now go back to the Build menu and click on Clean Solution. Unless you are just testing a compilation, it is always best to clean your build before compiling. Compilation length differs from machine to machine, you should expect it to take 15-30 minutes.
    • You will find the following message once the compilation has finished successfully:
    ========== Build: 22 completed, 0 failed, 0 up-to-date, 1 skipped ==========
    
    • You will find your freshly compiled binaries in your C:\SkyFireEMU\Build\bin\Release folder:
    ace.dll
    authserver.conf.dist
    authserver.exe
    libmysql.dll (If you did NOT update the header source.)
    worldserver.conf.dist
    worldserver.exe
    

  4. Cut and Paste these files from C:\SkyFireEMU\Build\bin\Release to where ever your server will be runned from.
    For demonstration\instruction purposes, we will move them to C:\SkyFireEMU\Server\. Leave the rest there for now.
  5. Rename authserver.conf.dist to authserver.conf and worldserver.conf.dist to worldserver.conf
    These are your config files. Go through and edit each one to match your prefered settings.

  6. You will also need libeay32.dll & ssleay32.dll to run your server. This file is found in your OpenSSL folder which is usually located C:\OpenSSL-Win*
    Just copy and paste libeay32.dll & ssleay32.dll along with your other files in your C:\SkyFireEMU\Server folder.

  7. (If you are updating MySQL header source): You will also need libmysql.dll to run your server. This file is found in your MySQL folder which is usually located C:\Program Files*\MySQL\MySQL Server *\lib
    Just copy and paste libmysql.dll along with your other files in your C:\SkyFireEMU\Server folder.

Keeping the code up to date

SkyFireEMU Developers are always at work fixing and adding new features to the core so it's best you keep up to date with the code.

  1. Simply right-click on your C:\SkyFireEMU\Core folder and click on Git GUI Here.
  2. Click on the Remote>Fetch from>origin when you see green line with text success hit Close.
  3. Then Click on the Merge>Local Merge... another window will popup, choose origin/master. When you see the green line with text success hit Close!
  • Now you can repeat the compiling procedure above.
  • And remember to clean your build everytime!


IMPORTING THE DATABASE

  • Before you start this phase you need to have installed a SQL Client and you should also have installed and set up your MySQL server and made an user account for SkyFireEMU with proper permissions to access and write data.

Creating Auth, Characters and World Databases

Using your chosen SQL Client, create the three Databases.

  1. Auth
  2. Characters
  3. World
  • Doing this may prevent importing problems later.

Importing Auth and Characters Databases

Using your chosen SQL Client, import both the auth_database.sql and characters_database.sql files located in C:\SkyFireEMU\Core\sql\base to their respective places in your MySQL database.


Importing World Database


    Grab the latest version of SkyFireDB using Git Extensions or Git Gui:

    git://github.com/ProjectSkyfire/SkyFireDB.git

    This will create a directory called SkyFireDB that will contain the world database files that the server will need.

  1. Open Database_Installer_Updater.bat found in SkyFireDB
  2. Follow the dialog and enter in your info.
  3. Example:
    MySQL Server Address (e.g. localhost):localhost
    
    MySQL Username: root
    MySQL Password: pass
    
    World Database: World
    
  4. Press 1 to install the World Database and all current updates when asked.
  5. Wait for the installer to do it's magic. After it is done, press any key to go back to the main menu.
  6. Install locals if you want.
  7. Press X to exit.

Done!

Importing Important Database Structure Updates

  1. Go into your C:\SkyFireEMU\core\sql\updates directory.
  2. Apply updates to their appropriate corresponding databases using your chosen SQL client.

Importing World Database Updates

  1. Open Database_Installer_Updater.bat found in C:\SkyFireEMU\Core\database
  2. Follow the dialog and enter in your info like you did before.
  3. Press U to import the World Database updates when asked.
  4. Select the correct changesets needed.
  • Or.. if you are a "pro" use your SQL client and import needed changes from C:\SkyFireEMU\Core\database\updates

Auth Database Accounts and Passwords

It is highly advised you change the passwords or delete these accounts.

  • NOTE: These may not exist.
User: Administrator
Pass: Administrator

User: Moderator
Pass: Moderator

User: Developer
Pass: Developer

User: Gamemaster
Pass: Gamemaster

User: Player
Pass: Player

Changing passwords

You can change a password to an account simply by going to your Worldserver console and type

account set password <accountname> <newpassword> <newpassword>

Deleting accounts

You can delete an account simply by going to your Worldserver console and type

account delete <accountname>

Making new accounts

You can make a new account simply by going to your Worldserver console and type

account create <accountname> <password>

Raising an account's access/GM level

You can raise an account level simply by going to your Worldserver console and type

account set gmlevel <accountname> <gmlevel> <realmid>

Or you can go into your Auth database via your SQL Client, select account_access and add a new line.

  • id=your account id found under accounts
  • GM/Access Levels: 0=Regular player, 1=Gamemaster, 2=Developer, 3=Moderator, 4=Administrator
    • You can only add Administrator (gmlevel 4) with your SQL client
  • RealmID is usually 1 or -1 for all realms


DBC, MAPS, VMAPS, and MMAPS

  • Project Skyfire, for legal reasons, CANNOT and will NOT provide download links to already extracted DBCs, MAPS, VMAPS, or MMAPS... so please do NOT ask!
  • We will, however, help you through the extraction process with step-by-step instructions
  • NOTE: Contrary to popular belief, your client does NOT have to have been on the live server to extract DBCs, MAPS, VMAPS, or MMAPS.

  1. The VERY FIRST THING you need is a WoW client fully patched to version 4.0.6a (build 13623)
    • NOTE: Your client has NOT been fully patched unless you have completed the following steps:
      • Ensure your config.wtf AND launcher.wtf are set at SET accounttype "CT", NOT "LK".
      • Then run launcher.exe and allow it to update your data files to the Cataclysm expansion, must download fully.
      • DO NOT ALLOW THE LAUNCHER TO BEGIN DOWNLOADING THE NEXT PATCH... CLOSE IMMEDIATELY AFTER DOWNLOADING TOOLS!
      • If you still have problems delete your whole WTF folder and rerun launcher to generate both .wtf files again then redo the whole step above.

  2. Copy and Paste extractor.exe, vmap3assembler.exe, vmap3extractor.exe, ace.dll, Simple_Extractor.bat, and mmaps_generator.exe from C:\SkyFireEMU\Build\bin\Release to your wow directory (C:\Program Files (x86)\World of Warcraft)

  3. Locate your bin file in your MySQL installation directory (Example: C:\Program Files\MySQL\MySQL Server 5.5\lib\ OR C:\Program Files(x86)\MySQL\MySQL Server 5.5\lib\ if you have a 32 bit MySQL installed on an 64 bit system).
    • Locate file named "libmysql.dll".
    • Copy this file and Paste it into your wow directory (ONLY COPY, do NOT move this file!).


Manual Extraction Method

  1. Open a command prompt to your wow directory (cd C:\Program Files (x86)\World of Warcraft).
    • To open a command prompt hold down shift and right-click inside the folder and then select: Open command window here.

    Dbc and Maps:
  2. In your command prompt type extractor.exe and hit enter.
  3. Wait until finished.
  4. It should have made two new directories, dbc and maps.

  5. VMaps:
  6. In your command prompt type vmap3extractor.exe and hit enter.
  7. Wait until finished.
  8. It should have made a new directory named Buildings.
  9. In your command prompt type mkdir vmaps (or simply make a new folder and rename it to vmaps).
  10. Then in your command prompt again, type vmap3assembler.exe Buildings vmaps and hit enter.
  11. Wait until finished.
  12. It should have made a new directory, vmaps.

  13. MMaps:
  14. Move the entire contents of your buildings folder into your vmaps folder (The contents ONLY. You do NOT want the folder named buildings inside your vmaps folder).
  15. You may now Delete the empty buildings folder.
  16. Create a new folder named mmaps.
  17. Now execute the mmaps_generator.exe.
    • NOTE: The generation of mmaps will take anywhere from 4 hours to 20 or MORE hours depending upon the speed of your machine. Please consider this before starting the mmaps generating!


Completion (For Both Methods)

  1. Move folders named mmaps, vmaps, dbc, maps, as well as the "libmysql.dll" to your server directory (where your worldserver.exe will be ran from).
  2. You may now delete files extractor.exe, vmap3assembler.exe, vmap3extractor.exe, ace.dll, Simple_Extractor.bat, and mmaps_generator.exe from your WoW installation directory as you should no longer need them.


SKYFIRE WOW.EXE PATCHER

Your Wow.exe client will be needed to be patched before you can properly connect to your server.

Patching

Pull the latest version of SkyFire-Community-Tools from

git://github.com/ProjectSkyfire/SkyFire-Community-Tools.git

You now have what you need to patch your wow. Choose one of the methods below to patch your wow.

Pre-Patched Method (Easy Method)

Open SkyFire-Community-Tools\SkyFire Patcher\ and skip to Moving and Patching.


Manuel Compile Method (Not really needed but will keep this for now)

  • Note: The patcher is made in C# and not C++. You need a C# compiler to compile it.
  • You will not need CMake for this.
  1. Open SkyFirePatcher.sln (located in ..Sources\Patcher) with C#.
  2. Select "Release"
  3. The platform should be "Any" (No separate 32/64 bit versions.)
  4. Clean
  5. Build. (This should take less than a minute.)
  • Do not worry if you get an error like:
    ..Sources\Patcher\SkyFirePatcher\Form1.cs(20,13): warning CS0414: The field 'SkyFirePatcher.Form1.exeLength' is assigned but its value is never used

  • After you compiled it, you should have SkyFirePatcher.exe in your ..Sources\Patcher\SkyFirePatcher\bin\Release folder.
    (You can delete the rest if you like.)

Keeping the code up to date

Again, you should be an expert by now with this pulling the source stuff. It's basically the same thing.


Moving and Patching

  1. Move SkyFirePatcher.exe into your Wow directory.
    (Usually something like C:\Program Files (x86)\World of Warcraft)

  2. Now run SkyFirePatcher.exe and a dialog should pop up with:
    Loading Wow.exe into memory...
    Success!
    Ready to patch Wow.exe.
    And "Status: Ready!" at the bottom.

  3. Click "Patch" at the bottom to patch your Wow.exe
    It will make a backup of your original Wow.exe as well. (Something like wow-original.exe)

Play!

  • Use your new patched Wow.exe file to play on your server and the backed up original Wow.exe to play on retail.




References

http://www.trinitycore.org/w/How-to:Win

http://wiki.cactusemu.com/index.php?title=Installation_%28Windows%29

Video tutorial: Pulling core repository with TortoiseGit

Video tutorial: CMake x64

Video tutorial: Compiling x64

Video tutorial: Importing the databases and structure updates

Video tutorial: dbc, map and vmaps