document linux source build. add env variable script for linux src builds

felipesanches-svg
don bright 2012-07-04 06:33:04 +02:00
parent 491caa15ad
commit 9a05c66e1c
3 changed files with 40 additions and 22 deletions

View File

@ -79,10 +79,10 @@ To build OpenSCAD, you need some libraries and tools. The version
numbers in brackets specify the versions which have been used for
development. Other versions may or may not work as well.
If you're using Ubuntu, you can install these libraries from
aptitude. If you're using Mac, there is a build script that compiles
the libraries from source. Follow the instructions for the platform
you're compiling on below.
If you're using a newer version of Ubuntu, you can install these
libraries from aptitude. If you're using Mac, or an older Linux, there
are build scripts that download and compile the libraries from source.
Follow the instructions for the platform you're compiling on below.
* [Qt4 (4.4 - 4.7)](http://www.qt.nokia.com/)
* [CGAL (3.6 - 3.9)](http://www.cgal.org/)
@ -117,15 +117,25 @@ compilation process.
After that, follow the Compilation instructions below.
### Building for Ubuntu
### Building for older Linux or without root access
If you have done this and want to contribute, fork the repo and
contribute docs on how to build for windows!
First, make sure that you have compiler tools (build-essential on ubuntu).
Then after you've cloned this git repository, run the script that sets up the
environment variables.
source ./scripts/setenv-linbuild.sh
Then run the script to download & compile all the prerequisite libraries above:
./scripts/linux-build-dependencies.sh
After that, follow the Compilation instructions below.
### Building for Windows
If you have done this and want to contribute, fork the repo and
contribute docs on how to build for windows!
OpenSCAD for Windows is usually cross-compiled from Linux. If you wish to
attempt an MSVC build, please see this site:
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Windows
### Compilation

View File

@ -7,12 +7,9 @@
# Usage: linux-build-dependencies.sh
#
# Prerequisites:
# - curl
# -- you can uncomment 'build_curl' at the bottom
# -- and add $BASEDIR/bin to your PATH, i.e. in .bash_profile
# - wget
# - Qt4
# - cmake 2.8
# -- you can uncomment 'build_cmake' at the bottom
# - cmake 2.8 ( force build_cmake at bottom if yours is too old )
#
BASEDIR=$HOME/openscad_deps
@ -209,9 +206,9 @@ mkdir -p $SRCDIR $DEPLOYDIR
export PATH=$BASEDIR/bin:$PATH
export LD_LIBRARY_PATH=$DEPLOYDIR/lib:$DEPLOYDIR/lib64:$LD_LIBRARY_PATH
export LD_RUN_PATH=$DEPLOYDIR/lib:$DEPLOYDIR/lib64:$LD_RUN_PATH
echo "PATH modified"
echo "LD_LIBRARY_PATH modified"
echo "LD_RUN_PATH modified"
echo "PATH modified temporarily"
echo "LD_LIBRARY_PATH modified temporarily"
echo "LD_RUN_PATH modified temporarily"
if [ ! "`command -v curl`" ]; then
build_curl 7.26.0
@ -232,8 +229,3 @@ build_glew 1.7.0
build_opencsg 1.3.2
echo "OpenSCAD dependencies built in " $BASEDIR
echo "To build OpenSCAD, copy/paste these lines to your shell prompt: "
echo "export LD_LIBRARY_PATH=$DEPLOYDIR/lib:$DEPLOYDIR/lib64"
echo "GLEWDIR=$DEPLOYDIR OPENSCAD_LIBRARIES=$DEPLOYDIR qmake-qt4"
echo "make -j$NUMCPU"

View File

@ -0,0 +1,16 @@
# BASEDIR and DEPLOYDIR must be the same as in linux-build-dependencies.sh
BASEDIR=$HOME/openscad_deps
DEPLOYDIR=$BASEDIR
PATH=$BASEDIR/bin:$PATH
LD_LIBRARY_PATH=$DEPLOYDIR/lib:$DEPLOYDIR/lib64
LD_RUN_PATH=$DEPLOYDIR/lib:$DEPLOYDIR/lib64
OPENSCAD_LIBRARIES=$DEPLOYDIR
GLEWDIR=$DEPLOYDIR
echo PATH modified
echo LD_LIBRARY_PATH modified
echo LD_RUN_PATH modified
echo OPENSCAD_LIBRARIES modified
echo GLEWDIR modified