deploying Squeak applications

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

deploying Squeak applications

Mark Volkmann
How are Squeak applications typically deployed to users? Is there a way to create an image that runs a given method when double-clicked? Is there a way to reduce an image to contain only the classes used from a given starting class?

---
Mark Volkmann



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: deploying Squeak applications

Michael Haupt-3
Hi Mark,

On 8/13/07, Mark Volkmann <[hidden email]> wrote:
> How are Squeak applications typically deployed to users?

I'd package the image and changes file, maybe along with the VM, and ship those.

> Is there a way to
> create an image that runs a given method when double-clicked?

You can add a class to the startup list:
SystemDictionary>>#addToStartUpList: will do that. The class is
required to understand the #startUp: message, which will be sent to it
when the image is loaded and started. #startUp: accepts a Boolean
telling it whether the image is resuming (newly started).

> Is there a way
> to reduce an image to contain only the classes used from a given starting
> class?

That one, I cannot answer.

Best,

Michael
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: deploying Squeak applications

Mark Volkmann
On Aug 13, 2007, at 8:26 AM, Michael Haupt wrote:

Hi Mark,

On 8/13/07, Mark Volkmann <[hidden email]> wrote:
How are Squeak applications typically deployed to users?

I'd package the image and changes file, maybe along with the VM, and ship those.

Tell me more about the changes file. When I do a save it seems to update both my image file and my changes file. If all my changes are saved in the changes file, why is the image file modified?

Is there a way to
create an image that runs a given method when double-clicked?

You can add a class to the startup list:
SystemDictionary>>#addToStartUpList: will do that. The class is
required to understand the #startUp: message, which will be sent to it
when the image is loaded and started. #startUp: accepts a Boolean
telling it whether the image is resuming (newly started).

Would you say this is the most common way to deploy a Smalltalk application to users, at least with Squeak?

Is there a way
to reduce an image to contain only the classes used from a given starting
class?

That one, I cannot answer.

---
Mark Volkmann



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: deploying Squeak applications

David Mitchell-10
In reply to this post by Michael Haupt-3
To see a good practice (best) for deployment, look at Sophie, which
borrows its deployment strategy from Plopp. I particularly like the
Linux deployment, which includes the VMs for on Windows and Mac OS X
as well.

This topic is addressed as a FAQ on the wiki (just updated with my
comments before replying to this email):
http://wiki.squeak.org/squeak/3563

I usually get my application running, then Save and Close Squeak. The
distribute the image (and changes, if I'm giving to another
developer).

Reducing (a.k.a., shrinking) the image is generally considered a black
art. Best practice today is writing your app with Monticello. Then get
a pre-shrunk Squeak and add reload your app. Here is a good place for
pre-shrunk Squeaks:

http://www.comtalk.net/Squeak/98

To see the future, take a look at Spoon. Probably not ready for the
beginners list, though:
http://netjam.org/spoon

On 8/13/07, Michael Haupt <[hidden email]> wrote:

> Hi Mark,
>
> On 8/13/07, Mark Volkmann <[hidden email]> wrote:
> > How are Squeak applications typically deployed to users?
>
> I'd package the image and changes file, maybe along with the VM, and ship those.
>
> > Is there a way to
> > create an image that runs a given method when double-clicked?
>
> You can add a class to the startup list:
> SystemDictionary>>#addToStartUpList: will do that. The class is
> required to understand the #startUp: message, which will be sent to it
> when the image is loaded and started. #startUp: accepts a Boolean
> telling it whether the image is resuming (newly started).
>
> > Is there a way
> > to reduce an image to contain only the classes used from a given starting
> > class?
>
> That one, I cannot answer.
>
> Best,
>
> Michael
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: deploying Squeak applications

David Mitchell-10
In reply to this post by Mark Volkmann
> Tell me more about the changes file. When I do a save it seems to update
> both my image file and my changes file. If all my changes are saved in the
> changes file, why is the image file modified?

Changes is a database of code used by the image.
http://wiki.squeak.org/squeak/49

Image contains the objects. That's all the running bytecode (including
your program), all of the data (including pointers to the changes and
sources files):

Smalltalk can live without the database of source code, but it cannot
live without the virtual image (or virtual machine).
http://wiki.squeak.org/squeak/2213

>
> Is there a way to
> create an image that runs a given method when double-clicked?
>
> You can add a class to the startup list:
> SystemDictionary>>#addToStartUpList: will do that. The
> class is
> required to understand the #startUp: message, which will be sent to it
> when the image is loaded and started. #startUp: accepts a Boolean
> telling it whether the image is resuming (newly started).
>
> Would you say this is the most common way to deploy a Smalltalk application
> to users, at least with Squeak?
>
>
> Is there a way
> to reduce an image to contain only the classes used from a given starting
> class?
>
> That one, I cannot answer.
>
> ---
> Mark Volkmann
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: deploying Squeak applications

David Mitchell-10
In reply to this post by Mark Volkmann
> Is there a way to
> create an image that runs a given method when double-clicked?
>
> You can add a class to the startup list:
> SystemDictionary>>#addToStartUpList: will do that. The
> class is
> required to understand the #startUp: message, which will be sent to it
> when the image is loaded and started. #startUp: accepts a Boolean
> telling it whether the image is resuming (newly started).
>
> Would you say this is the most common way to deploy a Smalltalk application
> to users, at least with Squeak?

I think most people just save the image before distribution. Since the
image is the application in its running state, that works. I think of
the above as being more for scripting.
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: deploying Squeak applications

Enno Schwass
In reply to this post by Mark Volkmann
Hi

> How are Squeak applications typically deployed to users?

http://squeak.preeminent.org/tut2007/html/206.html

and further pages. Look for that special mac section.

> Is there a way to create an image that runs a given method when  
> double-clicked? Is there a way to reduce an image to contain only  
> the classes used from a given starting class?

As Michael said check SystemDictionary>>#addToStartUpList:



You could start with one of the smaller images and fill in all the  
needed. But why? A typical bigger image has a size of 25 MB.
In these times, this isnt much.

On the other hand there is kernelimage

http://www.comtalk.net/Squeak/98

Hope that helps
Enno
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: deploying Squeak applications

Brad Fuller-2
In reply to this post by Mark Volkmann
On Mon August 13 2007 5:27 am, Mark Volkmann wrote:
> How are Squeak applications typically deployed to users? Is there a
> way to create an image that runs a given method when double-clicked?
> Is there a way to reduce an image to contain only the classes used
> from a given starting class?

Hi Mark,

Also see Ned's lockdown:

http://wiki.squeak.org/squeak/518
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners