-
Notifications
You must be signed in to change notification settings - Fork 74
VectorGraphcis plugin
Ken Dickey edited this page Aug 6, 2021
·
16 revisions
It does require background in building with C & Linux tools
Until the VectorEnginePlugin is merged into the OpenSmalltalk release, you can build it if you build a Squeak VM.
The basic steps are to [A] Generate the VectorEnginePlugin.c code using a Cuis specialized VMMaker package [B] Build an OpenSmalltalk VM, [C] Test the result, and [D] install in a typical place.
As I primarily use Linux on Arm64, I will describe the process for that platform.
- On a fresh Cuis image, update to latest.
- Feature require: 'VectorEnginePlugin'.
- Open a Browser and find Class VectorEnginePlugin.
- Select the Class Comment text and execute it:
VectorEnginePlugin translateInDirectory: DirectoryEntry currentDirectory doInlining: true
- You can now quit the image and should find file "VectorEnginePlugin.c
- Make a place (e.g. mkdir ~/OpenSmalltalk; cd ~/OpenSmalltalk)
- git clone --depth 1 https://OpenSmalltalk/opensmalltalk-vm oscogvm
- cd oscogvm/build.PLATFORM/squeak.VMKIND.spur
- cd oscogvm/build.linux64ARMv8/squeak.stack.spur - If not arm64, you can use "cog" in place of "stack"
Note: file HowToBuild
- mkdir ~/OpenSmalltalk/oscogvm/platforms/Cross/plugins/VectorEnginePlugin - cp <WhereYouMadeIt>/VectorEngintPlugin.c ~/OpenSmalltalk/oscogvm/platforms/Cross/plugins/VectorEnginePlugin
- edit "plugins.ext" to add a new line at the end (after SHA2Plugin \) with the single line VectorEnginePlugin
- cd build - ./mvm
- Answer "y" to the prompt "clean?"
- cd to installed-in location, e.g.
- ls should show a "squeak" executable and support libs, e.g. VectorEnginePlugin.so
Assume $CUIS = ~/Cuis-Smalltalk/Cuis-Smalltalk-Dev
_in the library directory_
./squeak $CUIS/Cuis5.0-4689.image
- In Cuis, execute the code:
Feature require: 'SVG'. VectorEngineWithPlugin isPluginAvailable. "Should answer true" (SVGMainMorph fromFileNamed: '/home/kendi3he/Cuis-Smalltalk/SVG/SVGSamples/butterfly.svg') openInHand.
I am very loose about this and just place the files into /usr/local.
- cd ~/OpenSmalltalk/oscogvm/products/sqstkspur64ARMv8linuxht - sudo cp -r * /usr/local
- which squeak
should answer: "/usr/local/bin/squeak"