integrate wrapper script for linux

This commit is contained in:
Axel Kohlmeyer
2023-08-01 03:00:33 -04:00
parent 488b4d46cd
commit 418b2c3df0
2 changed files with 22 additions and 0 deletions

View File

@ -45,6 +45,17 @@ do \
cp -r ${QTDIR}/plugins/${dir} ${DESTDIR}/qt5plugins/
done
echo "Set up wrapper script"
MYDIR=$(dirname "$0")
cp ${MYDIR}/linux_wrapper.sh ${DESTDIR}/bin
for s in ${DESTDIR}/bin/*
do \
EXE=$(basename $s)
test ${EXE} = linux_wrapper.sh && continue
test ${EXE} = qt.conf && continue
ln -s bin/linux_wrapper.sh ${DESTDIR}/${EXE}
done
pushd ..
zip -9rv LAMMPS-Linux-amd64.zip LAMMPS_GUI
popd

View File

@ -0,0 +1,11 @@
#!/bin/sh
# wrapper for bundled executables
BASEDIR=$(dirname "$0")
EXENAME=$(basename "$0")
# append to LD_LIBRARY_PATH to prefer local (newer) libs
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BASEDIR}/lib
export LD_LIBRARY_PATH
exec "${BASEDIR}/bin/${EXENAME}" "$@"