[Sugar-devel] Bundling plugins with Browse

Bert Freudenberg bert at freudenbergs.de
Wed Dec 10 08:40:30 EST 2008


On 10.12.2008, at 13:13, Sayamindu Dasgupta wrote:

> On Wed, Dec 10, 2008 at 3:47 AM, Bert Freudenberg <bert at freudenbergs.de 
> > wrote:
>>
>> On 09.12.2008, at 22:29, Sayamindu Dasgupta wrote:
>>
>>> On Wed, Dec 10, 2008 at 12:37 AM, Bert Freudenberg <bert at freudenbergs.de 
>>> >
>>> wrote:
>>>>
>>>> On 09.12.2008, at 18:49, Sayamindu Dasgupta wrote:
>>>>>
>>>>> http://dev.laptop.org/~sayamindu/Browse-99.xo seems to be  
>>>>> working for
>>>>> me. Please test.
>>>>> Attached is the patch which did the trick.
>>>>
>>>> Ugh. Why is it necessary to copy the plugin to  
>>>> $SUGAR_ACTIVITY_ROOT/
>>>> data ? That would only make sense if it is supposed to be  
>>>> modified at
>>>> runtime.
>>>>
>>>
>>>
>>> Do stuff placed in $SUGAR_ACTIVITY_ROOT remain persistent across
>>> reboots ? I seem to have troubles getting that (the file disappeared
>>> after reboot)
>>
>>
>> You misunderstood. Why copy at all? Why not run it from the bundle?
>>
>> Copying from the bundle is only necessary for e.g. default  
>> configuration
>> files that the activity needs to be able to change later (because  
>> the bundle
>> itself is read-only).
>>
>
>
> Ah, ok, I was blindly following cert8.db
> http://dev.laptop.org/~sayamindu/Browse-101.xo follows your solution
> and seems to work fine. Moreover, theoretically one can drop any
> plugin in the plugin directory of Browse, and expect it to work.

Right.

> <embed_pdf_in_browse.patch>


That's more like it :)

The only nit to pick would be that it would be better style to use  
activity.get_bundle_path() instead of directly accessing the  
environment variable. The toolkit is there for using it ;)

- Bert -





More information about the Devel mailing list