# If you want to install the Part Library (of 4,500 parts and symbols):
test -f installed/qcad/partlibrary-2.0.1.2-1.zip &&
mv installed/qcad/partlibrary-2.0.1.2-1.zip .
test ! -f partlibrary-2.0.1.2-1.zip &&
wget http://www.ribbonsoft.com/archives/partlibrary/\
partlibrary-2.0.1.2-1.zip
chown $USER partlibrary-2.0.1.2-1.zip
unzip partlibrary-2.0.1.2-1.zip
cp -a partlibrary-2.0.1.2-1/* /usr/local/qcad/qcad/library/
rm -r ./partlibrary-2.0.1.2-1
# ** Keep in mind that these environment variables below may exist as your
# non-root user or when you su with a login shell (su -), but you're running
# su right now and it's not a login shell, so you'll probably have to set
# these.
# If you have a /etc/profile.d/qt.sh, source it so we have QTDIR, and the
# updated PATH:
test -f /etc/profile.d/qt.sh && . /etc/profile.d/qt.sh
# Make sure the QTDIR environment variable is set, if not, run something
# like this (replacing /usr/lib/qt with where it actually is):
test -z "$QTDIR" &&
( test -d /usr/lib/qt && export QTDIR=/usr/lib/qt
test -d /opt/qt && export QTDIR=/opt/qt )
# Set QMAKESPEC to the appropriate spec for your platform. This is what I
# used:
export QMAKESPEC=$QTDIR/mkspecs/linux-g++
# Make sure 'qmake' is in your PATH:
which qmake
# If it wasn't found, make sure QT's bin directory is in your PATH:
# (this should already be set via /etc/profile.d/qt.sh, /etc/profile,
# ~/.profile, etc.)
echo $PATH | grep -q "$QTDIR/bin" || export PATH="$PATH:$QTDIR/bin"
# Now actually build it. I add the "notrans" option because I don't need
# them, but also because the release_translations.sh is missing.
cd /usr/local/qcad-2.0.5.0-1-community.src/scripts
sh ./build_qcad.sh notrans
# If you downloaded the Part Library, install it:
test "$USER" != "root" &&
( NRHD=`finger $USER | egrep "^Directory: " | awk '{ print $2 }'`
test -f ${NRHD}/partlibrary-2.0.1.2-1.zip &&
unzip ${NRHD}/partlibrary-2.0.1.2-1.zip \
-d /usr/local/qcad/qcad/library
unset NRHD )
### If you want to install the docs (accessible as Help -> Manual in Qcad):
##http://www.ribbonsoft.com/archives/qcad/qcad-manual-en-2.0.4.0-1.html.zip