Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 11544056: Prepared buildtools for Safari (Closed)

Created:
Sept. 4, 2013, 8:03 a.m. by Sebastian Noack
Modified:
Oct. 31, 2013, 4:29 p.m.
Visibility:
Public.

Description

Prepared buildtools for Safari

Patch Set 1 #

Patch Set 2 : Prepared buildtools for Safari #

Patch Set 3 : #

Total comments: 81

Patch Set 4 : #

Patch Set 5 : #

Total comments: 11

Patch Set 6 : #

Patch Set 7 : Added ext directory to includedFiles for chrome and extensions based on it. #

Patch Set 8 : Made "Chrome" be not replaced with "Safari" in the warning on the first run page #

Total comments: 11

Patch Set 9 : Addressed comments #

Patch Set 10 : Made first run page always generated, fix absolute URLs for Safari during build, introduced browser… #

Total comments: 1

Patch Set 11 : Fixed regex for fixing absolute URLs in Safari #

Patch Set 12 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+625 lines, -10 lines) Patch
A Info.plist.tmpl View 1 2 3 1 chunk +159 lines, -0 lines 0 comments Download
A background.html.tmpl View 1 chunk +9 lines, -0 lines 0 comments Download
M build.py View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -3 lines 0 comments Download
A imageConversion.py View 1 2 3 4 1 chunk +126 lines, -0 lines 0 comments Download
M manifest.json.tmpl View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M packager.py View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -0 lines 0 comments Download
M packagerChrome.py View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -6 lines 0 comments Download
M packagerGecko.py View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
A packagerSafari.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +269 lines, -0 lines 0 comments Download
A safariInfo.js.tmpl View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 33
Sebastian Noack
Sept. 4, 2013, 8:06 a.m. (2013-09-04 08:06:29 UTC) #1
Sebastian Noack
Beside some code cleanup, I added support for generating signed xar archives. In order to ...
Sept. 6, 2013, 2:59 p.m. (2013-09-06 14:59:30 UTC) #2
Wladimir Palant
http://codereview.adblockplus.org/11544056/diff/10001/Info.plist.tmpl File Info.plist.tmpl (right): http://codereview.adblockplus.org/11544056/diff/10001/Info.plist.tmpl#newcode5 Info.plist.tmpl:5: <key>CFBundleDisplayName</key> Nit: We generally use two spaces for indentation, ...
Sept. 10, 2013, 10:15 a.m. (2013-09-10 10:15:27 UTC) #3
Sebastian Noack
Agreed, to all comments not replied to. http://codereview.adblockplus.org/11544056/diff/10001/Info.plist.tmpl File Info.plist.tmpl (right): http://codereview.adblockplus.org/11544056/diff/10001/Info.plist.tmpl#newcode8 Info.plist.tmpl:8: <string>{{ identifier ...
Sept. 10, 2013, 12:40 p.m. (2013-09-10 12:40:43 UTC) #4
Wladimir Palant
http://codereview.adblockplus.org/11544056/diff/10001/Info.plist.tmpl File Info.plist.tmpl (right): http://codereview.adblockplus.org/11544056/diff/10001/Info.plist.tmpl#newcode8 Info.plist.tmpl:8: <string>{{ identifier }}</string> On 2013/09/10 12:40:43, sebastian wrote: > ...
Sept. 10, 2013, 2:02 p.m. (2013-09-10 14:02:12 UTC) #5
Sebastian Noack
http://codereview.adblockplus.org/11544056/diff/10001/packagerChrome.py File packagerChrome.py (right): http://codereview.adblockplus.org/11544056/diff/10001/packagerChrome.py#newcode379 packagerChrome.py:379: color = map(float, color) On 2013/09/10 14:02:12, Wladimir Palant ...
Sept. 10, 2013, 4:50 p.m. (2013-09-10 16:50:05 UTC) #6
Wladimir Palant
http://codereview.adblockplus.org/11544056/diff/10001/packagerChrome.py File packagerChrome.py (right): http://codereview.adblockplus.org/11544056/diff/10001/packagerChrome.py#newcode404 packagerChrome.py:404: difference2=lambda source, col: (col - source) / col, On ...
Sept. 11, 2013, 6:41 a.m. (2013-09-11 06:41:36 UTC) #7
Felix Dahlke
http://codereview.adblockplus.org/11544056/diff/10001/packagerChrome.py File packagerChrome.py (right): http://codereview.adblockplus.org/11544056/diff/10001/packagerChrome.py#newcode316 packagerChrome.py:316: def convert(self, params, files): On 2013/09/10 10:15:27, Wladimir Palant ...
Sept. 11, 2013, 2:44 p.m. (2013-09-11 14:44:34 UTC) #8
Sebastian Noack
http://codereview.adblockplus.org/11544056/diff/10001/packagerChrome.py File packagerChrome.py (right): http://codereview.adblockplus.org/11544056/diff/10001/packagerChrome.py#newcode404 packagerChrome.py:404: difference2=lambda source, col: (col - source) / col, On ...
Sept. 11, 2013, 3:48 p.m. (2013-09-11 15:48:06 UTC) #9
Wladimir Palant
http://codereview.adblockplus.org/11544056/diff/10001/packagerChrome.py File packagerChrome.py (right): http://codereview.adblockplus.org/11544056/diff/10001/packagerChrome.py#newcode404 packagerChrome.py:404: difference2=lambda source, col: (col - source) / col, As ...
Sept. 11, 2013, 4:14 p.m. (2013-09-11 16:14:56 UTC) #10
Felix Dahlke
http://codereview.adblockplus.org/11544056/diff/10001/packagerSafari.py File packagerSafari.py (right): http://codereview.adblockplus.org/11544056/diff/10001/packagerSafari.py#newcode56 packagerSafari.py:56: d[key] = '<%s>%s</%s>' % (type, val, type) On 2013/09/11 ...
Sept. 12, 2013, 1:54 p.m. (2013-09-12 13:54:14 UTC) #11
Sebastian Noack
Except the comment below, all issues should be fixed now. http://codereview.adblockplus.org/11544056/diff/10001/packagerSafari.py File packagerSafari.py (right): http://codereview.adblockplus.org/11544056/diff/10001/packagerSafari.py#newcode85 ...
Sept. 19, 2013, 2:40 p.m. (2013-09-19 14:40:36 UTC) #12
Felix Dahlke
http://codereview.adblockplus.org/11544056/diff/10001/packagerSafari.py File packagerSafari.py (right): http://codereview.adblockplus.org/11544056/diff/10001/packagerSafari.py#newcode23 packagerSafari.py:23: from collections import OrderedDict On 2013/09/10 10:15:27, Wladimir Palant ...
Oct. 15, 2013, 4:24 p.m. (2013-10-15 16:24:38 UTC) #13
Felix Dahlke
http://codereview.adblockplus.org/11544056/diff/10001/packagerSafari.py File packagerSafari.py (right): http://codereview.adblockplus.org/11544056/diff/10001/packagerSafari.py#newcode23 packagerSafari.py:23: from collections import OrderedDict On 2013/10/15 16:24:38, Felix H. ...
Oct. 15, 2013, 4:32 p.m. (2013-10-15 16:32:56 UTC) #14
Sebastian Noack
http://codereview.adblockplus.org/11544056/diff/32001/imageConversion.py File imageConversion.py (right): http://codereview.adblockplus.org/11544056/diff/32001/imageConversion.py#newcode67 imageConversion.py:67: image = image.convert('L') On 2013/10/15 16:24:38, Felix H. Dahlke ...
Oct. 15, 2013, 5:06 p.m. (2013-10-15 17:06:56 UTC) #15
Felix Dahlke
Also reviewed packagerSafari.py now, looks like the issues have all been addressed, except for one. ...
Oct. 15, 2013, 10:46 p.m. (2013-10-15 22:46:11 UTC) #16
Sebastian Noack
http://codereview.adblockplus.org/11544056/diff/32001/packagerSafari.py File packagerSafari.py (right): http://codereview.adblockplus.org/11544056/diff/32001/packagerSafari.py#newcode101 packagerSafari.py:101: endScripts= (get_optional('contentScripts', 'document_end' ) or '').split(), On 2013/10/15 22:46:11, ...
Oct. 16, 2013, 8:52 a.m. (2013-10-16 08:52:22 UTC) #17
Sebastian Noack
I've uploaded a new patch set.
Oct. 16, 2013, 9:46 a.m. (2013-10-16 09:46:02 UTC) #18
Felix Dahlke
LGTM
Oct. 16, 2013, 10 a.m. (2013-10-16 10:00:47 UTC) #19
Sebastian Noack
I had to add a directory to packagedFiles, because I split ext.js (the browser abstraction ...
Oct. 23, 2013, 2:34 p.m. (2013-10-23 14:34:35 UTC) #20
Felix Dahlke
On 2013/10/23 14:34:35, sebastian wrote: > I had to add a directory to packagedFiles, because ...
Oct. 23, 2013, 2:36 p.m. (2013-10-23 14:36:00 UTC) #21
Sebastian Noack
On 2013/10/23 14:36:00, Felix H. Dahlke wrote: > On 2013/10/23 14:34:35, sebastian wrote: > > ...
Oct. 23, 2013, 2:39 p.m. (2013-10-23 14:39:26 UTC) #22
Felix Dahlke
On 2013/10/23 14:39:26, sebastian wrote: > Yes it is. You can also see above in ...
Oct. 23, 2013, 2:40 p.m. (2013-10-23 14:40:22 UTC) #23
Sebastian Noack
I had to add a hack on top of the hack that replaces "Chrome in ...
Oct. 25, 2013, 4:59 p.m. (2013-10-25 16:59:08 UTC) #24
Wladimir Palant
http://codereview.adblockplus.org/11544056/diff/123001/build.py File build.py (right): http://codereview.adblockplus.org/11544056/diff/123001/build.py#newcode205 build.py:205: packager.createBuild(baseDir, type=type, outFile=outFile, buildNum=buildNum, releaseBuild=releaseBuild, keyFile=keyFile) Nit: restricting line ...
Oct. 30, 2013, 1:36 p.m. (2013-10-30 13:36:01 UTC) #25
Wladimir Palant
On 2013/10/23 14:40:22, Felix H. Dahlke wrote: > I know, just wanted to make sure ...
Oct. 30, 2013, 2:06 p.m. (2013-10-30 14:06:17 UTC) #26
Sebastian Noack
http://codereview.adblockplus.org/11544056/diff/123001/imageConversion.py File imageConversion.py (right): http://codereview.adblockplus.org/11544056/diff/123001/imageConversion.py#newcode72 imageConversion.py:72: return image On 2013/10/30 13:36:01, Wladimir Palant wrote: > ...
Oct. 30, 2013, 4:12 p.m. (2013-10-30 16:12:10 UTC) #27
Wladimir Palant
http://codereview.adblockplus.org/11544056/diff/123001/packagerChrome.py File packagerChrome.py (right): http://codereview.adblockplus.org/11544056/diff/123001/packagerChrome.py#newcode306 packagerChrome.py:306: files[path] = re.sub(r"\b(?<!Google )Chrome\b", params['type'].capitalize(), data) On 2013/10/30 16:12:10, ...
Oct. 30, 2013, 4:21 p.m. (2013-10-30 16:21:38 UTC) #28
Sebastian Noack
Oct. 30, 2013, 5:22 p.m. (2013-10-30 17:22:02 UTC) #29
Wladimir Palant
LGTM
Oct. 30, 2013, 6:21 p.m. (2013-10-30 18:21:30 UTC) #30
Wladimir Palant
On 2013/10/30 18:21:30, Wladimir Palant wrote: > LGTM Note that removing the translation hack and ...
Oct. 31, 2013, 6:08 a.m. (2013-10-31 06:08:03 UTC) #31
Sebastian Noack
Oct. 31, 2013, 10:48 a.m. (2013-10-31 10:48:24 UTC) #32
Wladimir Palant
Oct. 31, 2013, 1:58 p.m. (2013-10-31 13:58:18 UTC) #33
I don't really like how this assumes that the extension description will always
be dependent on the build target (I suggested making description configurable)
but it will do for now. LGTM if you fix the issue below.

http://codereview.adblockplus.org/11544056/diff/383001/packagerSafari.py
File packagerSafari.py (right):

http://codereview.adblockplus.org/11544056/diff/383001/packagerSafari.py#newc...
packagerSafari.py:125: lambda m: '%s%s%s' % (m.group(1), prefix,
m.group(3).lstrip('/')),
Why look for the entire tag if all you need is the leading slash inside the
attribute? Also, if the intention was to match href="..." only inside a tag then
it didn't work - this regexp will happily match <>href="/fo"<>. How about:

    r'(<[^<>]*?\b(?:href|src)\s*=\s*(?:["\']))\/',
    r'\1%s' % prefix,

Powered by Google App Engine
This is Rietveld