1) Available installer software: I haven't come across suitable cross-
platform installers (except some Java-based ones, but these require a
Java Runtime Environment to be installed). This might not be a big
problem as the Word plugin will only be available on two platforms
(Mac and Windows), and if I understood correctly from the ticket a
MacOS X-installer might be produced rather easily anyway. A installer
for Windows could be based on NSIS, a rather popular installer system
which is both free and open source.
2) Detecting the Startup folder path. The most difficult part of the
installer will be determining the correct place to put the Zotero.dot
file. Microsoft made a bit of a mess of things, but if I understand
correctly, the correct folder is the one specified under
Tools>Options>File locations>Startup directory in Word, which has a
default setting of a folder in the application data folder ("$APPDATA
\Microsoft\Word\Startup" where $APPDATA is something like "C:\Windows
\Profiles\user name\Application Data"). Microsoft suggests that you
should first check for a registry key that is created when the user
specifies a different Startup Folder, and, if that key doesn't exist,
to fall back on the default folder location. So the installer would
have to include the following steps:
a) Check whether Word is installed (this can be looked up in the
registry)
b) Look up the registry key to check whether a non-default Startup
Folder has been specified
c) If in b no key is found, use default folder location to install
Zotero.dot. If a key has been found, install Zotero.dot in that
folder.
3) Zotero.dot naming. Currently the plugin is named just Zotero.dot. A
naming scheme that would incorporate a version-identifier might be
handy if the installer is to check whether an older version of the
plugin is already installed. Alternatively you could just name all
versions of the plugin "Zotero.dot" and set the installer to overwrite
any existing Zotero.dot-file by default. This (easy) solution however
doesn't prevent users from installing older versions of the plugin
over newer versions.
Some useful sites I came across with info on where to look for the
startup-folder:
http://support.microsoft.com/kb/210860/en-us
http://www.primeconsulting.com/faqs/faq6400.html
Concludingly, I would like to know whether I can help. If so, I can
probably mash up an installer this week using NSIS. This software
includes wizards to create installers, so the only custom code that
has to be written would be steps a to c (see point 2).
By all means.
> I haven't come across suitable cross-
> platform installers (except some Java-based ones, but these require a
> Java Runtime Environment to be installed). This might not be a big
> problem as the Word plugin will only be available on two platforms
> (Mac and Windows), and if I understood correctly from the ticket a
> MacOS X-installer might be produced rather easily anyway. A installer
> for Windows could be based on NSIS, a rather popular installer system
> which is both free and open source.
A Windows-only installer isn't a problem, since the Mac version will
probably just use a disk image with a custom background and an aliased
drop folder. The Nullsoft installer should be fine.
> 2) Detecting the Startup folder path. The most difficult part of the
> installer will be determining the correct place to put the Zotero.dot
> file. Microsoft made a bit of a mess of things, but if I understand
> correctly, the correct folder is the one specified under
> Tools>Options>File locations>Startup directory in Word, which has a
> default setting of a folder in the application data folder ("$APPDATA
> \Microsoft\Word\Startup" where $APPDATA is something like "C:\Windows
> \Profiles\user name\Application Data").
For XP it's usually C:\Documents and Settings rather than
C:\Windows\Profiles\, but, yeah, that's right.
> Microsoft suggests that you
> should first check for a registry key that is created when the user
> specifies a different Startup Folder, and, if that key doesn't exist,
> to fall back on the default folder location. So the installer would
> have to include the following steps:
> a) Check whether Word is installed (this can be looked up in the
> registry)
> b) Look up the registry key to check whether a non-default Startup
> Folder has been specified
> c) If in b no key is found, use default folder location to install
> Zotero.dot. If a key has been found, install Zotero.dot in that
> folder.
Sounds good.
> 3) Zotero.dot naming. Currently the plugin is named just Zotero.dot. A
> naming scheme that would incorporate a version-identifier might be
> handy if the installer is to check whether an older version of the
> plugin is already installed. Alternatively you could just name all
> versions of the plugin "Zotero.dot" and set the installer to overwrite
> any existing Zotero.dot-file by default. This (easy) solution however
> doesn't prevent users from installing older versions of the plugin
> over newer versions.
I'm not too concerned about version detection in the installer. If
Zotero and the plugin are on incompatible versions, an alert will pop up
advising the user to download the latest versions of each from
zotero.org, so using "Zotero.dot" should be fine.
> Concludingly, I would like to know whether I can help. If so, I can
> probably mash up an installer this week using NSIS.
Yes, that'd be great.
At some point we might consider whether we have any interest in doing
this within Zotero itself, since we do have access to the Windows
registry within Firefox
(http://developer.mozilla.org/en/docs/Accessing_the_Windows_Registry_Using_XPCOM)
and could create an installer in the preferences (similar to what we do
now with the PDF tools). But it'd take considerably longer to develop
that, it wouldn't happen in time for 1.0, and it might be more
appropriate as part of a more general architecture for installing
option/platform-specific add-ons, so I think we should go with NSIS for
now for the Windows installer.
Let us know if you have any questions or need any assistance. Thanks
very much for your help.
- Dan
Some notes:
- I've written the installer in Eclipse using the NSIS-plugin that is
available for this IDE (http://eclipsensis.sourceforge.net/
index.shtml). It is quite an easy platform to code installers.
- The code to detect the correct folder for the Zotero.dot file only
works for Word 2000 to 2007. I read on the forum that apparently Word
97 also works with the plugin, but I haven't come across any
documentation yet describing how I can find the plugin-folder (this is
by default C:\Program Files\Microsoft Office\Office\STARTUP\). If a
registry key exists support for Word 97 is easily implementable.
- The code most likely only works for Windows 2000 and up (this
further includes XP and Vista).
- The behavior of the installer is now to always overwrite the
existing Zotero.dot without asking for confirmation.
- The current installer is quite skinny. It doesn't show a Zotero
logo, a license or anything else. It also doesn't enter anything in
the registry or start menu, and doesn't provide an uninstaller.
- The installer only supports English right now. Apparently the
interface of the NSIS-software is already translated in a great number
of languages, so localization would only require the translation of a
couple of strings that I've written myself.
It works on my computer (XP SP2 with Word 2007), but a few more tests
are most welcome. Please let me know where you think improvements are
necessary.
- ZoteroWordPluginInstaller0.3.zip contains version 1.0a3 of the Word
plugin
- I zipped the installer as Google Groups doesn't allow .exe uploads
- The installer checks for the presence of Word, and if a copy is
found, it copies the plugin-file (Zotero.dot) to the startup-folder of
Word. The path of this startup-folder is shown during the installation
process. The plugin can be uninstalled by manually deleting the
Zotero.dot-file.
The Word plugin installer and updated documentation are up at
http://www.zotero.org/documentation/microsoft_word_integration. I made a
few small changes to the versions Rintze posted here (including an icon
for the installer, though only at 32x32px).
Rintze, thanks for all your help with this.
Marcello
On Oct 3, 1:40 pm, Dan Stillman <dstill...@zotero.org> wrote:
> On 9/27/07 10:48 AM, Rintze Zelle wrote:
>
> > I think the installer can be made available on the Zotero web page. I
> > rewrote the installation-section ofhttp://www.zotero.org/documentation/microsoft_word_integration
> > to reflect positive user reports on the versions of Word and Windows
> > with which the plugin works. I also updated the info regarding
> > installing the plugin by hand
>
> The Word plugin installer and updated documentation are up athttp://www.zotero.org/documentation/microsoft_word_integration. I made a
Perhaps you can tell me the path of the correct startup folder? You
can find this in Word 2007 under Word Options > Advanced > General >
File Locations. The path of the startup folder should be listed there.
Marcello
I'm happy to hear that the installer worked after all.
Rintze Zelle