-
Notifications
You must be signed in to change notification settings - Fork 76
VectorGraphcis plugin
The good news is that the VectorEnginePlugin has been merged into the standard OpenSmalltalk build.
To check if you have it, in a Workspace
Feature require: 'SVG'.
VectorEngineWithPlugin isPluginAvailable."--> true "
Building the VectorEnginePlugin plugin 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'.
- Cuis-Smalltalk-Dev/clonePackageRepos.sh script installs the VMMaker package, which is required for this.
- 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.cog.spur
- cd oscogvm/build.linux64ARMv8/squeak.cog.spur
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/sqcogspur64ARMv8linuxht - sudo cp -r * /usr/local
- which squeak
should answer: "/usr/local/bin/squeak"