Building the Standalone Client
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.
Building on Mac OS X, Linux, and other POSIX platforms
Prerequisites
- perl
- bash
- git
On most Linux distributions and on Mac OS X with Xcode, all but git are preinstalled.
To install git on OS X, install homebrew and run:
brew install git
(You may also use MacPorts or Fink instead of homebrew.)
To install git on Ubuntu or other dpkg-based Linux distributions:
apt-get install git
Building
- Get
zotero-standalone-buildand enter the directorygit clone --recursive https://github.com/zotero/zotero-standalone-build cd zotero-standalone-build
- Modify config.sh to build only for your desired platform(s) by changing the
BUILD_MAC,BUILD_WIN32, andBUILD_LINUXvariables at the top of the scripts. For example, if you intend to build only for Linux, changeBUILD_MAC=1 BUILD_WIN32=1 BUILD_LINUX=1
to
BUILD_MAC=0 BUILD_WIN32=0 BUILD_LINUX=1
Note: Because of the way Mozilla packages XULRunner, fetch_xulrunner.sh can only retrieve Mac builds on OS X.
- Run
fetch_xulrunner.sh./fetch_xulrunner.sh
This will add unpacked XULRunner builds to the
xulrunner/subdirectory of the zotero-standalone-build directory. - Run
build.sh./build.sh
Your desired builds should now be available in uncompressed form in the
staging/subdirectory, or in distributable form in thedist/subdirectory.
Building on Windows
Prerequisites
- Cygwin, with the following additional packages:
- ca-certificates
- curl
- curl-devel (Theoretically not required, but the current curl package does not include all of the required shared libraries)
- git
- unzip
- util-linux
- zip
- Unicode NSIS and install the following (Unicode!) plugins by copying the .dll files to the plugins NSIS\Unicode\plugins-folder
- 7zip, Windows (not Cygwin) version
- upx, Windows (not Cygwin) version
- Windows SDK is needed for the included uuidgen.exe and signtool.exe utilities.
Building
- Open a Cygwin prompt, and navigate to a folder under which zotero project files should be stored.
- Verify that git is set to check out files without modifying line-endings.
$ git config --global core.autocrlf input
This may not be the case if you've selected the default options while installing the Windows version of git. If so, temporarily change this with the following.
$ git config --global core.autocrlf input
See the git manual for details on this setting.
- Check out zotero-standalone-build from its home on GitHub.
git clone --recursive git://github.com/zotero/zotero-standalone-build.git cd zotero-standalone-build
- Add executable privileges to ReplaceVistaIcon
chmod 755 win/ReplaceVistaIcon/ReplaceVistaIcon.exe
- Modify config.sh to build only for your desired platform(s) by changing the
BUILD_MAC,BUILD_WIN32, andBUILD_LINUXvariables at the top of the scripts. For example, if you intend to build only for Windows, changeBUILD_MAC=1 BUILD_WIN32=1 BUILD_LINUX=1
to
BUILD_MAC=0 BUILD_WIN32=1 BUILD_LINUX=0
Note: Because of the way Mozilla packages XULRunner, fetch_xulrunner.sh can only retrieve Mac builds on OS X.
- Also adapt the paths in config.sh to point to the correct executables of 7zip, UPX, NSIS, and the Windows SDK. You might want to set SIGN=1 to 0, to stop getting error messages
- Fetch XULRunner and build Zotero Standalone:
./fetch_xulrunner.sh ./build.sh
Installation and Packaging Notes
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.
Protocol handler registration
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.
File extensions and MIME types
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 |

Upgrade Storage