diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/check-dependencies.sh | 2 | ||||
| -rw-r--r-- | scripts/installer.nsi | 1 | ||||
| -rwxr-xr-x | scripts/release-common.sh | 9 | ||||
| -rw-r--r-- | scripts/setenv-unibuild.sh | 7 | ||||
| -rwxr-xr-x | scripts/uni-build-dependencies.sh | 125 | 
5 files changed, 126 insertions, 18 deletions
diff --git a/scripts/check-dependencies.sh b/scripts/check-dependencies.sh index eaed556..6a3e637 100755 --- a/scripts/check-dependencies.sh +++ b/scripts/check-dependencies.sh @@ -449,7 +449,7 @@ check_old_local()    warnon=    if [ "`uname | grep -i linux`" ]; then      header_list="opencsg.h CGAL boost GL/glew.h gmp.h mpfr.h eigen2 eigen3" -    liblist="libboost libopencsg libCGAL libglew" +    liblist="libboost_system libboost_system-mt libopencsg libCGAL libglew"      for i in $header_list $liblist; do        if [ -e /usr/local/include/$i ]; then          echo "Warning: you have a copy of "$i" under /usr/local/include" diff --git a/scripts/installer.nsi b/scripts/installer.nsi index 87ec18d..1841431 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -6,6 +6,7 @@ DirText "This will install OpenSCAD on your computer. Choose a directory"  Section "install"  SetOutPath $INSTDIR  File openscad.exe +File openscad.com  File /r /x mingw-cross-env examples  File /r /x mingw-cross-env libraries  ${registerExtension} "$INSTDIR\openscad.exe" ".scad" "OpenSCAD_File" diff --git a/scripts/release-common.sh b/scripts/release-common.sh index ae856df..de14cb1 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -166,7 +166,14 @@ fi  case $OS in      LINXWIN)          # dont use paralell builds, it can error-out on parser_yacc. + +        # make main openscad.exe          cd $DEPLOYDIR && make $TARGET + +        # make console pipe-able openscad.com - see winconsole.pri for info +        i686-pc-mingw32-qmake CONFIG+=winconsole ../openscad.pro +        make +          cd $OPENSCADDIR      ;;      *) @@ -232,6 +239,7 @@ case $OS in          #package          cp win32deps/* openscad-$VERSION          cp $TARGET/openscad.exe openscad-$VERSION +        cp $TARGET/openscad.com openscad-$VERSION          rm -f openscad-$VERSION.zip          "$ZIP" $ZIPARGS openscad-$VERSION.zip openscad-$VERSION          rm -rf openscad-$VERSION @@ -242,6 +250,7 @@ case $OS in          echo "Creating binary package"          cd $DEPLOYDIR          cp $TARGET/openscad.exe openscad-$VERSION +        cp $TARGET/openscad.com openscad-$VERSION          rm -f OpenSCAD-$VERSION.zip          "$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION          cd $OPENSCADDIR diff --git a/scripts/setenv-unibuild.sh b/scripts/setenv-unibuild.sh index 881526e..66fb7a9 100644 --- a/scripts/setenv-unibuild.sh +++ b/scripts/setenv-unibuild.sh @@ -130,5 +130,12 @@ if [ "`echo $* | grep qt5`" ]; then   setenv_qt5  fi +if [ -e $DEPLOYDIR/include/Qt ]; then +  echo "Qt found under $DEPLOYDIR ... " +  QTDIR=$DEPLOYDIR +  export QTDIR +  echo "QTDIR modified to $DEPLOYDIR" +fi +  clean_note diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 0c37605..09b6b79 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -24,14 +24,25 @@  #  # Prerequisites:  # - wget or curl -# - Qt4 +# - OpenGL (GL/gl.h) +# - GLU (GL/glu.h)  # - gcc +# - Qt4 +# +# If your system lacks qt4, build like this: +# +#   ./scripts/uni-build-dependencies.sh qt4 +#   . ./scripts/setenv-unibuild.sh  # -# Enable Clang (experimental, only works on linux): +# If your system lacks glu, try to build like this: +# +#   ./scripts/uni-build-dependencies.sh glu +# +# If you want to try Clang compiler (experimental, only works on linux):  #  #   . ./scripts/setenv-unibuild.sh clang  # -# Enable Qt5 (experimental) +# If you want to try Qt5 (experimental)  #  #   . ./scripts/setenv-unibuild.sh qt5  # @@ -42,6 +53,51 @@ printUsage()    echo  } +build_glu() +{ +  version=$1 +  if [ -e $DEPLOYDIR/lib/libGLU.so ]; then +    echo "GLU already installed. not building" +    return +  fi +  echo "Building GLU" $version "..." +  cd $BASEDIR/src +  rm -rf glu-$version +  if [ ! -f glu-$version.tar.gz ]; then +    curl -O http://cgit.freedesktop.org/mesa/glu/snapshot/glu-$version.tar.gz +  fi +  tar xzf glu-$version.tar.gz +  cd glu-$version +  ./autogen.sh --prefix=$DEPLOYDIR +  make -j$NUMCPU +  make install +} + +build_qt4() +{ +  version=$1 +  if [ -e $DEPLOYDIR/include/Qt ]; then +    echo "qt already installed. not building" +    return +  fi +  echo "Building Qt" $version "..." +  cd $BASEDIR/src +  rm -rf qt-everywhere-opensource-src-$version +  if [ ! -f qt-everywhere-opensource-src-$version.tar.gz ]; then +    curl -O http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-$version.tar.gz +  fi +  tar xzf qt-everywhere-opensource-src-$version.tar.gz +  cd qt-everywhere-opensource-src-$version +  ./configure -prefix $DEPLOYDIR -opensource -confirm-license -fast -no-qt3support -no-svg -no-phonon -no-audio-backend -no-multimedia -no-javascript-jit -no-script -no-scripttools -no-declarative -no-xmlpatterns -nomake demos -nomake examples -nomake docs -nomake translations -no-webkit +  make -j$NUMCPU +  make install +  QTDIR=$DEPLOYDIR +  export QTDIR +  echo "----------" +  echo " Please set QTDIR to $DEPLOYDIR ( or run '. scripts/setenv-unibuild.sh' )" +  echo "----------" +} +  build_bison()  {    version=$1 @@ -176,15 +232,32 @@ build_boost()      fi    fi    # We only need certain portions of boost -  ./bootstrap.sh --prefix=$DEPLOYDIR --with-libraries=thread,program_options,filesystem,system,regex +  if [ -e ./bootstrap.sh ]; then +    BSTRAPBIN=./bootstrap.sh +  else +    BSTRAPBIN=./configure +  fi +  $BSTRAPBIN --prefix=$DEPLOYDIR --with-libraries=thread,program_options,filesystem,system,regex +	if [ -e ./b2 ]; then +    BJAMBIN=./b2; +  elif [ -e ./bjam ]; then +    BJAMBIN=./bjam +  elif [ -e ./Makefile ]; then +    BJAMBIN=make +  fi    if [ $CXX ]; then      if [ $CXX = "clang++" ]; then -      ./b2 -j$NUMCPU toolset=clang install +      $BJAMBIN -j$NUMCPU toolset=clang install        # ./b2 -j$NUMCPU toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" install      fi    else -    ./b2 -j$NUMCPU -    ./b2 install +    $BJAMBIN -j$NUMCPU +    if [ $? = 0 ]; then +      $BJAMBIN install +    else +      echo boost build failed +      exit 1 +    fi    fi  } @@ -199,19 +272,28 @@ build_cgal()    cd $BASEDIR/src    rm -rf CGAL-$version    if [ ! -f CGAL-$version.tar.* ]; then -    #4.0.2 -    curl --insecure -O https://gforge.inria.fr/frs/download.php/31174/CGAL-$version.tar.bz2 -    # 4.0 curl --insecure -O https://gforge.inria.fr/frs/download.php/30387/CGAL-$version.tar.gz -    # 3.9 curl --insecure -O https://gforge.inria.fr/frs/download.php/29125/CGAL-$version.tar.gz +    # 4.1 +    curl --insecure -O https://gforge.inria.fr/frs/download.php/31640/CGAL-$version.tar.bz2 +    # 4.0.2 curl --insecure -O https://gforge.inria.fr/frs/download.php/31174/CGAL-$version.tar.bz2 +    # 4.0 curl --insecure -O https://gforge.inria.fr/frs/download.php/30387/CGAL-$version.tar.gz #4.0 +    # 3.9 curl --insecure -O https://gforge.inria.fr/frs/download.php/29125/CGAL-$version.tar.gz #3.9      # 3.8 curl --insecure -O https://gforge.inria.fr/frs/download.php/28500/CGAL-$version.tar.gz      # 3.7 curl --insecure -O https://gforge.inria.fr/frs/download.php/27641/CGAL-$version.tar.gz    fi -  tar jxf CGAL-$version.tar.bz2 +  tar xf CGAL-$version.tar.bz2    cd CGAL-$version +  mkdir bin +  cd bin +  rm -rf ./* +  if [ "`uname -a| grep ppc64`" ]; then +    CGAL_BUILDTYPE="Release" # avoid assertion violation +  else +    CGAL_BUILDTYPE="Debug" +  fi    if [ "`echo $2 | grep use-sys-libs`" ]; then -    cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DCMAKE_BUILD_TYPE=Debug +    cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DCMAKE_BUILD_TYPE=$CGAL_BUILDTYPE ..    else -    cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DGMP_INCLUDE_DIR=$DEPLOYDIR/include -DGMP_LIBRARIES=$DEPLOYDIR/lib/libgmp.so -DGMPXX_LIBRARIES=$DEPLOYDIR/lib/libgmpxx.so -DGMPXX_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_LIBRARIES=$DEPLOYDIR/lib/libmpfr.so -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DBOOST_ROOT=$DEPLOYDIR -DCMAKE_BUILD_TYPE=Debug +    cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DGMP_INCLUDE_DIR=$DEPLOYDIR/include -DGMP_LIBRARIES=$DEPLOYDIR/lib/libgmp.so -DGMPXX_LIBRARIES=$DEPLOYDIR/lib/libgmpxx.so -DGMPXX_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_LIBRARIES=$DEPLOYDIR/lib/libmpfr.so -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DBOOST_ROOT=$DEPLOYDIR -DCMAKE_BUILD_TYPE=$CGAL_BUILD_TYPE ..    fi    make -j$NUMCPU    make install @@ -272,7 +354,7 @@ build_glew()  build_opencsg()  { -  if [ -e $DEPLOYDIR/include/opencsg.h ]; then +  if [ -e $DEPLOYDIR/lib/libopencsg.so ]; then      echo "OpenCSG already installed. not building"      return    fi @@ -426,6 +508,16 @@ if [ $1 ]; then      build_opencsg 1.3.2      exit    fi +  if [ $1 == "qt4" ]; then +    # such a huge build, put here by itself +    build_qt4 4.8.4 +    exit +  fi +  if [ $1 == "glu" ]; then +    # Mesa and GLU split in late 2012, so it's not on some systems +    build_glu 9.0.0 +    exit +  fi  fi @@ -433,13 +525,12 @@ fi  # Main build of libraries  # edit version numbers here as needed.  # -  build_eigen 3.1.1  build_gmp 5.0.5  build_mpfr 3.1.1  build_boost 1.49.0  # NB! For CGAL, also update the actual download URL in the function -build_cgal 4.0.2 +build_cgal 4.1  build_glew 1.9.0  build_opencsg 1.3.2  | 
