This commit is contained in:
SANO Masatoshi 2019-05-07 09:21:16 +00:00
parent 16a63d38ef
commit 7d38dc369d
2 changed files with 15 additions and 11 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
*.o
*.dirstamp
*.AppImage
.deps
src/ros
src/ros.exe

View file

@ -1,13 +1,23 @@
#!/bin/sh -ex
deploy=linuxdeploy-x86_64.AppImage
cd `dirname $0`
cd ..
deploy=appimagetool-x86_64.AppImage
desktop=roswell.desktop
appdir=roswell.AppDir
icon=roswell.png
./configure prefix=`pwd`/$appdir
make
make install
# Download the toolchain
curl -fsSLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$deploy"
curl -fsSLO "https://github.com/AppImage/AppImageKit/releases/download/11/$deploy"
# Make it executable
chmod +x "./$deploy"
cd $appdir
# Download the icon
curl -fsSL "https://avatars0.githubusercontent.com/u/16501222?s=256&v=4" -o "$icon"
curl -fsSL "https://raw.githubusercontent.com/AppImage/AppImageKit/master/resources/AppRun" -o AppRun
chmod +x AppRun
# Build appimage
cat <<EOF > "$desktop"
[Desktop Entry]
@ -22,12 +32,5 @@ Icon=roswell
Terminal=true
MimeType=image/png;
EOF
appdir=`mktemp -d`
./$deploy \
--icon-file="$icon" \
--desktop-file="roswell.desktop" \
--appdir="$appdir" \
--executable="$1" \
--output=appimage
rm -rf $appdir $deploy $desktop
cd ..
./$deploy roswell.AppDir