diff options
author | Einar Egilsson <einar@einaregilsson.com> | 2015-09-23 10:58:44 +0000 |
---|---|---|
committer | Einar Egilsson <einar@einaregilsson.com> | 2015-09-23 10:58:44 +0000 |
commit | 354b7325e453c3fa259ecd9a07b4634d09cf5afe (patch) | |
tree | b137bf64bfe82e06d99e83c234875d8f08ecad3f /build.py | |
parent | 96560ba904512a429378531c65c70ecaceb9b241 (diff) |
Build correctly for Firefox + allow to turn on logging
Diffstat (limited to 'build.py')
-rwxr-xr-x | build.py | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -4,7 +4,14 @@ import os, os.path, re, zipfile, json def get_files_to_zip(): #Exclude git stuff, build scripts etc. - exclude = [r'(\\|/)\.git(\\|/)', r'\.(py|sh)$', r'\.DS_Store$', r'\.gitignore$',r'(\\|/)build(\\|/)', '.*devprofile.*', r'debug\.sh'] + exclude = [ + r'(\\|/)\.git(\\|/)', + r'\.(py|sh)$', + r'\.DS_Store$', + r'\.gitignore$', + r'(\\|/)build(\\|/)', + r'debug\.sh' + ] zippable_files = [] for root, folders, files in os.walk('.'): @@ -14,6 +21,13 @@ def get_files_to_zip(): zippable_files.append(file) return zippable_files +def create_firefox_addon(): + os.system('jpm xpi') + import glob, shutil + name = glob.glob('*.xpi')[0] + shutil.move(name, os.path.join('build', 'redirector-firefox.xpi')) + + def create_addon(files, browser): output_folder = 'build' if not os.path.isdir(output_folder): @@ -56,6 +70,7 @@ if __name__ == '__main__': print '' browsers = ['chrome', 'firefox', 'opera'] - for b in browsers: - create_addon(files, b) + create_addon(files, 'chrome') + create_addon(files, 'opera') + create_firefox_addon() |