Difference between revisions of "Development/Building MatterControl"

From MatterControl Manual
Jump to: navigation, search
 
Line 3: Line 3:
 
*Git
 
*Git
 
*Nuget
 
*Nuget
*.NET Framework or Mono (Usually installed with IDEs)
+
*Latest .Net Framework or Mono 5+
*Development Environment (MonoDevelop, Visual Studio, Xamarin Studio, etc...)
+
*[https://github.com/MatterHackers/MatterControl/tree/1.7 MatterControl 1.7 branch]
 +
*Visual Studio 2015, 2017 or latest MonoDevelop
  
 
== Quick Summary ==
 
== Quick Summary ==
Line 10: Line 11:
 
~ $ git clone --recursive https://github.com/MatterHackers/MatterControl.git
 
~ $ git clone --recursive https://github.com/MatterHackers/MatterControl.git
 
~ $ cd MatterControl
 
~ $ cd MatterControl
~/MatterControl (master) $ nuget restore MatterControl.sln  
+
~/MatterControl $ git checkout 1.7
~/MatterControl (master *) $ xbuild MatterControl.sln  
+
~/MatterControl $ nuget restore MatterControl.sln
~/MatterControl (master) $ mono ./bin/Debug/MatterControl.exe  
+
~/MatterControl $ xbuild MatterControl.sln
 +
~/MatterControl $ mono ./bin/Debug/MatterControl.exe
 
</pre>
 
</pre>
  

Latest revision as of 12:35, 17 August 2017

Dependencies

Quick Summary

~ $ git clone --recursive https://github.com/MatterHackers/MatterControl.git
~ $ 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 https://github.com/MatterHackers/MatterControl.git
  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](https://github.com/mrward/monodevelop-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
    ./build.sh
  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