linux scripts without cd

This commit is contained in:
alemuntoni 2020-10-20 10:52:15 +02:00
parent 84fa5e6c34
commit f730693acc
2 changed files with 16 additions and 24 deletions

View File

@ -9,27 +9,22 @@
# You can give as argument the path of the bundle (default is src/install),
# and the AppImage will be placed in the parent directory (src)
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
#checking for parameters
if [ "$#" -eq 0 ]
then
BUNDLE_PATH="../../src/install"
BUNDLE_PATH=$SCRIPTS_PATH/../../src/install
else
BUNDLE_PATH=$(realpath $1)
fi
cd "$(dirname "$(realpath "$0")")"; #move to script directory
SCRIPTS_PATH=$(pwd)
cd $BUNDLE_PATH
PARENT_NAME="$(basename $BUNDLE_PATH)"
export VERSION=$(cat $SCRIPTS_PATH/../../ML_VERSION)
cd ..
$SCRIPTS_PATH/resources/appimagetool $PARENT_NAME
mv MeshLab-$VERSION*.AppImage MeshLab$VERSION-linux.AppImage
#chmod +x MeshLab$VERSION-linux.AppImage
mv $PARENT_NAME/MeshLab-$VERSION*.AppImage $PARENT_NAME/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
echo MeshLab$VERSION-linux.AppImage generated

View File

@ -6,30 +6,27 @@
# due to linuxdeployqt tool choice (see https://github.com/probonopd/linuxdeployqt/issues/340).
#
# Without given arguments, the folder that will be deployed is meshlab/src/install.
#
#
# You can give as argument the path of the bundle.
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
#checking for parameters
if [ "$#" -eq 0 ]
then
BUNDLE_PATH="../../src/install"
BUNDLE_PATH=$SCRIPTS_PATH/../../src/install
else
BUNDLE_PATH=$(realpath $1)
fi
cd "$(dirname "$(realpath "$0")")"; #move to script directory
SCRIPTS_PATH=$(pwd)
$SCRIPTS_PATH/resources/linuxdeployqt $BUNDLE_PATH/usr/share/applications/meshlab.desktop -bundle-non-qt-libs
cd $BUNDLE_PATH
chmod +x $BUNDLE_PATH/usr/bin/meshlab
rm $BUNDLE_PATH/AppRun
$SCRIPTS_PATH/resources/linuxdeployqt usr/share/applications/meshlab.desktop -bundle-non-qt-libs
chmod +x usr/bin/meshlab
rm AppRun
cp $SCRIPTS_PATH/resources/AppRunMeshLab .
mv AppRunMeshLab AppRun
chmod +x AppRun
cp $SCRIPTS_PATH/resources/AppRunMeshLab $BUNDLE_PATH/
mv $BUNDLE_PATH/AppRunMeshLab $BUNDLE_PATH/AppRun
chmod +x $BUNDLE_PATH/AppRun
#at this point, distrib folder contains all the files necessary to execute meshlab
echo "$BUNDLE_PATH is now a self contained meshlab application"
echo "$BUNDLE_PATH is now a self contained meshlab application"