Changeset 770

Show
Ignore:
Timestamp:
12/23/07 13:25:31 (16 years ago)
Author:
arnonym
Message:

- Add a script to start mixers in a generic way.

- Install the specific mixers with their ui.py-files to $sharedir/python and use them.

- Add another "app" for testing. (/me doesn't have a device with a mixer, so I can't test the real mixers.)

- Ignore ffadomixer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/mixer

    • Property svn:ignore changed from
      *ui.py
      *.pyc
      to
      *ui.py
      *.pyc
      ffadomixer
  • trunk/libffado/support/mixer/SConscript

    r761 r770  
    2121# along with this program.  If not, see <http://www.gnu.org/licenses/>. 
    2222# 
     23import os 
     24from string import Template 
    2325 
    2426Import( 'env' ) 
    2527 
    2628if env.has_key('PYUIC'): 
    27         for app in [ "mixer_phase24.ui", 
    28                      "mixer_phase88.ui", 
    29                      "mixer_saffirepro.ui", 
    30                      "mixer_saffire.ui", 
    31                      "mixer_af2.ui", 
    32                    ]: 
    33                 env.PyUIC( source=app, target=app.replace(".","")+".py" ) 
     29        e = env.Clone() 
     30 
     31        e['MIXERAPPS'] = [ 'phase24', 'phase88', 'saffirepro', 'saffire', 'af2', 'aktest' ] 
     32        e['PYTHONDIR'] = Template( os.path.join( e['SHAREDIR'], 'python' ) ).safe_substitute( e ) 
     33 
     34        apps = [] 
     35 
     36        for m in e['MIXERAPPS']: 
     37                apps.append( "mixer_" + m ) 
     38 
     39        for app in apps: 
     40                if os.path.exists( app+".ui" ): 
     41                        e.PyUIC( source=app+".ui", target=app+"ui.py" ) 
     42                        e.Install( "$PYTHONDIR", app+"ui.py" ) 
     43                e.Install( "$PYTHONDIR", app+".py" ) 
     44 
     45        e.ScanReplace( "ffadomixer.in" ) 
     46        e.Depends( "ffadomixer", "SConscript" ) 
     47        e.Install( "$bindir", "ffadomixer" ) 
     48 
     49        for app in apps: 
     50                e.InstallAs( os.path.join( e['bindir'], "ffado"+app ), "ffadomixer" ) 
     51 
     52