root/branches/libffado-2.0/support/mixer-qt4/SConscript

Revision 1415, 3.6 kB (checked in by arnonym, 4 years ago)

Quite some stuff:

  • add a simple python-parser for the format of the configuration-file already used by ffado
  • add the names of the mixers to be used to the configuration-file
  • port the PanelManager? to QMainWindow and introduce a menu and a statusbar
  • set the icon of the application to the beautiful ffado-icon

TODO for the next time:

  • overwrite the global config with the local config in PanelManager?
  • "About FFADO" in the help-menu
  • maybe also move the names of the mixers python-files into the configuration and load them only on demand. And then use this info also in the SConscript :-)
  • also add menu-items to recheck the status of the mixer and maybe even the ability to trigger a bus-reset from gui. But that would need ppalmers to implement that action in the dbus-server.
Line 
1 #!/usr/bin/python
2 #
3 # Copyright (C) 2007-2008 Arnold Krille
4 # Copyright (C) 2007-2008 Pieter Palmers
5 #
6 # This file is part of FFADO
7 # FFADO = Free Firewire (pro-)audio drivers for linux
8 #
9 # FFADO is based upon FreeBoB.
10 #
11 # This program is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 2 of the License, or
14 # (at your option) version 3 of the License.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 #
24 import os
25 from string import Template
26
27 Import( 'env' )
28
29 if env.has_key('PYUIC4'):
30     e = env.Clone()
31     e['MIXERGUIS'] = [
32                         'phase24',
33                         'phase88',
34                         'saffire_mono', 'saffire_stereo',
35                         'saffirepro_large', 'saffirepro_small',
36                         'saffirele_large', 'saffirele_small',
37                         'audiofire_strip', 'audiofire_settings',
38                         'bcoaudio5',
39                         'edirolfa101', 'edirolfa66',
40                         'quatafire',
41                         'mackie_onyxmixer',
42                         'motu',
43                         'global', 'dummy'
44                      ]
45     e['MIXERAPPS'] = [
46                         'phase24',
47                         'phase88',
48                         'saffire',
49                         'saffirepro',
50                         'audiofire',
51                         'bcoaudio5',
52                         'edirolfa101', 'edirolfa66',
53                         'quatafire',
54                         'mackie_onyxmixer',
55                         'motu',
56                         'global', 'dummy'
57                      ]
58
59     e['OTHERGUIS'] = ['ffado_regdialog', 'ffado_panelmanagerstatus']
60     e['OTHERAPPS'] = ['ffado_dbus_util',
61                       'ffado_regdialog',
62                       'ffado_panelmanager',
63                       'ffado_configuration',
64                       'mixer_saffire_base'
65                      ]
66
67     #
68     # For the ffadomixer.in
69     e['PYTHONDIR'] = Template( os.path.join( e['SHAREDIR'], 'python' ) ).safe_substitute( e )
70     # For the installation of the stuff
71     e['pythondir'] = Template( os.path.join( e['sharedir'], 'python' ) ).safe_substitute( e )
72
73     for m in e['MIXERGUIS']:
74         app = "mixer_" + m
75         if os.path.exists( app+".ui" ):
76             e.PyUIC4( source=app+".ui", target=app+"ui.py" )
77             e.Install( "$pythondir", app+"ui.py" )
78     for m in e['MIXERAPPS']:
79         app = "mixer_" + m
80         e.Install( "$pythondir", app+".py" )
81
82     for app in e['OTHERGUIS']:
83         if os.path.exists( app+".ui" ):
84             e.PyUIC4( source=app+".ui", target=app+"ui.py" )
85             e.Install( "$pythondir", app+"ui.py" )
86     for app in e['OTHERAPPS']:
87         e.Install( "$pythondir", app+".py" )
88
89     e.Install( "$pythondir", "ffado_registration.py" )
90
91     e.ScanReplace( "ffadomixer_config.py.in" )
92     e.Depends( "ffadomixer_config.py", "#/config.h" )
93     e.Install( "$pythondir", "ffadomixer_config.py" )
94
95     e.ScanReplace( "ffado-mixer.in" )
96     e.Depends( "ffado-mixer", "#/config.h" )
97     e.Depends( "ffado-mixer", "SConscript" )
98     e.Install( "$bindir", "ffado-mixer" )
99
100     e.Install( "$sharedir/icons", "../xdg/hi64-apps-ffado.png" )
Note: See TracBrowser for help on using the browser.