Compiling:OS X

From ArcEmu-Wiki
(Difference between revisions)
Jump to: navigation, search
(DBC Files)
m
 
(6 intermediate revisions by 2 users not shown)
Line 28: Line 28:
 
*PHP and Apache (both built in to mac)
 
*PHP and Apache (both built in to mac)
  
*SVN (comes bundled with XCode)
+
*GIT (http://code.google.com/p/git-osx-installer)
  
 
*MacPorts [http://www.macports.org/] (recommended but not fully required, it makes getting missing items a lot easier)
 
*MacPorts [http://www.macports.org/] (recommended but not fully required, it makes getting missing items a lot easier)
Line 46: Line 46:
 
   mkdir arcemu ; cd arcemu
 
   mkdir arcemu ; cd arcemu
  
* Check out the source code using SVN
+
* Check out the source code using GIT
 
+
  svn co https://arcemu.svn.sourceforge.net/svnroot/arcemu/trunk/
+
 
+
  
 +
git clone git://github.com/arcemu/arcemu.git code
  
 
== Building ==
 
== Building ==
Line 77: Line 75:
 
=== building Arcemu ===
 
=== building Arcemu ===
  
* Go to the 'trunk' sub-directory of the directory where you checked out the sources
+
* Go to the directory where you checked out the sources
  
     cd /path/to/your/source/trunk
+
     cd /path/to/your/source/
  
 
( /path/to/your/source is the path to the Arcemu directory, in my case it's /Users/dfighter/arcemu )
 
( /path/to/your/source is the path to the Arcemu directory, in my case it's /Users/dfighter/arcemu )
Line 89: Line 87:
 
* Generate the makefiles with CMake
 
* Generate the makefiles with CMake
  
     cmake -DCMAKE_INSTALL_PREFIX=/YOUR/DIRECTORY/HERE/ ../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 )
 
( /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 )
Line 133: Line 131:
 
* Refer to the [http://www.arcemu.info/wiki/index.php?title=Compiling:_Windows#5._.28Extracting_and_Copying_DBCs.2C_maps.2C_and_vmaps..29 windows howto] at the moment.
 
* Refer to the [http://www.arcemu.info/wiki/index.php?title=Compiling:_Windows#5._.28Extracting_and_Copying_DBCs.2C_maps.2C_and_vmaps..29 windows howto] at the moment.
  
After you have the files, type
+
After you have the files, type :
 
+
<source lang="bash">
    sudo mkdir /arcemu/server/DBC
+
sudo mkdir /arcemu/server/DBC
 +
sudo mkdir /arcemu/server/maps
 +
</source>
  
 
and then copy the DBC and maps files to those directories.
 
and then copy the DBC and maps files to those directories.
Line 146: Line 146:
  
 
To start the server run Terminal and type:
 
To start the server run Terminal and type:
 
+
<source lang="bash">
cd /arcemu/server/bin/
+
cd /arcemu/server/
 
+
then
then type
+
 
+
 
./arcemu-logonserver
 
./arcemu-logonserver
 
+
</source>
and in a second terminal window,
+
and in a second terminal window:
+
<source lang="bash">
cd /arcemu/server/bin/
+
cd /arcemu/server
 
+
then
then type
+
 
+
 
./arcemu-world
 
./arcemu-world
 +
</source>
  
  
 
Congratulations, play away.
 
Congratulations, play away.
 
  
 
== '''Done''' ==
 
== '''Done''' ==

Latest revision as of 05:53, 13 November 2011

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