How to configure to build and run PhidgetPlugin for Squeak
[back to the PhidgetLab home page]
Introduction
This file describes how to configure your environment to use the PhidgetPlugin in Squeak.
It should also work with future versions.
Start with the Platform independent part and then go on to
the section for your platform (Win32 / Linux /
MacOS).
Finally, build the plugin.
Get the Sources
- Download the plugin sources:
-
Unzip PhidgetPlugin.zip.
The uncompressed "platforms/" is called "platforms directory" from now on.
-
The makefiles you find in our sources under platforms/yourPlatform are called "PhidgetPlugin.makefile".
They will build only the PhidgetPlugin, not the whole VM. You can also use the general makefile from the
Squeak sources if you have them, but it is easier to build only the plugin.
[top]
Configuring
Platform Independent Part
Installing phidget21 Library
-
Install the Phidget Drivers. You can find them at
phidgets.com.
Generating Sources Using VMMaker
-
In your Squeak image file in at least the Phidget-VMMaker.sar file (for build only).
To actually use Phidgets after building, file in Phidget-Core.sar and
Phidget-Etoys.sar too.
- Install and start VMMaker.
- Set the "path to platforms code" to your platforms directory.
- Select your platform name (unix / win32 / Mac OS).
-
Set "path to generated source code" to
"<path-to-platforms-code>/<your-platform>/src".
(This will not work on certain VMMaker versions. Don't worry about that.)
- Drag 'n' drop PhidgetPlugin to the external plugins list.
- Click "Entire" and wait until generating the sources finished.
Win32
Configuring Tools
-
Download and install MinGW
(or other gcc and make for Windows).
It will help if you select to install MinGW make too, and have the "bin" directory in the
PATH variable.
Configuring the Makefile
-
Download the Phidget 21 libraries for Windows from
phidgets.com.
The unzipped folder is called "phidget21-windevel directory" from now on.
-
In platforms\win32\plugins\PhidgetPlugin\Makefile, line 18, specify the path of your
phidget21-windevel directory.
-
In line 24 set the path to your gcc.
Linux
Phidget21 Library
-
Note: If you do not want to be super user when using the phidgets, read the README
file in the phidget21 library release, notice the section about udev files there.
Configuring the Makefile
-
In platforms/unix/PhidgetPlugin.makefile you need to specify where the plugin should be
installed. This will most likely be your Squeak insallation directory (else the plugin will
not be loaded). For instance "/usr/lib/squeak/3.9-8".
In line 14 replace the "squeakdir" with your own.
Mac OS
Nothing to be done here ;)
[top]
Building the Plugin
Win32
- In a console navigate to "platforms/win32"
-
Build:
make -f PhidgetPlugin.makefile
-
Build a debug version: (This will overwrite the normal version and vice versa)
make -f PhidgetPlugin.makefile debug
-
Copy PhidgetPlugin.dll from platforms\win32\build\obj\PhidgetPlugin\ into the
directory of your Squeak executable.
-
Clean up: (optional)
make -f PhidgetPlugin.makefile clean
Linux
- In a console/terminal navigate to "platforms/unix"
-
Build:
sudo make -f PhidgetPlugin.makefile
-
Build a debug version: (This will overwrite the normal version and vice versa)
sudo make -f PhidgetPlugin.makefile debug
-
Clean up: (optional)
make -f PhidgetPlugin.makefile clean
-
In Linux the plugin is also installed when building it.
Uninstall: sudo make -f PhidgetPlugin.makefile uninstall
-
Uninstall and clean:
sudo make -f PhidgetPlugin.makefile uninstall-clean
(This is the same as first making clean, and then making uninstall.)
Mac OS
- Open the PhidgetPlugin.xcodeproj in platforms/Mac OS/plugins/PhidgetPlugin/.
- Build the bundle with "Release" as configuration.
-
Copy the bundle file from platforms/Mac OS/plugins/PhidgetPlugin/build/Release/
into your Squeak app:
- Right click on your Squeak.app, choose "Show Package Contents".
- Copy the file into Contents/Resources/.
[top]
Finished!
Now you have built the PhidgetPlugin and can use the Phidgets in Squeak.