Setting up your development environment

From Askmonty.org

Main Page >  MariaDB 
MariaDB FAQ | MariaDB versus MySQL | Development | Download | License | Logo | MariaDB Reference Manual
 Contributing | MCA | Contributions | Release Process | Release Criteria | Plans | Tools | Replication
About | Set Up | Getting the Source | Building MariaDB | Contributing Code


Contents

About This Page

On this page we list the various software packages we recommend developers have installed to effectively work on the MariaDB code.

Platform Specific Instructions

Linux

TODO.

Mac

XCode

  • Install Xcode from Apple (need registration): http://developer.apple.com/tools/xcode/ or from your Mac OS X installation disk (macports needs XCode >= 3.1, so if you do not have that version or greater you will need to download the latest version, which is 900+ MB)

MacPorts

Install bzr

  • install gtk with aqua interface (if you prefer the X11 variant just remove "+quartz" and "+no_x11" from the following lines):
    sudo port install pango +quartz +no_x11
    sudo port install cairo +quartz +no_x11
    sudo port install gtk2 +quartz
    
  • install bzr and its utils:
    sudo port install bzr
    sudo port install bzrtools
    sudo port install bzr-gtk
    

Install the build tools needed for Mysql/MariaDB

  • bison
    sudo port install bison
  • autoconf (this might already be installed)
    sudo port install autoconf
  • libtool (this might already be installed)
    sudo port install libtool

Your Mac should now have everything it needs to get, compile, and otherwise work with the MariaDB source code. The next step is to actually get a copy of the code. For help with this see the #Getting the Maria code section of this page.

Windows

TODO.

Platform Independent Instructions

The instructions in this section are applicable to multiple operating systems. Often you will have to have done the steps for your operating system before doing the steps here.

Getting the Maria code

  1. prepare a repository directory
    bzr init-repo --1.9 <bzr-root-directory>
  2. Branch the repository. If you have fast Internet or have no other computer with the maria or MySQL 5.1 repositories skip the next step and use the "Fast Internet" instructions
  3. If you have a slow Internet connection and an existing maria repository on another computer, do the following:
    1. tar up the existing repository on the other computer
      bzr branch <other computer bzr-root>/<maria repository> /tmp/maria-rep
      cd /tmp
      tar czf maria-rep.tar.gz maria-rep
      
    2. move it to the Mac using a flash drive, dvd, or by copying it over the network (in our example, we placed the tar file in /tmp on the Mac)
    3. untar the tarball and use bzr to branch it to where you want the code to live
      cd /tmp
      tar xzf maria-rep.tar.gz
      rm maria-rep.tar.gz
      bzr branch maria-rep <bzr-root-directory>/maria-tmp
      rm -rf maria-rep
      
    4. Now branch from the real repository on launchpad and cleanup:
        cd <bzr-root-directory>
        bzr branch lp:maria maria
        rm -rf maria-tmp
      
    5. do not forget to remove the temporary directory and the tarball on the other computer
  4. If you have a fast Internet connection, or you don't have an existing branch of the maria repository, branch directly from Launchpad like so:
    cd <bzr-root-directory>
    bzr branch lp:maria maria
    
    The download is several hundred megabytes, so be prepared for a long download if you are on a slow connection.