C Code Generation
arning at charm.net
Tue Jan 23 16:10:18 UTC 2001
On Tue, 23 Jan 2001 10:14:35 -0500 Geoffrey Corey <gcorey at redsky.com> wrote:
>I'm delving into a new area of Squeak for me. Here is what I want to do and
>maybe someone on the list can tell me it I can do it. What I would like to
>do is take a squeak application and generate 'C' code to make a standalone
>exe for a target platform. For example, is it possible to take the Whisker
>browser and make a standalone executable?
>I know it sounds strange, but that is the requirement given to me. Is it
>possible? Is there any docs on the Net that explains this? I searched the
>eGroups list and the Swiki but couldn't find much info. The "?" on the
>CCodeGeneration class pretty much covers building a class in 'C', but I'm
>having difficulting grasping the big picture.
There are several interpretations of "standalone executable" and I wonder which describes your requirements.
- If the requirement is really for a single .exe file and no other associated files, the answer is that, while not a standard feature, I think some folks on the list have succeeded in appending the image file on to the end of the VM and modifying the VM to read the image from there. If no one remembers who or how, you might try scanning an archive of the list (like eGroups).
- If the requirement is an executable which *appears* to be Whisker and nothing else (no games, email client, etc), then the issue is one of simply disabling certain things (like the world menu) in the image.
- If the requirement is for a pure C program, then you are probably out of luck since the CCodeGenerator will translate only a subset of Smalltalk, not the full range of ploymorphic/late-binding stuff any real Smalltalk app is sure to contain. I say "probably" since this seems a rather artificial requirement and you might try to go around it by showing the VM as the application and pass the image off as some sort of data structure required by the app.
Is any of these an accurate picture of what you need?
More information about the Squeak-dev