Update Recipe

This commit is contained in:
probonopd committed 2016-05-15 17:57:05 +02:00
1 parent 690ebeef2d
commit ae79177ebb
1 file changed
+41 -13
+41 -13
View File
@@ -3,12 +3,24 @@
# NOTE: Please test the resulting AppImage on your target systems and copy in any additional
# libraries and/or dependencies that might be missing on your target system(s).
########################################################################
# Get virtualenv on the target system
########################################################################
sudo apt-get update
sudo apt-get -y install python-virtualenv
########################################################################
# Source some helper functions
########################################################################
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
. ./functions.sh
########################################################################
# Create the AppDir
########################################################################
APP=PythonGTK3Hello
LOWERAPP=${APP,,}
@@ -18,9 +30,11 @@ cd $APP/
cd $APP.AppDir/
virtualenv usr
########################################################################
# Create a virtualenv inside the AppDir
########################################################################
cp avahi-discover usr/bin/
virtualenv usr
# Install python dependencies into the virtualenv
# ./usr/bin/pip install ...
@@ -32,15 +46,9 @@ cp -r /usr/lib/python2.7/dist-packages/gi usr/lib/python2.7/site-packages/
cp -r /usr/lib/python2.7/dist-packages/gobject/ usr/lib/python2.7/site-packages/
cp -r /usr/lib/python2.7/dist-packages/glib/ usr/lib/python2.7/site-packages/
get_apprun
cat > $LOWERAPP.desktop <<EOF
[Desktop Entry]
Name=$APP
Exec=$LOWERAPP
Icon=$LOWERAPP
Comment=A hello world app written in GTK3 and Python
EOF
########################################################################
# "Install" a simple sample app in the AppDir
########################################################################
mkdir -p usr/bin/
cat > usr/bin/$LOWERAPP <<\EOF
@@ -55,18 +63,38 @@ Gtk.main()
EOF
chmod a+x usr/bin/$LOWERAPP
########################################################################
# Finalize the AppDir
########################################################################
get_apprun
cat > $LOWERAPP.desktop <<EOF
[Desktop Entry]
Name=$APP
Exec=$LOWERAPP
Icon=$LOWERAPP
Comment=A hello world app written in GTK3 and Python
EOF
cp /usr/share/icons/hicolor/256x256/apps/logview.png $LOWERAPP.png
########################################################################
# Bundle dependencies
########################################################################
copy_deps ; copy_deps ; copy_deps
delete_blacklisted
move_lib
cp /usr/share/icons/hicolor/256x256/apps/logview.png $LOWERAPP.png
VERSION=1
ARCH=$(arch)
########################################################################
# Package the AppDir as an AppImage
########################################################################
# At this point, you should be able to run the application by executing
# ./AppRun