Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-20 Thread Erik Blankinship
Am I correct that sugar and gnome can co-exist in two different ways right
now?

1. On a dual boot machine, probably an xo, where activities are installed
into /home/user/Activities/ where useris probably *always *olpc

2. Sugar as an application in gnome (within a Xephyr window) where
activities can be installed a few places, including
/home/user/Activities/

Next question.. am I correct that the *preferred *way for users to install
activities and applications is:

A. Sugar activities are installed via .xo bundles.

B. Gnome activities are installed via .rpm files.

Now, how should activity developers (who are not writing system libraries
like xulrunner or squeak) put their content so that their
activity/application can be viewed from both sugar and gnome?  I am asking
so children can avoid having redundant copies of files on every machine
running both gnome and sugar.  This is a real problem for content rich
activities with lots of media assets.

By default, an rpm file will install into /usr/lib/python/.  This is
obviously not where sugar looks for its activities.  If we could get an
'educational content' rpm to install its contents anywhere... where should
we put its assets so that they are automatically where they should be for
sugar too?  Any experts out there on rpm spec files?

Or is this a bad idea?
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-19 Thread Frantisek Dufka
On 19.1.2011 3:57, Martin Langhoff wrote:
   - Typical users in an OLPC deployment will often depend on the OS
 image having the libs installed -- as it happens now with the examples
 I've given earlier.

Hmm, I always wondered how those many separate gcompris activities work 
in this regard. I suppose gcompris is not preinstalled, does every 
activitity come with the shared stuff?

Frantisek
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-19 Thread Erik Blankinship


 Let's assume delivery of the activity-application is via a usb stick.
  Let's also assume the video game has 200mb of assets.  The goal is to make
 it as easy as possible to install the activity-application once, from either
 side, and to put the assets in one place.  For sugar, this would be a ~200mb
 xo bundle on the usb stick.  For gnome, this might be a ~200mb rpm on the
 usb stick.

 Do all activity and application developers have write access to any part of
 the system where they can add the libraries that they need to the system
 from either gnome or sugar side and then access if from either side?  Where
 and how should assets be installed?


The best practice I am concocting is that a developer put all assets
into ~/Actitivities/MyCoolActivity/

The xo bundle will obviously install and point there. Gnome .rpm
installations should point there too.

Hopefully it is straightforward to make the gnome rpm installation point and
run from this location.  Is there anything I should look out for before
going down this path?
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-18 Thread Bert Freudenberg
On 18.01.2011, at 18:41, Erik Blankinship wrote:

 On a dual-boot XO, does it make sense to use the same binary code for sugar 
 activities also in gnome applications?  If so, are there guidelines or 
 example acti-plications?

I think it makes a lot of sense. That's one of the reasons the Etoys activity 
bundle is but a tiny wrapper. Etoys works as stand-alone application in Gnome 
and as activity in Sugar.

 If the same binary code is not re-used by both platforms, but just the same 
 code base, are there guidelines or examples of how to re-use the same code 
 base effectively?  Off the top of my head, how data is serialized is handled 
 differently between the two platforms.

Yes. Etoys switches the tool bar, e.g., the insert object/keep a copy buttons 
are replaced by file load/save buttons, the sharing button goes away, a 
full-screen button is added. The file format is the same, but different code 
paths are used.

 This question is of particular concern to acti-plications with many media 
 assets, like some video games.  It would be nice to avoid file redundancy.  
 Given the small size of the XO netbooks, I hope this question is on mark for 
 this community.

Right on.

- Bert -

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-18 Thread Martin Langhoff
On Tue, Jan 18, 2011 at 12:41 PM, Erik Blankinship er...@mediamods.com wrote:
 On a dual-boot XO, does it make sense to use the same binary code for sugar
 activities also in gnome applications?  If so, are there guidelines or
 example acti-plications?

The gnome side will most likely be installed via RPMs (or .deb files
on Ubuntu/Fedora setups). So your Sugar app could just use the
libraries, binaries and resources/assets from the RPM.

Examples - Write.xo uses the Abiword libraries. Browse.xo uses
xulrunner (the Firefox libraries  backend). Bert pointed out EToys.

In all those cases, you get code reuse and a small Activity, but the
activity completely depends finding the things it needs.

hth,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-18 Thread Erik Blankinship


 The gnome side will most likely be installed via RPMs (or .deb files
 on Ubuntu/Fedora setups). So your Sugar app could just use the
 libraries, binaries and resources/assets from the RPM.

 Examples - Write.xo uses the Abiword libraries. Browse.xo uses
 xulrunner (the Firefox libraries  backend). Bert pointed out EToys.

 In all those cases, you get code reuse and a small Activity, but the
 activity completely depends finding the things it needs.


If my acti-plication has dependencies that are not part of the underlying
build, do I need to install them on the gnome side first?  Or can
cross-platform libraries be initially installed on the Sugar side too?

A related follow-up: does it make sense to put cross-platform dependencies
that a gnome activity would need into ~/Activities/MyCoolActivity.activity/
?
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-18 Thread Martin Langhoff
On Tue, Jan 18, 2011 at 2:25 PM, Erik Blankinship er...@mediamods.com wrote:
 If my acti-plication has dependencies that are not part of the underlying
 build, do I need to install them on the gnome side first?

It's not technically at the gnome side... you have to install them in
the system :-)

 - Power users, developers with an XO, will use yum (or a GUI frontend
to yum) to install the required libs, and the gnome app.

 - Typical users in an OLPC deployment will often depend on the OS
image having the libs installed -- as it happens now with the examples
I've given earlier.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-18 Thread Erik Blankinship
On Tue, Jan 18, 2011 at 9:57 PM, Martin Langhoff
martin.langh...@gmail.comwrote:

 On Tue, Jan 18, 2011 at 2:25 PM, Erik Blankinship er...@mediamods.com
 wrote:
  If my acti-plication has dependencies that are not part of the underlying
  build, do I need to install them on the gnome side first?

 It's not technically at the gnome side... you have to install them in
 the system :-)


Let's assume delivery of the activity-application is via a usb stick.  Let's
also assume the video game has 200mb of assets.  The goal is to make it as
easy as possible to install the activity-application once, from either side,
and to put the assets in one place.  For sugar, this would be a ~200mb xo
bundle on the usb stick.  For gnome, this might be a ~200mb rpm on the usb
stick.

Do all activity and application developers have write access to any part of
the system where they can add the libraries that they need to the system
from either gnome or sugar side and then access if from either side?  Where
and how should assets be installed?
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel