diff --git a/package_mrtrix b/package_mrtrix index 691a9177c4..86c6feea17 100755 --- a/package_mrtrix +++ b/package_mrtrix @@ -1,13 +1,12 @@ #!/bin/bash - cat < _package/mrtrix3/launcher <<"EOF" #!/bin/bash PREFIX="$(dirname $0)/.." @@ -55,18 +56,19 @@ COMMAND="$(basename $0)" "$PREFIX"/lib/ld-*.so* "$PREFIX"/exe/"$COMMAND" "$@" EOF chmod a+x _package/mrtrix3/launcher - mkdir _package/mrtrix3/bin - ( - cd _package/mrtrix3/bin - for n in ../exe/*; do ln -s ../launcher $(basename $n); done + mkdir -p _package/mrtrix3/release + mkdir -p _package/mrtrix3/release/bin + ( + cd _package/mrtrix3/release/bin + for n in ../exe/*; do ln -s ../../launcher $(basename $n); done ) echo - collating dependent system libraries... - LIBS=$(for n in bin/*; do ldd $n; done | sed 's/(.*)$//g' | sed 's/^.*=>//g' | sort | uniq | grep -v 'mrtrix\|vdso\|libGL.so\|libEGL.so\|nvidia\|fglrx' | xargs) - echo ' libraries identified:' + LIBS=$(for n in release/bin/*; do ldd $n; done | sed 's/(.*)$//g' | sed 's/^.*=>//g' | sort | uniq | grep -v 'mrtrix\|vdso\|libGL.so\|libEGL.so\|nvidia\|fglrx' | xargs) + echo ' libraries identified:' for n in $LIBS; do echo ' '$n; done - cp $LIBS _package/mrtrix3/lib/ - + cp $LIBS _package/mrtrix3/release/lib/ + QTCORE=$(for n in $LIBS; do echo $n; done | grep 'libQt.*Core') [[ $QTCORE ]] && ( # sort out Qt: QTPLUGDIR=$(strings $QTCORE | sed -n 's/qt_plugpath=\(.*\)$/\1/p') @@ -76,14 +78,14 @@ EOF echo ' additional libraries required for Qt:' for n in $QTLIBS; do echo ' '$n; done - cp $QTLIBS _package/mrtrix3/lib/ - cp -r $QTPLUGDIR _package/mrtrix3/lib/ - cat > _package/mrtrix3/lib/qt.conf << EOF + cp $QTLIBS _package/mrtrix3/release/lib/ + cp -r $QTPLUGDIR _package/mrtrix3/release/lib/ + cat > _package/mrtrix3/release/lib/qt.conf << EOF [Paths] Prefix = . EOF - + ) ) @@ -102,7 +104,7 @@ On your target system, unpack mrtrix3.tar.gz using: $ tar xfz mrtrix3.tar.gz -You should also add the mrtrix3/bin folder to your PATH to finalise the -installation. +You should also add the mrtrix3/release/bin and mrtrix3/scripits folders to your PATH to finalise +the installation. EOF