Experiments with buildung mousepad with meson

flo.xfce at gmx-topmail.de flo.xfce at gmx-topmail.de
Mon Oct 17 18:30:30 CEST 2016

On 10/17/16 17:51, Matthew Brush wrote:
> On 2016-10-17 08:12 AM, flo.xfce at gmx-topmail.de wrote:
>> Hey everyone,
>> Meson is a rather new build system, designed to "not suck". More details
>> here: https://github.com/mesonbuild/meson/wiki
>> I took mousepad and added support for building it with meson. You can
>> find my efforts here: https://github.com/Flow-It/mousepad
>> If you want to try out how fast it builds compared to autotools you need
>> meson and ninja installed and this patch for exo:
>> https://bugzilla.xfce.org/show_bug.cgi?id=12901
>> After that you need to run (in the source root directory):
>> mkdir build
>> meson build -Denable-maintainer-mode=true
>> cd build
>> ninja
>> I don't intend to replace autotools building but just offer a second
>> option. In general it should not be necessary to touch any existing
>> files. However, I changed the #include directives because of some
>> include search path problems
> You need to add the top source and build dirs to the include paths, for
> example in autotools it would be:
> *_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
I figured that out, too. But at this point I already changed the
includes from <mousepad/myheader.h> to "myheader.h". And actually, I
prefer quotes over angle brackets for including headers from the same
source tree.

>> and I added a new .desktop template and
>> renamed an .ui file (all these changes however could be applied to
>> mousepad without supporting meson, it makes building a bit more
>> straightforward and increases consistency).
> How? I just quickly looked but a lot of the changes seem unrelated to
> build system stuff.
Using the new mousepad.desktop.in.in.gettext file we can use gettext to
translate it instead of using intltool. We need gettext anyway for the
source translations, so why having two tools when one (gettext) can do
the job? (I know that the intltool stuff was needed when gettext did not
have the ability to translate desktop files. Our configure scripts where
never updated so I thought it was a good idea at this point).
The .ui file change is for consistency:
mousepad-window-ui.xml -> mousepad-window-ui.h -> mousepad_window_ui
mousepad-prefs-dialog.glade -> mousepad-prefs-dialog-ui.h ->
is not consistent (original file -> header -> internal variable name)
because for the prefs-dialog a "-ui" is added to the file name which was
not in the original file name. It's just a minor change but it makes the
build script better readable.

> Cheers,
> Matthew Brush
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce4-dev

More information about the Xfce4-dev mailing list