Skip to content

Commit

Permalink
Install icons for linux version (and appimage)
Browse files Browse the repository at this point in the history
  • Loading branch information
cknave committed Oct 11, 2017
1 parent c366bcc commit 6e62f64
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 10 deletions.
21 changes: 21 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,24 @@ SUBDIRS = docs dosbox glob src

EXTRA_DIST = copying.txt soundfx.zzm bootstrap.sh
pkgdata_DATA = soundfx.zzm

#if FREEDESKTOP
desktopdir = $(datadir)/applications
desktop_DATA = inst/platform/linux/kevedit.desktop

ICON_SIZES = 16 32 128 256 512

install-icons:
for size in $(ICON_SIZES); do \
mkdir -p $(datadir)/icons/hicolor/$${size}x$${size}/apps; \
$(INSTALL_DATA) $(srcdir)/inst/icon$${size}.png $(datadir)/icons/hicolor/$${size}x$${size}/apps/kevedit.png; \
done

uninstall-icons:
for size in $(ICON_SIZES); do \
rm -f $(datadir)/icons/hicolor/$${size}x$${size}/apps/kevedit.png; \
done

install-data-local: install-icons
uninstall-local: uninstall-icons
#endif
28 changes: 25 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,37 @@ case "$host" in
esac


AC_MSG_CHECKING(for macOS)
case "$host" in
*darwin*)
AC_DEFINE(MACOS, [1], [Define to 1 if host is macOS])
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac

AC_ARG_WITH(dosbox, AC_HELP_STRING([--without-dosbox],[include DOSBox emulation support]),dosbox=$withval,dosbox=maybe)
if test "$dosbox" == "maybe"; then
if test -n "$WINDOWS32" || test -n "$DOS"; then
AC_MSG_NOTICE(DOS/Windows: Not enabling DOSBox support)
if test -n "$DOS"; then
AC_MSG_NOTICE(DOS: Not enabling DOSBox support)
else
AC_MSG_NOTICE(Non-DOS/Windows: Enabling DOSBox support)
AC_MSG_NOTICE(Non-DOS: Enabling DOSBox support)
dosbox=yes
fi
fi
AM_CONDITIONAL([FREEDESKTOP], [test "$freedesktop" = "yes"])

AC_ARG_WITH(freedesktop, AC_HELP_STRING([--with-freedesktop],[install desktop file and icons for GNOME/KDE]),freedesktop=$withval,freedesktop=maybe)
if test "$freedesktop" == "maybe"; then
if test -n "$WINDOWS32" || test -n "$DOS" || test -n "$MACOS"; then
AC_MSG_NOTICE(DOS/Windows/Mac: Not installing desktop file and icons)
else
AC_MSG_NOTICE(Non-DOS/Windows/Mac: Installing desktop file and icons)
freedesktop=yes
fi
fi

if test "$dosbox" == "yes"; then
AC_CHECK_PROG(MKISOFS, mkisofs, mkisofs)
Expand Down
4 changes: 0 additions & 4 deletions inst/platform/linux/KevEdit.AppDir/kevedit.desktop

This file was deleted.

Binary file removed inst/platform/linux/KevEdit.AppDir/kevedit.png
Binary file not shown.
8 changes: 5 additions & 3 deletions inst/platform/linux/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ if [ -z "$SOURCE" ]; then
fi

rm -rf /work/appdir
mkdir /work/appdir
cp -a /platform/linux/KevEdit.AppDir /work/appdir
cp /vendor/AppRun-x86_64 /work/appdir/KevEdit.AppDir/AppRun
mkdir -p /work/appdir/KevEdit.AppDir

rm -rf /work/kevedit
mkdir /work/kevedit
Expand All @@ -27,5 +25,9 @@ automake --add-missing
make
make install

cp -a /platform/linux/kevedit.desktop /work/appdir/KevEdit.AppDir/
cp -a /work/kevedit/inst/icon512.png /work/appdir/KevEdit.AppDir/kevedit.png
cp /vendor/AppRun-x86_64 /work/appdir/KevEdit.AppDir/AppRun

mkdir -p /work/appdir/KevEdit.AppDir/usr/lib
cp -a /usr/local/lib/libSDL2*.so* /work/appdir/KevEdit.AppDir/usr/lib/
10 changes: 10 additions & 0 deletions inst/platform/linux/kevedit.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=KevEdit
Comment=ZZT Editor
Exec=kevedit
Icon=kevedit
Terminal=false
Type=Application
StartupNotify=false

0 comments on commit 6e62f64

Please sign in to comment.