-
Notifications
You must be signed in to change notification settings - Fork 74
VectorGraphcis plugin
hilaire 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.<yourplatform></yourplatform>/squeak.<vmkind></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 /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?"
- This last should result in a message "Libraries have been installed in"
- cd to installed-in location, e.g.
~/OpenSmalltalk/oscogvm/products/sqstackspur64ARMv8linuxht/lib/squeak/5.0-*
- ls should show a "squeak" executable and support libs, e.g. VectorEnginePlugin.so
- Test _in this directory_
- [Assume]
- ./squeak $CUIS/Cuis5.0-<whatever></whatever>.image
- In Cuis,
Feature require: 'SVG'. VectorEngineWithPlugin isPluginAvailable. "Should answer true" (SVGMainMorph fromFileNamed: '/home/kendi3he/Cuis-Smalltalk/SVG/SVGSamples/butterfly.svg') openInHand.