Both sides previous revisionPrevious revisionNext revision | Previous revision |
dev:client_coding:building_the_desktop_app [2023/05/22 05:48] – [Build Steps] dstillman | dev:client_coding:building_the_desktop_app [2024/07/20 03:00] (current) – [Helper Script] dstillman |
---|
To build Zotero for another platform, first prepare Zotero's JavaScript source by running ''npm run build'' (or keep it prepared automatically as you make changes with ''npm start'') and then run ''app/scripts/dir_build'' with the ''-p'' flag for the desired platform (e.g., ''app/scripts/dir_build -p w'' for Windows). | To build Zotero for another platform, first prepare Zotero's JavaScript source by running ''npm run build'' (or keep it prepared automatically as you make changes with ''npm start'') and then run ''app/scripts/dir_build'' with the ''-p'' flag for the desired platform (e.g., ''app/scripts/dir_build -p w'' for Windows). |
| |
| If running ''npm run build'' manually, you may need to set the environment variable ''%%NODE_OPTIONS=--openssl-legacy-provider%%'' to avoid an ''ERR_OSSL_EVP_UNSUPPORTED'' error. |
===== Running Your Custom Build ==== | ===== Running Your Custom Build ==== |
| |
* ''-ZoteroDebugText'' or ''-ZoteroDebug'' enable [[:debug_output#logging_to_a_terminal_window|real-time debug output]] from ''Zotero.debug()'' | * ''-ZoteroDebugText'' or ''-ZoteroDebug'' enable [[:debug_output#logging_to_a_terminal_window|real-time debug output]] from ''Zotero.debug()'' |
* ''-jsconsole'' will open the Error Console (Tools → Developer → Error Console) | * ''-jsconsole'' will open the Error Console (Tools → Developer → Error Console) |
| * ''-jsdebugger'' starts the Firefox Browser Toolbox for [[developer_tools|debugging]], if Zotero was built with devtools enabled; not available in release builds |
* ''-ZoteroSkipBundledFiles'' skips style and translator initialization, which speeds up startup time after rebuilding if you're working on something that doesn't require styles or translators | * ''-ZoteroSkipBundledFiles'' skips style and translator initialization, which speeds up startup time after rebuilding if you're working on something that doesn't require styles or translators |
* ''-debugger'' starts the Mozilla DevTools server for [[developer_tools|remote debugging]], if Zotero was built with devtools enabled; not available in release builds | |
==== Helper Script ==== | ==== Helper Script ==== |
| |
| |
* ''-r'' Rebuild (calling `npm run build` automatically if `npm start` isn't running) | * ''-r'' Rebuild (calling `npm run build` automatically if `npm start` isn't running) |
* ''-b'' Skip bundled styles and translators | * ''-d'' Include Firefox Developer Tools in a rebuild and open the Browser Toolbox |
* ''-d'' Start the devtools server for [[developer_tools|remote debugging]] | * ''-b'' Skip bundled styles and translators — avoids extra work at startup if not needed |
===== Running Zotero Plugins ===== | ===== Running Zotero Plugins ===== |
| |