#!/bin/sh
# heekscad-install.sh -- Downloads, builds and installs HeeksCAD from svn
# Define BUILDPATH variable for this script to run it in
# somewhere other than home.
BUILDPATH=${BUILDPATH:-~/} # Location of HeeksCAD build dir.
INSTALLPATH=/usr/local # Location to install HeeksCAD
BUILDPREREQS="subversion libwxbase2.8-dev \
build-essential libopencascade-dev libwxgtk2.8-dev \
libgtkglext1-dev python-dev cmake libboost-python-dev"
test -d $BUILDPATH || mkdir -p $BUILDPATH
# Add openinnovations hardy repository
if test $(lsb_release -s -c) = 'hardy'; then
if grep opennovation /etc/apt/sources.list ; then
echo openinnovation already configured.
else
echo deb http://www.opennovation.org/ubuntu hardy main contrib non-free | sudo tee -a /etc/apt/sources.list
wget -q -O - http://www.opennovation.org/ubuntu/opennovation.key | sudo apt-key add -
aptitude update
fi
fi
# Install build prerequisites
sudo apt-get install -y $BUILDPREREQS
cd $BUILDPATH
if [ -d HeeksCAD ]; then
cd HeeksCAD
svn update
else
svn checkout http://heekscad.googlecode.com/svn/trunk/ HeeksCAD
fi
cd ${BUILDPATH}/HeeksCAD/src
make clean
make
sudo make install
# Make menu entry find the binary
sudo ln -s ${INSTALLPATH}/bin/HeeksCAD /usr/bin/HeeksCAD
# Make HeeksCAD find the program icons
sudo ln -s ${INSTALLPATH}/share/heekscad/ /usr/share/heekscad
# Install HeeksCNC
#Get the HeeksCNC files from the SVN repository, build, and install
cd ${BUILDPATH}/HeeksCAD/
if [ -d HeeksCNC ]; then
cd HeeksCNC
svn update
else
svn checkout http://heekscnc.googlecode.com/svn/trunk/ HeeksCNC
fi
cd ${BUILDPATH}/HeeksCAD/HeeksCNC/src
make clean
make
sudo make install
# build, and install kurve
cd ${BUILDPATH}/HeeksCAD/HeeksCNC/kurve
make clean
make
sudo make install
sudo ln -s .libs/kurve.so ${BUILDPATH}/HeeksCAD/HeeksCNC/kurve.so
# Install libarea
# area.so is required for pocket operations.
#Get the libarea files from the SVN repository, build, and install
cd ${BUILDPATH}/HeeksCAD/HeeksCNC/
if [ -d libarea ]; then
cd libarea
svn update
else
svn checkout http://libarea.googlecode.com/svn/trunk/ libarea
fi
cd ${BUILDPATH}/HeeksCAD/HeeksCNC/libarea/
make clean
make
sudo make install
sudo ln -s .libs/area.so ${BUILDPATH}/HeeksCAD/HeeksCNC/area.so
# Install libactp
# actp.so is required for adaptive roughing operations.
# Get the libactp (adaptive roughing) files from the SVN repository, build, and
install
cd ${BUILDPATH}/HeeksCAD/HeeksCNC/
if [ -d libactp ]; then
cd libactp
svn update
else
svn checkout http://libactp.googlecode.com/svn/trunk/ libactp
fi
cd ${BUILDPATH}/HeeksCAD/HeeksCNC/libactp/PythonLib
make clean
make
sudo make install
sudo ln -s .libs/actp.so ${BUILDPATH}/HeeksCAD/HeeksCNC/actp.so
# Install opencamlib
# opencamlib is the replacement for pycam. It's required for zigzag operations.
# Get the opencamlib files from the SVN repository, build, and install
cd ${BUILDPATH}/HeeksCAD/HeeksCNC/
if [ -d opencamlib ]; then
cd opencamlib
svn update
else
svn checkout http://opencamlib.googlecode.com/svn/trunk/ opencamlib
fi
cd ${BUILDPATH}/HeeksCAD/HeeksCNC/opencamlib/src
make clean
cmake .
make
make doc # Creates PDF file needed by make install
sudo make install
if test $(lsb_release -s -c) = 'hardy'; then
echo This is Ubuntu Hardy, creating symlinks
sudo ln -fs /usr/local/lib/python2.5/dist-packages/kurve.so /usr/local/lib/python2.5/site-packages/kurve.so
sudo ln -fs /usr/local/lib/python2.5/dist-packages/actp.so /usr/local/lib/python2.5/site-packages/actp.so
sudo ln -fs /usr/local/lib/python2.5/dist-packages/area.so /usr/local/lib/python2.5/site-packages/area.so
fi
Original issue reported on code.google.com by ichu...@gmail.com on 26 Jul 2010 at 7:50
Original issue reported on code.google.com by
ichu...@gmail.com
on 26 Jul 2010 at 7:50