My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
BuildFromSource  
how to build global menu from the source.
Phase-Deploy, Deprecated, installation
Updated Aug 17, 2011 by rainwood...@gmail.com

Introduction

This article will help you to build gnome-globalmenu from a svn snapshot. This guide works for the 0.7.x branch, but not for the current 0.9.x branch.

Step 0: Prerequisites

  • VALA = 0.7.7 is a must for building from svn. Building from a released tarball doesn't need it.
    • lastest trunk build of vala should work, though not tested.
    • SRPM
    • Please also check the configure.ac file for the most updated requirement on VALA
    • libwnck-1.0
    • gtk+-2.0
    • gnome-menus
    • libpanelapplet-1.0 (for GlobalMenu.PanelApplet)

Step 1: Obtain the Source

Read GitRepository for how to get the source code from the git repository.

Step 2: Compile the Source

configure

cd gnome-globalmenu
./autogen.sh --prefix=/usr --sysconfdir=/etc
make

For most linux flavors I know, --prefix=/usr is more preferable than --prefix=/usr/local. The sysconfdir parameter is to make gconf happy. Other things you may want to change are (useful for packagers)

--disable-tests # disable building the tests (they take some time)
--disable-schemas-install # disable installing the gconf schemas. DON'T use this unless you know what you are doing

components

Take a look at GlobalMenuSpecification to first understand the required components.

libglobalmenu-gnome converts each gtk window to a client. GlobalMenu.PanelApplet is a Global Menu Server. It is a panel applet that features some window management. libgnomenu-panel is another Global Menu Server. It is a GTK Plugin that adds global menu entry to the GNOME main menu bar.

module

libglobalmenu-gnome is a GTK plugin module that makes GTK aware of the global menu by dynamic patching. The library is built under gtk-modules/globalmenu/.

At this stage you can set the environment to test the global menu:

export GTK_MODULES=globalmenu-gnome

Using the environment variable to load the module for end users is not recommended because it is not integrated into the gnome stack. After installation you can enable the module with a gconf key, as mentioned later.

If you are debugging, some libtool tricks can help

cd gtk-modules/globalmenu;
libtool gdb [any application]

Environment variable GLOBALMENU_GNOME_AGRS contains the gnu style arguments of the gtk plugin module library

GLOBALMENU_GNOME_ARGS=
--verbose
--disable
--log-file="filename"

In order not to mess up with gnome-keyring and similar applications that relies on 'zero' output of messages, by default the module will log the verbose messages to ~/.gnomenu.log.

The magic environment variable GTK_MENUBAR_NO_MAC can be specified for the module to ignore the applications.

export GTK_MENUBAR_NO_MAC=[prgname list, eg: "gedit gnome-settings-daemon"]

If some application doesn't work well with the plugin, please file an issue.

applet

The gnome-panel applet is built at applet/GlobalMenu.PanelApplet. The applet is built with libgnomenu, which composes the GTK widget representaion of Global Menu.

If GNOME_GlobalMenu_PanelApplet.server is not installed to the correct bonobo-activation location, you can not add the applet to the panel.

Also, see David's tricks for debugging a panel applet.

--verbose for many debug messages.

Step 3: Install

check

First check if things are sane.

make check

Sometimes the checks are broken. If that's the case please file a bug report.

install

To install

su -c 'make install'

post-install configuration

If you disabled the installation of the schema, please install it by the method specified by your distributation.

Ensure libglobalmenu-gnome is loaded as a Gtk module by setting the gconf key

apps/gnome-settings-daemon/gtk-modules/globalmenu-gnome

Notice that loading and unloading the module on the fly is yet experimental. Random crashes do occur: Save your work before toggling Global Menu! So please immediately restart your gnome session after changing this key.

Remember to add the applet to your panel. There is also a shortcut to this key in the preference window of the applet.

Step 4: Packaging

HINTS:

Because some of the c source code is built from vala code, prepend a make before make dist to avoid strange building problems.

Step 5: Remove

su -c 'make uninstall'

Troubleshooting

In General

Please report to our project's mail list the detail of the trouble which traps you . We will try to help. the address of the mail list is googlegroups.com: gnome-globalmenu . reverse the order and replace : with @.

GIT traffic also goes into the groups.

Comment by dbr...@gmail.com, Mar 19, 2009

@pixelazion: you should install libgnome-menu-dev

Comment by ali...@gmail.com, Mar 21, 2009

Hi rainwoodman,

im trying to compile gnome globalmenu following the instructions for CentOS5.2 and when I enter ./autogen.sh --prefix=/usr --sysconfdir=/etc

it displays this error:

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... Running gnome-doc-common... Running aclocal-1.4... aclocal: configure.ac: 14: macro `AM_PROG_CC_C_O' not found in library aclocal: configure.ac: 21: macro `AM_GCONF_SOURCE_2' not found in library

Could you help me please?

thanks for your work! Regards from Gibraltar

Comment by ali...@gmail.com, Mar 21, 2009

sorry i forgot to say that i want to make it work in xfce :D

Comment by kox...@gmail.com, Apr 17, 2009

hi in opensuse 11.1 gnome 2.26 show this:

make: No hay ninguna regla para construir el objetivo licenses.h', necesario para all'. Alto.

say, there is not ruls to buil licenses.s needed for 'alls, stop.

one one idea???

Comment by Francesc...@gmail.com, Apr 19, 2009
Comment by adityago...@gmail.com, May 2, 2009

I got following notification after adding global menu applet on Debian lenny

Global Menu Plugin is not enabled on this desktop. Enable the plugin by accessing the preference dialog via a right click, or by exporting GTK_MODULES=globalmenu-gnome in your profile.

I've tried this but nothing happened. What to do

Comment by glaedr.i...@gmail.com, Jun 27, 2009

./autogen.sh: 15: ./configure: not found in fact, the folder doesn't contain any script named "configure", and neither does the folder on the Internet....

Comment by iwillhap...@gmail.com, Dec 2, 2009

In ubuntu 9.10 ,I got this error while I make it: "make5?: 没有规则可以创建“test-adapter”需要的目标“../libserver.la”。 停止。" what`s wrong?

Comment by project member lviggi...@gmail.com, Dec 9, 2009

Same problem here (ubuntu 9.10 amd64, vala 0.7.8)

Comment by golim...@gmail.com, Dec 15, 2009

@iwillhappy1314, @Iviggiani Try:

make clean
./autogen.sh --prefix=/usr --sysconfdir=/etc --disable-tests --without-xfce4-panel
Comment by Tiger2Wa...@gmail.com, Dec 22, 2009

I have this problem also even run: make clean ./autogen.sh --prefix=/usr --sysconfdir=/etc --disable-tests --without-xfce4-panel make

The output is:


... make2?: Nothing to be done for `all'. make2?: Leaving directory `/mnt/d2on3/working/mod/gnome-globalmenu/vapi' Making all in tests make2?: Entering directory `/mnt/d2on3/working/mod/gnome-globalmenu/tests' vapidir=../vapi -H testman.h -C --basedir=.. --pkg gtk+-2.0 --library testman testman.vala /bin/bash: -H: command not found make2?: [testman.vapi] Error 127 (ignored) make all-am make3?: Entering directory `/mnt/d2on3/working/mod/gnome-globalmenu/tests' make3?: No rule to make target testman.c', needed by libtestman_la-testman.lo'. Stop. make3?: Leaving directory `/mnt/d2on3/working/mod/gnome-globalmenu/tests' make2?: all? Error 2 make2?: Leaving directory `/mnt/d2on3/working/mod/gnome-globalmenu/tests' make1?: [all-recursive] Error 1 make1?: Leaving directory `/mnt/d2on3/working/mod/gnome-globalmenu' make: all? Error 2

The error seen --disable-tests option is not works correctly.

Comment by beautifulsnow@gmail.com, Mar 29, 2010

Hi, I also have the same problem.

--disable-tests does not help at all. Can someone help? Pretty please?

Comment by Bruno.R....@gmail.com, Apr 3, 2010

Building from git source code fails:

make all-recursive make1?: Entering directory `/home/bruno/src/gnome-globalmenu' Making all in vapi make2?: Entering directory `/home/bruno/src/gnome-globalmenu/vapi' make2?: Nothing to be done for `all'. make2?: Leaving directory `/home/bruno/src/gnome-globalmenu/vapi' Making all in tests make2?: Entering directory `/home/bruno/src/gnome-globalmenu/tests' make all-am make3?: Entering directory `/home/bruno/src/gnome-globalmenu/tests' make3?: Nothing to be done for `all-am'. make3?: Leaving directory `/home/bruno/src/gnome-globalmenu/tests' make2?: Leaving directory `/home/bruno/src/gnome-globalmenu/tests' Making all in legacy-support make2?: Entering directory `/home/bruno/src/gnome-globalmenu/legacy-support' make2?: Nothing to be done for `all'. make2?: Leaving directory `/home/bruno/src/gnome-globalmenu/legacy-support' Making all in libsettings make2?: Entering directory `/home/bruno/src/gnome-globalmenu/libsettings' /usr/bin/valac --vapidir=../vapi --vapidir .. --vapidir ../vapi --pkg configmake --pkg config \

-C \ -H globalmenu-settings.h \ --library=globalmenu-settings \ --vapi=globalmenu-settings.vapi \ settings.vala global-settings.vala local-settings.vala \ --pkg gtk+-2.0 \ --pkg gdk-x11-2.0
settings.vala:126.43-126.56: error: The name get_class' does not exist in the context of Gnomenu.Settings'
weak ObjectClass? klass = (ObjectClass?) (this.get_class());
^^^^^^
settings.vala:126.20-126.59: error: expression type not allowed as initializer
weak ObjectClass? klass = (ObjectClass?) (this.get_class());
^^^^^^^^^^^^^^
settings.vala:127.26-127.30: error: The name klass' does not exist in the context of Gnomenu.Settings.load_property'
weak ParamSpec? pspec = klass.find_property(key);
^^^
settings.vala:127.18-127.49: error: expression type not allowed as initializer
weak ParamSpec? pspec = klass.find_property(key);
^^^^^^^^^^^^
settings.vala:128.23-128.27: error: The name pspec' does not exist in the context of Gnomenu.Settings.load_property'
Value value = Value(pspec.value_type);
^^^
settings.vala:129.6-129.10: error: The name pspec' does not exist in the context of Gnomenu.Settings.load_property'
if(pspec.value_type == typeof(bool)) {
^^^
settings.vala:132.6-132.10: error: The name pspec' does not exist in the context of Gnomenu.Settings.load_property'
if(pspec.value_type == typeof(string)) {
^^^
settings.vala:135.6-135.10: error: The name pspec' does not exist in the context of Gnomenu.Settings.load_property'
if(pspec.value_type == typeof(int)) {
^^^
settings.vala:139.5-139.9: error: The name pspec' does not exist in the context of Gnomenu.Settings.load_property'
pspec.value_type.name()); ^^^
settings.vala:155.3-155.62: warning: unhandled error `GLib.KeyFileError?'
keyfile.load_from_data(data, data.length, KeyFileFlags?.NONE); ^^^^^^^^^^^^^^^^^^^^
settings.vala:106.43-106.56: error: The name get_class' does not exist in the context of Gnomenu.Settings'
weak ObjectClass? klass = (ObjectClass?) (this.get_class());
^^^^^^
settings.vala:106.20-106.59: error: expression type not allowed as initializer
weak ObjectClass? klass = (ObjectClass?) (this.get_class());
^^^^^^^^^^^^^^
settings.vala:107.26-107.30: error: The name klass' does not exist in the context of Gnomenu.Settings.save_property'
weak ParamSpec? pspec = klass.find_property(key);
^^^
settings.vala:107.18-107.49: error: expression type not allowed as initializer
weak ParamSpec? pspec = klass.find_property(key);
^^^^^^^^^^^^
settings.vala:108.23-108.27: error: The name pspec' does not exist in the context of Gnomenu.Settings.save_property'
Value value = Value(pspec.value_type);
^^^
settings.vala:110.6-110.10: error: The name pspec' does not exist in the context of Gnomenu.Settings.save_property'
if(pspec.value_type == typeof(bool)) {
^^^
settings.vala:113.6-113.10: error: The name pspec' does not exist in the context of Gnomenu.Settings.save_property'
if(pspec.value_type == typeof(string)) {
^^^
settings.vala:116.6-116.10: error: The name pspec' does not exist in the context of Gnomenu.Settings.save_property'
if(pspec.value_type == typeof(int)) {
^^^
settings.vala:120.5-120.9: error: The name pspec' does not exist in the context of Gnomenu.Settings.save_property'
pspec.value_type.name()); ^^^
Compilation failed: 18 error(s), 1 warning(s) make2?: [vala-ccode] Error 1 make2?: Leaving directory `/home/bruno/src/gnome-globalmenu/libsettings' make1?: [all-recursive] Error 1 make1?: Leaving directory `/home/bruno/src/gnome-globalmenu' make: all? Error 2

Comment by damer...@gmail.com, Nov 12, 2011

Where is ./autogen.sh ? Can't find it at all. v0.7


Sign in to add a comment
Powered by Google Project Hosting