Skip to content

Instantly share code, notes, and snippets.

@tschoonj
Created November 25, 2016 15:51
Show Gist options
  • Save tschoonj/03ba1330f43d15a4fe8f3b68e2b11849 to your computer and use it in GitHub Desktop.
Save tschoonj/03ba1330f43d15a4fe8f3b68e2b11849 to your computer and use it in GitHub Desktop.
DAWN Linux AppImage Recipe
#!/bin/bash
APP="DawnDiamond"
VERSION="2.3.0.v20161123-1546"
rm -rf $APP/$APP.AppDir
rm -rf out
mkdir -p $APP
cd $APP/
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
. ./functions.sh
mkdir -p $APP.AppDir/usr
cd $APP.AppDir/usr
wget http://opengda.org/DawnDiamond/2.3/downloads/builds-release/$APP-$VERSION-linux64.zip -O $APP-$VERSION-linux64.zip
#wget http://dawn.diamond.ac.uk/DawnDiamond/2.3/downloads/builds-release/$APP-$VERSION-linux64.zip -O $APP-$VERSION-linux64.zip
unzip -q $APP-$VERSION-linux64.zip
mv $APP-$VERSION-linux64 bin
rm $APP-$VERSION-linux64.zip
cd ..
get_apprun
#echo "-nosplash" > usr/bin/dawn.ini.new
echo "--launcher.GTK_version" >> usr/bin/dawn.ini.new
echo "2" >> usr/bin/dawn.ini.new
cat usr/bin/dawn.ini >> usr/bin/dawn.ini.new
mv usr/bin/dawn.ini.new usr/bin/dawn.ini
cat > $APP.desktop <<EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=DAWN
Icon=$APP.png
Exec=dawn
Categories=Education;Science;DataVisualization;Physics;Chemistry
Terminal=false
EOF
cp usr/bin/plugins/org.dawnsci.product.plugin_1.0.0.v20161123-1546/icons/Temp-48x48-icon.png $APP.png || exit 1
#find usr \
# -name "*.html" -exec rm '{}' \; \
# -or -name "*.bat" -exec rm '{}' \; \
# -or -name "mac*.png" -exec rm '{}' \; \
# -or -name "win*.png" -exec rm '{}' \; \
# -or -name "eclipse*.gif" -exec rm '{}' +
#
get_desktopintegration $APP
cd .. # Move out of the AppDir
generate_appimage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment