1
=================================================================
3
Netscape Plugin for Squeak on Unix platforms
6
Author: Bert Freudenberg
7
Last edited: 2010-05-11 17:30:59 by bert
9
================================================================
15
npunix.c (modified copy from Netscape Plugin SDK)
16
include/* (unmodified headers from Netscape Plugin SDK)
19
=================================================================
22
The Squeak plugin should be automatically compiled and installed with
23
the normal squeak build process. This installs squeak into (probably)
25
squeakdir=/usr/local/lib/squeak
27
You will need an image. Copy it (or symlink) to
29
${squeakdir}/SqueakPlugin.image
31
A good place to look for an image suited as plugin is
33
http://squeakland.org/download
35
To register the plugin run ${imgdir}/npsqueakregister.
36
It looks for various browsers
37
in various directories and creates links to the plugin. If
38
your browser is not found, hack the npsqueakregister script or
39
symlink the plugin manually:
41
ln -s ${squeakdir}/@VM_VERSION@/npsqueak.so \
42
/usr/lib/mybrowser/plugins/
44
Exit and restart the browser. Check if the Squeak plugin
45
was recognized by selecting the Help>>About Plugins menu item.
47
Open the html file in the test/ directory. This should
48
activate the Squeak plugin. Since this is the first time the
49
plugin is executed, a .npsqueak folder will be created in your
52
=================================================================
54
NOTE: If you are not the super user of your machine you can install
55
everything into your home directory. Put npsqueak.so somewhere your
56
browser will find it. Make a .npsqueak dir in your home directory
57
with subdirectories and files like shown below. Also create a
58
.npsqueak/npsqueakrun file which points to a Squeak VM.
60
=================================================================
64
* How the plugin works:
66
- npsqueak.so needs to be symlinked where the browser expects plugins
67
- when the browser wants to display a page with an embedded Etoys
68
project, it launches the plugin
69
- the plugin executes the "npsqueakrun" script, passing some parameters
70
to establish a communication channel between the plugin and squeak
71
- that script runs the Squeak VM with an image, instructing the VM to
72
redirect the output into the plugin's window
73
- the image then loads the project
75
* On the first run for each user, npsqueakrun will create a directory
76
structure like this (unless overridden by variables, see below):
87
* Environment Variables:
90
Identifies the sandbox directory, e.g., a place which can be
91
accessed from any (potentially unsafe) Squeaklet.
93
* Default: "$(HOME)/Squeak"
96
Identifies the directory to store private information
99
* should not be accessible by other users
101
* Default: "$(HOME)/.npsqueak/secure"
104
If set, logs debug info to /tmp/npsqueak.log
110
application/x-squeak-source:sts:Squeak source
111
application/x-squeak-object:sqo:Squeak object
112
application/x-squeak-project:pr:Squeak project
116
parameters in EMBED tag used by Squeak:
119
MEMORY=... (not by unix npsqueak)
123
* Communication with VM is via Pipes
125
=================================================================
129
* loop on read() and write() until all data is sent and received.
130
* make plugin not wait for browser when the url is loaded into a target.
132
=================================================================
138
* default to ~/Squeak
139
* do not copy image to ~/.npsqueak anymore
142
* (ikp) BSD-friendly Makefile
145
* (bf) use "find -H" in npsqueakregister
148
* (ikp) use libtool to build
151
* npsqueak checks for image file in system and home dir
152
* modified npsqueakrun, runs with bash, other shells untested
153
* renamed untrusted -> My Squeak
154
* fixed make sure Squeak really gets killed
155
* fixed crashing the browser when closing plugin page
158
* (ikp) handle imageName and failureUrl tags
161
* modified install from home directory to system-wide
164
* hack to work with Mozilla >= 1.0 which deletes the delivered
165
file immediately. We just create a hard link before and
166
delete that after opening the file.
169
* uses aio now for command pipe
170
* moved stuff from ~/.netscape/squeak to ~/.npsqueak directory
171
* implemented SecurityPlugin
174
* updated for squeakland.org image.
175
* TODO: SecurityManager
178
* updated for Squeak 3.0
181
* introduced -browserPipes command line
182
* this fixed the bug of plugins in tables
183
* cleaned up a lot of hacks
184
* this fixed crashing Mozilla 0.6
185
* made widget destroy work more often than not
186
* Problems: crashes when closing Netscape window
187
* pipe is polled for now - should use select in sqXWindow
191
* url requests through browser
194
* report attributes to vm