[etoys-dev] Applying changesets to selected images only

Ricardo Moran richi.moran at gmail.com
Mon Jun 24 15:58:04 EDT 2013


I've done something similar for Physical Etoys that lets us add new source
code and/or new files to a published release. This has been very useful for
us and the implementation is very simple, so maybe if there is enough
interest we could adapt it and include it in Etoys.
I'm attaching an *.st file if you want to check it out. It consists on just
two classes: PEInstaller and PEModule. PEInstaller takes care of the
startup behavior and registering which PEModules have been installed
already (so that we don't install something twice). PEModule includes the
logic to install (and rollback if something fails) a given module. On each
startup the behavior is the following:

   1. PEInstaller looks on the default directory for *.pem files that
   hasn't been installed before. These *.pem files are just renamed zip files.
   2. For each *.pem file found, PEInstaller creates a PEModule and
   installs it, which involves the following steps:
      1. Since the *.pem file is just a zip, the PEModule first extracts
      all its files on the default directory. This allows us to add arbitrary
      files, not just source code.
      2. Then it looks for source code files (*.st, *.cs, or *.mcz) on the
      extracted files, and it loads them in the image.
   3. After installing all modules found, PEInstaller registers them on the
   "installedModules" class inst var, and saves the image. If an error occured
   while installing a module, it will rollback all modules installed on this
   startup (so that we don't leave any file hanging there) and it quits the


On Sun, Jun 23, 2013 at 12:09 PM, K. K. Subramaniam <kksubbu.ml at gmail.com>wrote:

> On Sunday 23 June 2013 07:54 PM, karl ramberg wrote:
>> You can make a project, make this change set default change set for that
>> project and publish the project. Answer yes to include change set in
>> published project.
>> It's a little more difficult to save the image with the change set
>> included.
> The difficulty that I have is actually in saving a patched image. Applying
> a patch is the easier part. I tried a deferred save and quit in the
> postscript of the changeset but there is still an annoying flash on every
> start for the postscript residual.
> The usual way of using a *.st file to apply the changeset and quit depends
> on the host OS. If only the image could autoexec a autorun.st file from
> the default directory on startup then cross-platform field patches would be
> simpler.
> Regards .. Subbu
> ______________________________**_________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/**mailman/listinfo/etoys-dev<http://lists.squeakland.org/mailman/listinfo/etoys-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20130624/60c679ec/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PhysicalEtoys-Installer.st
Type: application/octet-stream
Size: 7746 bytes
Desc: not available
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20130624/60c679ec/attachment.obj>

More information about the etoys-dev mailing list