aboutsummaryrefslogtreecommitdiff
path: root/build.py
blob: 2454945f590a7108464ce6cb8619cc0c09d9ac03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os, os.path, zipfile

os.chdir(r'components\interfaces')
for f in os.listdir('.'):
	if f.startswith('rdI') and f.endswith('.idl'):
		os.system(r'xpidl -m typelib -e ..\%s %s' % (f[:-3] + 'xpt',f))
os.chdir(r'..\..')

xpi = zipfile.ZipFile('redirector-2.6.xpi','w')
for (root, folders, files) in os.walk('.'):
	if not '.svn' in root:
		for f in files:
			if f.lower().endswith(('.rdf', '.manifest', '.js', '.xpt', '.png', '.css', '.dtd', '.properties', '.xul', '.html')):
				xpi.write(os.path.join(root[2:],f))

xpi.close()