mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 16:14:38 +00:00
39 lines
754 B
Bash
39 lines
754 B
Bash
#!/bin/bash
|
|
|
|
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
|
|
|
|
INSTALL_PATH=$SCRIPTS_PATH/../../install
|
|
QT_DIR=""
|
|
APPNAME="meshlab.app"
|
|
|
|
#checking for parameters
|
|
for i in "$@"
|
|
do
|
|
case $i in
|
|
-i=*|--install_path=*)
|
|
INSTALL_PATH="${i#*=}"
|
|
shift # past argument=value
|
|
;;
|
|
-qt=*|--qt_dir=*)
|
|
QT_DIR=${i#*=}/bin/
|
|
shift # past argument=value
|
|
;;
|
|
*)
|
|
# unknown option
|
|
;;
|
|
esac
|
|
done
|
|
|
|
ARGUMENTS=""
|
|
|
|
for plugin in $INSTALL_PATH/$APPNAME/Contents/PlugIns/*.so
|
|
do
|
|
ARGUMENTS="${ARGUMENTS} -executable=${plugin}"
|
|
done
|
|
|
|
${QT_DIR}macdeployqt $INSTALL_PATH/$APPNAME \
|
|
$ARGUMENTS
|
|
|
|
# remove everything from install path, except the appbundle
|
|
cd $INSTALL_PATH
|
|
ls | grep -xv "${APPNAME}" | xargs rm |