Installation (Windows Clang)

From Project Skyfire
Revision as of 04:36, 5 August 2024 by Aridev (talk | contribs) (→‎Software Required)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


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. Install Visual Studio Code [1].

  3. Install Clang for Windows [2].

  4. Download Ninja Build System and move it to "C:/Ninja/ninja.exe" [3].

  5. MySQL Server
    • You can use MySQL Community Server 8.0.X 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: 8.0.X
    • Download MySQL Installer. Be sure to install the development libraries else your core will not compile.
    • 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.


Microsoft Visual Studio Code

Start by installing Visual Studio Code Extensions:

  • C/C++
  • CMake-Tools
  • Next step is to set your generator and MAKE PROGRAM in Visual Studio Code, Open User Settings JSON file and set your generator and MAKE PROGRAM to Ninja.

        "cmake.generator": "Ninja",
        "cmake.configureArgs":  [  "-DCMAKE_MAKE_PROGRAM=C:/Ninja/ninja.exe" ],
    

    PULLING AND COMPILING THE SOURCE

    Pulling the Source

    1. Create a directory in which Core files will be pulled (for example: C:\SkyFire_548).
    2. Right-click on the directory and click on Git Bash Here
    3. Fill in the data as follows:

    4. git clone -b main https://codeberg.org/ProjectSkyfire/SkyFire_548.git


    5. Press Enter to Clone Existing Repository. Wait a few minutes (or less) and all the source files will be pulled in the directory C:\SkyFire_548.

    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_5xx from our release repository:

      https://github.com/ProjectSkyfire/database/releases
      Import the DB into your world table. Will update this method shortly

      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

      https://codeberg.org/ProjectSkyfire/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.