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 |
'rme', |
---|
44 |
'global', 'dummy' |
---|
45 |
] |
---|
46 |
e['MIXERAPPS'] = [ |
---|
47 |
'phase24', |
---|
48 |
'phase88', |
---|
49 |
'saffire', |
---|
50 |
'saffirepro', |
---|
51 |
'audiofire', |
---|
52 |
'bcoaudio5', |
---|
53 |
'edirolfa101', 'edirolfa66', |
---|
54 |
'quatafire', |
---|
55 |
'mackie_onyxmixer', |
---|
56 |
'motu', |
---|
57 |
'rme', |
---|
58 |
'global', 'dummy' |
---|
59 |
] |
---|
60 |
|
---|
61 |
e['OTHERGUIS'] = ['ffado_regdialog', 'ffado_panelmanagerstatus'] |
---|
62 |
e['OTHERAPPS'] = ['ffado_dbus_util', |
---|
63 |
'ffado_regdialog', |
---|
64 |
'ffado_panelmanager', |
---|
65 |
'ffado_configuration', |
---|
66 |
'ffado_logginghandler', |
---|
67 |
'mixer_saffire_base' |
---|
68 |
] |
---|
69 |
|
---|
70 |
# |
---|
71 |
# For the ffadomixer.in |
---|
72 |
e['PYTHONDIR'] = Template( os.path.join( e['SHAREDIR'], 'python' ) ).safe_substitute( e ) |
---|
73 |
# For the installation of the stuff |
---|
74 |
e['pythondir'] = Template( os.path.join( e['sharedir'], 'python' ) ).safe_substitute( e ) |
---|
75 |
|
---|
76 |
for m in e['MIXERGUIS']: |
---|
77 |
app = "mixer_" + m |
---|
78 |
if os.path.exists( app+".ui" ): |
---|
79 |
e.PyUIC4( source=app+".ui", target=app+"ui.py" ) |
---|
80 |
e.Install( "$pythondir", app+"ui.py" ) |
---|
81 |
for m in e['MIXERAPPS']: |
---|
82 |
app = "mixer_" + m |
---|
83 |
e.Install( "$pythondir", app+".py" ) |
---|
84 |
|
---|
85 |
for app in e['OTHERGUIS']: |
---|
86 |
if os.path.exists( app+".ui" ): |
---|
87 |
e.PyUIC4( source=app+".ui", target=app+"ui.py" ) |
---|
88 |
e.Install( "$pythondir", app+"ui.py" ) |
---|
89 |
for app in e['OTHERAPPS']: |
---|
90 |
e.Install( "$pythondir", app+".py" ) |
---|
91 |
|
---|
92 |
e.Install( "$pythondir", "ffado_registration.py" ) |
---|
93 |
|
---|
94 |
e.ScanReplace( "ffadomixer_config.py.in" ) |
---|
95 |
e.Depends( "ffadomixer_config.py", "#/config.h" ) |
---|
96 |
e.Install( "$pythondir", "ffadomixer_config.py" ) |
---|
97 |
|
---|
98 |
e.ScanReplace( "ffado-mixer.in" ) |
---|
99 |
e.Depends( "ffado-mixer", "#/config.h" ) |
---|
100 |
e.Depends( "ffado-mixer", "SConscript" ) |
---|
101 |
e.Install( "$bindir", "ffado-mixer" ) |
---|
102 |
|
---|
103 |
e.Install( "$sharedir/icons", "../xdg/hi64-apps-ffado.png" ) |
---|