OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # coding: utf-8 | 2 # coding: utf-8 |
3 | 3 |
4 import argparse | 4 import argparse |
5 import datetime | 5 import datetime |
6 import errno | 6 import errno |
7 import hashlib | 7 import hashlib |
8 import io | 8 import io |
9 import json | 9 import json |
10 import os | 10 import os |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 os.close(handle) | 129 os.close(handle) |
130 cleanup.append(abpxpi) | 130 cleanup.append(abpxpi) |
131 packager.createBuild(parameters.abpdir, outFile=abpxpi, releaseBuild=True) | 131 packager.createBuild(parameters.abpdir, outFile=abpxpi, releaseBuild=True) |
132 | 132 |
133 profile = FirefoxProfile( | 133 profile = FirefoxProfile( |
134 addons=[ | 134 addons=[ |
135 crawlerxpi, | 135 crawlerxpi, |
136 abpxpi, | 136 abpxpi, |
137 ], | 137 ], |
138 preferences={ | 138 preferences={ |
| 139 'browser.tabs.warnOnCloseOtherTabs': False, |
139 'browser.uitour.enabled': False, | 140 'browser.uitour.enabled': False, |
140 'prompts.tab_modal.enabled': False, | 141 'prompts.tab_modal.enabled': False, |
141 } | 142 } |
142 ) | 143 ) |
143 | 144 |
144 abpsettings = os.path.join(profile.profile, 'adblockplus') | 145 abpsettings = os.path.join(profile.profile, 'adblockplus') |
145 os.makedirs(abpsettings) | 146 os.makedirs(abpsettings) |
146 with open(os.path.join(abpsettings, 'patterns.ini'), 'w') as handle: | 147 with open(os.path.join(abpsettings, 'patterns.ini'), 'w') as handle: |
147 print >>handle, '# Adblock Plus preferences' | 148 print >>handle, '# Adblock Plus preferences' |
148 print >>handle, 'version=4' | 149 print >>handle, 'version=4' |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) | 190 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) |
190 DEPENDENCY_SCRIPT = os.path.join(BASE_DIR, "ensure_dependencies.py") | 191 DEPENDENCY_SCRIPT = os.path.join(BASE_DIR, "ensure_dependencies.py") |
191 | 192 |
192 try: | 193 try: |
193 subprocess.check_call([sys.executable, DEPENDENCY_SCRIPT, BASE_DIR]) | 194 subprocess.check_call([sys.executable, DEPENDENCY_SCRIPT, BASE_DIR]) |
194 except subprocess.CalledProcessError as e: | 195 except subprocess.CalledProcessError as e: |
195 print >>sys.stderr, e | 196 print >>sys.stderr, e |
196 print >>sys.stderr, "Failed to ensure dependencies being up-to-date!" | 197 print >>sys.stderr, "Failed to ensure dependencies being up-to-date!" |
197 | 198 |
198 run() | 199 run() |
OLD | NEW |