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
=== modified file 'setup.py'
--- setup.py 2012-09-14 13:43:48 +0000
+++ setup.py 2012-10-05 21:36:21 +0000
@@ -58,14 +58,11 @@
58 '256x256', '256x256@2x',58 '256x256', '256x256@2x',
59 '512x512', '512x512@2x',59 '512x512', '512x512@2x',
60 ]60 ]
61# The @2x sizes are commented out here for now, as png2icns doesn't support61ICNS_EMBED_SIZES = ['16x16', '16x16@2x',
62# embedding them, as it should. It seems to hardcode the list of allowable62 '32x32', '32x32@2x',
63# sizes, and they are duplicates or not allowed, which creates errors.63 '128x128', '128x128@2x',
64ICNS_EMBED_SIZES = ['16x16', # '16x16@2x',64 '256x256', '256x256@2x',
65 '32x32', # '32x32@2x',65 '512x512', '512x512@2x',
66 '128x128', # '128x128@2x',
67 '256x256', # '256x256@2x',
68 '512x512', # '512x512@2x',
69 ]66 ]
70ICO_EMBED_SIZES = ['16x16',67ICO_EMBED_SIZES = ['16x16',
71 '24x24',68 '24x24',
@@ -121,13 +118,15 @@
121118
122 def run(self):119 def run(self):
123 """Generate the icons."""120 """Generate the icons."""
124 BuildPNG.run(self)121 if sys.platform != 'darwin':
125 png2icns = find_executable('png2icns')122 raise OSError('Can only build high res icns files on darwin.')
126 if png2icns is None:123
127 sys.stderr.write('png2icns is required to build the icns file.')124 iconutil = find_executable('iconutil')
125 if iconutil is None:
126 sys.stderr.write('iconutil is required to build the icns file.')
128 return127 return
129128
130 icns_args = [png2icns, 'ubuntuone.icns']129 icns_args = [iconutil, '-c', 'icns', 'ubuntuone.iconset']
131 icns_dir = os.path.join(os.getcwd(), 'ubuntuone.iconset')130 icns_dir = os.path.join(os.getcwd(), 'ubuntuone.iconset')
132 try:131 try:
133 os.makedirs(icns_dir)132 os.makedirs(icns_dir)

Subscribers

People subscribed via source and target branches

to all changes: