Development/Building MatterControl

From MatterControl Manual
Revision as of 12:35, 17 August 2017 by MatterHackers (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Quick Summary

~ $ git clone --recursive
~ $ cd MatterControl
~/MatterControl $ git checkout 1.7
~/MatterControl $ nuget restore MatterControl.sln
~/MatterControl $ xbuild MatterControl.sln
~/MatterControl $ mono ./bin/Debug/MatterControl.exe

Detailed Instructions

  1. Create a new folder for the MatterControl source
    mkdir MatterDevelop
  2. Change to the new directory
    cd MatterDevelop
  3. Checkout the latest source code:
    git clone --recursive
  4. Install MonoDevelop.
    sudo apt-get install monodevelop
  5. Add Mono SSL Support - Copy in Mozilla Root certificates to enable NuGet and MatterControl SSL requests
    mozroots --import --sync
  6. Restore NuGet packages - On MonoDevelop 4.0 or older you can install [NuGet Addin]( If you are on Mint, also install libmono-cairo2.0-cil. Alternatively you can run the command line NuGet application to restore the project packages:
    nuget restore MatterControl/MatterControl.sln
  7. Optionally switch to a target branch
    git -C MatterControl/ checkout master
    git -C MatterControl/ submodule update --init --recursive
    As a single command line statement:
    targetBranch=master && git -C MatterControl/ checkout $targetBranch && git -C MatterControl/ submodule update --init --recursive
  8. Build MatterControl
    mdtool build -c:Release MatterControl/MatterControl.sln or
    xbuild MatterCControl/MatterControl.sln
  9. After MatterControl has been built in MonoDevelop it is recommended that you run the application via command line or via a shell script to invoke mono.
    mono MatterControl/bin/Release/MatterControl.exe
    If you'd like to log errors for troubleshooting
    mono MatterControl/bin/Release/MatterControl.exe > log.txt
    If you want detailed error logging and tracing
    MONO_LOG_LEVEL=debug mono MatterControl/bin/Release/MatterControl.exe > log.txt
  10. In order for MatterControl to access the serial ports, you will need to give your user the appropriate permissions. On Debian based distros, add yourself to the dialout group. On Arch, add yourself the the uucp and lock groups instead.
    gpasswd -a $USER dialout

Serial Helper

  1. Change to the SerialHelper directory
    cd MatterControl/Submodules/agg-sharp/SerialPortCommunication/SerialHelper
  2. Run the build script
  3. If your receive errors you may need to install libc6-dev-i386 for x86 compilation
    sudo apt-get install libc6-dev-i386

Note: Single command lines statements assume the use of the Bash shell