-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmake_appimage.sh
executable file
·93 lines (80 loc) · 2.47 KB
/
make_appimage.sh
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
set -e
########################################################################
# Package the binaries built on Travis CI as an AppImage
#
# For more information, see http://appimage.org/
########################################################################
echo "Starting AppImage process"
cd "$TRAVIS_BUILD_DIR/build"
OUTDIR="$TRAVIS_BUILD_DIR/deploy"
APP="jwm-settings-manager"
# this variable is used in the sourced functions below
LOWERAPP="${APP}"
RELEASE=''
if [ -n "$TRAVIS_TAG" ]
then
VERSION="$TRAVIS_TAG"
RELEASE="$TRAVIS_TAG"
else
VERSION="$TRAVIS_COMMIT"
fi
if [ -z "$RELEASE" ]
then
RELEASE="$VERSION"
fi
APPDIR="/tmp/$APP/$APP.AppDir"
export ARCH=$(arch)
echo "Name: $APP"
echo "Version: $VERSION"
echo "Release: $RELEASE"
echo "Arch: $ARCH"
echo
echo "Begin AppImage building!"
make install DESTDIR="$APPDIR"
cd "$APPDIR/.."
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
source ./functions.sh
cd "$APPDIR"
########################################################################
# Copy in dependencies
########################################################################
echo "Copy Dependencies"
copy_deps
move_lib
########################################################################
# Delete stuff that should not go into the AppImage
########################################################################
echo "Delete dangerous libraries, and remove uneeded things"
# See https://github.com/probonopd/AppImages/blob/master/excludelist
delete_blacklisted
if [ -d usr/lib/$ARCH-linux-gnu ]
then
mv usr/lib/$ARCH-linux-gnu/* usr/lib/
rmdir usr/lib/$ARCH-linux-gnu
fi
rm -rf usr/include || true
rm -rf usr/lib/cmake || true
rm -rf usr/doc || true
rm -rf usr/share || true
rmdir usr/lib64 || true
rmdir usr/lib/mesa || true
find . -name *.so -or -name *.so.* -exec strip {} \;
for f in $(find . -type f -executable -exec file -- {} \; | grep ELF | cut -d: -f1); do
strip "$f"
done
########################################################################
# Get Desktop stuff
########################################################################
echo "Setting up Desktop integration"
get_icon
get_desktop
get_desktopintegration "$APP"
fix_desktop "$APP"
########################################################################
# Now packaging AppDir as an AppImage
########################################################################
echo "Generating AppImage!"
generate_appimage
echo "All finished"
exit 0