File: linux_appimages.sh

package info (click to toggle)
meshlab 2020.09%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,132 kB
  • sloc: cpp: 400,238; ansic: 31,952; javascript: 1,578; sh: 387; yacc: 238; lex: 139; python: 86; makefile: 30
file content (52 lines) | stat: -rw-r--r-- 1,754 bytes parent folder | download | duplicates (2)
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