Try to re-work release building script a little.
[dcpomatic.git] / pre
1 #!/usr/bin/python
2
3 import os
4 import shutil
5
6 def command(c):
7     os.system(c)
8     print c
9
10 def current_version():
11     f = open('wscript', 'rw')
12     while 1:
13         l = f.readline()
14         if l == '':
15             break
16
17         s = l.split()
18         if len(s) == 3 and s[0] == "VERSION":
19             return s[2][1:-1]
20
21     assert(false)
22
23 v = current_version()
24
25 command("./builds/windows-32")
26 shutil.copy(os.path.join('build', 'windows', 'DVD-o-matic %s 32-bit Installer.exe' % v), '.')
27 command("./builds/windows-64")
28 shutil.copy(os.path.join('build', 'windows', 'DVD-o-matic %s 64-bit Installer.exe' % v), '.')
29 command("./waf dist")