Compiling:OS X

From ArcEmu-Wiki
Revision as of 05:53, 13 November 2011 by 0x4A42 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ArcEmu currently ONLY supports: 3.3.5a 12340 June 29, 2010


Contents

Mac OS X

Note: This how-to is incomplete

Note: Currently building on OS X is broken, the Lua engines cannot be built. So if it fails for you too, just disable it in CMake and don't build it! We are working on it!


Requirements:

  • MySQL


  • - MySQL puts the sock file in /tmp/mysql.sock. many *nix programs are looking for it in /var/mysql/mysql.sock. To fix execute:
   sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

If you get the error "ln: /var/mysql/mysql.sock: No such file or directory" then you must first create the mysql directory like so:

   sudo mkdir /var/mysql
  • - MySQL also needs its own little bash profile line added. Execute this command in terminal:
    export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
  • XCode and other Dev tools installed from Mac OSX DVD, or the Apple developer site
  • PHP and Apache (both built in to mac)
  • MacPorts [1] (recommended but not fully required, it makes getting missing items a lot easier)
  • PCRE library
 ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
 http://sourceforge.net/projects/pcre/files/

If any of the links are dead, just search for the name of the projects using a search engine like Google, Bing, Yahoo, etc.

Getting the sources

  • Make a directory for Arcemu, for example:
 mkdir arcemu ; cd arcemu
  • Check out the source code using GIT
git clone git://github.com/arcemu/arcemu.git code

Building

building and installing PCRE

  • Extract the contents of the PCRE package to some directory
  • Enter the directory
  • If you are on a 64bit system then just type
 ./configure

otherwise you will have to type

 CFLAGS=" -m32" CXXFLAGS=" -m32" ./configure
  • Start to build with
 make
  • Finally when it's done, install it
 sudo make install


building Arcemu

  • Go to the directory where you checked out the sources
    cd /path/to/your/source/

( /path/to/your/source is the path to the Arcemu directory, in my case it's /Users/dfighter/arcemu )

  • Create a build folder, where you will build
    mkdir build ; cd build
  • Generate the makefiles with CMake
    cmake -DCMAKE_INSTALL_PREFIX=/YOUR/DIRECTORY/HERE/ ../code/cmake

( /YOUR/DIRECTORY/HERE/ is the directory where after building Arcemu you will want the system to copy the files, in my case it's /Users/dfighter/arc335a )


Ico info.png This will configure Arcemu to be built using the default configuration, which is fine for most people, however if you'd like to customize it more take a look at CMake



  • Start the build
    make
  • When it's done, unless you got an error and it failed, install the files
    make install

Setup

~ DBC Extraction ~

Ico info.png DBC Extraction is now on its OWN page. Please come back to THIS page when you are done extracting DBCs!


To extract DBCs, follow the guide on the page below. The precompiled linux native executable should work on Macs.

Compiling:_DBC_Extraction


~ Map Extraction

  • Place ad.exe into the client's root directory. ("/Applications/World of Warcraft/")
  • Create a subdirectory called 'maps'. ("/Applications/World of Warcraft/maps")
  • Using the Terminal type,
    cd /Applications/World\ of\ Warcraft
    wine ./ad.exe

if you get a message saying that wine is not found, and you did install it using macports. That is because the default app dir for macports isnt in the PATH variable. So, for a quick bypass, give it the full path to wine, which is "/opt/local/bin/wine" (without quotes) Note: while ad.exe is running, the screen will look like it is doing some funky things. (symbols everywhere) This is normal, as the code used to process a progress bar was 'extremely' windows console specific. Just wait until your screen stops doing things (30-60mins) until moving to the next part.

  • When ad.exe has finished, move the folder "/Applications/World of Warcraft/maps" and paste it in your Arcemu server directory ("/arcemu/server/bin/"). So you should now have a "/arcemu/server/bin/maps" directory containing numerous .bin files.


DBC Files

After you have the files, type :

sudo mkdir /arcemu/server/DBC
sudo mkdir /arcemu/server/maps

and then copy the DBC and maps files to those directories.

Database Setup

For now read [2]


To start the server run Terminal and type:

cd /arcemu/server/
then
./arcemu-logonserver

and in a second terminal window:

cd /arcemu/server
then
./arcemu-world


Congratulations, play away.

Done

You're now ready to move on to Server configuration

Personal tools