Deploying the TCL Plugin

Difference between version 13 and 16 - Previous - Next
***Revised Instructions (September 2020)***

The Pale Moon browser can still use the Tcl Browser Plugin on current operating systems.  Pale Moon is a fork of Firefox that chooses to retain older add-on technologies, such as XUL XPI extensions and NPAPI plugins.

''On Linux''

   * Download and install the "Pale Moon" browser from https://www.palemoon.org/
   * Download the Plugin from https://www.tcl.tk/software/plugin/download.html
   * Do not try to use the XPI installer for the Plugin.  This will cause Pale Moon to segfault.
   * Instead, follow the instructions at https://www.tcl.tk/software/plugin/download.html to rename and unzip the installer.  Copy the files from the installer, except install.js, to directory /usr/lib/mozilla/plugins (create the directory if it does not already exist).  The directory is included in Pale Moon's hard-coded plugins search path, and so Pale Moon will detect plugin libraries that are placed there.

''On Windows''
   * Download and install the 32-bit Windows version of the "Pale Moon" browser from https://www.palemoon.org/
   * Download the 32-bit Windows Tcl Browser Plugin from https://www.tcl.tk/software/plugin/download.html
   * Do not try to use the XPI installer for the Plugin.  This will cause Pale Moon to segfault.
   * Instead, follow the instructions at https://www.tcl.tk/software/plugin/download.html to rename and unzip the installer.  The contents of the zip file are the following files and directories:
        nptcl\
        install.js
        nptcl31.dll
        pluginhostctrl.dll
   * The default installation path for Pale Moon is
        C:\Program Files (x86)\Pale Moon
   * This directory has a subdirectory "browser".  If it does not already exist, create a subdirectory "browser\plugins", i.e.
        C:\Program Files (x86)\Pale Moon\browser\plugins
   * Now copy the directory nptcl\ and the file nptcl31.dll from the unzipped XPI installer to Pale Moon's browser\plugins directory.  The files install.js (XPI install script) and pluginhostctrl.dll (ActiveX adaptor for MSIE) are not required.

''All Systems''
   * Load the page "about:plugins", or select "Add-ons" from the "Tools" menu, and choose the "Plugins" tab, to see whether the plugin has been detected.
   * Load one of the following web pages, which show the same content:
   ** https://www.tcl-lang.org/software/plugin/applets.html
   ** http://www.tcl-lang.org/software/plugin/applets.html   ** http:// site at www.tcl.tk/software/plugin/applets.html
   ** '''NOT''' https:// site at www.tcl.tk/software/plugin/applets.html which links to Tclets at a http server: the browser refuses to load "mixed active content" - i.e. to embed an active http resource in a https page.
   ** In case of problems, check the browser's error logs.  Select "Web Developer" from the "Tools" menu and choose "Toggle Tools" or "Browser Console".
   * An older page with similar information is available at http://www.demailly.com/tcl/plugin/applets.html.  The page has older versions of the same Tclets, intended for the Plugin v2.0.
   * An even older page from the Sun era can be found on the Wayback Machine at https://web.archive.org/web/19980127211419/http://sunscript.sun.com/plugin/applets.html, although the Tclets themselves are not archived.

''Newer Builds''
   * The plugin can be built from the sources available at https://sourceforge.net/projects/tclplugin/, combined with a suitable [basekit] and [stardll] for the external Tcl/Tk interpreters.   * ROn Linux, rebuilding with Tcl/Tk 8.5 or 8.6 is successful with minor patches.  The upgrade from bitmap fonts to outline fonts on X11 systems is useful, but Tclets may need revision because the new default fonts have different sizes.
   * Builds with Tcl/Tk 8.6 or 8.7 complete successfully, but the resulting plugin does not work.

***Older Instructions***

'''General Instructions'''

Use the appropriate XPI at http://www.tcl.tk/software/plugin/ for Mozilla/Firefox.

http://plugindoc.mozdev.org/windows-all.html#TCL

'''Installing Tcl Plugin on Unices'''

[LV] How does one install the plugin in Mozilla or Netscape on Linux or Solaris?

[JH] If the appropriate XPI is not available, see the special notes regarding how to do this are also in the CVS area for those building it themselves.

'''Installing Tcl Plugin on Windows - Manual Method '''

See the manual install instructions at http://www.tcl.tk/software/plugin/download.html.

If you are intent on installing the 2.0 version, the instructions below may help.

Plugin v2.0 works with both Mozilla 1.x and IE 5.5+ on Windows.  I prepared a zip file to make installation easy on today's systems [http://www.gamon.org/Profession/TCL/Plugin20/Plugin20.zip].

Essentially, there are five dll's:

 nptcl32.dll
 tcl80.dll
 tclpip80.dll
 tclreg80.dll
 tk80.dll

If you copy them to the Mozilla plugins directory, Mozilla will autodetect the plugin.  

MS supposedly removed plugin support starting with IE 5.5 sp2.  Actually, all they removed was autodetection.  You will still find a plugin folder in the IE directory, and the plugin.ocx control is still in the Windows directory.  So, to enable the plugin for IE, you only have to copy the dll's to the plugin directory, then add the appropriate Registry entries by hand.

Jason Summers describes the Registry edits at http://entropymine.com/jason/replug/pluginocx.html

See this page [http://entropymine.com/jason/replug/pluginocx.html] for help in
re-enabling support for specific MIME types, which might be helpful for tclets.
10-10-2002 [escargo])

The dll's can be obtained by downloading and running the old plugin installer for Windows.

My zip file above includes the dlls.  The zip file also includes an installer script that copies the dll's to the plugin directories, and adds the appropriate Registry entries.  

After installing the plugin, try it out at http://www.tcl.tk/software/plugin/applets.html .

Update - install.tcl changed as suggested by MRS below.


[MRS] Just a suggestion for non-english users, because the ''Program Files'' dir is different in other languages (''Arquivos de programas'' in Portuguese, ''Programme'' in German, etc...)

So, change the install script line 31 from:

        set IEPluginDir "C:/Program Files/Internet Explorer/PLUGINS"

to:

        package require registry
        set ProgDir [registry get {HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\SFC} ProgramFilesDir]
        set IEPluginDir "$ProgDir/Internet Explorer/PLUGINS"

and the script will get the right name.

[Michael Schlenker]
With Mozilla 1.2a on Windows 2000 i needed no restart, it simply worked after copying the bin dir of the plugin installation. I really like the frogger game. (Hmm, when i have time, i just have to program an EGO-Frogger, in 3D, with frog eye worldview.)

----

'''Configuration'''

[jima]: Any configuration hints ?

I installed the plugin for firefox following [Brian Theado]'s advice in [http://wiki.tcl.tk/12719] but have no clue on how setting '''policy''' to '''trusted'''. I would like to do some testing at home.

I seem not to be able to make it happen from reading docs about tcl pluging version 2.

[Brian Theado] - It's not clear to me where you are stuck.  Does it help you to know that tclplugin.dll is a [starkit] ([JH]: actually a [stardll]) and the Tcl based files are all contained within the dll?  You can use [sdx] to extract all the files from the dll (sdx unwrap tclplugin.dll).  This will create a tclplugin.vfs directory where you can make your changes and then 'sdx sync tclplugin.vfs tclplugin.dll' will update the files in the dll.

[JH]: Version 3.1 changed the structure of the plugin to make the '''plugin''' runtime library split out onto disk, while tclplugin.dll still remains for the core Tcl/Tk stuff.  This allows users to modify the plugin configuration without poking into the [stardll].

----
Please Note:  This page has been designed using information from the original Tcl Plugin page.  If you are in the know, please feel free to adjust, simplify, clarify or update any or all of the information on this page.

<<categories>> Deployment | Internet | web | Tcl Browser Plugin