Changeset 805

Show
Ignore:
Timestamp:
01/04/08 15:25:59 (16 years ago)
Author:
arnonym
Message:

Install a .desktop-file that adds ffadomixer to the menus of kde and gnome.

Check for xdg-desktop-menu to install the .desktop-file.

And use that test for checking for pyuic too. It seems better than checking for some (developer) python-module that is not really used. Should really fix #48.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/SConstruct

    r791 r805  
    9595        buildenv['LD_LIBRARY_PATH']='' 
    9696 
     97if os.environ.has_key('XDG_CONFIG_DIRS'): 
     98        buildenv['XDG_CONFIG_DIRS']=os.environ['XDG_CONFIG_DIRS'] 
     99if os.environ.has_key('XDG_DATA_DIRS'): 
     100        buildenv['XDG_DATA_DIRS']=os.environ['XDG_DATA_DIRS'] 
     101if os.environ.has_key('HOME'): 
     102        buildenv['HOME']=os.environ['HOME'] 
    97103 
    98104env = Environment( tools=['default','scanreplace','pyuic','dbus','doxygen','pkgconfig'], toolpath=['admin'], ENV = buildenv, options=opts ) 
     
    128134        return ret 
    129135 
    130 tests = { "ConfigGuess" : ConfigGuess } 
     136def CheckForApp( context, app ): 
     137        context.Message( "Checking wether '" + app + "' executes " ) 
     138        ret = context.TryAction( app ) 
     139        context.Result( ret[0] ) 
     140        return ret 
     141 
     142tests = { "ConfigGuess" : ConfigGuess, "CheckForApp" : CheckForApp } 
    131143tests.update( env['PKGCONFIG_TESTS'] ) 
    132144tests.update( env['PYUIC_TESTS'] ) 
     
    181193        env['ALSA_SEQ_OUTPUT'] = conf.CheckLib( 'asound', symbol='snd_seq_event_output_direct', autoadd=0 ) 
    182194 
    183 if conf.PyQtCheck(): 
     195if conf.CheckForApp( "which pyuic" ): 
    184196        env['PYUIC'] = True 
     197 
     198if conf.CheckForApp( "xdg-desktop-menu --help" ): 
     199        env['XDG_TOOLS'] = True 
    185200 
    186201config_guess = conf.ConfigGuess() 
  • trunk/libffado/support/mixer/SConscript

    r801 r805  
     1#!/usr/bin/python 
    12# 
    23# Copyright (C) 2007 Arnold Krille 
     
    4445        e.Install( "$bindir", "ffadomixer" ) 
    4546 
     47        if env.has_key('XDG_TOOLS'): 
     48                e.Command( ".ffado.org-ffadomixer.desktop", "ffado.org-ffadomixer.desktop", "xdg-desktop-menu install $SOURCES && touch $TARGET" ) 
     49                e.NoCache( ".ffado.org-ffadomixer.desktop" ) 
     50                e.Alias( "install", ".ffado.org-ffadomixer.desktop" ) 
     51