Installing Squeak: Difference between revisions

From OLPC
Jump to navigation Jump to search
(New article with not quite complete installation procedure)
 
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''Note:''' The steps below will result in a ''system-developer's'' version of [[Squeak]]. On the laptop there is a special [[Squeak]] distribution derived from [http://squeakland.org squeakland.org]. See [[Etoys]] for information on the actual OLPC version. --[[User:Bert|Bert]]

==Multiplatform==
[[Squeak]] inherited from [[Smalltalk]] the binary-image multiple platform capability (ca.1980 much earlier than [[Java]]); in order to use it, you need the binary-image (cross-platform) and the virtual machine (OS-specific).

This means that if you develop something in [[Etoys]] ([[Squeak]]) in your *nix, Mac or Windows machine, you then copy the <tt>.image & .changes</tt> to the OLPC and it will work exactly the same&mdash;no compilation, no conversion, no hassle.

===Download files===
===Download files===

The latest stable image (not the VM) can be found '''[http://ftp.squeak.org/current_stable/ here]'''.

On the [http://www.squeak.org/Download/ Squeak download page], click the appropriate link to download the virtual machine and image for your computer and operating system.
On the [http://www.squeak.org/Download/ Squeak download page], click the appropriate link to download the virtual machine and image for your computer and operating system.

Pre-built zip files (with all necessary files) exist for [http://ftp.squeak.org/current_stable/win/Squeak3.10-7159-win32.zip Windows] and [http://ftp.squeak.org/current_stable/mac/Squeak3.10-7159mac.zip Mac OS]. Current stable release is 3.10 (as of [[08 May]] [[2008]] - please [http://www.squeak.org/Download/ verify and update links] if this changes).

For Linux you must download the current release [http://ftp.squeak.org/3.10/Squeak3.10-7159-basic.zip Basic Image file] and the executable [http://ftp.squeak.org/3.10/unix-linux/Squeak-3.10-1.i686-pc-linux-gnu.tar.gz VM for Linux] or the [http://ftp.squeak.org/3.9/unix-linux/Squeak-3.9-8.src.tar.gz VM source] (see [http://www.squeak.org/Download/ here for other flavors]).

===Installing===

Normally, [[Squeak]] installations are self-sufficient in the sense that it keeps itself in one directory without messing around with the OS, so all you have to do is make sure that all files reside in a directory of your liking. Sharing the VM, sources and other tidbits is possible&mdash;but since you are here you probably want the ''fast-lane no fuzz installation...''

;MS-Windows and MacOS:should be straight forward: just [[unzip]].

;What follows is for Linux:


Untar the file into a directory.
Untar the file into a directory.
Line 10: Line 32:
to install the virtual machine.
to install the virtual machine.


Choose or create a directory to run squeak in, and run
Choose or create a directory to run Squeak in, and run


inisqueak
inisqueak
Line 19: Line 41:


OR copy the image file, the changes file and the sources file to your working directory, and change their names to squeak.image, squeak.change, and squeak.sources. (I don't yet know if this last is necessary. Anybody?)
OR copy the image file, the changes file and the sources file to your working directory, and change their names to squeak.image, squeak.change, and squeak.sources. (I don't yet know if this last is necessary. Anybody?)

==Running Squeak==

If you are running in a GUI, just drag-n-drop the image file (<tt>squeakXXX.image</tt>) onto the VM executable (<tt>squeak</tt> or <squeak.exe>).

Another option is to run it from the command-line which (iirc) goes <tt>vm image</tt> (ie: <tt>squeak squeakXXX.image</tt>. (NOTE: I could be mistaken - so check the docs and/or websites ;)


Run
Run
Line 24: Line 52:
squeak
squeak


and you get an amazingly rich but underdocumented graphical programming environement. If OLPC wants a proper manual for all of this, I'm an experienced Tech Writer with lots of API and other programming documentation experience who learned Smalltalk from the books when they first came out, and I'm available.--[[User:Mokurai|Mokurai]] 05:36, 12 October 2006 (EDT)
and you get an amazingly rich but underdocumented graphical programming environement. If OLPC wants a proper manual for all of this, I'm an experienced Tech Writer with lots of API and other programming documentation experience who learned [[Smalltalk]] from the books when they first came out, and I'm available.--[[User:Mokurai|Mokurai]] 05:36, 12 October 2006 (EDT)

===Notice to [[Squeak]]/[[Smalltalk]] beginners===

I '''recommend reading''' some material along, probably starting either at [http://www.whysmalltalk.com/tutorials/squeak.htm Why Smalltalk's Squeak Tutorials] page, or the [http://wiki.squeak.org/squeak/792 hectic Squeak.org wiki] (or try a [http://www.google.com/search?client=opera&rls=en&q=introduction+squeak+tutorial&sourceid=opera&ie=utf-8&oe=utf-8 Google search])

[[Squeak]], as a direct descendant of [[Smalltalk]]-80, basically manages four ''essential'' files:
;The Virtual Machine (VM):normally inmutable, so no really a cause of problems
;.image:is the file where the ''snapshot'' of the objects are stored / serialized. This file is '''manually''' saved, so if you exit the environment without saving, you lose (or discard) your changes since the last save.<br>'''Discarding''' (not saving the image) is particularly helpful when you are trying things out or mess up (and you will, trust me, we all have :)
;.changes:is where the history of all the changes done by the user (method editions, sending messages (manually) to objects, etc.) is stored. That's the reason why it's '''''very important''''' to keep both the <tt>.image</tt> & <tt>.change</tt> files '''together''' at all times.<br>Since all the source code of new or modified methods is stored in this file, if you lose it or becomes off-sync with the image, meaning that the source code will be '''lost'''. The environment will still work fine (compiled methods are objects, so they'll reside in the image) but you will not be able to browse the code properly. You can still decompile it though ;)<br>'''NOTE: <u>never</u> edit this file manually!''' Although it's used as the deposit for the source-code, you will accomplish nothing (except ruining your sources) in the environment if you do.
;.sources:is where the method's sources are kept - but only the 'original' source - once you change a base method, its source will be stored in <tt>.change</tt>&mdash;so if your paths are correct, this file doesn't need to be copied and is basically a read-only file.

I personally recommend that your first action in the environment is a '''Save As''' (with an appropriate and different name&mdash;ie: <tt>testing.image</tt>) so that 'starting from scratch' is just a couple clicks away and will ensure that you always keep the 'original' environment as a backup.
===Great news for [[Squeak]]/[[Smalltalk]]/[[Seaside]]/[[Magritte]]===

Squeak4.1beta runs fabulously on the G1G1 OLPC with Seaside 3.0 and Magritte included. Wonderful to see a web server running on the machine and view your site in the Browser. To build this image start with the latest distribution of Squeak for linux from [http://www.squeak.org/trunk Squeak latest] and use the VM given [http://www.squeakvm.org here]. Add Seaside3.0 (using the [http://builder.seaside.st/ builder]) and Magritte (as specified [http://www.lukas-renggli.ch/smalltalk/magritte?_s=ZMKs6TnO7QFc58Ws&_k=5aCeehFL&_n&19 here]) to your image, and voila! It is amazing to see a full version of Seaside3.0 with Magritte running!
Follow the link [http://book.seaside.st/book/getting-started/pharo-squeak/one-click-image Seaside Tutorial] for a good tutorial.

The seaside examples work fine.

[[Category:Software development]]
[[Category:Etoys]]
[[Category:Developers]]
[[Category:HowTo]]

Latest revision as of 23:36, 23 April 2010

Note: The steps below will result in a system-developer's version of Squeak. On the laptop there is a special Squeak distribution derived from squeakland.org. See Etoys for information on the actual OLPC version. --Bert

Multiplatform

Squeak inherited from Smalltalk the binary-image multiple platform capability (ca.1980 much earlier than Java); in order to use it, you need the binary-image (cross-platform) and the virtual machine (OS-specific).

This means that if you develop something in Etoys (Squeak) in your *nix, Mac or Windows machine, you then copy the .image & .changes to the OLPC and it will work exactly the same—no compilation, no conversion, no hassle.

Download files

The latest stable image (not the VM) can be found here.

On the Squeak download page, click the appropriate link to download the virtual machine and image for your computer and operating system.

Pre-built zip files (with all necessary files) exist for Windows and Mac OS. Current stable release is 3.10 (as of 08 May 2008 - please verify and update links if this changes).

For Linux you must download the current release Basic Image file and the executable VM for Linux or the VM source (see here for other flavors).

Installing

Normally, Squeak installations are self-sufficient in the sense that it keeps itself in one directory without messing around with the OS, so all you have to do is make sure that all files reside in a directory of your liking. Sharing the VM, sources and other tidbits is possible—but since you are here you probably want the fast-lane no fuzz installation...

MS-Windows and MacOS
should be straight forward: just unzip.
What follows is for Linux

Untar the file into a directory.

Go into the directory and run

sh ./INSTALL

to install the virtual machine.

Choose or create a directory to run Squeak in, and run

inisqueak

there to create your personal image file.

(I haven't found the inisqueak script, so I hope someone will edit this.)

OR copy the image file, the changes file and the sources file to your working directory, and change their names to squeak.image, squeak.change, and squeak.sources. (I don't yet know if this last is necessary. Anybody?)

Running Squeak

If you are running in a GUI, just drag-n-drop the image file (squeakXXX.image) onto the VM executable (squeak or <squeak.exe>).

Another option is to run it from the command-line which (iirc) goes vm image (ie: squeak squeakXXX.image. (NOTE: I could be mistaken - so check the docs and/or websites ;)

Run

squeak

and you get an amazingly rich but underdocumented graphical programming environement. If OLPC wants a proper manual for all of this, I'm an experienced Tech Writer with lots of API and other programming documentation experience who learned Smalltalk from the books when they first came out, and I'm available.--Mokurai 05:36, 12 October 2006 (EDT)

Notice to Squeak/Smalltalk beginners

I recommend reading some material along, probably starting either at Why Smalltalk's Squeak Tutorials page, or the hectic Squeak.org wiki (or try a Google search)

Squeak, as a direct descendant of Smalltalk-80, basically manages four essential files:

The Virtual Machine (VM)
normally inmutable, so no really a cause of problems
.image
is the file where the snapshot of the objects are stored / serialized. This file is manually saved, so if you exit the environment without saving, you lose (or discard) your changes since the last save.
Discarding (not saving the image) is particularly helpful when you are trying things out or mess up (and you will, trust me, we all have :)
.changes
is where the history of all the changes done by the user (method editions, sending messages (manually) to objects, etc.) is stored. That's the reason why it's very important to keep both the .image & .change files together at all times.
Since all the source code of new or modified methods is stored in this file, if you lose it or becomes off-sync with the image, meaning that the source code will be lost. The environment will still work fine (compiled methods are objects, so they'll reside in the image) but you will not be able to browse the code properly. You can still decompile it though ;)
NOTE: never edit this file manually! Although it's used as the deposit for the source-code, you will accomplish nothing (except ruining your sources) in the environment if you do.
.sources
is where the method's sources are kept - but only the 'original' source - once you change a base method, its source will be stored in .change—so if your paths are correct, this file doesn't need to be copied and is basically a read-only file.

I personally recommend that your first action in the environment is a Save As (with an appropriate and different name—ie: testing.image) so that 'starting from scratch' is just a couple clicks away and will ensure that you always keep the 'original' environment as a backup.

Great news for Squeak/Smalltalk/Seaside/Magritte

Squeak4.1beta runs fabulously on the G1G1 OLPC with Seaside 3.0 and Magritte included. Wonderful to see a web server running on the machine and view your site in the Browser. To build this image start with the latest distribution of Squeak for linux from Squeak latest and use the VM given here. Add Seaside3.0 (using the builder) and Magritte (as specified here) to your image, and voila! It is amazing to see a full version of Seaside3.0 with Magritte running! Follow the link Seaside Tutorial for a good tutorial.

The seaside examples work fine.