188BET靠谱吗Building the Zotero Desktop App

Note:188BET靠谱吗If you don't plan to make any code changes yourself, and only wish to run the latest prerelease versions of Zotero, you can just install abeta build.

Build Steps

Windows users:The following commands assume a POSIX-compliant system.188BET靠谱吗To build Zotero on Windows, please follow theWindows-specific stepsfirst.

  1. Make sure you have Git and Git LFS installed. git lfsshouldn't show an error.
  2. 188BET靠谱吗Clone the Zotero source code:
    188BET靠谱吗git clone --recursive https://github.com/zotero/zotero zotero-client
  3. Change to the source code repo:
    188BET靠谱吗cd zotero-client
  4. Check your system for the necessary tools and install any that are missing:
    app/scripts/check_requirements

    188BET靠谱吗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.

  5. Install Node.js modules using Node 18 or later:
    npm i
  6. 188BET靠谱吗Build and run Zotero:
    app/scripts/build_and_run -r

The build will be placed in theapp/staging/folder in unpackaged form.

188BET靠谱吗To build Zotero for another platform, first prepare Zotero's JavaScript source by runningnpm run build(or keep it prepared automatically as you make changes withnpm start) and then runapp/scripts/dir_buildwith the-pflag for the desired platform (e.g.,app/scripts/dir_build -p wfor Windows).

If runningnpm run buildmanually, you may need to set the environment variableNODE_OPTIONS=--openssl-legacy-providerto avoid anERR_OSSL_EVP_UNSUPPORTEDerror.

Running Your Custom Build

After you've built the client, you can continue to run it fromapp/staging/or move the app directory to a location of your choosing and start it normally.

For development, you'll generally want to leave the app in the staging directory and use thebuild_and_runhelper script, but you can also call the launcher directly:

Mac

188BET靠谱吗app/staging/Zotero.app/Contents/MacOS/zotero

Linux

188BET靠谱吗app/staging/Zotero_linux-x86_64/zotero

Windows

188BET靠谱吗app/staging/Zotero_win-x64/zotero.exe

Command-line Flags

In most cases, you'll want to use thehelper scriptbelow instead of passing these flags directly to the launcher, but it's helpful to know the available options, which also work with release and beta builds:

  • 188BET靠谱吗-ZoteroDebugTextor 188BET靠谱吗-ZoteroDebugenable real-time debug outputfrom 188BET靠谱吗Zotero.debug()
  • -jsconsolewill open the Error Console (Tools → Developer → Error Console)
  • -jsdebuggerstarts the Firefox Browser Toolbox for debugging188BET靠谱吗, if Zotero was built with devtools enabled!not available in release builds
  • 188BET靠谱吗-ZoteroSkipBundledFilesskips style and translator initialization, which speeds up startup time after rebuilding if you're working on something that doesn't require styles or translators

助手脚本

For local development, you'll want to use thebuild_and_run188BET靠谱吗helper script, which automates rebuilding Zotero and starting it with debug output enabled and the error console open.Create an alias forapp/scripts/build_and_runwith an appropriate name (e.g.,188BET靠谱吗zotero-source), or create a shell script in your path that selects a preexisting developmentprofileand forwards command-line parameters:

188BET靠谱吗#!/bin/bash -e export ZOTERO_PROFILE="Dev" ~/zotero-client/app/scripts/build_and_run "$@"

You can then run, e.g.,188BET靠谱吗zotero-source -r188BET靠谱吗to rebuild Zotero with your changes and start it up.

Options:

  • -rRebuild (calling `npm run build` automatically if `npm start` isn't running)
  • -dInclude Firefox Developer Tools in a rebuild and open the Browser Toolbox
  • -bSkip bundled styles and translators — avoids extra work at startup if not needed

188BET靠谱吗Running Zotero Plugins

Packaging

Mac

  • In Keychain Access, create buildkeychain with password
  • Import Developer ID certificate, public key, and private key
  • Set up app-specific password for Apple developer account
  • Create a config-custom.shfile in app/:
    SIGN=1 KEYCHAIN=build KEYCHAIN_PASSWORD=
               
                NOTARIZATION_BUNDLE_ID=
                
                 NOTARIZATION_USER="
                 
                  " NOTARIZATION_PASSWORD="
                  
                   " BUILD_PLATFORMS=m
                  
                 
                
               

Windows

  • Verify that git is set to check out files without modifying line endings.
    $ git config --global core.autocrlf

    The response should be either empty (meaningfalse) orinput.If set totrue(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 thegit manualfor details on this setting.

  • Install NSIS 3and install the necessary plugins by running app/win/download-nsis-plugins.
  • The Windows SDKis needed for the included signtool.exeutility.You can uncheck all other installation options.Adjust the path in app/config.shto point to the correct version of the Windows SDK.

Installation and Packaging Notes

Note:These instructions are not applicable on macOS, which handles protocol handler and MIME type registration through the bundled Info.plist file.188BET靠谱吗Additionally, they are only applicable on Windows if for some reason you want to run Zotero without running the installer.

Protocol handler registration

188BET靠谱吗Zotero should be registered as the system's default protocol handler for the188BET靠谱吗zotero://protocol.

File extensions and MIME types

188BET靠谱吗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 vnd.citationstyles.style+xml

Distribution

Distribution steps are beyond the scope of this page, but seeapp/scripts/build_and_deployfor an example of the necessary steps.

Baidu
map