1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#!/bin/bash
# This is a script shell for setting up the AppImage bundle for linux
# Requires a properly built meshlab, boundled and deployed (see linux_deploy.sh)
# inside the directory given as argument
#
# Without given arguments, MeshLab AppImage(s) will be placed in the meshlab
# directory.
#
# You can give as argument the DISTRIB_PATH.
#checking for parameters
if [ "$#" -eq 0 ]
then
DISTRIB_PATH="../../distrib"
else
DISTRIB_PATH=$(realpath $1)
fi
cd "$(dirname "$(realpath "$0")")"; #move to script directory
INSTALL_PATH=$(pwd)
cd $DISTRIB_PATH
PARENT_NAME="$(basename $DISTRIB_PATH)"
export VERSION=$(cat $INSTALL_PATH/../../ML_VERSION)
cd ..
#mv $PARENT_NAME/usr/share/applications/meshlab.desktop .
mv $PARENT_NAME/AppRun $PARENT_NAME/AppRunMeshLab
mv $PARENT_NAME/AppRunMeshLabServer $PARENT_NAME/AppRun
rm $PARENT_NAME/*.desktop
cp $PARENT_NAME/usr/share/applications/meshlab_server.desktop $PARENT_NAME/
$INSTALL_PATH/resources/appimagetool $PARENT_NAME
mv MeshLabServer-$VERSION*.AppImage MeshLabServer$VERSION-linux.AppImage
#chmod +x MeshLabServer$VERSION-linux.AppImage
#mv $PARENT_NAME/usr/share/applications/meshlab_server.desktop .
#mv meshlab.desktop $PARENT_NAME/usr/share/applications/
mv $PARENT_NAME/AppRun $PARENT_NAME/AppRunMeshLabServer
mv $PARENT_NAME/AppRunMeshLab $PARENT_NAME/AppRun
rm $PARENT_NAME/*.desktop
cp $PARENT_NAME/usr/share/applications/meshlab.desktop $PARENT_NAME/
$INSTALL_PATH/resources/appimagetool $PARENT_NAME
mv MeshLab-$VERSION*.AppImage MeshLab$VERSION-linux.AppImage
#chmod +x MeshLab$VERSION-linux.AppImage
#at this point, distrib folder contains all the files necessary to execute meshlab
echo MeshLab$VERSION-linux.AppImage and MeshLabServer$VERSION-linux.AppImage generated
|