forked from mod-audio/mda-lv2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwscript
140 lines (123 loc) · 4.67 KB
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/usr/bin/env python
import os
import re
import shutil
import waflib.extras.autowaf as autowaf
MDA_VERSION = '1.1.0'
# Mandatory waf variables
APPNAME = 'MDA' # Package name for waf dist
VERSION = MDA_VERSION # Package version for waf dist
top = '.' # Source directory
out = 'build' # Build directory
def options(opt):
opt.load('compiler_cxx')
autowaf.set_options(opt)
def configure(conf):
conf.load('compiler_cxx')
autowaf.configure(conf)
conf.line_just = 23
autowaf.display_header('MDA.lv2 Configuration')
autowaf.check_pkg(conf, 'lv2', atleast_version='1.0.0', uselib_store='LV2')
autowaf.display_msg(conf, "LV2 bundle directory",
conf.env.LV2DIR)
print('')
def build(bld):
# Make a pattern for shared objects without the 'lib' prefix
module_pat = re.sub('^lib', '', bld.env.cxxshlib_PATTERN)
module_ext = module_pat[module_pat.rfind('.'):]
plugins = '''
Ambience
Bandisto
BeatBox
Combo
DX10
DeEss
Degrade
Delay
Detune
Dither
DubDelay
Dynamics
EPiano
Image
JX10
Leslie
Limiter
Loudness
MultiBand
Overdrive
Piano
RePsycho
RezFilter
RingMod
RoundPan
Shepard
Splitter
Stereo
SubSynth
TalkBox
TestTone
ThruZero
Tracker
Transient
VocInput
Vocoder
'''.split()
for p in plugins:
bundle = 'mod-mda-%s.lv2' % p
# Build manifest by substitution
bld(features = 'subst',
source = 'bundles/%s/manifest.ttl.in' % bundle,
target = bld.path.get_bld().make_node('%s/manifest.ttl' % bundle),
LIB_EXT = module_ext,
install_path = '${LV2DIR}/%s' % bundle)
# Build plugin library
obj = bld(features = 'cxx cxxshlib',
source = ['src/mda%s.cpp' % p, 'lvz/wrapper.cpp'],
includes = ['.', './lvz', './src'],
name = p,
target = os.path.join(bundle, p),
install_path = '${LV2DIR}/' + bundle,
uselib = ['LV2'],
defines = ['PLUGIN_CLASS=mda%s' % p,
'URI_PREFIX="http://moddevices.com/plugins/mda/"',
'PLUGIN_URI_SUFFIX="%s"' % p,
'PLUGIN_HEADER="src/mda%s.h"' % p])
obj.env.cxxshlib_PATTERN = module_pat
# Set extra files for install
for i in bld.path.ant_glob('bundles/%s/*.ttl' % bundle):
bld(features = 'subst',
is_copy = True,
source = i,
target = bld.path.get_bld().make_node('%s/%s' % (bundle, i)),
install_path = '${LV2DIR}/%s' % bundle)
# Install modgui
modgui = 'bundles/%s/modgui' % bundle
def install_modgui_data(folder):
for j in bld.path.ant_glob('%s/%s/*' % (modgui, folder)):
bld.path.get_bld().make_node('%s/modgui/%s' % (bundle, folder)).mkdir()
bld(features = 'subst',
is_copy = True,
source = j,
target = bld.path.get_bld().make_node('%s/modgui/%s/%s' % (bundle, folder, j)),
install_path = '${LV2DIR}/%s/modgui/%s' % (bundle, folder))
for i in bld.path.ant_glob('%s/*' % modgui):
bld.path.get_bld().make_node('%s/modgui' % bundle).mkdir()
bld(features = 'subst',
is_copy = True,
source = i,
target = bld.path.get_bld().make_node('%s/modgui/%s' % (bundle, i)),
install_path = '${LV2DIR}/%s/modgui' % bundle)
install_modgui_data('combos/model-001')
install_modgui_data('knobs/chicken-head')
install_modgui_data('knobs/boxy')
install_modgui_data('knobs/lata')
install_modgui_data('knobs/japanese')
install_modgui_data('pedals')
install_modgui_data('pedals/boxy')
install_modgui_data('pedals/boxy75')
install_modgui_data('pedals/japanese')
install_modgui_data('switches')
install_modgui_data('utils')
# Install data file
bld.install_files('${LV2DIR}/' + bundle, os.path.join(bundle, p + '.ttl'))