文档中的说明对我不起作用,所以我找到了另一种方法:
一罐
- 下载 Zotero 独立版本
- 获取插件源代码
- 将附加组件编译到包含
install.rdf
文件的构建目录中
- 将此构建目录复制到
/modules/
Zotero Standalone Build 存储库的目录中
- 将 Zotero Standalone Build 存储库编译为构建(导出到
/staging/<your system architecture>/
)
- 添加说明以在 Zotero 加载时包含新插件到
/staging/<your system architecture>/defaults/prefs.js
文件中。
- 使用以下命令启动 zotero
./zotero
:
git clone --recursive https://github.com/zotero/zotero-standalone-build
...
npm run build
git clone git@github.com<your zotero extension>.git
# Switch out build file to add additional plugin
cp -r "src/build.sh" "src/submodules/zotero/zotero-standalone-build/build.sh"
..
npm build
...
staging/Zotero_linux-x86_64/zotero -purgecaches
我为它创建了一个修改后的build.sh
文件,该文件zotero-standalone-build
将扩展名添加到prefs.js
文件中:
echo 'pref("extensions.something.unopkgPaths", "{}");' >> "$APPDIR/defaults/preferences/prefs.js"
echo 'pref("extensions.something.version", "");' >> "$APPDIR/defaults/preferences/prefs.js"
echo 'pref("extensions.something.installed", false);' >> "$APPDIR/defaults/preferences/prefs.js"
echo 'pref("extensions.something.skipInstallation", false);' >> "$APPDIR/defaults/preferences/prefs.js"
构建命令的细节取决于您要包含的插件。