Installing RepRap on your computer

From RepRapWiki
Jump to: navigation, search
There are security restrictions on this page


Mendel Build Documentation



Material-select.png
Please Note this page describes how to install the RepRap standard software. There are alternatives to the standard software available and these are listed on the Comparison of RepRap Toolchains.


Contents


How to avoid doing what it says on this page

You can run RepRap from a flash drive on an unaltered PC (thanks to Alexander Chung of Delcam). For details see here.

Prerequisites

The RepRap software currently runs under 32-bit Linux, 32-bit Microsoft Windows and runs on 64-bit Microsoft Windows (with the 64-bit RepRap distribution). However, some of external library files only shipped with a 32 bit version, it is not able to run on 64-bit Linux. We are working on adding Mac versions.

You will need the Java Runtime Environment (JRE) on your computer. If you don't have it already (Oracle Java- you may find open java doesn't seem to work), get Oracle Java here:

The Host software is still a little buggy on Windows with Java 6 installed, if you encounter any problems with Java 6 and the software, try uninstalling Java 6 and install the latest Java 5 runtime from:

You will also need to download and install the Arduino development environment to build the firmware for your RepRap machine. That is available here:

If you are using MakerBot electronics or the Sanguinololu, you may need to download and install the Sanguino add-ons for Arduino. Get them here:

Finally in this section, you may care to take a look at software that is useful for RepRap, but not required to run it. There's a list here:

Download

From Github

Download the RepRap distribution from:

https://github.com/reprap/release

The main download (which is about 10 MB) will have a name like reprap-nnnnnn-yyyymmdd.zip. This is the one file you want. It is the main download for RepRap; nnnnnn is the name of the current RepRap machine and yyyymmdd is the date of the release. (You may have to click the view raw link)

Legacy: From SourceForge

Download the RepRap distribution from Sourceforge:

32-bit: http://sourceforge.net/projects/reprap/

64-bit: http://sourceforge.net/projects/reprap64bit/

Note: this repository is maintained for legacy purposes, and may well not be up-to-date.

Linux Installation

You can install and use RepRap in your own file-space under Linux.

In your own space

Unzip the downloaded file:

$ unzip reprap-nnnnnn-yyyymmdd.zip

This will create a directory called reprap-nnnnnn-yyyymmdd (with the name of the current RepRap machine and the distribution date substituted, clearly). To run the RepRap software simply move to that directory and run the file named reprap:

$ cd reprap-nnnnnn-yyyymmdd
$ ./reprap

Installing for all users

If you want RepRap to be available system-wide to all users, you will need to log in as the superuser to install it.

Assume you downloaded reprap-nnnnnn-yyyymmdd.zip into the directory /xxx/yyy. Move to the directory /usr/local, then unpack it:

# cd /usr/local
# unzip /xxx/yyy/reprap-nnnnnn-yyyymmdd.zip

Then move to the /usr/local/bin directory and create a short shell script called reprap using your favourite text editor (gedit in the example).

# cd /usr/local/bin
# gedit reprap

Copy and paste these three lines into the script, then save it:

#!/bin/sh
cd /usr/local/reprap-nnnnnn-yyyymmdd
./reprap

(Don't forget to replace the nnnnnn and the yyyymmdd with the right strings for your distribution file.)

Finally, set execute permission on the file:

# chmod 755 reprap

Any user will now be able to run the software just by typing the command "reprap".

There is a RepRap teardrop symbol in the file /usr/local/reprap-nnnnnn-yyyymmdd/reprap-icon.png which people can use if they add the program to their desktop or task-bar as a clickable executable. The program is /usr/local/bin/reprap .

If you want to save space, you can now delete the distribution .zip file:

# rm /xxx/yyy/reprap-nnnnnn-yyyymmdd.zip

Linux AMD64

The reprap software comes with rxtx and java3d binaries needed for 32bit arcitectures so getting the reprap software working on amd64 either means installing 32bit version of java or installing native 64bit versions of the libraries. For the latter option here is how you can set it up.

For java3d these can simply be installed using

cd /path/to/your/host/software
sudo apt-get install libjava3d-jni
ln -sf /usr/lib/jni/libj3dcore-ogl.so .

# gentoo amd64 ...
emerge sun-java3d-bin 
ln -sf /usr/lib/sun-java3d-bin/libj3dcore-ogl.so .

Gentoo 64 Bit: RepRap provided j3d jars will most likely fail with java.lang.UnsatisfiedLinkError: javax.media.j3d.NativePipeline.getAWT()J. If so, modify reprap script with the following:

 ...
 # Comment out j3d jars from classpath
 #CLASSPATH=$CLASSPATH:./j3dcore.jar
 #CLASSPATH=$CLASSPATH:./j3dutils.jar
 #CLASSPATH=$CLASSPATH:./vecmath.jar
 ...
 # use java-config to set up correct classpath
 java -Djava.libray.path=$(java-config -i sun-java3d-bin) -cp $(java-config -p sun-java3d-bin):$CLASSPATH -Xmx$REPRAP_RAM_SIZE org.reprap.Main 

For rxtx it's almost the same:

cd /path/to/your/host/software
sudo apt-get install librxtx-java
ln -sf /usr/lib/librxtxSerial.so .

# gentoo amd64 ...
emerge rxtx
ln -sf /usr/lib/rxtx-2/librxtxSerial.so .

[Note about the above symlink - verify the location of that file - on AMD 64 debian sid it required this instead.]

ln -sf /usr/lib/jni/librxtxSerial.so .

In case your Linux distribution doesn't come with a librxtx-java package, you can download binaries for the latest stable version here. Copy the librxtxSerial.so appropriate for your system into the host software directory.

GilesBathgate 10:50, 16 January 2010 (UTC)

Traumflug 17:44, 4 June 2010 (UTC)

Windows Installation

You will need administrator privileges to do this.

Create a new folder:

C:\Program Files\Reprap

Unpack the ZIP file anywhere you like on your system. It will create a folder called reprap-nnnnnn-yyyymmdd or reprap 64bit-nnnnnn-yyyymmdd where nnnnnn is the name of the current RepRap machine and yyyymmdd is the date of the release. Move all the files in that folder into C:\Program Files\Reprap.

You can then delete the reprap-nnnnnn-yyyymmdd if you like, and the ZIP file.

In C:\Program Files\Reprap there is a .BAT file called reprap.bat. Running that will launch the RepRap host software. You can copy that .BAT file to your desktop or elsewhere to give you a clickable executable.

Note: With Java6 on Windows 7 64bit (and possibly others, please confirm), you might have to set the PATH enviromental variable manually. --I didn't need to with Java6, but did with Java5 (both Win7 64bit).

Source Code

Distribution Contents

Information on the files in the RepRap distribution are available at RepRap Distribution Files.

Getting the latest sources

All the files for RepRap are kept in a Git repository on Github.

You can use your web browser to inspect and download individual files here.

If you want to get the latest versions of files you can check them out of the repository. But take care - these files will be development versions that may have bugs.

The simplest way to obtain the files is probably to use the Eclipse software development environment, which is used by the RepRap hardware and software developers.

Using Git from within Eclipse

Note that you may need to be the superuser or administrator on your computer to do these installations.

Git in Eclipse (EGit) needs Mylyn, so install that first:

  1. Open Help -> Install new software
  2. In the "Work with" window, paste: http://download.eclipse.org/mylyn/releases/latest
  3. Call it Mylyn in the subwindow that pops up
  4. Three check boxes will appear. Just check the first.
  5. Click "Next" (you'll have to agree to the licence) and keep going till you get to click "Finish".
  6. It will ask you if you want to restart Eclipse. Say yes.

Installing EGit is a very similar process:

  1. Open Help -> Install new software
  2. In the "Work with" window, paste: http://download.eclipse.org/egit/updates
  3. Proceed as above, but this time check all the boxes.

To get RepRap from its Git Repository:

  1. Open "Window" -> "Open Perspective" -> "Other".
  2. Choose "Git Repository Exploring"
  3. It will open a panel called "Git repositories"
  4. There are buttons along the top. Hovering the mouse will tell you what they do. Click on "Clone a Git repository and add the clone to this view"
  5. Paste https://github.com/reprap/host.git as the location
  6. Click "Finish"
  7. Right click on the resulting download and select "Import Projects".

This should give you a Java project with all the sources of the host software.

In addition to host.git at https://github.com/reprap/ there are also mendel.git, huxley.git, and electronics.git with all the design files for those, firmware.git for the code that you load into the RepRap machine itself, and darwin.git for the legacy Darwin files.


To work with the Java source code you will need the system-dependent libraries that RepRap uses. Those are in the directory Reprap/lib/system-dependent/. You will need to copy (or create links to) the .so files (Linux) or the .dll files (Windows) in there to the place in the Java system where these are stored.

To do accomplish this:

  1. Open "Window" -> "Open Perspective" -> "Other".
  2. Choose "Java (default)"
  3. It will open a panel called "Package explorer"
  4. Your project folder (Reprap [host master]) will be listed there.
  5. Right click on the folder and select "Configure build path" -> "Libraries"
  6. Click the triangle next to "RXTXcomm.jar" to drop down its list of associations, and select "Native library location"
  7. Click Edit..., and in the window that appears, click Workspace...
  8. Browse to Reprap/lib/sytstem-dependent/windows-i586 (if you're on Windows; otherwise choose the folder appropriate to your own operating system)
  9. Click OK, and repeat from step 6 onward for "j3d-org-java3d-all.jar" and "j3dcore.jar" just like you did for RXTXcomm.jar.
  10. Click "OK", and try compiling the code to see if it works.


Ubuntu 64 Bit: You will need to obtain the 64 bit libraries for java3d:

sudo aptitude install libjava3d-java
sudo aptitude install libjava3d-jni

sudo cp /usr/lib/jni/libj3dcore-ogl.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/
sudo cp /usr/lib/jni/librxtxSerial.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/

sudo cp /usr/share/java/vecmath-*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/
sudo cp /usr/share/java/j3d*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/

(above commands obtained from http://ubuntuforums.org/showthread.php?t=1105627)

Alternatives

Alternative software packages are available to generate G Code and drive the RepRap. More information on these can be found on the Alternative Software page.


Further reading

  • You'll run this driver software later, during commissioning, to calibrate the system, and while printing out parts. This page presents how to use the software once you have installed it and that one explains the different options for configuration.