Can create an AppImage with make-appimage.

This commit is contained in:
Andrew Hamilton 2017-06-30 12:47:50 +01:00
parent 9e410fa796
commit 50dac0aa58
5 changed files with 88 additions and 9 deletions

29
appimage/make-appimage Executable file
View file

@ -0,0 +1,29 @@
#!/bin/bash
# Copyright (C) 2017 Andrew Hamilton. All rights reserved.
# Licensed under the Artistic License 2.0.
set -e
VIGIL_PATH=$(realpath $(dirname $0)/..)
export VIGIL_PATH
function get_patched_recipe {
wget -c "https://github.com/AppImage/AppImages/raw/94d39b68d8d7ab56f31fde6f59bc8d2813d13599/recipes/meta/Recipe"
cp Recipe Recipe-patched
sed -i -e 's|delete_blacklisted|# delete_blacklisted|g' Recipe-patched
chmod +x Recipe-patched
}
[ $# -eq 0 ] && WORK_PATH=$(mktemp -d --suffix=-appimage) || WORK_PATH="$1"
cd "$WORK_PATH"
$VIGIL_PATH/appimage/make-appimage-yml.py > vigil.yml
get_patched_recipe
./Recipe-patched --no-di vigil.yml
mv out/Vigil* .
echo
echo "AppImage path: $(realpath Vigil*)"

44
appimage/make-appimage-yml.py Executable file
View file

@ -0,0 +1,44 @@
#!/usr/bin/env python3
# Copyright (C) 2017 Andrew Hamilton. All rights reserved.
# Licensed under the Artistic License 2.0.
import vigil.tools as tools
dist_deps = set()
for dependency in tools.dependencies("ubuntu"):
if "/" in dependency:
raise ValueError
else:
dist_deps.add(dependency)
dist_deps.update({"python3-pygments", "python3-pyinotify", "python3-docopt",
"util-linux", "python3-pil", "python3-pip",
"python3-setuptools"})
dep_list = "\n - ".join(sorted(dist_deps))
print("""app: vigil-code-monitor
ingredients:
packages:
- %s
dist: zesty
sources:
- deb http://archive.ubuntu.com/ubuntu/ zesty main universe
script:
- ./usr/bin/python3 -m pip install $VIGIL_PATH
- cp $VIGIL_PATH/appimage/vigil-icon.png .
- cp -a $VIGIL_PATH/tests .
- cp $VIGIL_PATH/test-all tests
- cat > vigil.desktop <<\EOF
- [Desktop Entry]
- Type=Application
- Name=Vigil Code Monitor
- Comment=Vigil maintains an up-to-date set of reports for every file in a codebase.
- Exec=./bin/python3 -m vigil
- Terminal=true
- Icon=vigil-icon.png
- Categories=Application;
- EOF
""" % dep_list)

BIN
appimage/vigil-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B