-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwscript
102 lines (82 loc) · 3.73 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
#!/usr/bin/env python
# This file is part of Virtual MIDI Controller
# Copyright (c) 2019 Kushview, LLC. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
from subprocess import call, Popen, PIPE
import os, sys
sys.path.append (os.getcwd() + "/tools/waf")
import cross, vmc, juce
VERSION='0.1.0'
def options (opt):
opt.load ("compiler_c compiler_cxx cross juce")
def silence_warnings (conf):
'''TODO: resolve these'''
conf.env.append_unique ('CFLAGS', ['-Wno-deprecated-register'])
conf.env.append_unique ('CXXFLAGS', ['-Wno-deprecated-register'])
conf.env.append_unique ('CFLAGS', ['-Wno-dynamic-class-memaccess'])
conf.env.append_unique ('CXXFLAGS', ['-Wno-dynamic-class-memaccess'])
conf.env.append_unique ('CFLAGS', ['-Wno-deprecated-declarations'])
conf.env.append_unique ('CXXFLAGS', ['-Wno-deprecated-declarations'])
def configure_product_name (conf):
return "Virtual MIDI Controller"
def configure (conf):
conf.check_ccache()
conf.prefer_clang()
conf.load ("compiler_c compiler_cxx ar cross juce")
conf.check_cxx_version()
silence_warnings (conf)
conf.check_common()
if cross.is_mingw(conf): conf.check_mingw()
elif juce.is_mac(): conf.check_mac()
else: conf.check_linux()
conf.env.DEBUG = conf.options.debug
conf.env.VERSION_STRING = VERSION
conf.define ('VERSION_STRING', conf.env.VERSION_STRING)
pkg='juce_audio_utils_debug-5' if conf.options.debug else 'juce_audio_utils-5'
conf.check_cfg (package=pkg, uselib_store='JUCE_AUDIO_UTILS',
args=['%s >= 5.4.5' % pkg, '--cflags', '--libs'], mandatory=True)
# conf.check_cfg (package='kv_gui_debug-0' if conf.options.debug else 'kv_gui-0',
# uselib_store='KV', args='--cflags --libs', mandatory=False)
print
juce.display_header ("Virtual MIDI Controller")
print
juce.display_msg (conf, "PREFIX", conf.env.PREFIX)
juce.display_msg (conf, "DATADIR", conf.env.DATADIR)
juce.display_msg (conf, "Debug", conf.options.debug)
print
juce.display_header ("Compiler")
juce.display_msg (conf, "CFLAGS", conf.env.CFLAGS)
juce.display_msg (conf, "CXXFLAGS", conf.env.CXXFLAGS)
juce.display_msg (conf, "LINKFLAGS", conf.env.LINKFLAGS)
def build (bld):
appEnv = bld.env.derive()
app = bld.program (
source = bld.path.ant_glob ("src/**/*.cpp"),
includes = [ 'src', 'src/compat', 'libs/lua',
'libs/lua/lua-5.3.5/src' ],
target = 'bin/virtual-midi-controller',
name = 'VMC',
env = appEnv,
use = [ 'KV', 'JUCE_AUDIO_UTILS' ]
)
if juce.is_mac():
app.mac_app = True,
app.mac_plist = 'tools/macdeploy/Info.plist'
# app.mac_files = [ 'project/Builds/MacOSX/Icon.icns' ]
app.target = 'Applications/MIDI Controller'
def macdeploy (ctx):
call (["tools/macdeploy/appbundle.py",
"-dmg", "vmc-osx-%s" % VERSION,
"-volname", "VMC",
"-fancy", "tools/macdeploy/fancy.plist",
"build/Applications/MIDI Controller.app"])