How do I create a directory for my codes?

When you start developing MercuryDPM applications ("Drivers"), you need a directory in which to store them. All MercuryDPM developers can should create a directory to store their aplications, and use svn for version control. Here is how you do it:

  1. Open a terminal, enter the subfolder Drivers/USER in the source directory, and svn-copy the template USER directory into a directory named after you, e.g.
    MercurySource/Drivers/USER$ svn cp Template Marlin
    @ USER
    Definition: MercuryBase.h:85
  2. Enter your directory. If you have already written a driver code, svn-remove the template driver, copy your driver into your folder and svn-add the driver.
    MercurySource/Drivers/USER$ cd Marlin
    MercurySource/Drivers/USER/Marlin$ cp $DIRECTORY/MyFirstDriver.cpp .
    MercurySource/Drivers/USER/Marlin$ svn add MyFirstDriver.cpp
    MercurySource/Drivers/USER/Marlin$ svn rm TemplateDriver.cpp
    If you are just starting to develop a driver, and svn-rename the template driver to the name you want to give your driver, e.g.
    MercurySource/Drivers/USER$ cd Marlin
    MercurySource/Drivers/USER/Marlin$ svn mv TemplateDriver.cpp MyFirstDriver.cpp
  3. return to your build directory and update cmake.
    MercurySource/Drivers/USER/Marlin$ cd ../../../../MercuryBuild
    MercuryBuild$ cmake .
    -- Build files have been written to: /Users/weinhartt/Mercury/Trunk/cmake-build-debug
    Updating cmake made a make command for your driver, you can test this:
    MercuryBuild$ make MyFirstDriver
    [100%] Built target MyFirstDriver
  4. then check-in your changes (after testing that all codes compile):
    MercuryBuild$ make fullTest
    MercuryBuild$ cd ../MercurySource
    MercurySource$ svn st
    A + Drivers/USER/Marlin
    A + Drivers/USER/Marlin/MyFirstDriver.cpp
    D + Drivers/USER/Marlin/TemplateDriver.cpp
    MercurySource$ svn ci -m "added a USER directory named Marlin"
    dominoes D
    Definition: Domino.cpp:76
    @ A
    Definition: StatisticsVector.h:42
    Now you can modify the driver code to your specific application.