Merge lp:~mikemc/ubuntuone-windows-installer/byo-libjpeg into lp:ubuntuone-windows-installer

Proposed by Mike McCracken on 2012-09-26
Status: Merged
Approved by: dobey on 2012-09-28
Approved revision: 142
Merged at revision: 140
Proposed branch: lp:~mikemc/ubuntuone-windows-installer/byo-libjpeg
Merge into: lp:ubuntuone-windows-installer
Diff against target: 37 lines (+10/-3)
1 file modified
scripts/setup-mac.py (+10/-3)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-windows-installer/byo-libjpeg
Reviewer Review Type Date Requested Status
dobey (community) Approve on 2012-09-28
Roberto Alsina (community) 2012-09-26 Approve on 2012-09-26
Review via email: mp+126538@code.launchpad.net

Commit message

- Package libjpeg for PIL so we don't break when a user doesn't have it installed. (LP: #1050534)

Description of the change

- Package libjpeg for PIL so we don't break when a user doesn't have it installed. (LP: #1050534)

TO TEST, build the app and check that libjpeg.?.dylib is in UbuntuOne.app/Contents/Frameworks/

also try running SSO like this:

DYLD_PRINT_LIBRARIES=1 UbuntuOne.app/Contents/Resources/Ubuntu\ Single\ Sign-On.app/Contents/MacOS/ubuntu-sso-login-qt --app_name "Ubuntu One"

you will see a ton of spam and in there should be something like these lines:

dyld: loaded: /Users/mmccrack/Documents/Canonical/Source/test-improve-buildout/scripts/dist/build_to_sign/UbuntuOne.app/Contents/Resources/Ubuntu Single Sign-On.app/Contents/Resources/lib/python2.7/lib-dynload/_imaging.so

dyld: loaded: /Users/mmccrack/Documents/Canonical/Source/test-improve-buildout/scripts/dist/build_to_sign/UbuntuOne.app/Contents/Resources/Ubuntu Single Sign-On.app/Contents/MacOS/../Frameworks/libjpeg.8.dylib

then you're good!

Prior to this branch, loading _imaging.so on a dev's machine would grab libjpeg from /usr/local/lib/, where brew installs it. but if it's on a machine without that, whoops!

To post a comment you must log in.
Roberto Alsina (ralsina) :
review: Approve
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/setup-mac.py'
2--- scripts/setup-mac.py 2012-09-14 20:36:23 +0000
3+++ scripts/setup-mac.py 2012-09-26 20:21:24 +0000
4@@ -502,7 +502,14 @@
5 qt_network_plugins = glob.glob(qt_plugin_path + "/bearer/*.dylib")
6 qt_imageformat_plugins = glob.glob(qt_plugin_path +
7 "/imageformats/*.dylib")
8- dylib_paths = qt_imageformat_plugins + qt_network_plugins
9+ qt_dylib_paths = qt_imageformat_plugins + qt_network_plugins
10+
11+ libjpeg_paths = glob.glob("/usr/local/lib/libjpeg.*.dylib")
12+ if len(libjpeg_paths) != 1:
13+ print "Warning: expected to find just one version of libjpeg"
14+ print "found:", libjpeg_paths
15+
16+ dylib_paths = qt_dylib_paths + [libjpeg_paths[0]]
17
18 data_files = glob.glob("data/*")
19
20@@ -618,7 +625,7 @@
21 "com.ubuntu.one.u1sdtool",
22 "u1sdtool")
23
24- control_panel_app_path = do_setup(False,
25+ control_panel_app_path = do_setup(True,
26 "com.ubuntu.one.controlpanel",
27 "ubuntuone-control-panel-qt",
28 is_main_app=True)
29@@ -641,7 +648,7 @@
30 control_panel_frameworks_path = os.path.join(control_panel_contents_path,
31 "Frameworks")
32
33- plugin_names = [os.path.basename(f) for f in dylib_paths]
34+ plugin_names = [os.path.basename(f) for f in qt_dylib_paths]
35
36 bearers_dir = os.path.join(control_panel_frameworks_path,
37 "plugins", "bearer")

Subscribers

People subscribed via source and target branches