From 6ce4239884780fafdf641fa52a2a8c7a0a02450d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 5 Nov 2017 11:55:52 -0800 Subject: build.sh: add option to create appdir This makes it easier to create an AppImage from the build artifacts. Signed-off-by: Dirk Hohndel --- scripts/build.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'scripts') diff --git a/scripts/build.sh b/scripts/build.sh index b5704af8a..5b2e11cbc 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -55,6 +55,10 @@ while [[ $# -gt 0 ]] ; do BUILD_MOBILE="1" BUILD_DESKTOP="1" ;; + -create-appdir) + # we are building an AppImage as by product + CREATE_APPDIR="1" + ;; *) echo "Unknown command line argument $arg" ;; @@ -485,4 +489,15 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do LIBRARY_PATH=$INSTALL_ROOT/lib make -j4 LIBRARY_PATH=$INSTALL_ROOT/lib make install + + if [ "$CREATE_APPDIR" = "1" ] ; then + # if we create an AppImage this makes gives us a sane starting point + cd $SRC + mkdir -p ./appdir + mkdir -p appdir/usr/share/metainfo + mkdir -p appdir/usr/share/icons/hicolor/256x256/apps + cp -r ./install-root/* ./appdir/usr + cp subsurface/appdata/subsurface.appdata.xml appdir/usr/share/metainfo/ + cp subsurface/icons/subsurface-icon.png appdir/usr/share/icons/hicolor/256x256/apps/ + fi done -- cgit v1.2.3-70-g09d2