5 def dependencies(target):
6 if target.platform == 'windows':
9 return (('ffmpeg-cdist', 'e797834288eaf05a2f406524ae04aaa0f114cb08'),
13 cmd = './waf configure --prefix=%s' % target.work_dir_cscript()
14 if target.platform == 'windows':
15 cmd += ' --target-windows'
16 elif target.platform == 'linux':
20 target.command('./waf')
22 if target.platform == 'linux' or target.platform == 'osx':
23 target.command('./waf install')
26 def package(target, version):
27 if target.platform == 'windows':
28 shutil.copyfile('build/platform/windows/installer.%s.nsi' % target.bits, 'build/platform/windows/installer2.%s.nsi' % target.bits)
29 target.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
30 target.command('sed -i "s~%%deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.windows_prefix, target.bits))
31 target.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
32 target.command('sed -i "s~%%bits%%~32~g" build/platform/windows/installer2.%s.nsi' % target.bits)
33 target.command('makensis build/platform/windows/installer2.%s.nsi' % target.bits)
34 return os.path.abspath(glob.glob('build/platform/windows/*%s*.exe' % target.bits)[0])
35 elif target.platform == 'linux':
41 shutil.copyfile('platform/linux/control-%s-%d' % (target.version, target.bits), 'debian/control')
42 target.command('./waf dist')
43 f = open('debian/files', 'w')
44 print >>f,'dcpomatic_%s-1_%s.deb video extra' % (version, cpu)
45 shutil.rmtree('build/deb', ignore_errors=True)
47 os.makedirs('build/deb')
49 shutil.move('../../dcpomatic-%s.tar.bz2' % version, 'dcpomatic_%s.orig.tar.bz2' % version)
50 target.command('tar xjf dcpomatic_%s.orig.tar.bz2' % version)
51 os.chdir('dcpomatic-%s' % version)
52 target.command('dch -b -v %s-1 "New upstream release."' % version)
53 target.set('CDIST_LINKFLAGS', target.get('LINKFLAGS'))
54 target.set('CDIST_CXXFLAGS', target.get('CXXFLAGS'))
55 target.set('CDIST_PKG_CONFIG_PATH', target.get('PKG_CONFIG_PATH'))
56 target.command('dpkg-buildpackage')
59 for p in glob.glob('../*.deb'):
60 debs.append(os.path.abspath(p))
63 elif target.platform == 'osx':
64 target.command('bash platform/osx/make_dmg.sh')
65 return os.path.abspath(glob.glob('build/platform/osx/DCP-o-matic*.dmg')[0])
68 target.command('./waf pot')
69 return [os.path.abspath('build/src/lib/libdcpomatic.pot'),
70 os.path.abspath('build/src/wx/libdcpomatic-wx.pot'),
71 os.path.abspath('build/src/tools/dcpomatic.pot')]
73 def make_manual(target):
74 os.chdir('doc/manual')
75 target.command('make')
76 return [os.path.abspath('pdf'), os.path.abspath('html')]