User:Wade/Unified Bundles: Difference between revisions

Wade (talk | contribs)
Wade (talk | contribs)
m moved Unified Bundles to User:Wade/Unified Bundles: Archiving this idea until it can be reconstituted as a feature request, if it still makes sense.
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{ GoogleTrans-en | es =show | bg =show | zh-CN =show | zh-TW =show | hr =show | cs =show | da =show | nl =show | fi =show | fr =show | de =show | el =show | hi =show | it =show | ja =show | ko =show | no =show | pl =show | pt =show | ro =show | ru =show | sv =show }}{{TOCright}}
==Goal==
==Goal==
To describe a new Sugar bundle which supports equally Activity software and prepared Content.   
To describe a new Sugar bundle which supports equally Activity software and prepared Content.   
Line 77: Line 78:
  exec sugar-etext-activity [options] <etext_file>
  exec sugar-etext-activity [options] <etext_file>


===EToys Content Viewer===
===Etoys Content Viewer===
The Sugar EToys Content Viewer is packaged as sugar-etoys-content-viewer.  Package dependences are not known at this time.   
The Sugar Etoys Content Viewer is packaged as sugar-etoys-content-viewer.  Package dependences are not known at this time.   


The purpose of having a separate content viewer for Etoys is that the content viewer wrapper script launches Etoys in a mode which bypasses the home screen, and seamlessly launches into the Etoys content.  [http://activities.sugarlabs.org/en-US/sugar/addon/4054 FreeCell] is an example of this idea.
The purpose of having a separate content viewer for Etoys is that the content viewer wrapper script launches Etoys in a mode which bypasses the home screen, and seamlessly launches into the Etoys content.  [http://activities.sugarlabs.org/en-US/sugar/addon/4054 FreeCell] is an example of this idea.


This package contains some of the source code to the EToys activity, plus the sugar-etoys-activity launcher script.
This package contains some of the source code to the Etoys activity, plus the sugar-etoys-activity launcher script.


EToys-based Unified content bundles are made up of a Squeak VM.  The activity.info file contains the line:
Etoys-based Unified content bundles are made up of a Squeak script or Etoys project.  The activity.info file contains the line:


  exec sugar-etoys-activity [options] <squeak_vm_file>
  exec sugar-etoys-activity [options] <squeak_file>


==Content Viewer implementation==
==Content Viewer implementation==
Line 107: Line 108:
With the SWF content viewer to base on, a Flash developer can develop a game in Flash but use Python to add toolbars and GTK widgets.  They would package their Python code and SWF file in a Unified bundle, and subclass the sugar-swf-activity classes in their Python code.
With the SWF content viewer to base on, a Flash developer can develop a game in Flash but use Python to add toolbars and GTK widgets.  They would package their Python code and SWF file in a Unified bundle, and subclass the sugar-swf-activity classes in their Python code.


==Sugar changes==
==Implementation==
The primary change to Sugar is that it should gracefully handle failure to find the program specified by the 'exec' line in activity.info, displaying a friendly error message on the launcher screen to the effect of "You do not have the required software to view this content.".
The primary change to Sugar is that it should gracefully handle failure to find the program specified by the 'exec' line in activity.info, displaying a friendly error message on the launcher screen to the effect of "You do not have the required software to view this content.".


There is also the new hidden=true line in activity.info to prevent Content Viewers from appearing in the Home view.
There is also the new hidden=true line in activity.info to prevent Content Viewers from appearing in the Home view.
Most of the work is in converting existing activities to Content Viewer packages, packaging them and writing the sugar-xxx-activity wrapper scripts.  Fortunately, this work can be done one content viewer at a time and the old and new systems can coexist. 
For example, you can have Read and sugar-pdf-content-viewer installed simultaneously.  The user will be allowed to open a PDF file with either, and sugar-pdf-content-viewer will only come into play when a Unified bundle is opened.