Note: The instructions below are not aimed for general use by the everyday user of Zotero. Some of the information below may need to be updated to work with the current code. Please update the instructions as necessary.
Note: The following commands assume a POSIX-compliant system. On Windows, first install Cygwin, install Git through Cygwin, and then run the following commands in the Cygwin terminal.
Zotero Standalone is currently built from an XPI of Zotero for Firefox. An included helper script, scripts/dir_build, can automate the process of creating a Standalone build from an unpacked local Zotero git repository.
zotero-build repository: git clone --recursive https://github.com/zotero/zotero git clone --recursive https://github.com/zotero/zotero-build
(If you just want to create a build from an existing XPI — for example, one you've extracted, modified, and recompressed — you can skip this step, though building from a local Zotero git repository is generally easier. If you want to build directly from a given commit of the Zotero source without modifications, you can skip zotero/zotero.)
zotero-standalone-build repo and change to that directory: git clone --recursive https://github.com/zotero/zotero-standalone-build cd zotero-standalone-build
scripts/check_requirements
This script checks all requirements for the official Zotero distribution system. If you're only creating a custom build, you only need the build requirements listed at the top, not the distribution requirements.
fetch_xulrunner.sh for the desired platform(s) (m=Mac, w=Windows, l=Linux): ./fetch_xulrunner.sh -p m
This will download Firefox runtime files to the xulrunner/ subdirectory and modify them for use with Zotero Standalone.
Note: Due to the way Firefox is packaged, fetch_xulrunner.sh can only retrieve Mac builds on macOS.
build_xpi (or build_xpi_4.0 for the 4.0 branch). To see available options:../zotero-build/xpi/build_xpi --help ../zotero-build/xpi/build_xpi_4.0
Then follow the instructions in II.
build.sh directly for the desired platform(s): ./build.sh -f /path/to/zotero.xpi -p m -d
../zotero (using the current branch and code), use the dir_build helper script: scripts/dir_build
Your desired builds should now be available in the staging/ subdirectory in unpackaged form.
Distribution steps are beyond the scope of this page, but see scripts/build_and_deploy for an example of the necessary steps.
scripts/check_requirementsNSIS\Unicode\Plugins foldercd to the plugins folder and run the following commands: wget https://github.com/mozilla/gecko-dev/raw/master/other-licenses/nsis/Plugins/AppAssocReg.dll wget https://github.com/mozilla/gecko-dev/raw/master/other-licenses/nsis/Plugins/ApplicationID.dll wget https://github.com/mozilla/gecko-dev/raw/master/other-licenses/nsis/Plugins/InvokeShellVerb.dll wget https://github.com/mozilla/gecko-dev/raw/master/other-licenses/nsis/Plugins/ShellLink.dll wget https://github.com/mozilla/gecko-dev/raw/master/other-licenses/nsis/Plugins/UAC.dll
$ git config --global core.autocrlf
The response should be either empty (meaning false) or input. If set to true (as it may be if you selected the default option while installing the Windows version of git), change this with the following command:
git config --global core.autocrlf false
See the git manual for details on this setting.
zotero-standalone-build repository as explained above, adjust the paths in config.sh to point to the correct executables of NSIS and the Windows SDK. You might want to set SIGN=1 to 0, to stop getting error messages-d flag when calling build.sh to create the installer package.Note: These instructions are not applicable on OS X, which handles protocol handler and MIME type registration through the bundled Info.plist file. Additionally, they are only applicable on Windows if, for some ungodly reason, you want to install Zotero Standalone without running the installer.
Zotero Standalone should be registered as the system's default protocol handler for the zotero:// protocol. This is necessary to make clicking the Zotero button in Firefox open Zotero Standalone when both are running simultaneously.
Zotero should be registered as a handler for the following file extensions and MIME types:
| File type description | File extension(s) | MIME type(s) |
|---|---|---|
| Research Information Systems Document | ris | application/x-research-info-systems application/x-endnote-refer text/x-research-info-systems text/application/x-research-info-systems text/ris ris |
| ISI Common Export Format Document | ciw, isi | application/x-inst-for-Scientific-info |
| Metadata Object Description Schema Document | mods | application/mods+xml |
| Resource Description Framework Document | rdf | application/rdf+xml |
| BibTeX Document | bib, bibtex | application/x-bibtex text/x-bibtex |
| MARC Record | mrc, marc | application/marc |
| CSL Citation Style | csl | text/x-csl |