#!/bin/bash
#
# QCAD startup script
#

DIR=${0%/*}
binary="$DIR/qcad-bin"
LD_LIBRARY_PATH="$DIR" "$binary" "$@"

if [ $? -ne 0 ]
then
    echo ""
    echo "QCAD has failed to start."
    echo ""
    echo "Please use the offscreen platform plugin for headless systems"
    echo "(without a running X11 server):"
    echo "$0 -platform offscreen"
    echo ""
    echo "In addition, you might have to override the default Qt style"
    echo "to prevent the loading of a native desktop style (such as GTK):"
    echo "$0 -style plastique"
fi
