diff options
-rw-r--r-- | README.md | 27 | ||||
-rwxr-xr-x | scripts/uni-get-dependencies.sh | 38 |
2 files changed, 27 insertions, 38 deletions
@@ -133,29 +133,34 @@ After that, follow the Compilation instructions below. ### Building for Linux/BSD -First, make sure that you have git installed (git-core in debian). Once you've -cloned this git repository, run the script that attempts to download the -dependency packages for your system: +First, make sure that you have git installed (git-core in debian). Once +you've cloned this git repository, download and install the dependency +packages listed above using your system's package manager. A convenience +script is provided that can help with this process: ./scripts/uni-get-dependencies.sh -If this fails then you have to download and install the dependency packages -on your own using your system's package manager. After installing -dependencies, check their versions. You can run this script to help you: +After installing dependencies, check their versions. You can run this +script to help you: ./scripts/check-dependencies.sh Take care that you don't have old local copies anywhere (/usr/local/). If all dependencies are present and of a high enough version, skip ahead -to the Compilation instructions. If some are missing or old, then you -can download and build dependencies into $HOME/openscad_deps as follows: +to the Compilation instructions. + +### Building for Linux/BSD on systems with older or missing dependencies + +If some of your system dependency libraries are missing or old, then you +can download and build newer versions into $HOME/openscad_deps by +running these commands: source ./scripts/setenv-unibuild.sh ./scripts/uni-build-dependencies.sh -This may take an hour or two. Note it will not build huge deps like gcc -or qt, only the main ones (boost, CGAL, opencsg, etc). After completion, -again check dependencies +This may take several hours. Note it will not build huge deps like gcc +or qt, only the smaller ones (boost, CGAL, opencsg, etc). After +completion, again check dependencies source ./scripts/setenv-unibuild.sh ./scripts/check-dependencies.sh diff --git a/scripts/uni-get-dependencies.sh b/scripts/uni-get-dependencies.sh index 3ed12e6..8c6fd06 100755 --- a/scripts/uni-get-dependencies.sh +++ b/scripts/uni-get-dependencies.sh @@ -1,38 +1,25 @@ get_fedora_deps() { - echo "Tested on Fedora 17. Please see README.md for info on older systems." + echo "Tested on Fedora 17" sudo yum install qt-devel bison flex eigen2-devel \ boost-devel mpfr-devel gmp-devel glew-devel CGAL-devel gcc pkgconfig git } get_freebsd_deps() { - echo "Tested on FreeBSD 9. Please see README.md for info on older systems." - - if [ "`pkg_info | grep -i cgal `" ]; then - echo Stopping. Please remove any CGAL packages you have installed and restart - exit - fi - - if [ "`pkg_info | grep -i opencsg`" ]; then - echo Stopping. Please remove any OpenCSG packages you have installed and restart - exit - fi - + echo "Tested on FreeBSD 9" pkg_add -r bison boost-libs cmake git bash eigen2 flex gmake gmp mpfr pkg_add -r xorg libGLU libXmu libXi xorg-vfbserver glew pkg_add -r qt4-corelib qt4-gui qt4-moc qt4-opengl qt4-qmake qt4-rcc qt4-uic - - #echo "BASEDIR=/usr/local ./scripts/linux-build-dependencies.sh cgal-use-sys-libs" - #echo "BASEDIR=/usr/local ./scripts/linux-build-dependencies.sh opencsg" + pkg_add -r opencsg cgal } debian_too_old() { - echo "System version too low. Please try 'old linux' build (see README.md)" - exit + echo "System version too low. Please try 'old linux' build (see README.md)" + exit 1 } get_debian_deps() @@ -55,7 +42,8 @@ get_debian_deps() if [ "`cat /etc/issue | grep 'Ubuntu 7'`" ]; then debian_too_old fi - echo "tested on Ubuntu 12. If this fails try 'old linux' build (see README.md)" + + echo "Tested on Ubuntu 12.04" sudo apt-get install build-essential libqt4-dev libqt4-opengl-dev \ libxmu-dev cmake bison flex libeigen2-dev git-core libboost-all-dev \ @@ -66,27 +54,23 @@ get_debian_deps() get_opensuse_deps() { - echo "tested on OpenSUSE 12. If this fails try 'old linux' build (see README.md)" - sudo zypper install libeigen2-devel mpfr-devel gmp-devel boost-devel \ - libqt4-devel glew-devel cmake git - - # sudo BASEDIR=/usr/local ./scripts/linux-build-dependencies.sh opencsg + libqt4-devel glew-devel cmake git cgal-devel } - - if [ "`cat /etc/issue | grep -i ubuntu`" ]; then get_debian_deps elif [ "`cat /etc/issue | grep -i debian`" ]; then - get_ubuntu_deps + get_debian_deps elif [ "`cat /etc/issue | grep -i opensuse`" ]; then get_opensuse_deps elif [ "`cat /etc/issue | grep -i freebsd`" ]; then get_freebsd_deps elif [ "`cat /etc/issue | grep -i fedora`" ]; then get_fedora_deps +elif [ "`cat /etc/issue | grep -i redhat`" ]; then + get_fedora_deps else echo "Unknown system type. Please install the dependency packages listed" echo "in README.md using your system's package manager." |