diff --git a/Makefile.am b/Makefile.am index 87eb42c0e7063814835e9525aa35c8f077581540..141593676fc982ff9d2cfd29999dc88972a43932 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,3 +6,30 @@ bin_SCRIPTS = lkt_show_config noinst_SCRIPTS = utils/scripts/manpage.bash CLEANFILES = utils/scripts/manpage.bash + +if LKT_APPIMAGE +# Build appimages, needs for lektor to be installed +appimage: install + [ -d AppImage ] || mkdir -p AppImage + cp $(top_srcdir)/inc/lektor/icon.xpm AppImage/lektor.xpm + + $(LKT_LINUXDEPLOY) --appdir AppImage/lektord \ + --desktop-file $(top_srcdir)/utils/desktop/lektord.desktop \ + --icon-file AppImage/lektor.xpm \ + --executable $(bindir)/lektord + $(LKT_APPIMAGETOOL) AppImage/lektord + + $(LKT_LINUXDEPLOY) --appdir AppImage/lkt \ + --desktop-file $(top_srcdir)/utils/desktop/lkt.desktop \ + --icon-file AppImage/lektor.xpm \ + --executable $(bindir)/lkt + $(LKT_APPIMAGETOOL) AppImage/lkt + +if LKT_KLKT + $(LKT_LINUXDEPLOY) --appdir AppImage/klkt \ + --desktop-file $(top_srcdir)/utils/desktop/klkt.desktop \ + --icon-file AppImage/lektor.xpm \ + --executable $(bindir)/klkt + $(LKT_APPIMAGETOOL) AppImage/klkt +endif +endif diff --git a/Makefile.in b/Makefile.in index d7c60060f495b65f38ddffa469c72f37858ea8f2..313912184730fe31d095a0aa2eeffe608a45240f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -953,6 +953,29 @@ uninstall-am: uninstall-binSCRIPTS .PRECIOUS: Makefile +# Build appimages, needs for lektor to be installed +@LKT_APPIMAGE_TRUE@appimage: install +@LKT_APPIMAGE_TRUE@ [ -d AppImage ] || mkdir -p AppImage +@LKT_APPIMAGE_TRUE@ cp $(top_srcdir)/inc/lektor/icon.xpm AppImage/lektor.xpm + +@LKT_APPIMAGE_TRUE@ $(LKT_LINUXDEPLOY) --appdir AppImage/lektord \ +@LKT_APPIMAGE_TRUE@ --desktop-file $(top_srcdir)/utils/desktop/lektord.desktop \ +@LKT_APPIMAGE_TRUE@ --icon-file AppImage/lektor.xpm \ +@LKT_APPIMAGE_TRUE@ --executable $(bindir)/lektord +@LKT_APPIMAGE_TRUE@ $(LKT_APPIMAGETOOL) AppImage/lektord + +@LKT_APPIMAGE_TRUE@ $(LKT_LINUXDEPLOY) --appdir AppImage/lkt \ +@LKT_APPIMAGE_TRUE@ --desktop-file $(top_srcdir)/utils/desktop/lkt.desktop \ +@LKT_APPIMAGE_TRUE@ --icon-file AppImage/lektor.xpm \ +@LKT_APPIMAGE_TRUE@ --executable $(bindir)/lkt +@LKT_APPIMAGE_TRUE@ $(LKT_APPIMAGETOOL) AppImage/lkt + +@LKT_APPIMAGE_TRUE@@LKT_KLKT_TRUE@ $(LKT_LINUXDEPLOY) --appdir AppImage/klkt \ +@LKT_APPIMAGE_TRUE@@LKT_KLKT_TRUE@ --desktop-file $(top_srcdir)/utils/desktop/klkt.desktop \ +@LKT_APPIMAGE_TRUE@@LKT_KLKT_TRUE@ --icon-file AppImage/lektor.xpm \ +@LKT_APPIMAGE_TRUE@@LKT_KLKT_TRUE@ --executable $(bindir)/klkt +@LKT_APPIMAGE_TRUE@@LKT_KLKT_TRUE@ $(LKT_APPIMAGETOOL) AppImage/klkt + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/README.md b/README.md index 3feec18cbe68ac4f14b106d573328fa2ea3581a1..8dcdfdfbe9fb62362fa724d406c055b3ac740d7e 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,7 @@ If you are using special modules or are compiling lektor without static modules, you may set their **absolute path** inside the lektor's config file. To generate AppImages, add `enable-appimage` to the `configure` line. Note that -doing so will override any defined prefix. Note that the only supported -distribution methode is AppImage. +the only supported distribution methode is AppImage. > **Important note**: if you are building using WSL, `lektord` will likely not launch, because `XDG_RUNTIME_DIR` is not defined here. This folder is diff --git a/configure b/configure index 07c279c84acd734563c8c6b3f51ca5598032e0a3..0b5836b6a1fe95b4617749735fe55503e9018015 100755 --- a/configure +++ b/configure @@ -673,6 +673,8 @@ LKT_APPIMAGETOOL CHMOD WGET PATCHELF +LKT_APPIMAGE_FALSE +LKT_APPIMAGE_TRUE LKT_DEBUG_ENABLED CXXCPP am__fastdepCXX_FALSE @@ -17328,6 +17330,14 @@ else LKT_APPIMAGE=no fi + if test "x${LKT_APPIMAGE}" = "xyes"; then + LKT_APPIMAGE_TRUE= + LKT_APPIMAGE_FALSE='#' +else + LKT_APPIMAGE_TRUE='#' + LKT_APPIMAGE_FALSE= +fi + if test "x${LKT_APPIMAGE}" = "xyes"; then : # Download tools for appimages @@ -17461,8 +17471,8 @@ fi as_fn_error $? "chmod is required for AppImage" "$LINENO" 5 fi - LKT_APPIMAGETOOL="$LKT_PATH_SOURCE/utils/appimagetool.AppImage" - LKT_LINUXDEPLOY="$LKT_PATH_SOURCE/utils/linuxdeploy.AppImage" + LKT_APPIMAGETOOL="$LKT_PATH_SOURCE/utils/appimagetool-`arch`.AppImage" + LKT_LINUXDEPLOY="$LKT_PATH_SOURCE/utils/linuxdeploy-`arch`.AppImage" @@ -17471,7 +17481,7 @@ fi $as_echo_n "checking AppImage creation tool... " >&6; } if test ! -x "$LKT_APPIMAGETOOL" ; then $WGET https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-`arch`.AppImage \ - -O $LKT_APPIMAGETOOL -o config.wget.log + -O "$LKT_APPIMAGETOOL" -o config.wget.log $CHMOD 00700 $LKT_PATH_SOURCE/utils/appimagetool.AppImage if test $? -eq 0 ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 @@ -17491,9 +17501,8 @@ $as_echo "already downloaded" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking LinuxDeploy creation tool" >&5 $as_echo_n "checking LinuxDeploy creation tool... " >&6; } if test ! -x "$LKT_LINUXDEPLOY" ; then - $WGET https://martinm.iiens.net/linuxdeploy \ - -O $LKT_PATH_SOURCE/utils/linuxdeploy-`arch`.AppImage -a config.wget.log - $CHMOD 00700 $LKT_PATH_SOURCE/utils/linuxdeploy-`arch`.AppImage + $WGET https://martinm.iiens.net/linuxdeploy -O "$LKT_LINUXDEPLOY" -a config.wget.log + $CHMOD 00700 $LKT_LINUXDEPLOY if test $? -eq 0 ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } @@ -17508,9 +17517,6 @@ fi $as_echo "already downloaded" >&6; } fi - # Override prefix var for each executable - # TODO: Find another way, don't override prefix - else { $as_echo "$as_me:${as_lineno-$LINENO}: Don't build appimages for lektord, lkt and klkt" >&5 @@ -18697,6 +18703,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${LKT_APPIMAGE_TRUE}" && test -z "${LKT_APPIMAGE_FALSE}"; then + as_fn_error $? "conditional \"LKT_APPIMAGE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${LKT_STATIC_MODULE_TRUE}" && test -z "${LKT_STATIC_MODULE_FALSE}"; then as_fn_error $? "conditional \"LKT_STATIC_MODULE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index 61de04096a9f28f8f956813ef237a14111184999..d2a74a7837d737510d4347b348bec1a9da8f5f80 100644 --- a/configure.ac +++ b/configure.ac @@ -99,6 +99,7 @@ AC_ARG_ENABLE([appimage], [AS_HELP_STRING([--enable-appimage], [Build appimages for lektord, lkt and klkt, no by default])], [LKT_APPIMAGE=$enableval], [LKT_APPIMAGE=no]) +AM_CONDITIONAL([LKT_APPIMAGE], [test "x${LKT_APPIMAGE}" = "xyes"]) AS_IF([test "x${LKT_APPIMAGE}" = "xyes"], [ # Download tools for appimages AC_PATH_PROG([PATCHELF], [patchelf]) @@ -108,8 +109,8 @@ AS_IF([test "x${LKT_APPIMAGE}" = "xyes"], [ AS_IF([test "$WGET" = "notfound"], [AC_MSG_ERROR([wget is required for AppImage]) ]) AS_IF([test "$CHMOD" = "notfound"], [AC_MSG_ERROR([chmod is required for AppImage]) ]) - LKT_APPIMAGETOOL="$LKT_PATH_SOURCE/utils/appimagetool.AppImage" - LKT_LINUXDEPLOY="$LKT_PATH_SOURCE/utils/linuxdeploy.AppImage" + LKT_APPIMAGETOOL="$LKT_PATH_SOURCE/utils/appimagetool-`arch`.AppImage" + LKT_LINUXDEPLOY="$LKT_PATH_SOURCE/utils/linuxdeploy-`arch`.AppImage" AC_SUBST([LKT_APPIMAGETOOL]) AC_SUBST([LKT_LINUXDEPLOY]) @@ -117,7 +118,7 @@ AS_IF([test "x${LKT_APPIMAGE}" = "xyes"], [ AC_MSG_CHECKING([AppImage creation tool]) if test ! -x "$LKT_APPIMAGETOOL" ; then $WGET https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-`arch`.AppImage \ - -O $LKT_APPIMAGETOOL -o config.wget.log + -O "$LKT_APPIMAGETOOL" -o config.wget.log $CHMOD 00700 $LKT_PATH_SOURCE/utils/appimagetool.AppImage AS_IF([test $? -eq 0 ], [AC_MSG_RESULT([done])], [AC_MSG_FAILURE([failed])]) else @@ -127,16 +128,12 @@ AS_IF([test "x${LKT_APPIMAGE}" = "xyes"], [ # Downlaod the AppDir management tool, create the AppDir AC_MSG_CHECKING([LinuxDeploy creation tool]) if test ! -x "$LKT_LINUXDEPLOY" ; then - $WGET https://martinm.iiens.net/linuxdeploy \ - -O $LKT_PATH_SOURCE/utils/linuxdeploy-`arch`.AppImage -a config.wget.log - $CHMOD 00700 $LKT_PATH_SOURCE/utils/linuxdeploy-`arch`.AppImage + $WGET https://martinm.iiens.net/linuxdeploy -O "$LKT_LINUXDEPLOY" -a config.wget.log + $CHMOD 00700 $LKT_LINUXDEPLOY AS_IF([test $? -eq 0 ], [AC_MSG_RESULT([done])], [AC_MSG_FAILURE([failed])]) else AC_MSG_RESULT([already downloaded]) fi - - # Override prefix var for each executable - # TODO: Find another way, don't override prefix ], [ AC_MSG_NOTICE([Don't build appimages for lektord, lkt and klkt]) ]) diff --git a/utils/desktop/klkt.desktop b/utils/desktop/klkt.desktop new file mode 100644 index 0000000000000000000000000000000000000000..a8831a36b2b140fe494253978f68823145bc132a --- /dev/null +++ b/utils/desktop/klkt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Klkt +Icon=lektor +GenericName=Lektor notification client +Comment=Notification client for lektord +Keywords=video;audio +Terminal=false +Categories=AudioVideo; +StartupNotify=true +Exec=klkt diff --git a/utils/desktop/lektord.desktop b/utils/desktop/lektord.desktop new file mode 100644 index 0000000000000000000000000000000000000000..79d73cd0313a271d8b28bf48bf2698066fbde6d2 --- /dev/null +++ b/utils/desktop/lektord.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Lektord +Icon=lektor +GenericName=Lektor deamon +Comment=The lektor deamon +Keywords=video;audio +Terminal=true +Categories=AudioVideo; +StartupNotify=true +Exec=lektord -F diff --git a/utils/desktop/lkt.desktop b/utils/desktop/lkt.desktop new file mode 100644 index 0000000000000000000000000000000000000000..851e0798c8f580a522a9052618da2bf01eb34f8f --- /dev/null +++ b/utils/desktop/lkt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=lkt +Icon=lektor +GenericName=lkt commnand line client +Comment=lkt command line client +Keywords=video;audio +Terminal=true +Categories=AudioVideo; +StartupNotify=true +Exec=lkt