Bundling plugins with Browse

Sayamindu Dasgupta sayamindu at gmail.com
Tue Dec 9 12:49:40 EST 2008


On Tue, Dec 9, 2008 at 7:54 PM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
> On Tue, Dec 9, 2008 at 3:21 PM, Sayamindu Dasgupta <sayamindu at gmail.com> wrote:
>> On Tue, Dec 9, 2008 at 12:20 AM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
>>> On Mon, Dec 8, 2008 at 7:45 PM, Sayamindu Dasgupta <sayamindu at gmail.com> wrote:
>>>> On Tue, Dec 9, 2008 at 12:07 AM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
>>>>> On Mon, Dec 8, 2008 at 7:34 PM, Sayamindu Dasgupta <sayamindu at gmail.com> wrote:
>>>>>> Hi all,
>>>>>> We are trying to figure out a way to bundle the mozplugger plugin[1]
>>>>>> in Browse, so that PDF files can be viewed from within Browse itself.
>>>>>> Does anyone know how this can be done. Apart from the mozplugger
>>>>>> plugin itself, we need to have the m4 binary to help mozplugger parse
>>>>>> its config file, as well as the application which _actually_ renders
>>>>>> the PDF.
>>>>>> Normally we can modify the OS image, but it would be easier for us to
>>>>>> include the entire thing in Browse and make a new Browse bundle.
>>>>>> Any thoughts/ideas/comments ?
>>>>>
>>>>> What are the binaries, libraries and other resources that are needed
>>>>> by the evince plugin and aren't available on the 8.2.0 image?
>>>>>
>>>>
>>>>
>>>> We won't use the evince plugin (as it does not have Journal support).
>>>> I have a simple python PDF viewer which takes care of rendering the
>>>> PDF. Everything that needs to be installed on the XO are at:
>>>> http://dev.laptop.org/~sayamindu/pdf_embed/
>>>
>>> I haven't done these tricks myself, but I know that some activities
>>> ship executables and libraries inside their bundles.
>>>
>>> Two places to look at are modifying PATH and LD_LIBRARY_PATH and
>>> insert in them paths inside the bundle.
>>>
>>> Also, you can set some mozilla-related paths at startup, see hulahop.startup().
>>>
>>> Would this be enough?
>>>
>>> strace -e open may be helpful in seeing which files it looks for and
>>> fails to find.
>>>
>>
>>
>> How do I do the strace for activity startup ? In an XO, it's pretty
>> easy to do via rainbow, but how do I do this in sugar-jhbuild ?
>> There's a MOZ_PLUGIN_PATH which looks promising, but somehow it's not
>> working for me. Strace should be able provide clues.
>
> You can strace an activity easily if you launch it from Terminal.
> Otherwise you will need to hack the sugar sources.
>
> strace -f sugar-launch Web
>
> should work, I think.
>


Thanks for the tip.
http://dev.laptop.org/~sayamindu/Browse-99.xo seems to be working for
me. Please test.
Attached is the patch which did the trick.
Thanks,
Sayamindu


-- 
Sayamindu Dasgupta
[http://sayamindu.randomink.org/ramblings]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: embed_pdf_in_browse.patch
Type: application/octet-stream
Size: 1431 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/devel/attachments/20081209/f8905da2/attachment-0001.obj 


More information about the Devel mailing list