Printrun

From RepRap
Revision as of 06:03, 23 January 2013 by Thinkyhead (talk | contribs) (Mac OS X: update info to help newbies)
Jump to: navigation, search

Printrun is a set of G-code sending applications, written by Kliment. It consists of printcore (dumb G-code sender), pronsole (featured command line G-code sender), pronterface (featured G-code sender with graphical user interface), and a small collection of helpful scripts. Together with skeinforge they form a pretty powerful softwarecombo.

Installation

GNU/Linux & Distros

Dependencies

Before installing Printrun, make sure to install a few required libraries for both pronterface and skeinforge.

Depending on your GNU/Linux distro, this can be done in several ways. The following is executed through the Terminal, often found under "Applications -> Accessories -> Terminal":

Debian

For debian estable (squeeze) install this packages:

# apt-get install python-serial python-wxgtk2.8 python-pyglet python-tk

There are experimental packages for Debian (squeeze wheezy):

sudo echo "deb http://apt.ulrichard.ch/  squeeze main contrib non-free" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install printrun-gui

Fedora

There are also experimental packages for Fedora 17:

wget http://repo.hroncok.cz/reprap/reprap.repo
sudo cp reprap.repo /etc/yum.repos.d/
sudo yum install printrun

Any problems with this repo report please to [email protected]. Don't forget to add your user to the dialout group.

If you have any other version of Fedora or you just don't want to use the packages, install dependencies and follow instructions below.

sudo yum install git pyserial wxPython tkinter

Ubuntu

sudo apt-get install python python-serial python-wxgtk2.8 python-tk git-core

There are also experimental packages for Ubuntu (maverick natty oneiric precise):

sudo apt-add-repository ppa:richi-paraeasy/ppa
sudo apt-get update
sudo apt-get install pronterface

Note: The previous package, 'printrun-gui' is currently broken on Ubuntu 'precise', but may work on previous Ubuntu releases. Both are in the same repository.

Install & update script

This script gives somehow the impression Printrun has to go through a complex installation. The most simple case is to meet the prerequisites above, then grab a copy from Github and run it with python pronterface.py right where you downloaded it.

For a more comfortable installation, you should install pronterface first, then skeinforge inside your pronterface installation directory.

This albeit little dirty but handy script does that for you! (N.B it can also be used as a update script. Be sure to put your .stl-files etc outside of your Printrun directory)

BASEDIR="$HOME/Dropbox/RepRap" # edit this is you don't want it installed in your home directory

PRINTRUNDIR="$BASEDIR/Printrun" # Defines where the 'Printrun' directory is located. But of course
                                # you can change this to say: "$HOME/Documents/Create/RepRap/Printrun".

SKEINFORGEDIR="$PRINTRUNDIR/skeinforge" #Defines where the 'skeinforge' directory is located in the
                                # 'Printrun' directory is located.

SKEINFORGEBASEURL="http://fabmetheus.crsndoo.com/files/"
SKEINFORGEFILENAME="50_reprap_python_beanshell.zip"

cd $BASEDIR # Change directory to the executing users home directory.

echo "Removing existing Printrun directory..." #Script being polite towards the user.
rm -rf $PRINTRUNDIR # Removes the defined Printrun directory and _everything_ that resides
                    # in and beneath its directory tree.

echo "Cloning Printrun..." # Script being polite towards the user.
git clone https://github.com/kliment/Printrun.git # See also: http://help.github.com/linux-set-up-git/

echo "Grabbing skeinforge..." # Script being polite towards the user.
wget -P /tmp $SKEINFORGEBASEURL$SKEINFORGEFILENAME # Uses good ol' wget for downloading skeinforge.

echo "Unzipping skeinforge into Printrun directory..." # Script being polite towards the user.
unzip -d $SKEINFORGEDIR /tmp/$SKEINFORGEFILENAME # unzips the grabbed zip to ones defined skeinforge dir.

echo "Symlinking skeinforge inside Printrun directory..." #Script being polite towards the user.
ln -s $SKEINFORGEDIR/* $PRINTRUNDIR/ # Script makes a symbolic link.

echo "Cleaning up temporary installation files..." #Script being polite towards the user.
rm -rf /tmp/$SKEINFORGEFILENAME # Removes tmp files.

Open a terminal window and copy the script above. Open nano by typing 'nano' in the windows prompt and hit return. Save the script in a file named say 'PrintrunUpdate', make any adjustments if you want/need to. (If a new software version comes out, you will have to change the 50_ (which is the current version since March 2012) into the correct version number). Most likely you need to use the following: chmod +x PrintrunUpdate This will allow you to execute the script in the first place. If you were to do this in your filemanager (Nautilus etc) it will ask you if you want to run this script.

Mac OS X

By far the easiest option for OS X is to download the pre-built Mac Pronterface application. As of January, 2013 it can be found at this location. If you're running 10.7 or later you should already have Python and all the necessary libraries to run Pronterface-Mac, but if for some reason Pronterface-Mac won't run, you may have to go through a few extra steps. Instructions to set up OS X for Printrun (both pre-Lion and post-Lion) are posted at Printrun's GitHub project page.

Windows

To make it work on Windows, get the following packages and install:

Or, use the ready-to-run version available at http://koti.kapsi.fi/~kliment/printrun/

Usage

With installation done, simply run the script, e.g.

python pronterface.py

Pronterface.png


CLI

You might also want to try a nice, unobtrusive command-line interface:

python pronsole.py

It features an online help function ("help" or "help <command>").

Troubleshooting

Good to know that the settings used by Pronterface are not stored in the app folder but in the user's folder (e.g : ~/.pronsolerc (GNU/Linux) C:\Users\yourname (Windows)).

'python goes SyntaxError'

Got an error similar to this?

[~] python pronterface.py
 File "pronterface.py", line 15
   print _("WX is not installed. This program requires WX to run.")
         ^
SyntaxError: invalid syntax

This can happen if you use a GNU/Linux distribution such as Archlinux.
You can easily solve this by executing the following instead:

python2 pronterface.py

Custom buttons don't appear

See also :