summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre.ledru@scilab.org>2011-10-07 17:30:20 +0200
committerSylvestre Ledru <sylvestre.ledru@scilab.org>2011-10-07 17:30:20 +0200
commite96bfd1a0a35754bf741badc4ba863fee6fcb048 (patch)
tree883332aca6949ebd8a5d92819e144bf46d44af14
parent7a128019b01489bf49bfa7d7b5c06468fa38425e (diff)
downloadscilab-5.3.zip
scilab-5.3.tar.gz
Also launch the update of the path in scilab-cli and gui5.3
Change-Id: I94e232a023212974c34d661d7d40e10a1cbbc8a7
-rwxr-xr-xscilab/bin/scilab52
1 files changed, 38 insertions, 14 deletions
diff --git a/scilab/bin/scilab b/scilab/bin/scilab
index fbaf702..61a18e4 100755
--- a/scilab/bin/scilab
+++ b/scilab/bin/scilab
@@ -624,11 +624,7 @@ cd "$LOCALOLDPWD"
624#export PVM_ARCH 624#export PVM_ARCH
625 625
626 626
627# 627detect_macosx_version()
628# Scilab will not work on some Mac OSX version
629# Check version number and ask user if he wants to go on.
630#
631check_macosx_version()
632{ 628{
633 macosxVersion=`sw_vers | grep '^ProductVersion:' | grep -o '[0-9]*\.[0-9]*\.[0-9]*'` 629 macosxVersion=`sw_vers | grep '^ProductVersion:' | grep -o '[0-9]*\.[0-9]*\.[0-9]*'`
634 if test "${macosxVersion}" = ""; then 630 if test "${macosxVersion}" = ""; then
@@ -642,12 +638,45 @@ check_macosx_version()
642 echo "Found MacOSX Version: $macosxVersion" 638 echo "Found MacOSX Version: $macosxVersion"
643 fi 639 fi
644 640
641}
642
643set_macox_specific_path()
644{
645
645 PATH_TO_SPECIFIC_10_6=$SCIBINARYBASE/lib/thirdparty/10.6/ 646 PATH_TO_SPECIFIC_10_6=$SCIBINARYBASE/lib/thirdparty/10.6/
646 PATH_TO_SPECIFIC_10_5=$SCIBINARYBASE/lib/thirdparty/10.5/ 647 PATH_TO_SPECIFIC_10_5=$SCIBINARYBASE/lib/thirdparty/10.5/
647 648
648 case $macosxMajorVersion in 649 case $macosxMajorVersion in
649 10) 650 10)
650 case $macosxMinorVersion in 651 case $macosxMinorVersion in
652 6)
653 # the iconv lib fails under 10.7, just declare it for 10.5 & 10.6
654 LD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_6${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
655 DYLD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_6${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}
656 ;;
657 5)
658 # the iconv lib fails under 10.7, just declare it for 10.5 & 10.6
659 LD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_6${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
660 DYLD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_6${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}
661 LD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_5${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
662 DYLD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_5${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}
663 ;;
664 esac
665 ;;
666 esac
667
668}
669
670#
671# Scilab will not work on some Mac OSX version
672# Check version number and ask user if he wants to go on.
673#
674check_macosx_version()
675{
676
677 case $macosxMajorVersion in
678 10)
679 case $macosxMinorVersion in
651 7) 680 7)
652 # We force to install JRE on Lion 681 # We force to install JRE on Lion
653 /usr/libexec/java_home --request 682 /usr/libexec/java_home --request
@@ -655,9 +684,6 @@ check_macosx_version()
655 ;; 684 ;;
656 685
657 6) 686 6)
658 # the iconv lib fails under 10.7, just declare it for 10.5 & 10.6
659 LD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_6${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
660 DYLD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_6${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}
661 687
662 if test $macosxBuildVersion -le 4; then 688 if test $macosxBuildVersion -le 4; then
663 # Version <= 10.6.4 689 # Version <= 10.6.4
@@ -665,12 +691,6 @@ check_macosx_version()
665 fi 691 fi
666 ;; 692 ;;
667 5) 693 5)
668 # the iconv lib fails under 10.7, just declare it for 10.5 & 10.6
669 LD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_6${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
670 DYLD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_6${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}
671 LD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_5${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
672 DYLD_LIBRARY_PATH=$PATH_TO_SPECIFIC_10_5${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}
673
674 if test $macosxBuildVersion -le 7; then 694 if test $macosxBuildVersion -le 7; then
675 # Version <= 10.5.8 695 # Version <= 10.5.8
676 osascript $BINPATH/checkmacosx.applescript $macosxVersion "10.5.8 (Leopard) or newer system" || exit 128 696 osascript $BINPATH/checkmacosx.applescript $macosxVersion "10.5.8 (Leopard) or newer system" || exit 128
@@ -712,6 +732,10 @@ case $OS in
712 # display a standard window 732 # display a standard window
713 BINPATH=$(dirname $0) 733 BINPATH=$(dirname $0)
714 # Do not perform the check with Scilab is started in CLI mode 734 # Do not perform the check with Scilab is started in CLI mode
735
736 detect_macosx_version
737 set_macox_specific_path
738
715 if test "$SCILAB_MODE" = "gui"; then 739 if test "$SCILAB_MODE" = "gui"; then
716 check_macosx_version 740 check_macosx_version
717 fi 741 fi