Index: packagerSafari.py |
=================================================================== |
--- a/packagerSafari.py |
+++ b/packagerSafari.py |
@@ -95,26 +95,16 @@ def createManifest(params, files): |
).encode('utf-8') |
def createInfoModule(params): |
template = getTemplate('safariInfo.js.tmpl') |
return template.render(params).encode('utf-8') |
-def fixAbsoluteUrls(files): |
- for filename, content in files.iteritems(): |
- if os.path.splitext(filename)[1].lower() == '.html': |
- files[filename] = re.sub( |
- r'(<[^<>]*?\b(?:href|src)\s*=\s*["\']?)\/+', |
- r'\1' + '/'.join(['..'] * filename.count('/') + ['']), |
- content, re.S | re.I |
- ) |
- |
- |
def _get_sequence(data): |
from Crypto.Util import asn1 |
sequence = asn1.DerSequence() |
sequence.decode(data) |
return sequence |
def get_developer_identifier(certs): |
@@ -175,18 +165,16 @@ def createBuild(baseDir, type, outFile=N |
certs, key = xarfile.read_certificates_and_key(keyFile) |
params['developerIdentifier'] = get_developer_identifier(certs) |
files['lib/info.js'] = createInfoModule(params) |
files['background.html'] = createScriptPage(params, 'background.html.tmpl', |
('general', 'backgroundScripts')) |
files['Info.plist'] = createManifest(params, files) |
- fixAbsoluteUrls(files) |
- |
dirname = metadata.get('general', 'basename') + '.safariextension' |
for filename in files.keys(): |
files[os.path.join(dirname, filename)] = files.pop(filename) |
if not devenv and keyFile: |
from buildtools import xarfile |
xarfile.create(outFile, files, keyFile) |
else: |