Merge lp:~dobey/ubuntuone-client-data/mac-build-icns into lp:ubuntuone-client-data

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 7
Merged at revision: 6
Proposed branch: lp:~dobey/ubuntuone-client-data/mac-build-icns
Merge into: lp:ubuntuone-client-data
Diff against target: 44 lines (+12/-13)
1 file modified
setup.py (+12/-13)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client-data/mac-build-icns
Reviewer Review Type Date Requested Status
Mike McCracken (community) Approve
Diego Sarmentero (community) Approve
Review via email: mp+128304@code.launchpad.net

Commit message

Require iconutil on darwin to build the .icns file.

To post a comment you must log in.
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
Revision history for this message
Mike McCracken (mikemc) wrote :

This builds a .icns on macos correctly for me.

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

The attempt to merge lp:~dobey/ubuntuone-client-data/mac-build-icns into lp:ubuntuone-client-data failed. Below is the output from the failed tests.

running build
running build_i18n
intltool-update -p -g ubuntuone-client-data
running build_icons
running build_help
running clean
WARNING: the following files are not recognized by DistUtilsExtra.auto:
  po/LINGUAS
  run-tests
  ubuntuone-icons.svg
  ubuntuone.icns
  ubuntuone.ico

+ python ./setup.py build clean
++ which python3
+ '[' -x /usr/bin/python3 ']'
+ python3 ./setup.py build clean
To build this program you need https://launchpad.net/python-distutils-extra

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'setup.py'
2--- setup.py 2012-09-14 13:43:48 +0000
3+++ setup.py 2012-10-05 21:36:21 +0000
4@@ -58,14 +58,11 @@
5 '256x256', '256x256@2x',
6 '512x512', '512x512@2x',
7 ]
8-# The @2x sizes are commented out here for now, as png2icns doesn't support
9-# embedding them, as it should. It seems to hardcode the list of allowable
10-# sizes, and they are duplicates or not allowed, which creates errors.
11-ICNS_EMBED_SIZES = ['16x16', # '16x16@2x',
12- '32x32', # '32x32@2x',
13- '128x128', # '128x128@2x',
14- '256x256', # '256x256@2x',
15- '512x512', # '512x512@2x',
16+ICNS_EMBED_SIZES = ['16x16', '16x16@2x',
17+ '32x32', '32x32@2x',
18+ '128x128', '128x128@2x',
19+ '256x256', '256x256@2x',
20+ '512x512', '512x512@2x',
21 ]
22 ICO_EMBED_SIZES = ['16x16',
23 '24x24',
24@@ -121,13 +118,15 @@
25
26 def run(self):
27 """Generate the icons."""
28- BuildPNG.run(self)
29- png2icns = find_executable('png2icns')
30- if png2icns is None:
31- sys.stderr.write('png2icns is required to build the icns file.')
32+ if sys.platform != 'darwin':
33+ raise OSError('Can only build high res icns files on darwin.')
34+
35+ iconutil = find_executable('iconutil')
36+ if iconutil is None:
37+ sys.stderr.write('iconutil is required to build the icns file.')
38 return
39
40- icns_args = [png2icns, 'ubuntuone.icns']
41+ icns_args = [iconutil, '-c', 'icns', 'ubuntuone.iconset']
42 icns_dir = os.path.join(os.getcwd(), 'ubuntuone.iconset')
43 try:
44 os.makedirs(icns_dir)

Subscribers

People subscribed via source and target branches

to all changes: