Explorar o código

ENH: fix x11 launch script for leopord x11 is auto-started for us on that os.

Bill Hoffman %!s(int64=17) %!d(string=hai) anos
pai
achega
8350a17101
Modificáronse 1 ficheiros con 21 adicións e 0 borrados
  1. 21 0
      Modules/CPack.RuntimeScript.in

+ 21 - 0
Modules/CPack.RuntimeScript.in

@@ -5,6 +5,26 @@
 CWD="`dirname \"$0\"`"
 TMP=/tmp/$UID/TemporaryItems
 
+version=`sw_vers -productVersion`
+if [ "$?" == "0" ]; then
+  major=${version%%\.*}
+  rest=${version#*\.}
+  minor=${rest%%\.*}
+  build=${rest#*\.}
+else
+  major=10
+  minor=4
+  build=0
+fi
+
+echo $version
+echo "Major = $major"
+echo "Minor = $minor"
+echo "Build = $build"
+
+
+# if 10.5 or greater, then all the open-x11 stuff need not occur
+if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
 ps -wx -ocommand | grep -e '[X]11.app' > /dev/null
 if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
     echo "rm -f ~/.xinitrc" > ~/.xinitrc
@@ -42,4 +62,5 @@ echo "$@" > /tmp/arguments.log
 if echo $1 | grep -- "^-psn_"; then
   shift
 fi
+fi
 exec "$CWD/bin/@CPACK_EXECUTABLE_NAME@" "$@" > /tmp/slicer.output 2>&1