This is the official resource - http://wiki.xfce.org/dev/howto/panel_plugins
Here is the panel-plugins source code to use as a reference - http://git.xfce.org/panel-plugins/
And from this mailing list I found:
Here is a good tutorial available at http://xfc.xfce.org/docs/tutorial/html/chapter08.html (but remember you want to do a panel-plugin,not an XFCE app )
It's probably enough to go on, but its not incredibly straight forward. Is there a "hello world" tutorial to get me started? The first link I posted used to have an example plugin to download, but its since been striked out. Is there another simple example plugin I can play with or can you recommend an existing panel plugin that it quite simple (preferably one not in the goodies pack as I already have those installed).
The first link I posted used to have an example plugin to download, but its since been striked out.
The sample plugin can be found in the git repository: http://git.xfce.org/panel-plugins/xfce4-sample-plugin/
I can't can't figure out to build the example plugin. I installed xfce4-dev-tools and I ran ./autogen.sh
$ ./autogen.sh Preparing package directory /home/beardedlinuxgeek/Downloads/xfce4-sample-plugin... Creating /home/beardedlinuxgeek/Downloads/xfce4-sample-plugin/aclocal.m4... Running glib-gettextize --force --copy... Copying file mkinstalldirs Copying file po/Makefile.in.in Please add the files codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 from the /usr/share/aclocal directory to your autoconf macro directory or directly to your aclocal.m4 file. You will also need config.guess and config.sub, which you can get from ftp://ftp.gnu.org/pub/gnu/config/. Running intltoolize --automake --copy --force Patching file 'po/Makefile.in.in' Running libtoolize --force --copy... libtoolize: putting auxiliary files in `.'. libtoolize: copying file `./ltmain.sh' libtoolize: You should add the contents of the following files to `aclocal.m4': libtoolize: `/usr/share/aclocal/libtool.m4' libtoolize: `/usr/share/aclocal/ltoptions.m4' libtoolize: `/usr/share/aclocal/ltversion.m4' libtoolize: `/usr/share/aclocal/ltsugar.m4' libtoolize: `/usr/share/aclocal/lt~obsolete.m4' libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. Running aclocal -I /usr/share/xfce4/dev-tools/m4macros -I /usr/share/xfce4/dev-tools/m4macros... configure.ac:37: error: 'AM_CONFIG_HEADER': this macro is obsolete. You should use the 'AC_CONFIG_HEADERS' macro instead. /usr/share/aclocal-1.13/obsolete-err.m4:12: AM_CONFIG_HEADER is expanded from... configure.ac:37: the top level autom4te: /usr/bin/m4 failed with exit status: 1 aclocal: error: echo failed with exit status: 1
I tried automake
configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found. configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE, configure.ac: that aclocal.m4 is present in the top-level directory, configure.ac: and that aclocal.m4 was recently regenerated (using aclocal) configure.ac:59: error: required file './install-sh' not found configure.ac:59: 'automake --add-missing' can install 'install-sh' Makefile.am: error: required file './INSTALL' not found Makefile.am: 'automake --add-missing' can install 'INSTALL' panel-plugin/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') panel-plugin/Makefile.am:10: error: Libtool library used but 'LIBTOOL' is undefined panel-plugin/Makefile.am:10: The usual way to define 'LIBTOOL' is to add 'LT_INIT' panel-plugin/Makefile.am:10: to 'configure.ac' and run 'aclocal' and 'autoconf' again. panel-plugin/Makefile.am:10: If 'LT_INIT' is in 'configure.ac', make sure panel-plugin/Makefile.am:10: its definition is in aclocal's search path. panel-plugin/Makefile.am: error: required file './depcomp' not found panel-plugin/Makefile.am: 'automake --add-missing' can install 'depcomp' /usr/share/automake-1.13/am/depend2.am: error: am__fastdepCC does not appear in AM_CONDITIONAL /usr/share/automake-1.13/am/depend2.am: The usual way to define 'am__fastdepCC' is to add 'AC_PROG_CC' /usr/share/automake-1.13/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again /usr/share/automake-1.13/am/depend2.am: error: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.13/am/depend2.am: The usual way to define 'AMDEP' is to add one of the compiler tests /usr/share/automake-1.13/am/depend2.am: AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX, /usr/share/automake-1.13/am/depend2.am: AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC /usr/share/automake-1.13/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again
No idea how to build this package.
The following worked for me:
git clone http://git.xfce.org/panel-plugins/xfce4-sample-plugin/ cd xfce4-sample-plugin ./autogen.sh --enable-maintainer-mode --prefix=/usr --disable-debug
That almost worked. Before I ran autogen.sh I had to open configure.ac.in and change line 32 from AM_CONFIG_HEADER to AC_CONFIG_HEADERS. Then between lines 30 and 31 I inserted a new line with AC_USE_SYSTEM_EXTENSIONS.
Then everything was able to be compiled and installed. Thank you for your help.
Last edited by beardedlinuxgeek (2013-03-01 18:20:01)