Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
dev:source_code [2017/12/13 03:28]
dstillman [Code Repositories]
dev:source_code [2017/12/13 03:39]
dstillman [Working with Git Repositories]
Line 30: Line 30:
  
 For confirmed bugs or agreed-upon changes, new issues will be created in the relevant repositories on GitHub by Zotero developers. Commit history can be viewed using the GitHub web interface or a Git client. Zotero developers previously used [[/​trac|Trac]] as a source code browser and internal issue tracker, and very old tickets are still archived there. For confirmed bugs or agreed-upon changes, new issues will be created in the relevant repositories on GitHub by Zotero developers. Commit history can be viewed using the GitHub web interface or a Git client. Zotero developers previously used [[/​trac|Trac]] as a source code browser and internal issue tracker, and very old tickets are still archived there.
-===== Working with Git Repositories ​=====+===== Working with the Zotero Source Code =====
  
-==== Checking out the source code ====+==== Zotero Client ​====
  
-To make code changes, you first need to create a local copy (a checkout) of the relevant code from the Zotero ​Git repository using a Git client.+See [[dev/​client coding/​Building ​the Standalone Client|Building ​the Zotero ​Client]].
  
-After installing Git, you can use the official command-line client ​for checking out code, e.g. +=== Zotero Connector ​for Chrome ===
  
-<​code>​git clone --recursive ​git://​github.com/​zotero/​zotero.git zotero</code>+To run a Git build of the Google Chrome Connector, you need to: 
 +  * ''​%%git clone --recursive ​https://​github.com/​zotero/​zotero-connectors/​%%''​ 
 +  * ''​cd ​zotero-connectors''​ 
 +  * ''​npm i''​ 
 +  * ''​./​build -d && gulp''​ 
 +  * Run Zotero and Chrome 
 +  * Load the Connector extension in Chrome 
 +    - Browse to [[chrome://​extensions/​]] 
 +    - Expand the "​Developer mode" bar 
 +    - Click the button "Load unpacked extension...",​ and give the path to the ''​build/browserExt'' ​ directory within the local repository
  
-checks out the Zotero ​client core code to a local "​zotero"​ directory.+You should now see a Zotero ​icon in the address bar when visiting translatable webpages (e.g., [[http://​www.agu.org/​journals/​ABS/​2002/​2000JD000290.shtml|this article]] or [[http://​www.amazon.com/​gp/​product/​B002B3YBZO/​ref=s9_pop_gw_ir03/​190-5343882-9824666?​pf_rd_m=ATVPDKIKX0DER&​pf_rd_s=center-2&​pf_rd_r=00JVFZE24KQ87CV9QJ59&​pf_rd_t=101&​pf_rd_p=1263340922&​pf_rd_i=507846|this book]]), and clicking the icon should add the item to your Zotero library.
  
-To use the current active branch, type ''​git checkout 4.0''​+After making changes, click Reload for the Connector entry in the Chrome Extensions pane and reload any open pages where you want to use the Connector. (If ''​gulp'' ​isn't runningyou'll need to run ''​./build -d'' after each change.)
- +
-Mac and Ubuntu users may already have Git installed. Mac users can install the latest version via [[http://​github.com/​mxcl/​homebrew|HomeBrew]][[http://​www.macports.org/|MacPorts]],​ or [[http://​finkproject.org|Fink]]),​ while Ubuntu users can install the [[http://​packages.ubuntu.com/​search?​arch=any&​searchon=names&​keywords=git|git package]]. +
- +
-You can also use a GUI program such as GitHub's [[https://​mac.github.com/​|Mac]] or [[https://​windows.github.com/​|Windows]] client. Whichever client you use, be sure to select the 4.0 branch ​after checking out the repository. +
- +
-Need more help? See the [[http://​help.github.com/​|GitHub documentation]] for assistance with checking out Git repositories.+
  
 ==== Contributing patches ==== ==== Contributing patches ====
Line 55: Line 58:
  
 See [[dev:​client_coding|Client Coding]] for more information on coding for Zotero. See [[dev:​client_coding|Client Coding]] for more information on coding for Zotero.
- 
-==== Running Git installations ==== 
- 
-For development,​ it is very convenient to run the Zotero client directly from a Git checkout. 
- 
-**Warning:​** Git installations are for development and testing purposes only. 
- 
-=== Zotero for Firefox Git installations === 
- 
-  - Install an [[https://​wiki.mozilla.org/​Addons/​Extension_Signing#​Unbranded_Builds|unbranded build of Firefox]] and set xpinstall.signatures.required to false in about:​config. This is necessary to run unsigned code in Firefox. 
-  - In the ''​extensions''​ subdirectory of your Firefox profile directory, create a text file named ''​zotero@chnm.gmu.edu''​ (without an extension) containing the path to your Git checkout (e.g. ''​~/​Documents/​Development/​zotero''​). This tells Firefox to load the extension from this location. If Zotero for Firefox is already installed, either [[http://​support.mozilla.com/​en-US/​kb/​Managing+profiles|use a separate profile]] (recommended) or uninstall it and restart Firefox before creating the text file. 
-  - Start the Firefox unbranded build. If the extension loaded successfully,​ you should see "​Zotero"​ in the bottom-right corner of the window. 
-  - If Zotero did not load, open Tools → Web Developer → Browser Console to debug. If your Firefox is not in English, you may need to [[/​support/​supported_languages#​switching_languages|switch the language]] to ''​en-US'',​ as the other locales may not yet have the latest strings. 
-  - Update to the latest revision at any time with ''​git pull''​. 
-  - Optionally, to get the latest translators,​ default set of CSL styles, and CSL locales, run ''​git submodule foreach git pull origin master''​. 
-  - Restart Firefox to see the changes. 
- 
-=== Zotero Standalone Git installation === 
- 
-After [[dev/​client coding/​Building the Standalone Client|building Zotero Standalone]],​ you can run it directly, or interact with it from a supported browser using a Zotero connector. 
- 
-=== Google Chrome Connector Git installation === 
- 
-To run a Git build of the Google Chrome Connector, you need to: 
-  * Check out the Google Chrome Connector code 
-  * Run Zotero Standalone and the Google Chrome browser 
-  * Load the Connector extension in Chrome 
-    - Browse to [[chrome://​extensions/​]] 
-    - Expand the "​Developer mode" bar 
-    - Click the button "Load unpacked extension...",​ and give the path to the local copy of the Connector extension code 
- 
-You should now see a Zotero icon in the address bar when visiting translatable webpages (e.g., [[http://​www.agu.org/​journals/​ABS/​2002/​2000JD000290.shtml|this article]] or [[http://​www.amazon.com/​gp/​product/​B002B3YBZO/​ref=s9_pop_gw_ir03/​190-5343882-9824666?​pf_rd_m=ATVPDKIKX0DER&​pf_rd_s=center-2&​pf_rd_r=00JVFZE24KQ87CV9QJ59&​pf_rd_t=101&​pf_rd_p=1263340922&​pf_rd_i=507846|this book]]), and clicking the icon should add the item to your Zotero Standalone library. 
dev/source_code.txt · Last modified: 2019/08/29 06:49 by dstillman