[Cuis-dev] running headless
Mark Volkmann
r.mark.volkmann at gmail.com
Mon Jun 24 07:11:09 PDT 2024
I'm trying to learn how to run a Smalltalk program in headless mode in
macOS. I documented all the steps I took. When I run the program, it just
hangs and I get no output. Does anyone see something suspicious in these
steps?
To build a Squeak VM for macOS:
1. Open a Terminal and cd to the directory where the VM will be created.
2. Enter `git clone https://github.com/OpenSmalltalk/opensmalltalk-vm.git`
3. Enter `cd opensmalltalk-vm`
4. Enter `./scripts/updateSCCSVersions`
5. Enter `cd building`
6. `cd` to the appropriate subdirectory for the target OS and processor.
For example, `macos64ARMv8`.
7. See the instructions in the file "HowToBuild".
8. Enter `cd squeak.coq.spur`
9. Enter `./mvm -A`. This will run for around 10 minutes and
generate an extreme amount of output.
10. Enter `chmod a+x Squeak.app`
11. Create a symbolic link to the virtual machine that is inside this app
by entering `ln -s "./Squeak.app/Contents/MacOS/Squeak" squeak-vm`.
To run a command-line app:
1. Obtain or create a Smalltalk image file.
For example, Cuis Smalltalk provides the base image file
`Cuis-Smalltalk-Dev/CuisImage/Cuis7.1-6452.image`.
2. Create a `.st` file containing Smalltalk code.
For example, the file `demo.st` could contain the following:
```smalltalk
| stdout |
stdout := StdIOWriteStream.
stdout nextPutAll: 'Hello, World!'
Smalltalk os snapshot: false andQuit: true.
```
3. Run the Smalltalk VM in headless mode,
giving it an image and a file of Smalltalk code. For example,
`./squeak-vm -headless Cuis-Smalltalk-Dev/CuisImage/Cuis7.1-6452.image
demo.st`
--
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240624/83c39163/attachment.htm>
More information about the Cuis-dev
mailing list