zotero-11.0~beta.3/0000755000000000000000000000000015270665264011053 5ustar zotero-11.0~beta.3/.babelrc0000644000000000000000000000070215270665264012445 0ustar { "compact": false, "retainLines": true, "presets": [ "@babel/preset-react" ], "ignore": [ "chrome/content/zotero/include.js", "chrome/content/zotero/xpcom/citeproc.js", "chrome/content/ace/*", "chrome/content/scaffold/templates/*", "resource/react-virtualized.js", "test/resource/*.js" ], "plugins": [ [ "transform-es2015-modules-commonjs", { "strictMode": false } ] ] } zotero-11.0~beta.3/.gitattributes0000644000000000000000000000040715270665264013747 0ustar *.sql text eol=lf app/win/zotero.exe.tar.xz filter=lfs diff=lfs merge=lfs -text app/mac/updater.tar.xz filter=lfs diff=lfs merge=lfs -text app/win/updater.exe.tar.xz filter=lfs diff=lfs merge=lfs -text app/linux/updater.tar.xz filter=lfs diff=lfs merge=lfs -text zotero-11.0~beta.3/.github/0000755000000000000000000000000015270665264012413 5ustar zotero-11.0~beta.3/.github/workflows/0000755000000000000000000000000015270665264014450 5ustar zotero-11.0~beta.3/.github/workflows/ci.yml0000644000000000000000000003712715270665264015600 0ustar name: CI on: push: pull_request: workflow_dispatch: schedule: # Monthly, to catch runner image and OS changes - cron: '0 6 1 * *' concurrency: group: ${{ github.ref }} cancel-in-progress: true jobs: # Decide whether to run the network-filesystem and Windows tests: always for manual and # scheduled runs, and otherwise only when the changes touch the Gecko version, the files # responsible for network-filesystem database handling, or (for Windows) the files that # make up the Windows build changes: name: Detect changes runs-on: ubuntu-latest if: > github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository outputs: network: ${{ steps.check.outputs.network }} windows: ${{ steps.check.outputs.windows }} steps: - name: Check for network-filesystem-related changes id: check env: EVENT: ${{ github.event_name }} REPO: ${{ github.repository }} SHA: ${{ github.sha }} BEFORE: ${{ github.event.before }} BASE: ${{ github.event.pull_request.base.sha }} run: | network=false windows=false if [[ "$EVENT" == "workflow_dispatch" || "$EVENT" == "schedule" ]]; then network=true windows=true else base="$BASE" [[ -z "$base" ]] && base="$BEFORE" git init -q repo && cd repo git remote add origin "https://github.com/$REPO" git fetch -q --depth 1 origin "$SHA" # Run the tests if the base of the change can't be determined (e.g., a new # branch or an unfetchable pre-force-push commit) if [[ -z "$base" || "$base" == 0000000000000000000000000000000000000000 ]] \ || ! git fetch -q --depth 1 origin "$base" 2>/dev/null; then network=true windows=true else files=$(git diff --name-only "$base" "$SHA") if grep -qE '^(app/config\.sh|chrome/content/zotero/xpcom/(db|file)\.js|\.github/workflows/ci\.yml)$' <<< "$files"; then network=true windows=true fi if grep -qE '^app/(win/|build\.sh$|scripts/(dir_build|fetch_xulrunner|prepare_build)$)' <<< "$files"; then windows=true fi fi fi echo "network=$network" >> "$GITHUB_OUTPUT" echo "windows=$windows" >> "$GITHUB_OUTPUT" test: name: Test (${{ matrix.shard }}) runs-on: ubuntu-latest timeout-minutes: 30 needs: changes # Same-repo PRs are covered by the push run, so run pull_request jobs only for forks if: > github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository strategy: matrix: # Numbered shards split the full suite. 'smb' and 'nfs' run the db and file tests # with the test data directory on a loopback CIFS or NFS mount, so that connection # initialization itself runs against a network filesystem, which is where # network-filesystem failures (startup crashes and hangs) occur. The network shards # run only when the 'changes' job detects relevant changes. shard: ${{ fromJSON(needs.changes.outputs.network == 'true' && '["1", "2", "3", "4", "smb", "nfs"]' || '["1", "2", "3", "4"]') }} steps: - uses: actions/checkout@v4 with: submodules: recursive lfs: true - name: Install Node uses: actions/setup-node@v4 with: node-version: 24 #cache: npm # Local via act - name: Install packages for act if: env.ACT == 'true' run: apt update && apt install -y zstd xvfb dbus-x11 libgtk-3-0 libx11-xcb1 libdbus-glib-1-2 libxt6 - name: Cache xulrunner id: xulrunner-cache uses: actions/cache@v4 with: path: app/xulrunner/firefox-x86_64 key: xulrunner-${{ hashFiles('app/config.sh', 'app/scripts/fetch_xulrunner') }} - name: Fetch xulrunner if: steps.xulrunner-cache.outputs.cache-hit != 'true' run: app/scripts/fetch_xulrunner -p l - name: Cache Node modules id: node-cache uses: actions/cache@v4 with: path: node_modules key: node-modules-24-${{ hashFiles('package-lock.json') }} - name: Install Node modules if: steps.node-cache.outputs.cache-hit != 'true' run: npm install - name: Build Zotero run: npm run build # Currently necessary for document-worker Webpack: https://stackoverflow.com/a/69746937 env: NODE_OPTIONS: --openssl-legacy-provider # Create deployment ZIP from the build output, then replace build/ with the # unzipped contents so that tests run against the same artifact that gets # deployed. This catches problems that only manifest after a zip round-trip # (e.g., resolved symlinks, missing files). - name: Create deployment ZIP run: | cd build zip -r ../build.zip * cd .. - name: Replace build with ZIP contents run: | rm -rf build mkdir build cd build unzip ../build.zip - name: Set up SMB share if: matrix.shard == 'smb' timeout-minutes: 10 run: | sudo apt install -y --no-install-recommends samba cifs-utils sudo mkdir -p /srv/zotero-smb /mnt/zotero-smb sudo chown $(whoami) /srv/zotero-smb sudo tee -a /etc/samba/smb.conf > /dev/null < needs.changes.outputs.network == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) steps: - uses: actions/checkout@v4 with: submodules: recursive lfs: true - name: Install Node uses: actions/setup-node@v4 with: node-version: 24 - name: Cache xulrunner id: xulrunner-cache uses: actions/cache@v4 with: path: app/xulrunner/Firefox.app key: xulrunner-mac-${{ hashFiles('app/config.sh', 'app/scripts/fetch_xulrunner') }} - name: Fetch xulrunner if: steps.xulrunner-cache.outputs.cache-hit != 'true' run: app/scripts/fetch_xulrunner -p m - name: Cache Node modules id: node-cache uses: actions/cache@v4 with: path: node_modules key: node-modules-mac-24-${{ hashFiles('package-lock.json') }} - name: Install Node modules if: steps.node-cache.outputs.cache-hit != 'true' run: npm install - name: Build Zotero run: npm run build # Currently necessary for document-worker Webpack: https://stackoverflow.com/a/69746937 env: NODE_OPTIONS: --openssl-legacy-provider - name: Set up NFS share run: | sudo mkdir -p /private/var/zotero-nfs sudo chown $(whoami) /private/var/zotero-nfs echo "/private/var/zotero-nfs -mapall=$(whoami) localhost" | sudo tee /etc/exports sudo nfsd enable || sudo nfsd start sleep 2 showmount -e localhost mkdir -p "$HOME/zotero-nfs" sudo mount_nfs -o vers=3 localhost:/private/var/zotero-nfs "$HOME/zotero-nfs" # The step timeout turns a startup hang into a failure - name: Run tests on network share timeout-minutes: 10 run: TMPDIR="$HOME/zotero-nfs" test/runtests.sh -f -r 3 -b db file # Boot the Windows build -- which uses custom-built Firefox components (xul.dll) rather # than stock Mozilla binaries -- and run the db and file tests. A Gecko bump commit # updates the custom-component hashes in config.sh along with the version, so this # tests each new set of custom components. test-win: name: Test (Windows ${{ matrix.arch }}) runs-on: ${{ matrix.os }} timeout-minutes: 40 needs: changes if: > needs.changes.outputs.windows == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) strategy: fail-fast: false matrix: include: - arch: x64 os: windows-latest - arch: arm64 os: windows-11-arm defaults: run: shell: bash steps: # The repository contains symlinks, which Git checks out as plain files on Windows # by default, breaking the build - name: Enable symlinks run: git config --global core.symlinks true - uses: actions/checkout@v4 with: submodules: recursive lfs: true - name: Install Node uses: actions/setup-node@v4 with: node-version: 24 # Git Bash has unzip but not zip, which fetch_xulrunner needs to repack omni.ja - name: Install zip run: choco install zip --no-progress -y - name: Cache xulrunner id: xulrunner-cache uses: actions/cache@v4 with: path: app/xulrunner/firefox-win-${{ matrix.arch }} key: xulrunner-win-${{ matrix.arch }}-${{ hashFiles('app/config.sh', 'app/scripts/fetch_xulrunner') }} - name: Fetch xulrunner if: steps.xulrunner-cache.outputs.cache-hit != 'true' run: app/scripts/fetch_xulrunner -p w -a ${{ matrix.arch }} - name: Cache Node modules id: node-cache uses: actions/cache@v4 with: path: node_modules key: node-modules-win-24-${{ hashFiles('package-lock.json') }} - name: Install Node modules if: steps.node-cache.outputs.cache-hit != 'true' run: npm install # Committed symlinks point into node_modules, which doesn't exist at checkout time, # so Git creates the directory ones with the wrong symlink type on Windows. Recreate # them now that the targets exist. - name: Recreate symlinks run: | git ls-files -s | awk '$1 == 120000 { print $4 }' | xargs rm git checkout -- . - name: Build Zotero run: npm run build # Currently necessary for document-worker Webpack: https://stackoverflow.com/a/69746937 env: NODE_OPTIONS: --openssl-legacy-provider # The step timeout turns a startup hang into a failure - name: Run tests timeout-minutes: 15 run: test/runtests.sh -f -r 3 -b -x app/staging/Zotero_win-${{ matrix.arch }}/zotero.exe db file utilities: name: Utilities Tests runs-on: ubuntu-latest if: > github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository steps: - uses: actions/checkout@v4 with: submodules: recursive - name: Install Node uses: actions/setup-node@v4 with: node-version: 24 - name: Cache utilities Node modules id: utilities-node-cache uses: actions/cache@v4 with: path: chrome/content/zotero/xpcom/utilities/node_modules key: utilities-node-modules-24-${{ hashFiles('chrome/content/zotero/xpcom/utilities/package-lock.json') }} - name: Install utilities Node modules if: steps.utilities-node-cache.outputs.cache-hit != 'true' run: npm install --prefix chrome/content/zotero/xpcom/utilities - name: Run utilities tests run: | npm test --prefix chrome/content/zotero/xpcom/utilities -- -j resource/schema/global/schema.json # Build deployment ZIPs from main, version branches (e.g., 9.0, 10.0), and *-hotfix branches deploy: name: Build, Upload runs-on: ubuntu-latest if: github.event_name == 'push' && github.repository == 'zotero/zotero' steps: - name: Check if deployment branch id: check-deploy if: env.ACT != 'true' run: | branch="${GITHUB_REF#refs/heads/}" if [[ "$branch" == "main" || "$branch" =~ ^[0-9]+\.[0-9]+$ || "$branch" == *-hotfix ]]; then echo "deploy=true" >> "$GITHUB_OUTPUT" fi - uses: actions/checkout@v4 if: steps.check-deploy.outputs.deploy == 'true' with: submodules: recursive lfs: true - name: Install Node if: steps.check-deploy.outputs.deploy == 'true' uses: actions/setup-node@v4 with: node-version: 24 - name: Cache Node modules id: node-cache if: steps.check-deploy.outputs.deploy == 'true' uses: actions/cache@v4 with: path: node_modules key: node-modules-24-${{ hashFiles('package-lock.json') }} - name: Install Node modules if: steps.check-deploy.outputs.deploy == 'true' && steps.node-cache.outputs.cache-hit != 'true' run: npm install - name: Build Zotero if: steps.check-deploy.outputs.deploy == 'true' run: npm run build # Currently necessary for document-worker Webpack: https://stackoverflow.com/a/69746937 env: NODE_OPTIONS: --openssl-legacy-provider - name: Create deployment ZIP if: steps.check-deploy.outputs.deploy == 'true' run: | cd build zip -r ../build.zip * cd .. - uses: ruby/setup-ruby@v1 if: steps.check-deploy.outputs.deploy == 'true' with: ruby-version: '3.3' bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Upload deployment ZIP if: steps.check-deploy.outputs.deploy == 'true' env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} run: | mkdir build-zip cp build.zip build-zip/$GITHUB_SHA.zip gem install --no-document dpl -v '>= 2.0' dpl s3 --bucket zotero-download --local_dir build-zip --upload_dir ci/client --acl public_read zotero-11.0~beta.3/.gitignore0000644000000000000000000000010415270665264013036 0ustar .DS_Store node_modules build/ .signatures.json tmp app/win/codesign zotero-11.0~beta.3/.gitmodules0000644000000000000000000000400015270665264013222 0ustar [submodule "translators"] path = translators url = https://github.com/zotero/translators.git branch = master [submodule "chrome/content/zotero/locale/csl"] path = chrome/content/zotero/locale/csl url = https://github.com/citation-style-language/locales.git branch = master [submodule "styles"] path = styles url = https://github.com/zotero/bundled-styles.git branch = master [submodule "test/resource/chai"] path = test/resource/chai url = https://github.com/chaijs/chai.git branch = master [submodule "test/resource/mocha"] path = test/resource/mocha url = https://github.com/mochajs/mocha.git branch = master [submodule "resource/schema/global"] path = resource/schema/global url = https://github.com/zotero/zotero-schema.git branch = master [submodule "resource/SingleFile"] path = resource/SingleFile url = https://github.com/gildas-lormeau/SingleFile.git [submodule "pdf-reader"] path = reader url = https://github.com/zotero/reader.git branch = master [submodule "pdf-worker"] path = document-worker url = https://github.com/zotero/document-worker.git branch = master [submodule "note-editor"] path = note-editor url = https://github.com/zotero/note-editor.git branch = master [submodule "chrome/content/zotero/xpcom/utilities"] path = chrome/content/zotero/xpcom/utilities url = https://github.com/zotero/utilities.git [submodule "chrome/content/zotero/xpcom/translate"] path = chrome/content/zotero/xpcom/translate url = https://github.com/zotero/translate.git [submodule "app/modules/zotero-word-for-mac-integration"] path = app/modules/zotero-word-for-mac-integration url = https://github.com/zotero/zotero-word-for-mac-integration.git [submodule "app/modules/zotero-word-for-windows-integration"] path = app/modules/zotero-word-for-windows-integration url = https://github.com/zotero/zotero-word-for-windows-integration.git [submodule "app/modules/zotero-libreoffice-integration"] path = app/modules/zotero-libreoffice-integration url = https://github.com/zotero/zotero-libreoffice-integration.git zotero-11.0~beta.3/CLAUDE.md0000644000000000000000000001506115270665264012335 0ustar # CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview Zotero is a Firefox-based desktop research management application. It runs as a XUL/XHTML application on a Mozilla platform (not Electron, not a web app). The UI uses a mix of XUL/XHTML, custom elements (Web Components), and React components. ## Build & Development Commands ```bash npm install # Install dependencies npm run build # Full build (Babel transpile JS/JSX, compile SCSS, browserify, symlink) npm run clean-build # Clean build output and rebuild ``` ### Running Tests Tests run inside a built Zotero application instance via `test/runtests.sh`: ```bash test/runtests.sh # Run all tests test/runtests.sh item # Run a single test file (omit "Test" and .js extension) test/runtests.sh item collections # Run multiple test files test/runtests.sh -g "pattern" # Run only tests matching a grep pattern test/runtests.sh -f # Stop after first failure test/runtests.sh -s item # Start at a specific test file test/runtests.sh -e item # End at a specific test file test/runtests.sh -c # Open JS console, don't quit on completion test/runtests.sh -b # Skip bundled translator/style installation (for faster startup when not necessary) test/runtests.sh -d 5 # Enable debug logging (level 1-5; default is 3) ``` Tests use Mocha + Chai (assert style) + Sinon. Test files live in `test/tests/` and follow the naming convention `Test.js`. Test helpers are in `test/content/support.js`. The test runner automatically triggers `npm run build` if the watch process isn't running, so it's not necessary to manually run a build before running tests. Tips: - Pass flags before test names (e.g., `test/runtests.sh -f item`). - `-f` should almost always be used, since test failures can cause later spurious test failures. - To view debug logging for a specific test when running multiple tests, add `Zotero.Debug.init(1)` at the beginning of the test and run with `-d 5`. ### Linting ```bash npx eslint # Lint a specific file ``` ESLint v9 flat config is in `eslint.config.mjs`. Uses `@zotero/eslint-config`, Babel parser, and React plugin. Currently, the code base is not fully linted, so only worry about issues with new or modified code lines. ## Architecture ### Core Layers - **XPCOM modules** (`chrome/content/zotero/xpcom/`) -- Core business logic. Loaded sequentially by `chrome/content/zotero/zotero.mjs`. All modules attach to the global `Zotero` namespace (e.g., `Zotero.Items`, `Zotero.Sync.Runner`). - **Data model** (`chrome/content/zotero/xpcom/data/`) -- ORM-like classes for database entities. `Zotero.DataObject` is the base class; `Zotero.Item`, `Zotero.Collection`, `Zotero.Search`, `Zotero.Library`, etc. extend it. Plural classes (`Zotero.Items`, `Zotero.Collections`) manage object caches and queries. Data objects use an async `saveTx()` pattern for persistence. - **Database** (`chrome/content/zotero/xpcom/db.js`) -- SQLite via Mozilla's mozStorage API. Accessed through `Zotero.DB.queryAsync()`, `Zotero.DB.executeTransaction()`. - **Sync system** (`chrome/content/zotero/xpcom/sync/`) -- `syncRunner.js` orchestrates sync. `syncEngine.js` handles object-level sync logic. `syncAPIClient.js` communicates with the Zotero API server. `syncLocal.js` manages local sync state. Similar `storage*` files for file syncing, along with zfs.js (Zotero Storage) and webdav.js (WebDAV). - **HTTP server** (`chrome/content/zotero/xpcom/server/`) -- Local HTTP server for browser connector integration and local API. ### UI Layers - **Main window**: `chrome/content/zotero/zoteroPane.xhtml` + `zoteroPane.js` - **Custom elements** (`chrome/content/zotero/elements/`) -- XUL custom elements inheriting from `XULElementBase` (defined in `elements/base.js`), which provides lifecycle helpers (`init()`, `destroy()`, `content` getter for templates). Registered via `customElements.define()`. - **React components** (`chrome/content/zotero/components/`) -- Used for complex interactive UI (tag selector, virtualized table, item tree, collection tree). Major tree views are `itemTree.jsx` and `collectionTree.jsx`. - **SCSS styles** (`scss/`) -- Compiled to CSS. Platform-specific overrides in `scss/mac/`, `scss/win/`, `scss/linux/`. - **Localization** -- Fluent (`.ftl` files) in `chrome/locale/en-US/zotero/`. Accessed via `data-l10n-id` attributes or `Zotero.getString()` for legacy `.properties` strings. All new strings must be added to `.ftl` files -- do not add new strings to `.properties` or `.dtd` files. ### Submodules Several features are developed in separate repos and included as Git submodules: - `reader/` -- PDF/EPUB/snapshot reader with annotations - `note-editor/` -- Rich text note editor - `document-worker/` -- PDF processing (extraction, manipulation) - `translators/` -- 760+ web translators for importing metadata from websites - `styles/` -- CSL citation styles - `chrome/content/zotero/xpcom/utilities/` -- Shared utility library - `chrome/content/zotero/xpcom/translate/` -- Translation framework - `resource/SingleFile/` -- Web page archiving ### Build System (`js-build/`) Custom Node.js build system (not Webpack). `js-build/config.js` defines what gets built: - **JS/JSX files** in `chrome/`, `components/`, `defaults/`, `test/` are transpiled via Babel (React JSX, CommonJS modules) - **SCSS files** in `scss/` and `chrome/skin/` are compiled with Dart Sass - **Browserify** bundles select npm packages (react-select, sinon, url) for use in the XUL environment - **Symlinks** connect source files and submodules into the `build/` directory - The built app reads from `build/`, not directly from source ## Code Style - Tabs for indentation, not spaces - Use `let` instead of `const` except for true scalar constants (e.g., `const MAX_SECONDS = 5 * 60;`) - No cuddled braces (opening brace on same line, but `else`/`catch`/etc. on their own line) - Use two hyphens `--` in comments, not an em dash - Indent blank lines to match surrounding indentation level - Objects attach to the `Zotero` global namespace rather than using ES module exports - Async code uses `async`/`await` throughout - Mozilla/XPCOM APIs are available globally: `Cc`, `Ci`, `Cu`, `Cr`, `Services`, `ChromeUtils`, `IOUtils`, `PathUtils` ## Translators See `translators/CLAUDE.md` for guidelines. Key rules: **never** generate translators from scratch, **never** generate UUIDs, **never** generate test cases -- all of these must be done through Zotero's Scaffold tool. zotero-11.0~beta.3/CONTRIBUTING.md0000644000000000000000000000113415270665264013303 0ustar # Contributing to Zotero ## Bug Reports and Feature Requests Zotero does not use GitHub Issues for bug reports, feature requests, or support questions. Please post all such requests to the [Zotero Forums](https://forums.zotero.org), where Zotero developers and many others can help. See [How Zotero Support Works](https://www.zotero.org/support/zotero_support) for more information. For confirmed bugs or agreed-upon changes, Zotero developers will create new issues in the relevant repositories. ## Working with Zotero Code See [Zotero Source Code](https://www.zotero.org/support/dev/source_code). zotero-11.0~beta.3/COPYING0000644000000000000000000010503615270665264012113 0ustar Zotero is Copyright © 2018 Corporation for Digital Scholarship, Vienna, Virginia, USA http://digitalscholar.org Copyright © 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Roy Rosenzweig Center for History and New Media, George Mason University, Fairfax, Virginia, USA http://zotero.org The Corporation for Digital Scholarship distributes the Zotero source code under the GNU Affero General Public License, version 3 (AGPLv3). The full text of this license is given below. The Zotero name is a registered trademark of the Corporation for Digital Scholarship. See http://zotero.org/trademark for more information. Third-party copyright in this distribution is noted where applicable. All rights not expressly granted are reserved. ========================================================================= GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . zotero-11.0~beta.3/README.md0000644000000000000000000000115115270665264012330 0ustar Zotero ====== [![CI](https://github.com/zotero/zotero/actions/workflows/ci.yml/badge.svg)](https://github.com/zotero/zotero/actions/workflows/ci.yml) [Zotero](https://www.zotero.org/) is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources. Please post feature requests or bug reports to the [Zotero Forums](https://forums.zotero.org/). If you're having trouble with Zotero, see [Getting Help](https://www.zotero.org/support/getting_help). For more information on how to use this source code, see the [Zotero documentation](https://www.zotero.org/support/dev/source_code). zotero-11.0~beta.3/app/0000755000000000000000000000000015270665264011633 5ustar zotero-11.0~beta.3/app/.gitignore0000644000000000000000000000024115270665264013620 0ustar *~ cache config-custom.sh dist lastrev staging tmp xulrunner win/resource_hacker win/firefox-*.win32.zip win/firefox-*.win64.zip win/firefox-*.win64-aarch64.zip zotero-11.0~beta.3/app/README.md0000644000000000000000000000051315270665264013111 0ustar # Zotero Standalone build utility These files are used to bundle the [Zotero core](https://github.com/zotero/zotero) into distributable bundles for Mac, Windows, and Linux. Instructions for building and packaging are available on the [Zotero wiki](https://www.zotero.org/support/dev/client_coding/building_the_standalone_client). zotero-11.0~beta.3/app/assets/0000755000000000000000000000000015270665264013135 5ustar zotero-11.0~beta.3/app/assets/application.ini0000644000000000000000000000060015270665264016135 0ustar [App] Vendor=Zotero Name=Zotero Version={{VERSION}} BuildID={{BUILDID}} Copyright=Copyright (c) 2006-2025 Contributors ID=zotero@zotero.org [Gecko] MinVersion=153.0 MaxVersion=153.99.* [XRE] EnableExtensionManager=1 EnableProfileMigrator=1 [AppUpdate] URL=https://www.zotero.org/download/client/update/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/update.xml zotero-11.0~beta.3/app/assets/branding/0000755000000000000000000000000015270665264014721 5ustar zotero-11.0~beta.3/app/assets/branding/locale/0000755000000000000000000000000015270665264016160 5ustar zotero-11.0~beta.3/app/assets/branding/locale/brand.dtd0000644000000000000000000000005515270665264017743 0ustar  zotero-11.0~beta.3/app/assets/branding/locale/brand.ftl0000644000000000000000000000041415270665264017754 0ustar -brand-shorter-name = Zotero -brand-short-name = Zotero -brand-full-name = Zotero -brand-product-name = Zotero -vendor-short-name = Zotero -app-name = Zotero -subscription-name = Zotero trademarkInfo = Zotero is a trademark of the Corporation for Digital Scholarship. zotero-11.0~beta.3/app/assets/branding/locale/brand.properties0000644000000000000000000000010315270665264021356 0ustar brandShorterName=Zotero brandShortName=Zotero brandFullName=Zotero zotero-11.0~beta.3/app/assets/chrome.manifest0000644000000000000000000000021315270665264016136 0ustar locale branding en-US chrome/en-US/locale/branding/ content branding chrome/branding/content/ skin browser preferences chrome/skin/ zotero-11.0~beta.3/app/assets/commandLineHandler.js0000644000000000000000000000754615270665264017233 0ustar let { CommandLineOptions, TestOptions } = ChromeUtils.importESModule("chrome://zotero/content/modules/commandLineOptions.mjs"); // Only allow BrowserContentHandler to open a new window if this is the initial launch, // meaning our CLH isn't registered yet. if (cmdLine.state != Ci.nsICommandLine.STATE_INITIAL_LAUNCH) { cmdLine.preventDefault = true; } // Force debug output to window if (cmdLine.handleFlag("ZoteroDebug", false)) { CommandLineOptions.forceDebugLog = 2; } // Force debug output to text console else if (cmdLine.handleFlag("ZoteroDebugText", false)) { CommandLineOptions.forceDebugLog = 1; } // Pressing Ctrl-C via the terminal is interpreted as a crash, and after three crashes // Firefox starts up in automatic safe mode (troubleshooting mode). To avoid this, we clear the crash // counter when using one of the debug-logging flags, which generally imply terminal usage. if (CommandLineOptions.forceDebugLog) { Services.prefs.getBranch("toolkit.startup.").clearUserPref("recent_crashes"); } CommandLineOptions.forceDataDir = cmdLine.handleFlagWithParam("datadir", false); // Set here, to be acted upon in xpcom/commandLineHandler.js CommandLineOptions.file = cmdLine.handleFlagWithParam("file", false); CommandLineOptions.url = cmdLine.handleFlagWithParam("url", false); if (CommandLineOptions.url) { CommandLineOptions.url = cmdLine.resolveURI(CommandLineOptions.url); } var processTestOptions = false; if (cmdLine.handleFlag("ZoteroTest", false)) { CommandLineOptions.test = true; processTestOptions = true; } if (cmdLine.handleFlag("ZoteroAutomatedTest", false)) { CommandLineOptions.automatedTest = true; } if (cmdLine.handleFlag("ZoteroSkipBundledFiles", false)) { CommandLineOptions.skipBundledFiles = true; } if (processTestOptions) { TestOptions.tests = cmdLine.handleFlagWithParam("test", false); TestOptions.noquit = cmdLine.handleFlag("noquit", false); TestOptions.makeTestData = cmdLine.handleFlag("makeTestData", false); TestOptions.noquit = !TestOptions.makeTestData && TestOptions.noquit; TestOptions.runTests = !TestOptions.makeTestData; TestOptions.bail = cmdLine.handleFlag("bail", false); TestOptions.startAt = cmdLine.handleFlagWithParam("startAtTestFile", false); TestOptions.stopAt = cmdLine.handleFlagWithParam("stopAtTestFile", false); TestOptions.shard = cmdLine.handleFlagWithParam("shard", false); TestOptions.grep = cmdLine.handleFlagWithParam("grep", false); TestOptions.timeout = cmdLine.handleFlagWithParam("ZoteroTestTimeout", false); TestOptions.retries = cmdLine.handleFlagWithParam("retries", false) || 0; Services.ww.openWindow( null, "chrome://zotero-unit/content/runtests.html", "_blank", "chrome,dialog=no,all", Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray) ); cmdLine.preventDefault = true; } if (cmdLine.handleFlag("debugger", false)) { (async function () { try { let portOrPath = Services.prefs.getBranch('').getIntPref('devtools.debugger.remote-port'); const { DevToolsLoader } = ChromeUtils.importESModule( "resource://devtools/shared/loader/Loader.sys.mjs" ); const loader = new DevToolsLoader({ freshCompartment: true, }); const { DevToolsServer } = loader.require("devtools/server/devtools-server"); const { SocketListener } = loader.require("devtools/shared/security/socket"); if (DevToolsServer.initialized) { dump("Debugger server already initialized\n\n"); return; } DevToolsServer.init(); DevToolsServer.registerAllActors(); DevToolsServer.allowChromeProcess = true; const socketOptions = { portOrPath }; const listener = new SocketListener(DevToolsServer, socketOptions); await listener.open(); if (!DevToolsServer.listeningSockets) { throw new Error("No listening sockets"); } dump(`Debugger server started on ${portOrPath}\n\n`); } catch (e) { dump(e + "\n\n"); Components.utils.reportError(e); } })(); } zotero-11.0~beta.3/app/assets/mac/0000755000000000000000000000000015270665264013675 5ustar zotero-11.0~beta.3/app/assets/mac/chrome/0000755000000000000000000000000015270665264015152 5ustar zotero-11.0~beta.3/app/assets/mac/chrome/skin/0000755000000000000000000000000015270665264016116 5ustar zotero-11.0~beta.3/app/assets/mac/chrome/skin/preferences/0000755000000000000000000000000015270665264020417 5ustar zotero-11.0~beta.3/app/assets/mac/chrome/skin/preferences/preferences.css0000644000000000000000000001165315270665264023440 0ustar /* # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. # # The Original Code is the Firefox Preferences System. # # The Initial Developer of the Original Code is # Ben Goodger. # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved. # # Contributor(s): # Ben Goodger # Kevin Gerich # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), # in which case the provisions of the GPL or the LGPL are applicable instead # of those above. If you wish to allow use of your version of this file only # under the terms of either the GPL or the LGPL, and not to allow others to # use your version of this file under the terms of the MPL, indicate your # decision by deleting the provisions above and replace them with the notice # and other provisions required by the GPL or the LGPL. If you do not delete # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. # # ***** END LICENSE BLOCK ***** */ .windowDialog { padding: 12px; font: -moz-dialog; } .paneSelector { list-style-image: url("chrome://browser/skin/preferences/Options.png"); } /* ----- GENERAL BUTTON ----- */ radio[pane=paneGeneral], radio[pane=paneMain] { -moz-image-region: rect(0px, 32px, 32px, 0px); } /* ----- TABS BUTTON ----- */ radio[pane=paneTabs] { -moz-image-region: rect(0px, 64px, 32px, 32px); } /* ----- CONTENT BUTTON ----- */ radio[pane=paneContent] { -moz-image-region: rect(0px, 96px, 32px, 64px); } /* ----- APPLICATIONS BUTTON ----- */ radio[pane=paneApplications] { -moz-image-region: rect(0px, 128px, 32px, 96px); } /* ----- PRIVACY BUTTON ----- */ radio[pane=panePrivacy] { -moz-image-region: rect(0px, 160px, 32px, 128px); } /* ----- SECURITY BUTTON ----- */ radio[pane=paneSecurity] { -moz-image-region: rect(0px, 192px, 32px, 160px); } /* ----- ADVANCED BUTTON ----- */ radio[pane=paneAdvanced] { -moz-image-region: rect(0px, 224px, 32px, 192px); } /* ----- SYNC BUTTON ----- */ radio[pane=paneSync] { list-style-image: url("chrome://browser/skin/preferences/Options-sync.png"); } /* ----- APPLICATIONS PREFPANE ----- */ #BrowserPreferences[animated="true"] #handlersView { height: 25em; } #BrowserPreferences[animated="false"] #handlersView { -moz-box-flex: 1; } description { font: small-caption; font-weight: normal; line-height: 1.3em; margin-bottom: 4px !important; } prefpane .groupbox-body { -moz-appearance: none; padding: 8px 4px 4px 4px; } #paneTabs > groupbox { margin: 0; } #tabPrefsBox { margin: 12px 4px; } prefpane .groupbox-title { background: url("chrome://global/skin/50pct_transparent_grey.png") repeat-x bottom left; margin-bottom: 4px; } tabpanels { padding: 20px 7px 7px; } caption { -moz-padding-start: 5px; padding-top: 4px; padding-bottom: 2px; } #paneMain description, #paneContent description, #paneAdvanced description, #paneSecurity description { font: -moz-dialog; } #paneContent { padding-top: 8px; } #paneContent row { padding: 2px 4px; -moz-box-align: center; } #popupPolicyRow, #enableSoftwareInstallRow, #enableImagesRow { margin-bottom: 4px !important; padding-bottom: 4px !important; border-bottom: 1px solid #ccc; } #browserUseCurrent, #browserUseBookmark, #browserUseBlank { margin-top: 10px; } #advancedPrefs { margin: 0 8px; } #privacyPrefs { padding: 0 4px; } #privacyPrefs > tabpanels { padding: 18px 10px 10px; } #OCSPDialogPane { font: message-box !important; } /** * Privacy Pane */ /* styles for the link elements copied from .text-link in global.css */ .inline-link { color: LinkText; text-decoration: underline; } .inline-link:not(:focus) { outline: 1px dotted transparent; } /** * Update Preferences */ #autoInstallOptions { -moz-margin-start: 20px; } .updateControls { -moz-margin-start: 10px; } /** * Clear Private Data */ #SanitizeDialogPane > groupbox { margin-top: 0; } /* ----- SYNC PANE ----- */ #syncDesc { padding: 0 8em; } #accountCaptionImage { list-style-image: url("chrome://mozapps/skin/profile/profileicon.png"); } #syncAddDeviceLabel { margin-top: 1em; margin-bottom: 1em; } #syncEnginesList { height: 10em; } zotero-11.0~beta.3/app/assets/multilocale.txt0000644000000000000000000000040215270665264016204 0ustar en-US,ar,bg-BG,br,ca-AD,cs-CZ,da-DK,de,el-GR,en-AU,en-CA,en-GB,en-NZ,es-ES,et-EE,eu-ES,fa,fi-FI,fr-FR,gl-ES,hu-HU,id-ID,is-IS,it-IT,ja-JP,km,ko-KR,lt-LT,nb-NO,nl-NL,pl-PL,pt-BR,pt-PT,ro-RO,ru-RU,sk-SK,sl-SI,sr-RS,sv-SE,ta,th-TH,tr-TR,uk-UA,vi-VN,zh-CN,zh-TW zotero-11.0~beta.3/app/assets/prefs.js0000644000000000000000000001665015270665264014622 0ustar // We only want a single window, I think pref("toolkit.singletonWindowType", "navigator:browser"); // For debugging purposes, show errors in console by default pref("javascript.options.showInConsole", true); // Don't retrieve unrequested links when performing standalone translation pref("network.prefetch-next", false); // Don't make DNS requests for links in snapshots pref("network.dns.disablePrefetch", true); // Don't open TCP connection when clicking on a link in a snapshot pref("network.http.speculative-parallel-limit", 0); // Let operations run as long as necessary pref("dom.max_chrome_script_run_time", 0); pref("intl.locale.requested", ''); pref("intl.regional_prefs.use_os_locales", false); // Fix error initializing login manager after this was changed in Firefox 57 // Could also disable this with MOZ_LOADER_SHARE_GLOBAL, supposedly pref("jsloader.shareGlobal", false); // Needed due to https://bugzilla.mozilla.org/show_bug.cgi?id=1181977 pref("browser.hiddenWindowChromeURL", "chrome://zotero/content/standalone/hiddenWindow.xhtml"); // Use basicViewer for opening new DOM windows from content (for TinyMCE) pref("browser.chromeURL", "chrome://zotero/content/standalone/basicViewer.xhtml"); // We need these to get the save dialog working with contentAreaUtils.js pref("browser.download.useDownloadDir", false); pref("browser.download.manager.showWhenStarting", false); pref("browser.download.folderList", 1); // Don't show add-on selection dialog pref("extensions.shownSelectionUI", true); pref("extensions.autoDisableScope", 11); pref("network.protocol-handler.expose-all", false); pref("network.protocol-handler.expose.zotero", true); pref("network.protocol-handler.expose.http", true); pref("network.protocol-handler.expose.https", true); // Never go offline pref("offline.autoDetect", false); pref("network.manage-offline-status", false); // Without this, we will throw up dialogs if asked to translate strange pages pref("browser.xul.error_pages.enabled", true); // Without this, scripts may decide to open popups pref("dom.disable_open_during_load", true); // Don't show security warning. The "warn_viewing_mixed" warning just lets the user know that some // page elements were loaded over an insecure connection. This doesn't matter if all we're doing is // scraping the page, since we don't provide any information to the site. pref("security.warn_viewing_mixed", false); // Temporarily allow plugins to load their own scripts from jar:file: URIs with loadSubScript() // without passing allowUnsafeURL (Mozilla bug 1974213). This will be disabled once plugins have // had time to update. pref("security.allow_unsafe_subscript_loads", true); // We do need synchronous XHR pref("network.xhr.block_sync_system_requests", false); // Preferences for add-on discovery pref("extensions.getAddons.cache.enabled", false); //pref("extensions.getAddons.maxResults", 15); //pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/guid:%IDS%?src=thunderbird&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%"); //pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/%APP%/search?q=%TERMS%"); //pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%?src=thunderbird"); //pref("extensions.webservice.discoverURL", "https://www.zotero.org/support/plugins"); // Check Windows certificate store for custom CAs pref("security.enterprise_roots.enabled", true); // Disable add-on signature checking with unbranded Firefox build pref("xpinstall.signatures.required", false); // Allow legacy extensions (though this might not be necessary) pref("extensions.legacy.enabled", true); // Allow installing XPIs from any host pref("xpinstall.whitelist.required", false); // Allow installing XPIs when using a custom CA pref("extensions.install.requireBuiltInCerts", false); pref("extensions.update.requireBuiltInCerts", false); // Don't connect to the Mozilla extensions blocklist pref("extensions.blocklist.enabled", false); // Avoid warning in console when opening Tools -> Add-ons pref("extensions.getAddons.link.url", ""); // Disable places pref("places.history.enabled", false); // Probably not used, but prevent an error in the console pref("app.support.baseURL", "https://www.zotero.org/support/"); // Disable Telemetry, Health Report, error reporting, and remote settings pref("toolkit.telemetry.unified", false); pref("toolkit.telemetry.enabled", false); pref("datareporting.policy.dataSubmissionEnabled", false); pref("toolkit.crashreporter.enabled", false); pref("extensions.remoteSettings.disabled", true); pref("extensions.update.url", ""); // Don't try to load the "Get Add-ons" tab on first load of Add-ons window pref("extensions.ui.lastCategory", "addons://list/extension"); // Don't show "Using experimental APIs requires a privileged add-on" warning pref("extensions.experiments.enabled", true); // Not set on Windows in Firefox anymore since it's a per-installation pref, // but we override that in fetch_xulrunner pref("app.update.auto", true); // URL user can browse to manually if for some reason all update installation // attempts fail. pref("app.update.url.manual", "https://www.zotero.org/download"); // A default value for the "More information about this update" link // supplied in the "An update is available" page of the update wizard. pref("app.update.url.details", "https://www.zotero.org/support/changelog"); // Interval: Time between checks for a new version (in seconds) // default=1 day pref("app.update.interval", 86400); // The minimum delay in seconds for the timer to fire. // default=2 minutes pref("app.update.timerMinimumDelay", 120); // Whether or not we show a dialog box informing the user that the update was // successfully applied. This is off in Firefox by default since we show a // upgrade start page instead! Other apps may wish to show this UI, and supply // a whatsNewURL field in their brand.properties that contains a link to a page // which tells users what's new in this new update. // update channel for this build pref("app.update.channel", "default"); // This should probably not be a preference that's used in toolkit.... pref("browser.preferences.instantApply", false); // Allow elements to be displayed full-screen pref("full-screen-api.enabled", true); // Allow chrome access in DevTools // This enables the input field in the Browser Console tool pref("devtools.chrome.enabled", true); // Default mousewheel action with Alt/Option is History Back/Forward in Firefox // We don't have History navigation and users want to scroll the tree with Option // key held down pref("mousewheel.with_alt.action", 1); // Use the system print dialog instead of the new tab-based print dialog in Firefox pref("print.prefer_system_dialog", true); // Disable libvpx decoding/encoding pref("media.webm.enabled", false); pref("media.encoder.webm.enabled", false); pref("media.mediasource.webm.enabled", false); pref("media.mediasource.webm.audio.enabled", false); pref("media.mediasource.vp9.enabled", false); pref("media.ffvpx.enabled", false); pref("media.ffvpx.mp3.enabled", false); pref("media.rdd-vpx.enabled", false); pref("media.rdd-ffvpx.enabled", false); pref("media.utility-ffvpx.enabled", false); // Allow collectionTree scrolling when Control is highlighting collections on win pref("mousewheel.with_control.action", 1); zotero-11.0~beta.3/app/assets/unix/0000755000000000000000000000000015270665264014120 5ustar zotero-11.0~beta.3/app/assets/unix/skin/0000755000000000000000000000000015270665264015064 5ustar zotero-11.0~beta.3/app/assets/unix/skin/preferences/0000755000000000000000000000000015270665264017365 5ustar zotero-11.0~beta.3/app/assets/unix/skin/preferences/preferences.css0000644000000000000000000001047715270665264022411 0ustar %if 0 /* # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. # # The Original Code is the Firefox Preferences System. # # The Initial Developer of the Original Code is # Ben Goodger. # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved. # # Contributor(s): # Ben Goodger # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), # in which case the provisions of the GPL or the LGPL are applicable instead # of those above. If you wish to allow use of your version of this file only # under the terms of either the GPL or the LGPL, and not to allow others to # use your version of this file under the terms of the MPL, indicate your # decision by deleting the provisions above and replace them with the notice # and other provisions required by the GPL or the LGPL. If you do not delete # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. # # ***** END LICENSE BLOCK ***** */ %endif /* Global Styles */ #BrowserPreferences radio[pane] { list-style-image: url("chrome://browser/skin/preferences/Options.png"); } radio[pane=paneMain] { -moz-image-region: rect(0px, 32px, 32px, 0px) } radio[pane=paneTabs] { -moz-image-region: rect(0px, 64px, 32px, 32px) } radio[pane=paneContent] { -moz-image-region: rect(0px, 96px, 32px, 64px) } radio[pane=paneApplications] { -moz-image-region: rect(0px, 128px, 32px, 96px) } radio[pane=panePrivacy] { -moz-image-region: rect(0px, 160px, 32px, 128px) } radio[pane=paneSecurity] { -moz-image-region: rect(0px, 192px, 32px, 160px) } radio[pane=paneAdvanced] { -moz-image-region: rect(0px, 224px, 32px, 192px) } %ifdef MOZ_SERVICES_SYNC radio[pane=paneSync] { list-style-image: url("chrome://browser/skin/preferences/Options-sync.png") !important; } %endif /* Applications Pane */ #BrowserPreferences[animated="true"] #handlersView { height: 25em; } #BrowserPreferences[animated="false"] #handlersView { -moz-box-flex: 1; } /* Privacy Pane */ /* styles for the link elements copied from .text-link in global.css */ .inline-link { color: LinkText; text-decoration: underline; } .inline-link:not(:focus) { outline: 1px dotted transparent; } /* Modeless Window Dialogs */ .windowDialog, .windowDialog prefpane { padding: 0px; } .contentPane { margin: 9px 8px 5px 8px; } .actionButtons { margin: 0px 3px 6px 3px !important; } /* Cookies Manager */ #cookiesChildren::-moz-tree-image(domainCol) { width: 16px; height: 16px; margin: 0px 2px; list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); } #paneApplications { margin-left: 4px; margin-right: 4px; padding-left: 0; padding-right: 0; } #linksOpenInBox { margin-top: 5px; } #paneAdvanced { padding-bottom: 10px; } #advancedPrefs { margin-left: 0; margin-right: 0; } #cookiesChildren::-moz-tree-image(domainCol, container) { list-style-image: url("moz-icon://stock/gtk-directory?size=menu"); } #cookieInfoBox { border: 1px solid ThreeDShadow; border-radius: 0px; margin: 4px; padding: 0px; } /* bottom-most box containing a groupbox in a prefpane. Prevents the bottom of the groupbox from being cutoff */ .bottomBox { padding-bottom: 4px; } /** * Clear Private Data */ #SanitizeDialogPane > groupbox { margin-top: 0; } %ifdef MOZ_SERVICES_SYNC /* Sync Pane */ #syncDesc { padding: 0 8em; } #accountCaptionImage { list-style-image: url("chrome://mozapps/skin/profile/profileicon.png"); } #syncAddDeviceLabel { margin-top: 1em; margin-bottom: 1em; } #syncEnginesList { height: 10em; } %endif zotero-11.0~beta.3/app/assets/updater.ini0000644000000000000000000000021415270665264015277 0ustar ; This file is in the UTF-8 encoding [Strings] Title=Zotero Update Info=Zotero is installing your updates and will start in a few moments…zotero-11.0~beta.3/app/assets/win/0000755000000000000000000000000015270665264013732 5ustar zotero-11.0~beta.3/app/assets/win/skin/0000755000000000000000000000000015270665264014676 5ustar zotero-11.0~beta.3/app/assets/win/skin/preferences/0000755000000000000000000000000015270665264017177 5ustar zotero-11.0~beta.3/app/assets/win/skin/preferences/preferences.css0000644000000000000000000001061315270665264022213 0ustar /* # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. # # The Original Code is the Firefox Preferences System. # # The Initial Developer of the Original Code is # Ben Goodger. # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved. # # Contributor(s): # Ben Goodger # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), # in which case the provisions of the GPL or the LGPL are applicable instead # of those above. If you wish to allow use of your version of this file only # under the terms of either the GPL or the LGPL, and not to allow others to # use your version of this file under the terms of the MPL, indicate your # decision by deleting the provisions above and replace them with the notice # and other provisions required by the GPL or the LGPL. If you do not delete # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. # # ***** END LICENSE BLOCK ***** */ /* Global Styles */ #BrowserPreferences radio[pane] { list-style-image: url("chrome://browser/skin/preferences/Options.png"); padding: 5px 3px 1px; } radio[pane=paneMain] { -moz-image-region: rect(0, 32px, 32px, 0); } radio[pane=paneTabs] { -moz-image-region: rect(0, 64px, 32px, 32px); } radio[pane=paneContent] { -moz-image-region: rect(0, 96px, 32px, 64px); } radio[pane=paneApplications] { -moz-image-region: rect(0, 128px, 32px, 96px); } radio[pane=panePrivacy] { -moz-image-region: rect(0, 160px, 32px, 128px); } radio[pane=paneSecurity] { -moz-image-region: rect(0, 192px, 32px, 160px); } radio[pane=paneAdvanced] { -moz-image-region: rect(0, 224px, 32px, 192px); } %ifdef MOZ_SERVICES_SYNC radio[pane=paneSync] { list-style-image: url("chrome://browser/skin/preferences/Options-sync.png") !important; } %endif /* Applications Pane */ #BrowserPreferences[animated="true"] #handlersView { height: 25em; } #BrowserPreferences[animated="false"] #handlersView { -moz-box-flex: 1; } /* Privacy Pane */ /* styles for the link elements copied from .text-link in global.css */ .inline-link { color: LinkText; text-decoration: underline; } .inline-link:not(:focus) { outline: 1px dotted transparent; } /* Modeless Window Dialogs */ .windowDialog, .windowDialog prefpane { padding: 0; } .contentPane { margin: 9px 8px 5px; } .actionButtons { margin: 0 3px 6px !important; } /* Cookies Manager */ #cookiesChildren::-moz-tree-image(domainCol) { width: 16px; height: 16px; margin: 0 2px; list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png") !important; } #cookiesChildren::-moz-tree-image(domainCol, container) { list-style-image: url("chrome://global/skin/icons/folder-item.png") !important; -moz-image-region: rect(0, 32px, 16px, 16px); } #cookiesChildren::-moz-tree-image(domainCol, container, open) { -moz-image-region: rect(16px, 32px, 32px, 16px); } #cookieInfoBox { border: 1px solid ThreeDShadow; border-radius: 0; margin: 4px; padding: 0; } /* Advanced Pane */ /* Adding padding-bottom prevents the bottom of the tabpanel from being cutoff when browser.preferences.animateFadeIn = true */ #advancedPrefs { padding-bottom: 8px; } /* bottom-most box containing a groupbox in a prefpane. Prevents the bottom of the groupbox from being cutoff */ .bottomBox { padding-bottom: 4px; } %ifdef MOZ_SERVICES_SYNC /* Sync Pane */ #syncDesc { padding: 0 8em; } .syncGroupBox { padding: 10px; } #accountCaptionImage { list-style-image: url("chrome://mozapps/skin/profile/profileicon.png"); } #syncAddDeviceLabel { margin-top: 1em; margin-bottom: 1em; } #syncEnginesList { height: 11em; } %endif zotero-11.0~beta.3/app/build.sh0000644000000000000000000013013415270665264013270 0ustar #!/bin/bash -e # Copyright (c) 2011 Zotero # Center for History and New Media # George Mason University, Fairfax, Virginia, USA # http://zotero.org # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" . "$CALLDIR/config.sh" . "$CALLDIR/scripts/utils.sh" if [ "`uname`" = "Darwin" ]; then MAC_NATIVE=1 else MAC_NATIVE=0 fi if [ "`uname -o 2> /dev/null`" = "Cygwin" ]; then WIN_NATIVE=1 else WIN_NATIVE=0 fi function usage { cat >&2 < /dev/null; then rsync -a "$1/" "$2/" else mkdir -p "$2" cp -a "$1/." "$2/" fi } function abspath { echo $(cd $(dirname $1); pwd)/$(basename $1); } function check_lfs_file { if [ "$(head --bytes 5 "$1")" = "versi" ]; then echo "$1 not checked out -- install Git LFS and run 'git lfs pull'" >&2 exit 1 fi } SOURCE_DIR="" ZIP_FILE="" BUILD_MAC=0 BUILD_WIN=0 BUILD_LINUX=0 PACKAGE=1 DEVTOOLS=0 quick_build=0 arch="" while getopts "d:f:p:a:c:tseq" opt; do case $opt in d) SOURCE_DIR="$OPTARG" ;; f) ZIP_FILE="$OPTARG" ;; p) for (( i=0; i<${#OPTARG}; i++ )); do case ${OPTARG:i:1} in m) BUILD_MAC=1 ;; w) BUILD_WIN=1 ;; l) BUILD_LINUX=1 ;; *) echo "$0: Invalid platform option ${OPTARG:i:1}" >&2 usage ;; esac done ;; a) arch="$OPTARG" ;; c) UPDATE_CHANNEL="$OPTARG" ;; t) DEVTOOLS=1 ;; e) SIGN=1 ;; s) PACKAGE=0 ;; q) quick_build=1 ;; *) usage ;; esac shift $((OPTIND-1)); OPTIND=1 done xul_hash_file() { local _platform=$1 local _arch=$2 case $_platform in m) echo "hash-mac";; w) [[ $_arch == x64 ]] && _arch="win-x64" [[ $_arch == arm64 ]] && _arch="win-arm64" echo "hash-${_arch}";; l) [[ $_arch == x64 ]] && _arch="x86_64" echo "hash-linux-${_arch}";; *) echo "Invalid platform '$_platform'" >&2 exit 1 esac } function check_xulrunner_hash { local _platform=$1 local _arch=$2 local platform_hash_file=$(xul_hash_file "$_platform" "${_arch:-universal}") # TEMP: If previous Windows hash file without architecture is present, force a refresh, # because the Firefox folder might have been changed without the new hash file being # updated, resulting in a broken build (e.g, fx140 using fx128). We'll want to keep this # as long as we're switching back to <=fx128. This isn't an issue on macOS because there's # no architecture and isn't an issue on Linux because the runtime folder names changed. if [[ $_platform = 'w' ]] && [[ -e "$CALLDIR/xulrunner/hash-win" ]]; then echo "Found old hash-win -- forcing redownload" rm "$CALLDIR"/xulrunner/hash-win* fi if [ ! -e "$CALLDIR/xulrunner/$platform_hash_file" ]; then echo "$platform_hash_file not found -- downloading" echo $CALLDIR/scripts/fetch_xulrunner -p $_platform ${_arch:+-a $_arch} else recalculated_xulrunner_hash=$("$CALLDIR/scripts/xulrunner_hash" -p $_platform ${_arch:+-a $_arch}) current_xulrunner_hash=$(< "$CALLDIR/xulrunner/$platform_hash_file") if [ "$current_xulrunner_hash" != "$recalculated_xulrunner_hash" ]; then echo "xulrunner hashes don't match -- redownloading" echo "$CALLDIR/scripts/fetch_xulrunner" -p $_platform ${_arch:+-a $_arch} current_xulrunner_hash=$(< "$CALLDIR/xulrunner/$platform_hash_file") if [ "$current_xulrunner_hash" != "$recalculated_xulrunner_hash" ]; then echo "xulrunner hashes don't match after running fetch_xulrunner!" exit 1 fi fi fi } # Derive platform flags from host if none provided if [[ $BUILD_MAC == 0 ]] && [[ $BUILD_WIN == 0 ]] && [[ $BUILD_LINUX == 0 ]]; then case "$(uname -s)" in Darwin) BUILD_MAC=1 ;; Linux) BUILD_LINUX=1 ;; CYGWIN*|MINGW*) BUILD_WIN=1 ;; esac fi # Check xulrunner hashes for requested builds if [ $BUILD_MAC == 1 ]; then check_xulrunner_hash m fi if [ $BUILD_WIN == 1 ]; then if [[ -n $arch ]]; then check_xulrunner_hash w $(get_canonical_arch w $arch) else for _a in win-x64 win-arm64 win32; do check_xulrunner_hash w "$_a" done fi fi if [ $BUILD_LINUX == 1 ]; then if [[ -n $arch ]]; then check_xulrunner_hash l $(get_canonical_arch l $arch) else for _a in x64 arm64; do check_xulrunner_hash l "$_a" done fi fi # Require source dir or ZIP file if [[ -z "$SOURCE_DIR" ]] && [[ -z "$ZIP_FILE" ]]; then usage elif [[ -n "$SOURCE_DIR" ]] && [[ -n "$ZIP_FILE" ]]; then usage fi # Require at least one platform if [[ $BUILD_MAC == 0 ]] && [[ $BUILD_WIN == 0 ]] && [[ $BUILD_LINUX == 0 ]]; then usage fi if [[ -z "${ZOTERO_TEST:-}" ]] || [[ $ZOTERO_TEST == "0" ]]; then include_tests=0 else include_tests=1 fi # Bundle devtools with dev builds if [ "$UPDATE_CHANNEL" == "beta" ] || [ "$UPDATE_CHANNEL" == "dev" ] || [ "$UPDATE_CHANNEL" == "test" ]; then DEVTOOLS=1 fi if [ -z "$UPDATE_CHANNEL" ]; then UPDATE_CHANNEL="default"; fi BUILD_ID=`date +%Y%m%d%H%M%S` # Paths to Gecko runtimes MAC_RUNTIME_PATH="$CALLDIR/xulrunner/Firefox.app" WIN_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox-" LINUX_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox-linux-" base_dir="$BUILD_DIR/base" app_dir="$BUILD_DIR/base/app" omni_dir="$BUILD_DIR/base/app/omni" shopt -s extglob mkdir -p "$app_dir" rm -rf "$STAGE_DIR" mkdir "$STAGE_DIR" rm -rf "$DIST_DIR" mkdir "$DIST_DIR" # Save build id, which is needed for updates manifest echo $BUILD_ID > "$DIST_DIR/build_id" cd "$app_dir" # Copy 'browser' files from Firefox # # omni.ja is left uncompressed within the Firefox application files by fetch_xulrunner # # TEMP: Also extract .hyf hyphenation files from the outer (still compressed) omni.ja # This works around https://bugzilla.mozilla.org/show_bug.cgi?id=1772900 set +e if [ $BUILD_MAC == 1 ]; then cp -Rp "$MAC_RUNTIME_PATH"/Contents/Resources/browser/omni "$app_dir" unzip -qj "$MAC_RUNTIME_PATH"/Contents/Resources/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/ elif [[ $BUILD_WIN == 1 ]]; then # These are non-arch-specific files, so just find a runtime we fetched: # - If the caller specified -a, that arch is guaranteed present. # - Otherwise prefer win-x64 → win-arm64 → win32, falling back to the first # directory that exists under xulrunner/. if [[ -n $arch ]]; then omni_arch=$(get_canonical_arch w $arch) else for cand in win-x64 win-arm64 win32; do [[ -d "${WIN_RUNTIME_PATH_PREFIX}${cand}" ]] && { omni_arch="$cand"; break; } done fi cp -Rp "${WIN_RUNTIME_PATH_PREFIX}${omni_arch}"/browser/omni "$app_dir" unzip -qj "${WIN_RUNTIME_PATH_PREFIX}${omni_arch}"/omni.ja "hyphenation/*" \ -d "$app_dir"/hyphenation/ elif [[ $BUILD_LINUX == 1 ]]; then # Same as above if [[ -n $arch ]]; then omni_arch=$(get_canonical_arch l $arch) else for cand in x86_64 arm64; do [[ -d "${LINUX_RUNTIME_PATH_PREFIX}${cand}" ]] && { omni_arch="$cand"; break; } done fi cp -Rp "${LINUX_RUNTIME_PATH_PREFIX}${omni_arch}"/browser/omni "$app_dir" unzip -qj "${LINUX_RUNTIME_PATH_PREFIX}${omni_arch}"/omni.ja "hyphenation/*" \ -d "$app_dir"/hyphenation/ fi set -e cd $omni_dir # Remove Firefox files that we don't need rm actors/AboutLogins{Parent,Child}.sys.mjs rm actors/AboutMessagePreview{Parent,Child}.sys.mjs rm actors/AboutNewTab{Parent,Child}.sys.mjs rm actors/AboutPrivateBrowsing{Parent,Child}.sys.mjs rm actors/AboutProtections{Parent,Child}.sys.mjs rm actors/AboutReader{Parent,Child}.sys.mjs rm actors/AboutTabCrashed{Parent,Child}.sys.mjs rm actors/AboutWelcome{Parent,Child}.sys.mjs rm actors/ASRouter{Parent,Child}.sys.mjs rm actors/BackupUI{Parent,Child}.sys.mjs rm actors/BlockedSite{Parent,Child}.sys.mjs rm actors/BrowserProcessChild.sys.mjs rm actors/BrowserTabChild.sys.mjs rm actors/ClickHandler{Parent,Child}.sys.mjs rm actors/ContentSearch{Parent,Child}.sys.mjs rm actors/DecoderDoctor{Parent,Child}.sys.mjs rm actors/DOMFullscreen{Parent,Child}.sys.mjs rm actors/EncryptedMedia{Parent,Child}.sys.mjs rm actors/FormValidation{Parent,Child}.sys.mjs rm actors/LinkHandler{Parent,Child}.sys.mjs rm actors/MigrationWizard{Parent,Child}.sys.mjs rm actors/PageData{Parent,Child}.sys.mjs # Not our PageData actor rm actors/PageInfoChild.sys.mjs rm actors/PageStyle{Parent,Child}.sys.mjs rm actors/Plugin{Parent,Child}.sys.mjs # GMP plugins, which we remove rm actors/PointerLock{Parent,Child}.sys.mjs #rm actors/RFPHelper{Parent,Child}.sys.mjs rm actors/ScreenshotsComponentChild.sys.mjs #rm actors/SearchSERPTelemetry{Parent,Child}.sys.mjs #rm actors/ShoppingSidebar{Parent,Child}.sys.mjs rm actors/SpeechDispatcher{Parent,Child}.sys.mjs rm actors/WebRTC{Parent,Child}.sys.mjs # Keep some essential files from chrome/browser/ mkdir chrome/browser-fx browser_keep=( content/browser/license.html # For web-ext content/browser/parent/ext-browser.js # For spellchecking content/browser/built_in_addons.json # Statically imported by BackupService, which SelectableProfileService pulls in when it's # instantiated as a command-line handler at startup content/browser/backup/backup-constants.mjs ) for file in "${browser_keep[@]}"; do mkdir -p "$(dirname "chrome/browser-fx/$file")" mv "chrome/browser/$file" "chrome/browser-fx/$file" done # Delete everything else rm -r chrome/browser # Move essential files back mv chrome/browser-fx chrome/browser #rm modules/SearchSERPTelemetry.sys.mjs # Move some Firefox files that would be overwritten out of the way mv chrome.manifest chrome.manifest-fx mv defaults defaults-fx # Extract Zotero files if [ -n "$ZIP_FILE" ]; then ZIP_FILE="`abspath $ZIP_FILE`" echo "Building from $ZIP_FILE" unzip -q $ZIP_FILE -d "$omni_dir" else if command -v rsync > /dev/null; then rsync_params="" if [ $include_tests -eq 0 ]; then rsync_params="--exclude /test" fi rsync -a $rsync_params "$SOURCE_DIR/" ./ else copy_dir "$SOURCE_DIR" . if [ $include_tests -eq 0 ]; then rm -rf ./test fi fi fi mv defaults defaults-z mv defaults-fx defaults prefs_file=defaults/preferences/zotero.js # Transfer Firefox prefs, omitting some with undesirable overrides from the base prefs # # - network.captive-portal-service.enabled # Disable the captive portal check against Mozilla servers # - extensions.systemAddon.update.url grep -E -v '(network.captive-portal-service.enabled|extensions.systemAddon.update.url)' defaults/preferences/firefox.js > $prefs_file rm defaults/preferences/firefox.js # Combine app and "extension" Zotero prefs echo "" >> $prefs_file echo "#" >> $prefs_file echo "# Zotero app prefs" >> $prefs_file echo "#" >> $prefs_file echo "" >> $prefs_file cat "$CALLDIR/assets/prefs.js" >> $prefs_file echo "" >> $prefs_file echo "# Zotero extension prefs" >> $prefs_file echo "" >> $prefs_file cat defaults-z/preferences/zotero.js >> $prefs_file # Babel strips the trailing newline, so anything appended below would share a line echo "" >> $prefs_file rm -rf defaults-z # Update the OneCRL list applied by CertRevocations at startup if [ $quick_build -eq 0 ]; then "$CALLDIR/scripts/fetch_onecrl" defaults/settings/security-state/onecrl.json fi # Platform-specific prefs if [ $BUILD_MAC == 1 ]; then perl -pi -e 's/pref\("browser\.preferences\.instantApply", false\);/pref\("browser\.preferences\.instantApply", true);/' $prefs_file perl -pi -e 's/%GECKO_VERSION%/'"$GECKO_VERSION_MAC"'/g' $prefs_file # Fix horizontal mousewheel scrolling (this is set to 4 in the Fx60 .app greprefs.js, but # defaults to 1 in later versions of Firefox, and needs to be 1 to work on macOS) echo 'pref("mousewheel.with_shift.action", 1);' >> $prefs_file elif [ $BUILD_WIN == 1 ]; then perl -pi -e 's/%GECKO_VERSION%/'"$GECKO_VERSION_WIN"'/g' $prefs_file elif [ $BUILD_LINUX == 1 ]; then # Modify platform-specific prefs perl -pi -e 's/pref\("browser\.preferences\.instantApply", false\);/pref\("browser\.preferences\.instantApply", true);/' $prefs_file perl -pi -e 's/%GECKO_VERSION%/'"$GECKO_VERSION_LINUX"'/g' $prefs_file # Auto-scroll is disabled by default on Linux # https://bugzilla.mozilla.org/show_bug.cgi?id=1747208 perl -pi -e 's/pref\("general\.autoScroll", false\);/pref\("general.autoScroll", true);/' $prefs_file fi # Clear list of built-in add-ons, but leave the en-US dictionary echo '{"dictionaries": {"en-US": "dictionaries/en-US.dic"}, "system": []}' > chrome/browser/content/browser/built_in_addons.json # chrome.manifest mv chrome.manifest zotero.manifest mv chrome.manifest-fx chrome.manifest # TEMP #echo "manifest zotero.manifest" >> "$base_dir/chrome.manifest" cat zotero.manifest >> chrome.manifest rm zotero.manifest # Update channel perl -pi -e 's/pref\("app\.update\.channel", "[^"]*"\);/pref\("app\.update\.channel", "'"$UPDATE_CHANNEL"'");/' $prefs_file echo -n "Channel: " grep app.update.channel $prefs_file echo # Add devtools prefs if [ $DEVTOOLS -eq 1 ]; then echo >> $prefs_file echo "// Dev Tools" >> $prefs_file echo 'pref("devtools.debugger.remote-enabled", true);' >> $prefs_file if [ $UPDATE_CHANNEL != "beta" ]; then echo 'pref("devtools.debugger.prompt-connection", false);' >> $prefs_file fi # Use 'zotero' instead of 'zotero-bin' when passing -jsdebugger flag on Linux, since we need # that to pass application.ini replace_line 'let command = Services.dirsvc.get\("XREExeF", Ci.nsIFile\).path;' \ 'let command = Services.dirsvc.get("XREExeF", Ci.nsIFile).path; command = command.replace("zotero-bin", "zotero");' \ chrome/devtools/modules/devtools/client/framework/browser-toolbox/Launcher.sys.mjs # Fix source display breaking when switching windows in the Browser Toolbox. # When the user switches which chrome window is being inspected (via the frame # picker), the thread actor's _onWindowReady handler clears all debuggees and # source actors, then re-adds debuggees. But it never calls addAllSources() to # re-emit the existing scripts — it only does that for BFCache navigations. # Since the scripts already exist (they're not new), onNewScript won't fire, # so the debugger's source list stays empty. Fix: also call addAllSources() # after frame switching, just like BFCache. replace_line '_onWindowReady\(\{ isTopLevel, isBFCache \}\)' \ '_onWindowReady({ isTopLevel, isBFCache, isFrameSwitching })' \ chrome/devtools/modules/devtools/server/actors/thread.js replace_line 'if \(isBFCache\) {' \ 'if (isBFCache || isFrameSwitching) {' \ chrome/devtools/modules/devtools/server/actors/thread.js # Suppress "Failed to get the active browserId" error when profile recording starts replace_line 'console\.error\(' \ 'if (false) console.error(' \ chrome/devtools/modules/devtools/shared/performance-new/recording-utils.sys.mjs # Stub out profile favicon lookup since we don't have PlacesUtils replace_line 'return getPageFavicons\(pageUrls\);' \ 'return pageUrls ? pageUrls.map(() => null) : [];' \ chrome/devtools/modules/devtools/client/performance-new/shared/background.sys.mjs # Use our profilerViewer.xhtml to display profiles. # We can't use basicViewer because that loads Zotero scripts, and profiling # runs in the Browser Toolbox child process, where a second Zotero instance # would collide with the locked database. replace_line 'const contentBrowser = await new Promise\(resolveOnContentBrowserCreated =>' \ 'if (typeof win.openWebLinkIn !== "function") { const ww = Cc["\@mozilla.org\/embedcomp\/window-watcher;1"].getService( Ci.nsIWindowWatcher ); const arg = { uri: urlToLoad }; arg.wrappedJSObject = arg; const viewerWin = ww.openWindow( null, "chrome:\/\/zotero\/content\/standalone\/profilerViewer.xhtml", null, "chrome,dialog=no,resizable,centerscreen,scrollbars", arg ); return await new Promise(resolve => { viewerWin.addEventListener("load", () => { resolve(viewerWin.document.getElementById("content")); }, { once: true }); }); } const contentBrowser = await new Promise(resolveOnContentBrowserCreated =>' \ chrome/devtools/modules/devtools/client/performance-new/shared/browser.js fi # 5.0.96.3 / 5.0.97-beta.37+ddc7be75c VERSION=`cat version` # 5.0.96 / 5.0.97 VERSION_NUMERIC=`perl -ne 'print and last if s/^(\d+\.\d+(\.\d+)?).*/\1/;' version` if [ -z "$VERSION" ]; then echo "Version number not found in version file" exit 1 fi rm version echo echo "Version: $VERSION" # Delete Mozilla signing info if present rm -rf META-INF # Copy branding cp -R "$CALLDIR"/assets/branding/locale/brand.{dtd,properties} chrome/en-US/locale/branding/ # Copy browser localization .ftl files for locale in `ls chrome/locale/`; do mkdir -p localization/$locale/branding cp "$CALLDIR/assets/branding/locale/brand.ftl" localization/$locale/branding/brand.ftl mkdir -p localization/$locale/toolkit/global cp chrome/locale/$locale/zotero/mozilla/arrowscrollbox.ftl localization/$locale/toolkit/global cp chrome/locale/$locale/zotero/mozilla/textActions.ftl localization/$locale/toolkit/global cp chrome/locale/$locale/zotero/mozilla/wizard.ftl localization/$locale/toolkit/global mkdir -p localization/$locale/browser cp chrome/locale/$locale/zotero/mozilla/browserSets.ftl localization/$locale/browser cp chrome/locale/$locale/zotero/mozilla/menubar.ftl localization/$locale/browser mkdir -p localization/$locale/devtools/client cp chrome/locale/$locale/zotero/mozilla/toolbox.ftl localization/$locale/devtools/client # TEMP: Until we've created zotero.ftl in all locales touch chrome/locale/$locale/zotero/zotero.ftl cp chrome/locale/$locale/zotero/*.ftl localization/$locale/ done # Add to chrome manifest echo "" >> chrome.manifest cat "$CALLDIR/assets/chrome.manifest" >> chrome.manifest replace_line 'handle: function bch_handle\(cmdLine\) {' 'handle: function bch_handle(cmdLine) { \/\/ TEST_OPTIONS_PLACEHOLDER ' modules/BrowserContentHandler.sys.mjs export CALLDIR && perl -pi -e 'BEGIN { local $/; open $fh, "$ENV{CALLDIR}/assets/commandLineHandler.js"; $replacement = <$fh>; close $fh; } s/\/\/ TEST_OPTIONS_PLACEHOLDER/$replacement/' modules/BrowserContentHandler.sys.mjs # Don't try to initialize Places, since we've removed its files #replace_line 'this._placesInitialized = true;' 'if (true) return; this._placesInitialized = true;' components/places/PlacesBrowserStartup.sys.mjs # Move test files to root directory if [ $include_tests -eq 1 ]; then cat test/chrome.manifest >> chrome.manifest rm test/chrome.manifest cp -R test/tests "$base_dir/tests" fi # Copy platform-specific assets if [ $BUILD_MAC == 1 ]; then copy_dir "$CALLDIR/assets/mac" . elif [ $BUILD_WIN == 1 ]; then copy_dir "$CALLDIR/assets/win" . elif [ $BUILD_LINUX == 1 ]; then copy_dir "$CALLDIR/assets/unix" . fi # Add word processor plug-ins echo >> chrome.manifest if [ $BUILD_MAC == 1 ]; then pluginDir="$CALLDIR/modules/zotero-word-for-mac-integration" mkdir -p "integration/word-for-mac" cp -RH "$pluginDir/components" \ "$pluginDir/resource" \ "$pluginDir/chrome.manifest" \ "integration/word-for-mac" echo -n "Word for Mac plugin version: " cat "integration/word-for-mac/resource/version.txt" echo echo >> $prefs_file cat "$CALLDIR/modules/zotero-word-for-mac-integration/defaults/preferences/zoteroMacWordIntegration.js" >> $prefs_file echo >> $prefs_file echo "manifest integration/word-for-mac/chrome.manifest" >> chrome.manifest elif [ $BUILD_WIN == 1 ]; then pluginDir="$CALLDIR/modules/zotero-word-for-windows-integration" mkdir -p "integration/word-for-windows" cp -RH "$pluginDir/components" \ "$pluginDir/resource" \ "$pluginDir/chrome.manifest" \ "integration/word-for-windows" echo -n "Word for Windows plugin version: " cat "integration/word-for-windows/resource/version.txt" echo echo >> $prefs_file cat "$CALLDIR/modules/zotero-word-for-windows-integration/defaults/preferences/zoteroWinWordIntegration.js" >> $prefs_file echo >> $prefs_file echo "manifest integration/word-for-windows/chrome.manifest" >> chrome.manifest fi # Libreoffice plugin for all platforms pluginDir="$CALLDIR/modules/zotero-libreoffice-integration" mkdir -p "integration/libreoffice" cp -RH "$pluginDir/chrome" \ "$pluginDir/components" \ "$pluginDir/resource" \ "$pluginDir/chrome.manifest" \ "integration/libreoffice" echo -n "LibreOffice plugin version: " cat "integration/libreoffice/resource/version.txt" echo echo >> $prefs_file cat "$CALLDIR/modules/zotero-libreoffice-integration/defaults/preferences/zoteroLibreOfficeIntegration.js" >> $prefs_file echo >> $prefs_file echo "manifest integration/libreoffice/chrome.manifest" >> chrome.manifest # Delete files that shouldn't be distributed find chrome -name .DS_Store -exec rm -f {} \; # Zip browser and Zotero files into omni.ja if [ $quick_build -eq 1 ]; then # If quick build, don't compress or optimize zip -qrXD omni.ja * else zip -qr9XD omni.ja * python3 "$CALLDIR/scripts/optimizejars.py" --optimize ./ ./ ./ fi mv omni.ja .. cd "$CALLDIR" rm -rf "$omni_dir" # Copy updater.ini cp "$CALLDIR/assets/updater.ini" "$base_dir" # Adjust chrome.manifest #perl -pi -e 's^(chrome|resource)/^jar:zotero.jar\!/$1/^g' "$BUILD_DIR/zotero/chrome.manifest" # Copy application.ini and modify cp "$CALLDIR/assets/application.ini" "$app_dir/application.ini" perl -pi -e "s/\{\{VERSION}}/$VERSION/" "$app_dir/application.ini" perl -pi -e "s/\{\{BUILDID}}/$BUILD_ID/" "$app_dir/application.ini" # Remove unnecessary files find "$BUILD_DIR" -name .DS_Store -exec rm -f {} \; # Mac if [ $BUILD_MAC == 1 ]; then echo 'Building Zotero.app' # Set up directory structure APPDIR="$STAGE_DIR/Zotero.app" rm -rf "$APPDIR" mkdir "$APPDIR" chmod 755 "$APPDIR" cp -r "$CALLDIR/mac/Contents" "$APPDIR" CONTENTSDIR="$APPDIR/Contents" # Merge relevant assets from Firefox mkdir "$CONTENTSDIR/MacOS" cp -r "$MAC_RUNTIME_PATH/Contents/MacOS/"!(firefox|firefox-bin|crashhelper|crashreporter.app|minidump-analyzer|nmhproxy|pingsender|updater.app) "$CONTENTSDIR/MacOS" cp -r "$MAC_RUNTIME_PATH/Contents/Resources/"!(application.ini|Assets.car|browser|defaults|precomplete|removed-files|updater.ini|update-settings.ini|webapprt*|*.icns|*.lproj) "$CONTENTSDIR/Resources" # Add our custom ChannelPrefs.framework and change channel if not a source build mkdir "$CONTENTSDIR/Frameworks" tar xvf "$CALLDIR/mac/ChannelPrefs.framework.tar.xz" -C "$CONTENTSDIR/Frameworks" if [ "$UPDATE_CHANNEL" != "source" ]; then "$CALLDIR/mac/set-channel-prefs-channel" "$CONTENTSDIR/Frameworks/ChannelPrefs.framework/ChannelPrefs" source $UPDATE_CHANNEL fi # Use our own launcher check_lfs_file "$CALLDIR/mac/zotero.xz" xz -d --stdout "$CALLDIR/mac/zotero.xz" > "$CONTENTSDIR/MacOS/zotero" chmod 755 "$CONTENTSDIR/MacOS/zotero" # Overlay custom Firefox components (e.g., XUL or libmozglue.dylib) if [ -n "$custom_components_hash_mac" ]; then cp -R "$MAC_RUNTIME_PATH/../MacOS/." "$CONTENTSDIR/MacOS/" fi # Use our own updater, because Mozilla's requires updates signed by Mozilla cd "$CONTENTSDIR/MacOS" check_lfs_file "$CALLDIR/mac/updater.tar.xz" tar xf "$CALLDIR/mac/updater.tar.xz" # Modify Info.plist perl -pi -e "s/\{\{VERSION\}\}/$VERSION/" "$CONTENTSDIR/Info.plist" perl -pi -e "s/\{\{VERSION_NUMERIC\}\}/$VERSION_NUMERIC/" "$CONTENTSDIR/Info.plist" if [ $UPDATE_CHANNEL == "beta" ] || [ $UPDATE_CHANNEL == "dev" ] || [ $UPDATE_CHANNEL == "source" ]; then perl -pi -e "s/org\.zotero\.zotero/org.zotero.zotero-$UPDATE_CHANNEL/" "$CONTENTSDIR/Info.plist" fi perl -pi -e "s/\{\{VERSION\}\}/$VERSION/" "$CONTENTSDIR/Info.plist" # Needed for "monkeypatch" Windows builds: # http://www.nntp.perl.org/group/perl.perl5.porters/2010/08/msg162834.html rm -f "$CONTENTSDIR/Info.plist.bak" echo grep -B 1 org.zotero.zotero "$CONTENTSDIR/Info.plist" echo grep -A 1 CFBundleShortVersionString "$CONTENTSDIR/Info.plist" echo grep -A 1 CFBundleVersion "$CONTENTSDIR/Info.plist" echo # Copy app files copy_dir "$base_dir" "$CONTENTSDIR/Resources" # Add word processor plug-ins mkdir "$CONTENTSDIR/Resources/integration" cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$CONTENTSDIR/Resources/integration/libreoffice" cp -RH "$CALLDIR/modules/zotero-word-for-mac-integration/install" "$CONTENTSDIR/Resources/integration/word-for-mac" # Delete extraneous files find "$CONTENTSDIR" -depth -type d -name .git -exec rm -rf {} \; find "$CONTENTSDIR" \( -name .DS_Store -or -name update.rdf \) -exec rm -f {} \; # Add Safari extensions -- this depends on signing but needs to be done before generating # the precomplete file # # $SAFARI_APPEX is a stub appex built from the safari-web-extension wrapper project. The web # extension itself comes from $SAFARI_EXT_RESOURCES (a zotero-connectors build/safari # directory), which replaces the stub's placeholder resources here before signing. # # $SAFARI_APP_EXTENSION is an optional prebuilt legacy Safari App Extension, embedded # alongside the web extension for Safari versions that can't load Developer ID web # extensions (supported in Safari 18.4 and later). On Safari versions that can load the # web extension, the SFSafariAppExtensionBundleIdentifiersToReplace key causes it to # replace the App Extension. if [[ $SIGN == 1 ]] && [[ -n "$SAFARI_APPEX" ]] && [[ -d "$SAFARI_APPEX" ]]; then if [[ -z "${SAFARI_EXT_RESOURCES:-}" ]] || [[ ! -f "$SAFARI_EXT_RESOURCES/manifest.json" ]]; then echo "SAFARI_EXT_RESOURCES doesn't contain a web extension -- aborting" 2>&1 exit 1 fi bundle_identifier=$(/usr/libexec/PlistBuddy -c "Print CFBundleIdentifier" "$APPDIR/Contents/Info.plist") mkdir "$APPDIR/Contents/PlugIns" webext_appex="$APPDIR/Contents/PlugIns/ZoteroSafariWebExtension.appex" cp -R "$SAFARI_APPEX" "$webext_appex" appex_resources="$webext_appex/Contents/Resources" rm -rf "$appex_resources" mkdir "$appex_resources" cp -R "$SAFARI_EXT_RESOURCES/." "$appex_resources/" # Show the connector version in Safari connector_version=$(python3 -c "import json, sys; print(json.load(open(sys.argv[1]))['version'])" "$appex_resources/manifest.json") if [[ $connector_version == *999* ]] && [ "$UPDATE_CHANNEL" != "test" ]; then echo "Placeholder connector version $connector_version not allowed for '$UPDATE_CHANNEL' channel -- aborting" 2>&1 exit 1 fi /usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString $connector_version" \ "$webext_appex/Contents/Info.plist" /usr/libexec/PlistBuddy -c "Set CFBundleVersion $connector_version" \ "$webext_appex/Contents/Info.plist" # Give the appex the same bundle identifier prefix as the parent app /usr/libexec/PlistBuddy -c "Set CFBundleIdentifier $bundle_identifier.SafariWebExtension" \ "$webext_appex/Contents/Info.plist" # Replace the legacy App Extension on Safari versions that can load the web extension /usr/libexec/PlistBuddy -c "Add :NSExtension:SFSafariAppExtensionBundleIdentifiersToReplace array" \ "$webext_appex/Contents/Info.plist" /usr/libexec/PlistBuddy -c "Add :NSExtension:SFSafariAppExtensionBundleIdentifiersToReplace:0 string $bundle_identifier.SafariExtension" \ "$webext_appex/Contents/Info.plist" # Add legacy Safari App Extension if [[ -n "${SAFARI_APP_EXTENSION:-}" ]]; then if [[ ! -d "$SAFARI_APP_EXTENSION" ]]; then echo "SAFARI_APP_EXTENSION not found at $SAFARI_APP_EXTENSION -- aborting" 2>&1 exit 1 fi appext_appex="$APPDIR/Contents/PlugIns/ZoteroSafariExtension.appex" cp -R "$SAFARI_APP_EXTENSION" "$appext_appex" rm -rf "$appext_appex/Contents/Resources/safari/test" /usr/libexec/PlistBuddy -c "Set CFBundleIdentifier $bundle_identifier.SafariExtension" \ "$appext_appex/Contents/Info.plist" fi fi # Copy over removed-files and make a precomplete file pushd "$CONTENTSDIR/Resources/" cp "$CALLDIR/update-packaging/removed-files_mac" removed-files python3 "$CALLDIR/scripts/createprecomplete.py" if [ ! -s precomplete ]; then echo "precomplete file not created -- aborting" 2>&1 exit 1 fi popd # Sign if [ $SIGN == 1 ]; then # Unlock keychain if a password is provided (necessary for building from a shell) if [ -n "$KEYCHAIN_PASSWORD" ]; then security -v unlock-keychain -p "$KEYCHAIN_PASSWORD" ~/Library/Keychains/$KEYCHAIN.keychain-db fi # Clear extended attributes, which can cause codesign to fail /usr/bin/xattr -cr "$APPDIR" # Sign libraries and updater without entitlements /usr/bin/codesign --force --options runtime --sign "$DEVELOPER_ID" \ "$APPDIR/Contents/MacOS/XUL" \ "$APPDIR/Contents/MacOS/updater.app/Contents/Frameworks/UpdateSettings.framework" \ "$APPDIR/Contents/MacOS/updater.app" \ "$APPDIR/Contents/Frameworks/ChannelPrefs.framework" find "$APPDIR/Contents" -name '*.dylib' -print0 | xargs -0 /usr/bin/codesign --force --options runtime --sign "$DEVELOPER_ID" # Sign bundled apps and main app bundle entitlements_file="$CALLDIR/mac/entitlements.xml" find "$APPDIR/Contents" -name '*.app' -not -name "updater.app" -print0 | xargs -0 /usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" # Sign .jnilib (Java native shared library) within LibreOffice extension, since notarization # started failing without this. The .jnilib is within a .jar within the .oxt, so we have to # extract both, sign the libraries, and then update each ZIP. # # TODO: Remove this block once the plugin ships a jna.jar without the macOS native # libraries, which are never loaded (JNA is used only on Windows) pushd "$BUILD_DIR" mkdir libreoffice-repack cd libreoffice-repack unzip -q "$APPDIR/Contents/Resources/integration/libreoffice/Zotero_LibreOffice_Integration.oxt" external_jars/jna.jar unzip -q external_jars/jna.jar 'com/sun/jna/darwin*/libjnidispatch.jnilib' /usr/bin/codesign --force --options runtime --sign "$DEVELOPER_ID" com/sun/jna/darwin*/libjnidispatch.jnilib zip -u external_jars/jna.jar com/sun/jna/darwin*/libjnidispatch.jnilib zip -u "$APPDIR/Contents/Resources/integration/libreoffice/Zotero_LibreOffice_Integration.oxt" external_jars/jna.jar cd .. rm -rf libreoffice-repack popd # Sign Safari extensions # # Even though they're signed by Xcode, we sign them again to make sure they match the parent app signature for appex in "$APPDIR"/Contents/PlugIns/*.appex; do if [ ! -d "$appex" ]; then continue fi echo # Extract entitlements, which differ from parent app /usr/bin/codesign -d --entitlements "$BUILD_DIR/safari-entitlements.plist" --xml "$appex" find "$appex/Contents" -name '*.dylib' -exec /usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" {} \; /usr/bin/codesign --force --options runtime --entitlements "$BUILD_DIR/safari-entitlements.plist" --sign "$DEVELOPER_ID" "$appex" done # Sign final app package echo /usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" "$APPDIR" # Verify app /usr/bin/codesign --verify -vvvv "$APPDIR" # Verify Safari extensions for appex in "$APPDIR"/Contents/PlugIns/*.appex; do if [ ! -d "$appex" ]; then continue fi echo /usr/bin/codesign --verify -vvvv "$appex" done elif [ -n "$custom_components_hash_mac" ]; then # Mozilla's helper apps (plugin-container, GPU helper, etc.) are signed with Mozilla's Team ID # and the hardened runtime, so without our signature they can't load custom components such as # libmozglue.dylib and fail to launch. Re-sign them ad hoc, which removes both. (Signed builds # re-sign everything with our Developer ID above.) find "$APPDIR/Contents/MacOS" -maxdepth 1 -name '*.app' -not -name "updater.app" -print0 \ | xargs -0 /usr/bin/codesign --force --sign - fi # Build and notarize disk image if [ $PACKAGE == 1 ]; then if [ $MAC_NATIVE == 1 ]; then echo "Creating Mac installer" dmg="$DIST_DIR/Zotero-$VERSION.dmg" "$CALLDIR/mac/pkg-dmg" --source "$STAGE_DIR/Zotero.app" \ --target "$dmg" \ --sourcefile --volname Zotero --copy "$CALLDIR/mac/DSStore:/.DS_Store" \ --symlink /Applications:"/Drag Here to Install" > /dev/null if [ "$UPDATE_CHANNEL" != "test" ]; then # Upload disk image to Apple "$CALLDIR/scripts/notarize_mac_app" "$dmg" echo # Staple notarization info to disk image "$CALLDIR/scripts/notarization_stapler" "$dmg" echo "Notarization complete" else echo "Test build -- skipping notarization" fi echo else echo 'Not building on Mac; creating Mac distribution as a zip file' rm -f "$DIST_DIR/Zotero_mac.zip" cd "$STAGE_DIR" && zip -rqX "$DIST_DIR/Zotero-${VERSION}_mac.zip" Zotero.app fi fi fi # Windows if [ $BUILD_WIN == 1 ]; then echo "Building Windows common" COMMON_APPDIR="$STAGE_DIR/Zotero_common" mkdir "$COMMON_APPDIR" # Package non-arch-specific components if [ $PACKAGE -eq 1 ]; then # Copy installer files cp -r "$CALLDIR/win/installer" "$BUILD_DIR/win_installer" perl -pi -e "s/\{\{VERSION}}/$VERSION/" "$BUILD_DIR/win_installer/defines.nsi" mkdir "$COMMON_APPDIR/uninstall" # Compress 7zSD.sfx upx --best -o "`cygpath -w \"$BUILD_DIR/7zSD.sfx\"`" \ "`cygpath -w \"$CALLDIR/win/installer/7zstub/firefox/7zSD.sfx\"`" > /dev/null fi if [[ -n $arch ]]; then archs=("$(get_canonical_arch w $arch)"); else archs=(win-x64 win-arm64 win32); fi for arch in "${archs[@]}"; do echo "Building Zotero_$arch" runtime_path="${WIN_RUNTIME_PATH_PREFIX}$arch" # Set up directory APPDIR="$STAGE_DIR/Zotero_$arch" mkdir "$APPDIR" # Copy relevant assets from Firefox # # 'i686' is a huge directory containing x86 versions of xul.dll and other files in # Firefox ARM64 builds for use with the EME DRM plugins cp -R "$runtime_path"/!(application.ini|browser|crashhelper.exe|crashreporter*|default-browser-agent.exe|defaultagent*|defaults|desktop-launcher|devtools-files|firefox*|i686|maintenanceservice*|minidump-analyzer.exe|nmhproxy.exe|pingsender.exe|private_browsing*|precomplete|removed-files|uninstall|update*) "$APPDIR" # Copy zotero.exe, which is built directly from Firefox source and then modified by # ResourceHacker to add icons check_lfs_file "$CALLDIR/win/zotero.exe.tar.xz" tar xf "$CALLDIR/win/zotero.exe.tar.xz" --to-stdout zotero_$arch.exe > "$APPDIR/zotero.exe" # Use our own updater, because Mozilla's requires updates signed by Mozilla check_lfs_file "$CALLDIR/win/updater.exe.tar.xz" tar xf "$CALLDIR/win/updater.exe.tar.xz" --to-stdout updater-$arch.exe > "$APPDIR/updater.exe" # Update .exe version numbers (only possible on Windows) if [ $WIN_NATIVE == 1 ]; then # FileVersion is limited to four integers, so it won't be properly updated for non-release # builds (e.g., we'll show 5.0.97.0 for 5.0.97-beta.37). ProductVersion will be the full # version string. rcedit "`cygpath -w \"$APPDIR/zotero.exe\"`" \ --set-file-version "$VERSION_NUMERIC" \ --set-product-version "$VERSION" rcedit "`cygpath -w \"$APPDIR/updater.exe\"`" \ --set-file-version "$VERSION_NUMERIC" \ --set-product-version "$VERSION" fi # Copy app files copy_dir "$base_dir" "$APPDIR" #mv "$APPDIR/app/application.ini" "$APPDIR/" # Copy in common files copy_dir "$COMMON_APPDIR" "$APPDIR" cat "$CALLDIR/win/installer/updater_append.ini" >> "$APPDIR/updater.ini" # Add devtools #if [ $DEVTOOLS -eq 1 ]; then # # Create devtools.jar # cd "$BUILD_DIR" # mkdir -p devtools/locale # cp -r "$runtime_path"/devtools-files/chrome/devtools/* devtools/ # cp -r "$runtime_path"/devtools-files/chrome/locale/* devtools/locale/ # cd devtools # zip -r -q ../devtools.jar * # cd .. # rm -rf devtools # mv devtools.jar "$APPDIR" # # cp "$runtime_path/devtools-files/components/interfaces.xpt" "$APPDIR/components/" #fi # Add word processor plug-ins mkdir -p "$APPDIR/integration" cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice" cp -RH "$CALLDIR/modules/zotero-word-for-windows-integration/install" "$APPDIR/integration/word-for-windows" if [ $arch = 'win32' ]; then rm "$APPDIR/integration/word-for-windows/libzoteroWinWordIntegration_x64.dll" rm "$APPDIR/integration/word-for-windows/libzoteroWinWordIntegration_ARM64.dll" elif [ $arch = 'win-x64' ]; then mv "$APPDIR/integration/word-for-windows/libzoteroWinWordIntegration_x64.dll" \ "$APPDIR/integration/word-for-windows/libzoteroWinWordIntegration.dll" rm "$APPDIR/integration/word-for-windows/libzoteroWinWordIntegration_ARM64.dll" elif [ $arch = 'win-arm64' ]; then mv "$APPDIR/integration/word-for-windows/libzoteroWinWordIntegration_ARM64.dll" \ "$APPDIR/integration/word-for-windows/libzoteroWinWordIntegration.dll" rm "$APPDIR/integration/word-for-windows/libzoteroWinWordIntegration_x64.dll" fi # Delete extraneous files find "$APPDIR" -depth -type d -name .git -exec rm -rf {} \; find "$APPDIR" \( -name .DS_Store -or -name '.git*' -or -name '.travis.yml' -or -name update.rdf -or -name '*.bak' \) -exec rm -f {} \; find "$APPDIR" \( -name '*.exe' -or -name '*.dll' \) -exec chmod 755 {} \; if [[ $PACKAGE -eq 1 ]] && [[ $SIGN -eq 1 ]]; then "$CALLDIR/win/codesign" "$APPDIR/zotero.exe" "$SIGNATURE_DESC" sleep $SIGNTOOL_DELAY "$CALLDIR/win/codesign" "$APPDIR/updater.exe" "$SIGNATURE_DESC Updater" sleep $SIGNTOOL_DELAY # Re-sign modified xul.dll "$CALLDIR/win/codesign" "$APPDIR/xul.dll" "$SIGNATURE_DESC" sleep $SIGNTOOL_DELAY "$CALLDIR/win/codesign" "$APPDIR/integration/word-for-windows/libzoteroWinWordIntegration.dll" "$SIGNATURE_DESC Word Plugin" fi # Copy over removed-files and make a precomplete file pushd "$APPDIR" cp "$CALLDIR/update-packaging/removed-files_$arch" removed-files python3 "$CALLDIR/scripts/createprecomplete.py" if [ ! -s precomplete ]; then echo "precomplete file not created -- aborting" 2>&1 exit 1 fi popd if [ $PACKAGE -eq 1 ]; then if [ $WIN_NATIVE -eq 1 ]; then echo "Creating Windows installer" # Build uninstaller if [ "$arch" = "win32" ]; then "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /V1 "`cygpath -w \"$BUILD_DIR/win_installer/uninstaller.nsi\"`" elif [ "$arch" = "win-x64" ]; then "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /DHAVE_64BIT_BUILD /V1 "`cygpath -w \"$BUILD_DIR/win_installer/uninstaller.nsi\"`" elif [ "$arch" = "win-arm64" ]; then "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /DHAVE_64BIT_BUILD /D_ARM64_ /V1 "`cygpath -w \"$BUILD_DIR/win_installer/uninstaller.nsi\"`" fi mv "$BUILD_DIR/win_installer/helper.exe" "$APPDIR/uninstall" if [ $SIGN -eq 1 ]; then "$CALLDIR/win/codesign" "$APPDIR/uninstall/helper.exe" "$SIGNATURE_DESC Uninstaller" sleep $SIGNTOOL_DELAY fi if [ "$arch" = "win32" ]; then INSTALLER_PATH="$DIST_DIR/Zotero-${VERSION}_win32_setup.exe" elif [ "$arch" = "win-x64" ]; then INSTALLER_PATH="$DIST_DIR/Zotero-${VERSION}_x64_setup.exe" elif [ "$arch" = "win-arm64" ]; then INSTALLER_PATH="$DIST_DIR/Zotero-${VERSION}_arm64_setup.exe" fi # Stage installer INSTALLER_STAGE_DIR="$BUILD_DIR/win_installer/staging" rm -rf "$INSTALLER_STAGE_DIR" mkdir "$INSTALLER_STAGE_DIR" cp -r "$APPDIR" "$INSTALLER_STAGE_DIR/core" # Build and sign setup.exe if [ "$arch" = "win32" ]; then "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /V1 "`cygpath -w \"$BUILD_DIR/win_installer/installer.nsi\"`" elif [ "$arch" = "win-x64" ]; then "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /DHAVE_64BIT_BUILD /V1 "`cygpath -w \"$BUILD_DIR/win_installer/installer.nsi\"`" elif [ "$arch" = "win-arm64" ]; then "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /DHAVE_64BIT_BUILD /D_ARM64_ /V1 "`cygpath -w \"$BUILD_DIR/win_installer/installer.nsi\"`" fi mv "$BUILD_DIR/win_installer/setup.exe" "$INSTALLER_STAGE_DIR" if [ $SIGN == 1 ]; then "$CALLDIR/win/codesign" "$INSTALLER_STAGE_DIR/setup.exe" "$SIGNATURE_DESC Setup" sleep $SIGNTOOL_DELAY fi # Compress application cd "$INSTALLER_STAGE_DIR" && 7z a -r -t7z "`cygpath -w \"$BUILD_DIR/app_$arch.7z\"`" \ -mx -m0=BCJ2 -m1=LZMA:d24 -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3 > /dev/null # Combine 7zSD.sfx and app.tag into setup.exe cat "$BUILD_DIR/7zSD.sfx" "$CALLDIR/win/installer/app.tag" \ "$BUILD_DIR/app_$arch.7z" > "$INSTALLER_PATH" # Sign installer .exe if [ $SIGN == 1 ]; then "$CALLDIR/win/codesign" "$INSTALLER_PATH" "$SIGNATURE_DESC Installer" fi chmod 755 "$INSTALLER_PATH" else echo 'Not building on Windows; only building zip file' fi cd "$STAGE_DIR" zip -rqX "$DIST_DIR/Zotero-${VERSION}_$arch.zip" Zotero_$arch fi done rm -rf "$COMMON_APPDIR" fi # Linux if [ $BUILD_LINUX == 1 ]; then if [[ -n $arch ]]; then archs=("$(get_canonical_arch l $arch)") else archs=(x64 arm64) fi for arch in "${archs[@]}"; do [[ $arch == x64 ]] && arch="x86_64" runtime_path="${LINUX_RUNTIME_PATH_PREFIX}${arch}" # Set up directory echo 'Building Zotero_linux-'$arch APPDIR="$STAGE_DIR/Zotero_linux-$arch" rm -rf "$APPDIR" mkdir "$APPDIR" # Merge relevant assets from Firefox cp -r "$runtime_path/"!(application.ini|browser|crashhelper|crashreporter|crashreporter.ini|defaults|devtools-files|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR" # Use our own launcher that calls the original Firefox executable with -app mv "$APPDIR"/firefox-bin "$APPDIR"/zotero-bin cp "$CALLDIR/linux/zotero" "$APPDIR"/zotero # Copy Ubuntu launcher files cp "$CALLDIR/linux/zotero.desktop" "$APPDIR" cp "$CALLDIR/linux/set_launcher_icon" "$APPDIR" # Use our own updater, because Mozilla's requires updates signed by Mozilla check_lfs_file "$CALLDIR/linux/updater.tar.xz" tar xf "$CALLDIR/linux/updater.tar.xz" --to-stdout updater-$arch > "$APPDIR/updater" chmod 755 "$APPDIR/updater" # Copy app files copy_dir "$base_dir" "$APPDIR" # Add word processor plug-ins mkdir "$APPDIR/integration" cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice" # Firefox includes an 'icons' folder with updater.png, but some Linux distro builds omit it mkdir -p "$APPDIR/icons" # Copy icons cp "$CALLDIR/linux/icons/icon32.png" "$APPDIR/icons/" cp "$CALLDIR/linux/icons/icon64.png" "$APPDIR/icons/" cp "$CALLDIR/linux/icons/icon128.png" "$APPDIR/icons/" cp "$CALLDIR/linux/icons/symbolic.svg" "$APPDIR/icons/" # Delete extraneous files find "$APPDIR" -depth -type d -name .git -exec rm -rf {} \; find "$APPDIR" \( -name .DS_Store -or -name update.rdf \) -exec rm -f {} \; # Copy over removed-files and make a precomplete file pushd "$APPDIR" cp "$CALLDIR/update-packaging/removed-files_linux-$arch" removed-files python3 "$CALLDIR/scripts/createprecomplete.py" if [ ! -s precomplete ]; then echo "precomplete file not created -- aborting" 2>&1 exit 1 fi popd if [ $PACKAGE == 1 ]; then # Create tar rm -f "$DIST_DIR/Zotero-${VERSION}_linux-$arch.tar.xz" cd "$STAGE_DIR" tar -cJf "$DIST_DIR/Zotero-${VERSION}_linux-$arch.tar.xz" "Zotero_linux-$arch" fi done fi rm -rf $BUILD_DIR zotero-11.0~beta.3/app/config.sh0000644000000000000000000000405115270665264013434 0ustar DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Version of Gecko to build with GECKO_VERSION_MAC="153.6.0esr" GECKO_VERSION_LINUX="153.6.0esr" GECKO_VERSION_WIN="153.6.0esr" RUST_VERSION=1.94.0 # URL prefix for custom builds of Firefox components custom_components_url="https://download.zotero.org/dev/firefox-components/" custom_components_hash_mac="26727867f22fbd6ac4766e7f6ee1bd79edc0abf8020b3323e6c978faf5c227a3" custom_components_hash_win_x64="fc3112fb8592d6bca02d9be905f22e94f98b724330791c8d5254d05558a77f4b" custom_components_hash_win_arm64="77791fe545ea6dc38a60356bf98b838a149808f118a962fffd6efa7ca63af8ae" custom_components_hash_win32="91d81183a66c4033fc0fa3ae936507c92fc99385b616f6ef36bd71074dcce63a" APP_NAME="Zotero" APP_ID="zotero\@zotero.org" # Whether to sign builds SIGN=0 # OS X Developer ID certificate information DEVELOPER_ID=F0F1FE48DB909B263AC51C8215374D87FDC12121 # Keychain and keychain password, if not building via the GUI KEYCHAIN="" KEYCHAIN_PASSWORD="" NOTARIZATION_BUNDLE_ID="" NOTARIZATION_USER="" NOTARIZATION_TEAM_ID="" NOTARIZATION_PASSWORD="" # Name of a notarytool keychain profile (see `xcrun notarytool store-credentials`), e.g., for an # App Store Connect API key -- used instead of the Apple ID settings above if set NOTARIZATION_PROFILE="" # Paths for Windows installer build NSIS_DIR='C:\Program Files (x86)\NSIS\' SIGNTOOL_DELAY=5 # Directory for unpacked binaries STAGE_DIR="$DIR/staging" # Directory for packed binaries DIST_DIR="$DIR/dist" SOURCE_REPO_URL="https://github.com/zotero/zotero" S3_BUCKET="zotero-download" S3_CI_ZIP_PATH="ci/client" S3_DIST_PATH="client" DEPLOY_HOST="deploy.zotero" DEPLOY_PATH="www/www-production/public/download/client" BUILD_PLATFORMS="" NUM_INCREMENTALS=6 if [ "`uname`" = "Darwin" ]; then shopt -s expand_aliases fi if [ "`uname -o 2> /dev/null`" = "Cygwin" ]; then export WIN_NATIVE=1 else export WIN_NATIVE=0 fi # Make utilities (mar/mbsdiff) available in the path PATH="$DIR/xulrunner/bin:$PATH" if [ -f "$DIR/config-custom.sh" ]; then . "$DIR/config-custom.sh" fi unset DIR zotero-11.0~beta.3/app/linux/0000755000000000000000000000000015270665264012772 5ustar zotero-11.0~beta.3/app/linux/build0000644000000000000000000000160215270665264014013 0ustar #!/bin/bash set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APP_ROOT_DIR="$(dirname "$SCRIPT_DIR")" . "$APP_ROOT_DIR/config.sh" if [ -z "${1:-}" ]; then echo "Usage: $0 x64|arm64" >&2 exit 1 fi gecko_path=~/src/firefox arch=$1 if [ ! -d "$gecko_path" ]; then echo "$gecko_path is not a directory" >&2 exit 1 fi # Install required Rust version rustup toolchain install $RUST_VERSION if [ $arch = "x64" ]; then rust_target=x86_64 elif [ $arch = "arm64" ]; then rust_target=aarch64 else echo "Unknown architecture $arch" >&2 exit 1 fi rustup target add $rust_target-unknown-linux-gnu rm "$gecko_path/mozconfig" touch "$gecko_path/mozconfig" if [ $arch == "arm64" ]; then echo "ac_add_options --target=aarch64-linux-gnu" >> "$gecko_path/mozconfig" fi cat "$SCRIPT_DIR/mozconfig" >> "$gecko_path/mozconfig" cd "$gecko_path" ./mach build ./mach package zotero-11.0~beta.3/app/linux/icons/0000755000000000000000000000000015270665264014105 5ustar zotero-11.0~beta.3/app/linux/icons/icon128.png0000644000000000000000000001775515270665264016015 0ustar ‰PNG  IHDR€€Ã>aË EiCCPICC profilexڝSgTSé=÷ÞôBKˆ€”KoR RB‹€‘&*! Jˆ!¡ÙQÁEEȠˆŽŽ€ŒQ, Š Øä!¢Žƒ£ˆŠÊûá{£kּ÷æÍþµ×>ç¬ó�³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@� $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€�˜&S `ËcbãP-`'æÓ€�ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E�[-qWW.(ÎI+6aaš@.Ây™2�4àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåϫp@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD �*°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Ͱ*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼� AÈa!ڈbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”�²Q=Ô µC¹¨7„F¢ Ðdt1š� ›Ðr´=Œ6¡çЫhڏ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱw�EÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö�/{ˆCÄ7$‰C2'¹�I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +ȅä�äÃä3ää!ò[ �b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5�ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºݕN—ÐWÒËéGè—èôw †ƒLjg(›gw¯˜L¦ӋÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªު UóUËT�©^S}®FU3Sã© Ԗ«Uª�PëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u�5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§�¦½E»Yû�AÇJ'\'Gg�Î�çSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—ᄑ¹Ñ<£ÕF�FŒiÆ\ã$ãmÆmƣ&&!&KMêMîšRM¹¦)¦;L;LÇÍÌ͢Í֙5›=1×2ç›ç›כ߷`ZxZ,¶¨¶¸eI²äZ¦Yn…Z9Y¥XUZ]³F­�­%ֻ­»§§¹N“N«žÖgðñ¶ɶ©·°åØۮ¶m¶}agbg·ŮÃ“}º}�ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)Äi�S›ÓGgg¹sƒ󈋉K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ�›³›Âí¨ۯî6îiî‡ܟÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCO�gµç#/c/‘W­װ·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·ȷËOÃož_…ßC#ÿdÿzÿѧ€%g‰�A�[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA�‚­‚åÁ­!hÈ쐭!÷ç˜ΑÎi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–Dޛg1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕX�XIlK9.*®6nl¾ßüíó‡â�â ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©�¼L Lݛ:žšv m2=:½1ƒ’‘�qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³�¬Y- ¶B¦èTZ(×*²geWf¿͉Ê9–«ž+Íí̳Êې7œïŸÿíÂᒶ¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oʿ™ܔ´©«ĹdÏfÒféæÞ-ž[–ª—æ—n Ùڴ ßV´íõöEÛ/—Í(ۻƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶׹ÔÕÒ=TR�Ö+ëGǾþ�ïw- 6 U�œÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þˮ/~øÕë×Îјѡ—򗓿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüï5”‚tEXtSoftwareAdobe ImageReadyqÉe<&iTXtXML:com.adobe.xmp õÃb‚ IDATxÚì�klÕÇϼÖö®Ÿ±�„`(¢!$Z¾‘¤H<ڢ–@J¤PU¢D¼DJ¨ú€’ JZµ¼Z!ðZ _ڒ ("¤…ІG ÄIÅøÇkïÚÞÝÙÛ{îÌxgfgvgfggg×s•›�gg×óûßsÎ=÷ÎŽQ™»…�.ÁÜ.b­¿À¿nû}²–Ÿÿõßý =²Q‰,@­ �(™ÛˆøG *sÚDˆ•¹+€|äê[-•¼ÿ�›Ÿ¨é¨ôû‡À‚’À »hœ®z³µwB=ó§(‹¥=Š�sû>VL" þo}ggÇMmm­ç777Åjߕ$>�§üùÊ_úҒ’Ç(û‰åþ -©TúÃññä3K—žõGº[fÞTÑ©šTø^|íµ7ÎY±⢷::Ú†'�ÐøðÍ瘘˜ܽ{ÏeW]uåÇôǜbT�Cu,|éÅ·/»úêïìE‘‹à×¾¶_–eòúë¹ðºë®ýˆîʺ�#è̾Dkó‰'vuȕà×¾V’ÉäЂ½gÓÍiUŽ܁›Á Öú÷ìÙ{k?\ðq{{Ûüݻ߽Um¤¼¨Ž,…-K‹Ÿz}?\ðµ}‹-º^€à´gVV:óÏÐÕչ,‚>øXh@¾L/'97«˜Hĥ~øàciii–ÔÜç›0‰€�à‡¾n?.snÁ1|ݾª pDð« ߋ"øá†ïºðü¹ ?”ˆà{‡ïE |¿‘à“ú@?xø¡@¿6ðC!€~íà×\|á×UÁ¯|÷ױì„uD G—Zhí¤Ç >·e ÀÁƒ…{ˆþÂíß쉍ûIá#Rô~ýû ç׿¯°¿Ìûµ÷àK¼šž| þ½�L ¼¼(_± ´rpÑÁÇÿRiȽñVh[~M\@Eð‰ ¡påÙù±�O¬Zp9ËALðKYŽòâA*„ à‡:¨Èç[)̆׉DßB1ôð ¢ÑƒM°V"1ù{‹¾¾›`JˆÄêý±Í—ˆ‡~UP­ Ÿþ‚–J΋Ä"Ø øvâk ãT<҆ہ?ãô@à{¹S\¬7øî2{6 ÁÚ߉Ç*Ø»ïPü™ÂʋA\µ"´ð}@Õsû.à“ÿpëï‹Һ¥Äc†¯ns}K v硆 Ÿ_»H:­›îjãûHé”+±8Î|yç.�ßÞåL†™GÓAu?€Á¿ùÎ] ø 5|ñÏ<²…}^'€૰êb¯¼¼náûž ®ø,è{öyô¶N÷:H%ã/8 ún^W×ð@¨à¿üêl²§t¤o�ûÇý\<M÷ܭóûa�OÂ'€0ÁÏíݹ¯ºJë� ÐCøó{Cߋ%ç |ùÐaÈþö)ÏÁž&„˜!è«oøU@˜àç'Óþ6ô¥<{گD ú¾yEÃÀ·À–5I6eJ΃œ“aê'W@n& ٙ,—�ÎÔ|ܟݺ ò‡;LëZ9ó}K@Zc¨á×|BHáçv¼ò{û�áÛÁçpx÷ލjÐ×8ð}@ØàËoïdQ¿×`OS@ì^-èk,ø¾ lðóýý�}æyoÁžN$±õëhз¼.à×Ì„ >NÁÎ<ò›Eä%Ò׎/Y ú¾/ãýù þðˆ£1|; �û1ô5.üŠFøhöq”ÏMZ× ƒ¾æû6ZÎå3|ÜYšOñ"^ Tȴr�gW··û*€0ÂÇ/»%ÛI°öw5!üù=uff: Fø8¡3óä6ÇcøúH_o-Ðìc¦¯Þà³k�ÏW_a„Ï&t>¸Ùs°§�L¼d%Hߺ¼.ác™žžq-n­ý‚L™M›!¯Ží—Oë˛G¹3ú v˺º…¯¸€ÀøÔìË8¶_f‡’S¼âqôÝ]4—¿žà³ÞO&¤j^ÈáØ>±X&ÆÑQÊ.„ÏõöÖ5|ôÿ™Œ{ Ö+|ùÀG�Áá]—i]cî iý:àY¦¯~ácI&'ÀËs°Åz„O††!ó‹NJà—KëòøǯZ¡ޭ_ø¸=11^èâÛ !�ÁÇ �¿Ä4oÊY°G¬Wú`™¾[nløÙl–ö¦€繠\@màcÉ>ýèq“Ö5ÇæôݷÑ0—¿^ácÂǠÏK°W²Õځ4¹[ cµv1Xm]B¯ð1¸“$‘þœ‡áá8Æö‰¢4kúµèT~fû+ ï}¯‚5ýL "¿ÄÆŪ‹à[Áµn¼~‚ÀÑ*Ò*°í|ž° BÇ\ÿØؘ _TáZ?¾n_ûU¼iá$­Sè'H™Ù"bXáËï¾ٗvƒ=QÚd{�%\bˆ2 ¿ǖ‹-ajÛÙlŽEõ˜ؙ˜˜dбŸ�ïCø˜ìѠ+¯JU¶ÍT>fúfžØjm²Ë{àìÉNá;�÷Âî+¤­·¥¥ ššb º,çÙ0îädšÖýYf5—Ëњ5ÁÕ2(Bõg!hPÝgì@/ –‰ÙõuË^åDâ0ØóA<¥¾k<ÞÌà£2™,œ<™¤ð3l Go_K!˜*?Û Ä@"(˜,Ů½º8­ëtgb·ßÆ_›4ALæ›Åãö‰#|k:Ï_Æ€>}ttFFN:‚âÄ öZ ¾ ´X&°ÚO×Â)Ù\OOÉGµè[£ý?Äö‰#eţöJ‰J=ӈ@Ïæû ©·›µú‘‘1ê×3ì˜Òðó0öåþY³¯´~%^(XÑà¼äø0Â×~/}o�ë`¯|°æBnûß÷DP¿0¤‹£z¥àÇø1 ›‡mýèó›XŸŸ›…�ûÚZæBªߓˆà—Ÿ́�é–òù<ß“YqXØQðù_ÕÜ>Žñwv8†_³<@ßø=Ðü��'Kú|Žîì*öùÊ+„Â%.Z¾W+ FðýŸ½‹,p2‡Ùìǥ1ֵK´Š0r2ÃR½Øïljöÿé?܇Œ±õw¶K@úþ\5øç"øÖsø°?;“‡Â?þ¡ðMMËt¿ <šy¼˜(z»cìÜm’2ϟw×òu|û œ©TÊàóÛ;h?¿ÛØÏ_ÔníóO�§£�S^§«߳"øöS·Ñÿ |Ɏ¡ù»l»©©™M#Ôçç8ŽE÷‰D‚õóóýüj·ü {|»yûìapÿþ÷LtŸ™A]¸p!$““ÐÓÓ CCCÐÒÒ̺Œ8[߷xñi0o޼@à{Œ"ø¥nÚ¦à(�ƒ�-!k­áãöèèèìhž,ç¨d6ÏǠà{²¸ I,‹à[ÀÏfgàèÑfÚÏ:«�™ù��èî®.ÝlÞâô.{ìØ,X°00øž€ݛîîy|Óçc+>xðóÙ œä¥KϱÏ7ú|lTgžù•@á{r8•9‚oü|¼Wï“O>e‰Ÿ´-Q½4ü >_,ޏŽ~¬­­5‚ÏÄIjöqŽŒqì^n?—¿öð=Yü‚ýø˜uYžÓð§¦ÒðùçŸÁ‘#‡Õ{õ„Ù֯¯a†ïÉPðÃôëô8ð1ôõ-�öö¶9”á“alì$»Y#�N1�äÂM‚Í,¡äd?àg23ǫ-’N§ßokk[�þîÓO?cèì섎Žv–èhøÿFú÷ÒÖ>Åêôô´ M¾_›¹«ülFuác9qbl¸|x °:ôÅß/¸àk«µ †ëÓa«Àü7.X Í~ÕæÀÃÍޟr]Íb¾Ææ9v,í–lm5­¯ Aà™Åaž¼Y ³àÀþa›¬±ûÛ]Ì n¢µƒÖî]»ö¼�·,/LwÊ3è(¼÷ ³aúۣüz¸AõÀYüÌ1aèŠ�/܏¯Ÿš­oý¼AAÀûàì³ϸ�nŽÒ:N+.êÛúÚMR9Z³۶=ùÐ]wm|޶ˆåâhðyE �'„Xº„� ·´ú–�Ç(+pq*|ÎU¹/ߨâõ�_4�ÏoøÔU¥6oÞô0²Q§™sÒ"9å®C‰Ö8­�´v­YsÍÒ;ïüщDë9ŠÉ׬€ftwå[[Nç¬E€P b A@ÁRðøVS¸+�?::òá¦Mülûö—>CCÊ=iA> @sʹ¶ª®AôÑ_¯^¾|ù7ººæ�‹IÝFP>x “ù×_û$ÍüsêbŒP$‚B�¥°ë© @ŠPdUSj�ÑbâÐÔrnL²j xU8Xc*|Q—UŒDP}ø ³Yµ!æԚ'. rn}²Îðj\ÀëZ?8hV ¯Z㼛–ïY:€z¾¶B š«vͲҨœ«Ö(ETœ) B€\ØûçQ©ná£K *‘¢ *‘¢2÷ÊÿÛïlãhÓIEND®B`‚zotero-11.0~beta.3/app/linux/icons/icon32.png0000644000000000000000000001074315270665264015715 0ustar ‰PNG  IHDR szzô EiCCPICC profilexڝSgTSé=÷ÞôBKˆ€”KoR RB‹€‘&*! Jˆ!¡ÙQÁEEȠˆŽŽ€ŒQ, Š Øä!¢Žƒ£ˆŠÊûá{£kּ÷æÍþµ×>ç¬ó�³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@� $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€�˜&S `ËcbãP-`'æÓ€�ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E�[-qWW.(ÎI+6aaš@.Ây™2�4àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåϫp@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD �*°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Ͱ*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼� AÈa!ڈbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”�²Q=Ô µC¹¨7„F¢ Ðdt1š� ›Ðr´=Œ6¡çЫhڏ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱw�EÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö�/{ˆCÄ7$‰C2'¹�I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +ȅä�äÃä3ää!ò[ �b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5�ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºݕN—ÐWÒËéGè—èôw †ƒLjg(›gw¯˜L¦ӋÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªު UóUËT�©^S}®FU3Sã© Ԗ«Uª�PëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u�5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§�¦½E»Yû�AÇJ'\'Gg�Î�çSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—ᄑ¹Ñ<£ÕF�FŒiÆ\ã$ãmÆmƣ&&!&KMêMîšRM¹¦)¦;L;LÇÍÌ͢Í֙5›=1×2ç›ç›כ߷`ZxZ,¶¨¶¸eI²äZ¦Yn…Z9Y¥XUZ]³F­�­%ֻ­»§§¹N“N«žÖgðñ¶ɶ©·°åØۮ¶m¶}agbg·ŮÃ“}º}�ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)Äi�S›ÓGgg¹sƒ󈋉K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ�›³›Âí¨ۯî6îiî‡ܟÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCO�gµç#/c/‘W­װ·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·ȷËOÃož_…ßC#ÿdÿzÿѧ€%g‰�A�[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA�‚­‚åÁ­!hÈ쐭!÷ç˜ΑÎi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–Dޛg1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕX�XIlK9.*®6nl¾ßüíó‡â�â ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©�¼L Lݛ:žšv m2=:½1ƒ’‘�qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³�¬Y- ¶B¦èTZ(×*²geWf¿͉Ê9–«ž+Íí̳Êې7œïŸÿíÂᒶ¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oʿ™ܔ´©«ĹdÏfÒféæÞ-ž[–ª—æ—n Ùڴ ßV´íõöEÛ/—Í(ۻƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶׹ÔÕÒ=TR�Ö+ëGǾþ�ïw- 6 U�œÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þˮ/~øÕë×Îјѡ—򗓿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüï5”‚tEXtSoftwareAdobe ImageReadyqÉe<&iTXtXML:com.adobe.xmp i1sIDATxÚėßoUǿ3;?vv�6[jcë‹`…€$¾D úâƒ�Hƒ�Z+„È …•hŒ1š˜ðhâ�7l4Mš l݂„„”’ҝîîüºž3;³;w;Ûζ€79{ï޽;ŸsÏýÞsç*B$E¡‚T™zóÓ%¬QžÿìH6PD ªÅP65®[Nx�¿޳ô�ð É„ÜF .NMMŸ9J²…’[™ï'æ Ïcó„ë6­ÑpE½îŠééß?d&³y¶Ù#ôìÅõC‡Äé̾v`E«?é㨧û,Ë,ӗå$ìúÄÇ`¦¢¦Öÿ¡ÁcÔÄüðVÑrÁ¯^…21RHsT‹¨=0iwô)öC;úV&œëcc]³Je¡æ�y$ð° B ο‡Q¿xâöíLx: Z®°‹Ô,ÓmŠv;=Å"D©Ôüo<½ Z®5/‡#žNô³B`N%ªãÀÿáGÙ cŒ¿�Yð®è*¸mP^{µ îœûÁIi ¸­��òÔpWxdªb³´ͨÝûòkøü)‰±pð\ž�Þàþϗá}/‡^‚~ìèºðžD˜þ™‡÷ÅW’ðP´`Ë—§__¨ݫ)yáauîû'¨®Fâu§˜'Æ"Ñå�óž޹Bë5ùãÇ#x$¸x v]^xæä‚|þ\EÚï…›¢ëîºn˵S„ÝàþÅKð~º$%!ehÆۣ=Áٖ–VÃÃÊ<ç>Y• ÕgGÐøæB{¦k2í¥CP”Âîy.jµ\x㹧é뢶\8+¨¿;.'›؉àÛïb œŽ“1¥½{Pzò ~ׄC“íæÍ[èëëë¶ 3ŽT\Pu2O¼µÎe‹�þ}»Qu˜››§>Õ?ÇÖáQ:&¬l d�ç$¡è8WŸ~¢㤴_yÕz³³Jß–+ÁR°…3M³ý&Nf�•éòVޗ‰<‚³í"ffþ¦>fÎÀ6Ø%ý#Ðu۷>.ià~¹vH; ™߽v–ᠿ߂©)¼P(tË÷ΥV«áÆìo0­ýP‹ Û`ØVWUµÛ6Ü<¼9>D¥råÇöFk΢Ó ƒ°%¸äÀ•+3عsǦàuÝââ]T«ˤ» �ÃÞ —pœ&'ÝnšL…/wªZ€aè‘ÂyŸ3˜ۚ¦u…'D1»~½rrdd×;œT6êƒØ ]7¢Y3œ“P'|rò—ñänغš‘ ĵ†[øƻLv‡ëäVĹÀНKêv€gîñF!sÿ`¡ø|IãB�IEND®B`‚zotero-11.0~beta.3/app/linux/icons/icon64.png0000644000000000000000000001301215270665264015712 0ustar ‰PNG  IHDR@@ªiqÞ EiCCPICC profilexڝSgTSé=÷ÞôBKˆ€”KoR RB‹€‘&*! Jˆ!¡ÙQÁEEȠˆŽŽ€ŒQ, Š Øä!¢Žƒ£ˆŠÊûá{£kּ÷æÍþµ×>ç¬ó�³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@� $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€�˜&S `ËcbãP-`'æÓ€�ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E�[-qWW.(ÎI+6aaš@.Ây™2�4àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåϫp@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD �*°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Ͱ*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼� AÈa!ڈbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”�²Q=Ô µC¹¨7„F¢ Ðdt1š� ›Ðr´=Œ6¡çЫhڏ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱw�EÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö�/{ˆCÄ7$‰C2'¹�I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +ȅä�äÃä3ää!ò[ �b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5�ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºݕN—ÐWÒËéGè—èôw †ƒLjg(›gw¯˜L¦ӋÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªު UóUËT�©^S}®FU3Sã© Ԗ«Uª�PëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u�5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§�¦½E»Yû�AÇJ'\'Gg�Î�çSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—ᄑ¹Ñ<£ÕF�FŒiÆ\ã$ãmÆmƣ&&!&KMêMîšRM¹¦)¦;L;LÇÍÌ͢Í֙5›=1×2ç›ç›כ߷`ZxZ,¶¨¶¸eI²äZ¦Yn…Z9Y¥XUZ]³F­�­%ֻ­»§§¹N“N«žÖgðñ¶ɶ©·°åØۮ¶m¶}agbg·ŮÃ“}º}�ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)Äi�S›ÓGgg¹sƒ󈋉K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ�›³›Âí¨ۯî6îiî‡ܟÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCO�gµç#/c/‘W­װ·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·ȷËOÃož_…ßC#ÿdÿzÿѧ€%g‰�A�[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA�‚­‚åÁ­!hÈ쐭!÷ç˜ΑÎi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–Dޛg1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕX�XIlK9.*®6nl¾ßüíó‡â�â ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©�¼L Lݛ:žšv m2=:½1ƒ’‘�qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³�¬Y- ¶B¦èTZ(×*²geWf¿͉Ê9–«ž+Íí̳Êې7œïŸÿíÂᒶ¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oʿ™ܔ´©«ĹdÏfÒféæÞ-ž[–ª—æ—n Ùڴ ßV´íõöEÛ/—Í(ۻƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶׹ÔÕÒ=TR�Ö+ëGǾþ�ïw- 6 U�œÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þˮ/~øÕë×Îјѡ—򗓿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüï5”‚tEXtSoftwareAdobe ImageReadyqÉe<&iTXtXML:com.adobe.xmp óTû6)IDATxÚä›[lUǿ™�Ëîl»e¡k°Ei‰`¡j4HM‰ñ P$Dž¼ Æ…4 MQHÄò&êð‰‹!&Þ #µ-¡²¤Ýn»۽ïΌ眙ݝݝ½Ìe{�ätfÎìt÷÷�ïüÏw¾3Cɲ óyc¬þƒ?^9¶rÿê¯_öÌjÈ Ïo�äùnIšÕ «}€ª²ed¬ªÎ[U>½Q@½‘~©¹ٻßí, •òr Ÿ)ý\q}áϕ ε߃�ãñxx|<´{ٲ»�’*بðôµkÿ¼ÚѱüsË"9MðÚÏ ½ÞÙyïaE² ÿ‹žp·p†BáÛOcãl‡Ç[$™ôù-F‡ Ä+U3Fª› ðÙcAp.B'aĕ)+‚Y÷G…�Kðꆙèba,7 Ps ^õrÊÔ08GàÍÇs¾’ èù/×ϳ¾’ ƒªBbµ\ˆêýfà©S§P!ÿW–ɞ|.w,“[ò×õ¯é]§Vvû޻&àeØs`8Âr.™aœÀ0<Ð ûÞpyèz´¼,ÉJÁ?\ÒJÅð…Êg‹Ôw•£ð¶‹`Ex-€”Wà ÷9ãHyOÉ]×5@æüÃð¶Š`5«º4”È`-sú,RõŸK´@ÛúÌæ�@w­±oÎê /]½éo�W èU+�}ñ9Ëð•dÀTZÜ*¼<: ÉýŸèŒõG:½óV]áMÀ2|4†à `FÖêÈ— xO¹ݶÀWï·†%Q‚Ծ§ OB"’ ê5«K;ÒАîœ [Ç!·§ÛÛl„·!´þď$–'Р‰ûA {A=æñ ¶Â[Ö;à3¿þŽ ðƒþ8¯žcÑã¶?o;¼¥HÐx�óé/놽¹s$züÞ]uƒtHQÆ ²ƒèÝèñ„¬ÁK‘¤ Ïàtç@DωàAêŸJ¥Œ{€]i¬ô¡/‘ éN‘³{ìöTÛҺÀã}"‘4Û,Âë%}?7ï‡ÒYóÄ&$zëë�ch²Un©ƒ®¼xî<¤O�)H�¥×$<èÎU¤õë �÷“““öŽÕàñ8Ÿú¦·Hé Õ|Hôöìª;ü(Š:+=%ÀØ �ÓUɏ¨¢eܓ›AÒÀçˆÊÂgg‰T{;P îŠð¸>‘ŒA0DÚê²26–·O~ÜÒȨîP§5@ò豚2Bzׅýý@§.<Ã0àpP …aàßAp:qœµ> Ô�Ý^¼ÒW6¥eáª]/N®’t2°,‹àhϐút: ãã!ÆP xŽãÉõï¶u,G7q@ګùñ5�µÀc×OŸ<�M ªçû*]/6ëm‚&¯/ä …O 7¥O$�L&Q¿Ïó¤(Fbͤō-Wát•cÃcE‹ E)omª[“©ôž‚µ <¿úAð>t?jí ŒŒQ‹‡óð‰(=ŽãÌåtOÞç[ ; –nÝòÏx¿ßýýý8á…7բѱzKËbÔÏÜS�U7Îâ„B, ��íyuÚk ¾¢2q0‰µ÷õýM¦™8ôĥ–‡ÌnY „Á”VfÔ)-›3€Qøh4zݰ._þëhW×#beÅ_„CPQ”4­,Û ž}l"oZ�ãYb¼dz:<±Áõø3µ¶üŋŽA/*­==Ÿ=ÝݽöY—Ëu—$‰ª«Öó%©¬(µu$ᡴ8“kùZáC¡ÐàٳgzwîÜq�þ‡Êx±–}aü†~ÉÀ 6?U>…n­*øå�۠óÂSᦠõÀ1K jX*[ù. é¸Åyž /PLó†áÒ*<^ªþҔÆYCÌV÷×z´òPn-¯͕1ƬÝä*€Ô|}þ€ýñK¶\IEND®B`‚zotero-11.0~beta.3/app/linux/icons/symbolic.svg0000644000000000000000000000043315270665264016447 0ustar zotero-11.0~beta.3/app/linux/mozconfig0000644000000000000000000000135415270665264014713 0ustar ac_add_options --enable-bootstrap mk_add_options AUTOCLOBBER=1 # These don't all affect the stub, but they can't hurt, and we'll want them if # we switch to custom XUL builds ac_add_options MOZ_ENABLE_JS_DUMP=1 ac_add_options MOZ_ENABLE_FORKSERVER= ac_add_options MOZ_TELEMETRY_REPORTING= ac_add_options MOZ_DATA_REPORTING= ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --disable-debug-symbols ac_add_options --disable-webrtc # This causes aarch64 build of 140.0esr to fail #ac_add_options --disable-eme export MOZILLA_OFFICIAL=1 export RELEASE_OR_BETA=1 MOZ_REQUIRE_SIGNING= ac_add_options --enable-official-branding # Build updater without MAR signature verification ac_add_options --enable-unverified-updates zotero-11.0~beta.3/app/linux/set_launcher_icon0000644000000000000000000000053615270665264016405 0ustar #!/bin/bash -e # # Run this to update the launcher file with the current path to the application icon # APPDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if [ -w "$APPDIR"/zotero.desktop ]; then sed -i -e "s@^Icon=.*@Icon=$APPDIR/icons/icon128.png@" "$APPDIR"/zotero.desktop else echo "$APPDIR"/zotero.desktop is not writable exit 1 fi zotero-11.0~beta.3/app/linux/update_updater0000644000000000000000000000202015270665264015715 0ustar #!/bin/bash set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$SCRIPT_DIR" if [ $# -ne 1 ]; then echo "Usage: $0 " exit 1 fi version="$1" for arch in x86_64 aarch64; do package="firefox-${version}.en-US.linux-${arch}.tar.xz" if [ $arch = 'aarch64' ]; then arch="arm64" fi if [ ! -f "$package" ]; then echo "Error: Package not found: $package" exit 1 fi echo "Extracting updater from $package..." tar --extract --xz --file="$package" --to-stdout "firefox/updater" > "updater-$arch" # Add missing RUNPATH to custom fx140 builds, which is missing for unclear reasons. # Without this, the updater fails looking for libmozsqlite3.so. patchelf --set-rpath '$ORIGIN' "updater-$arch" done echo "Creating updater.tar.xz..." if [ `uname` = "Darwin" ]; then tar=gtar else tar=tar fi $tar --owner=0 --group=0 --numeric-owner --no-xattrs --mode=0755 -cJvf updater.tar.xz updater-x86_64 updater-arm64 rm updater-x86_64 updater-arm64 echo "Done: updater.tar.xz created" zotero-11.0~beta.3/app/linux/zotero0000644000000000000000000000136715270665264014246 0ustar #!/bin/bash # Increase open files limit # # Mozilla file functions (OS.File.move()/copy(), NetUtil.asyncFetch/asyncCopy()) can leave file # descriptors open for a few seconds (even with an explicit inputStream.close() in the case of # the latter), so a source installation that copies ~500 translators and styles (with fds for # source and target) can exceed the default 1024 limit. # Current hard-limit on Ubuntu 16.10 is 4096 ulimit -n 4096 # Allow profile downgrade for Zotero export MOZ_ALLOW_DOWNGRADE=1 # Don't create dedicated profile (default-esr) export MOZ_LEGACY_PROFILES=1 # Use wayland backend when available export MOZ_ENABLE_WAYLAND=1 CALLDIR="$(dirname "$(readlink -f "$0")")" "$CALLDIR/zotero-bin" -app "$CALLDIR/app/application.ini" "$@" zotero-11.0~beta.3/app/linux/zotero.desktop0000644000000000000000000000102415270665264015704 0ustar [Desktop Entry] Name=Zotero Exec=bash -c "$(dirname $(realpath $(echo %k | sed -e 's/^file:\\/\\///')))/zotero -url %U" Icon=zotero.ico Type=Application Terminal=false Categories=Office; MimeType=text/plain;x-scheme-handler/zotero;application/x-research-info-systems;text/x-research-info-systems;text/ris;application/x-endnote-refer;application/x-inst-for-Scientific-info;application/mods+xml;application/rdf+xml;application/x-bibtex;text/x-bibtex;application/marc;application/vnd.citationstyles.style+xml X-GNOME-SingleWindow=true zotero-11.0~beta.3/app/modules/0000755000000000000000000000000015270665264013303 5ustar zotero-11.0~beta.3/app/scripts/0000755000000000000000000000000015270665264013322 5ustar zotero-11.0~beta.3/app/scripts/10.0_release_build_and_deploy0000644000000000000000000000341415270665264020702 0ustar #!/bin/bash set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APP_ROOT_DIR="$(dirname "$SCRIPT_DIR")" ROOT_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")" . "$APP_ROOT_DIR/config.sh" CHANNEL="release" BRANCH="10.0" BUILD_ONLY=0 if [ "`uname`" = "Darwin" ]; then export SAFARI_APPEX="$ROOT_DIR/../safari-web-extension-builds/ZoteroSafariExtension.appex" export SAFARI_EXT_RESOURCES="$ROOT_DIR/../safari-web-extension-builds/release/safari" export SAFARI_APP_EXTENSION="$ROOT_DIR/../safari-app-extension-builds/release/ZoteroSafariExtension.appex" if [ ! -d "$SAFARI_APPEX" ]; then echo "Safari extension stub not found at $SAFARI_APPEX -- aborting" >&2 exit 1 fi if [ ! -f "$SAFARI_EXT_RESOURCES/manifest.json" ]; then echo "Safari web extension not found in $SAFARI_EXT_RESOURCES -- aborting" >&2 exit 1 fi if [ ! -d "$SAFARI_APP_EXTENSION" ]; then echo "Safari App Extension not found at $SAFARI_APP_EXTENSION -- aborting" >&2 exit 1 fi fi while getopts "b" opt; do case $opt in b) BUILD_ONLY=1 ;; esac shift $((OPTIND-1)); OPTIND=1 done cd "$SCRIPT_DIR" ./check_requirements hash=`./get_repo_branch_hash $BRANCH` ./check_app_matches_commit $hash source_dir=`./get_commit_files $hash` build_dir=`mktemp -d` function cleanup { rm -rf "$source_dir" rm -rf "$build_dir" } trap cleanup EXIT ./prepare_build -s "$source_dir" -o "$build_dir" -c $CHANNEL -m $hash VERSION="`cat \"$build_dir/version\"`" ./build_for_deploy -d "$build_dir" -p $BUILD_PLATFORMS -c $CHANNEL if [ $BUILD_ONLY -eq 1 ]; then echo echo "Build only -- skipping deploy." echo "To deploy, run on the deploy server:" echo " $DEPLOY_PATH/deploy $CHANNEL $VERSION $BUILD_PLATFORMS" else ssh $DEPLOY_HOST "$DEPLOY_PATH/deploy" $CHANNEL "$VERSION" $BUILD_PLATFORMS fi zotero-11.0~beta.3/app/scripts/add_omni_file0000644000000000000000000000217015270665264016016 0ustar #!/bin/bash set -euo pipefail # # Zip a file directly into app/omni.ja in staging/ # # Zip paths are relative to the current directory, so this should be run from # the client build/ directory # SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="$(dirname "$SCRIPT_DIR")" . "$ROOT_DIR/config.sh" function usage { cat >&2 <&2 exit 1 fi if [ ! -f "$SAFARI_EXT_RESOURCES/manifest.json" ]; then echo "Safari web extension not found in $SAFARI_EXT_RESOURCES -- aborting" >&2 exit 1 fi if [ ! -d "$SAFARI_APP_EXTENSION" ]; then echo "Safari App Extension not found at $SAFARI_APP_EXTENSION -- aborting" >&2 exit 1 fi fi while getopts "b" opt; do case $opt in b) BUILD_ONLY=1 ;; esac shift $((OPTIND-1)); OPTIND=1 done cd "$SCRIPT_DIR" ./check_requirements hash=`./get_repo_branch_hash $BRANCH` ./check_app_matches_commit $hash source_dir=`./get_commit_files $hash` build_dir=`mktemp -d` function cleanup { rm -rf "$source_dir" rm -rf "$build_dir" } trap cleanup EXIT ./prepare_build -s "$source_dir" -o "$build_dir" -c $CHANNEL -m $hash VERSION="`cat \"$build_dir/version\"`" ./build_for_deploy -d "$build_dir" -p $BUILD_PLATFORMS -c $CHANNEL if [ $BUILD_ONLY -eq 1 ]; then echo echo "Build only -- skipping deploy." echo "To deploy, run on the deploy server:" echo " $DEPLOY_PATH/deploy $CHANNEL $VERSION $BUILD_PLATFORMS" else ssh $DEPLOY_HOST "$DEPLOY_PATH/deploy" $CHANNEL "$VERSION" $BUILD_PLATFORMS fi zotero-11.0~beta.3/app/scripts/build_and_run0000644000000000000000000000360715270665264016060 0ustar #!/bin/bash -e SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APP_ROOT_DIR="$(dirname "$SCRIPT_DIR")" ROOT_DIR="$(dirname $APP_ROOT_DIR)" # Set ZOTERO_PROFILE environment variable to choose profile profile_args=() if [ -n "${ZOTERO_PROFILE:-}" ]; then profile_args=(-p "$ZOTERO_PROFILE") fi FORCE_FULL=0 NO_REBUILD=0 SKIP_BUNDLED_FILES=0 DEBUGGER=0 while getopts "rfnbd" opt; do case $opt in r) # Deprecated -- rebuilding is now the default echo "-r is deprecated -- rebuilding is now the default (use -n to skip)" >&2 ;; f) FORCE_FULL=1 ;; n) NO_REBUILD=1 ;; b) SKIP_BUNDLED_FILES=1 ;; d) DEBUGGER=1 ;; \?) exit 1 ;; esac done # Remove options from $@ shift $((OPTIND-1)) if [ $NO_REBUILD -eq 0 ]; then PARAMS="" if [ $DEBUGGER -eq 1 ]; then PARAMS="-t" fi if [ $FORCE_FULL -eq 1 ]; then PARAMS="$PARAMS -f" fi # Check if build watch is running # If not, run now if ! ps u | grep js-build/build.js | grep -v grep > /dev/null; then echo "Running JS build process" echo cd $ROOT_DIR # TEMP: --openssl-legacy-provider avoids a build error in pdf.js NODE_OPTIONS=--openssl-legacy-provider node js-build/build.js echo fi "$SCRIPT_DIR/dir_build" $PARAMS fi PARAMS="" if [ $SKIP_BUNDLED_FILES -eq 1 ]; then PARAMS="$PARAMS -ZoteroSkipBundledFiles" fi if [ $DEBUGGER -eq 1 ]; then PARAMS="$PARAMS -jsdebugger" else PARAMS="$PARAMS -jsconsole" fi if [ "`uname`" = "Darwin" ]; then command="Zotero.app/Contents/MacOS/zotero" elif [ "`uname`" = "Linux" ]; then if [[ "`uname -m`" = "aarch64" ]]; then command="Zotero_linux-arm64/zotero" else command="Zotero_linux-x86_64/zotero" fi elif [ "`uname -o 2> /dev/null`" = "Cygwin" ]; then command="Zotero_win-x64/zotero.exe" else echo "Unknown platform" >&2 exit 1 fi echo "$APP_ROOT_DIR/staging/$command" "${profile_args[@]}" -ZoteroDebugText $PARAMS "$@" zotero-11.0~beta.3/app/scripts/build_for_deploy0000644000000000000000000001006715270665264016572 0ustar #!/bin/bash # # Builds Zotero and uploads to S3 and deploy server, but does not make the build live. # To make the build live, run the deploy script on the deploy server (or via SSH). # set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="$(dirname "$SCRIPT_DIR")" . "$ROOT_DIR/config.sh" function usage { cat >&2 < "$TEMP_DIR/version_info/build-${os_name}.json" chmod g+w "$TEMP_DIR/version_info/build-${os_name}.json" done rsync -rv "$TEMP_DIR/version_info/" $DEPLOY_HOST:"$channel_deploy_path/$VERSION/" rm -rf "$STAGE_DIR"/* echo echo "Build $VERSION uploaded successfully." echo "To deploy, run on the deploy server:" echo " ./deploy $CHANNEL $VERSION $PLATFORMS" zotero-11.0~beta.3/app/scripts/check_app_matches_commit0000644000000000000000000000202615270665264020236 0ustar #!/bin/bash set -euo pipefail # Check that app/ in this checkout matches app/ in the commit being built. # # The build-and-deploy scripts run the build scripts and config from the local # checkout but build source files from the tip of the remote branch, so a stale # checkout can silently build with the wrong Gecko version or omni patches. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")" if [ -z "${1:-}" ]; then echo "Usage: $0 commit-hash" >&2 exit 1 fi hash=$1 cd "$ROOT_DIR" if ! git cat-file -e "$hash^{commit}" 2>/dev/null; then git fetch -q origin fi if ! git cat-file -e "$hash^{commit}" 2>/dev/null; then echo "Commit $hash not found locally after fetching -- aborting" >&2 exit 1 fi if ! git diff --quiet HEAD "$hash" -- app/; then echo >&2 echo "app/ files in this checkout differ from app/ in $hash:" >&2 echo >&2 git --no-pager diff --stat HEAD "$hash" -- app/ >&2 echo >&2 echo "Update this checkout (e.g., 'git pull') and try again" >&2 exit 1 fi zotero-11.0~beta.3/app/scripts/check_requirements0000644000000000000000000000767715270665264017146 0ustar #!/bin/bash set -uo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APP_ROOT_DIR="$(dirname "$SCRIPT_DIR")" ROOT_DIR="$(dirname "$APP_ROOT_DIR")" . "$APP_ROOT_DIR/config.sh" . "$SCRIPT_DIR/utils.sh" cd "$ROOT_DIR" platform=`get_current_platform` FAIL_CMD='echo -e \033[31;1mFAIL\033[0m' FAIL_CMD_INLINE='echo -n -e \033[31;1mFAIL\033[0m' FAILED=0 hdr_start=`tput smul` hdr_stop=`tput rmul` echo "${hdr_start}Checking build requirements:${hdr_stop}" echo echo -n "Checking for Node.js: " which node || { $FAIL_CMD_INLINE; FAILED=1; } node_version=$(node -v | cut -c 2-) echo -n "Checking Node version: $node_version" if [ $(echo $node_version | cut -d '.' -f1 ) -ge "18" ]; then echo else echo -n " -- must be 18 or later " { $FAIL_CMD; FAILED=1; } fi echo -n "Checking for Git LFS: " which git-lfs || { $FAIL_CMD_INLINE; FAILED=1; } echo "Checking for Git LFS checkouts: " lfs_files=$(git lfs ls-files -n 2> /dev/null) || { $FAIL_CMD; FAILED=1; } for lfs_file in $lfs_files; do echo -n " - $lfs_file: " file_type=$(file -b $lfs_file) echo -n $file_type" " if [ -z "$(echo -n $file_type | grep XZ)" ]; then { $FAIL_CMD_INLINE; FAILED=1; echo " -- run 'git lfs install; git lfs pull'"; } fi echo done echo -n "Checking for perl: " which perl || { $FAIL_CMD; FAILED=1; } echo -n "Checking for python3: " which python3 || { $FAIL_CMD; FAILED=1; } echo -n "Checking for curl: " which curl || { $FAIL_CMD; FAILED=1; } echo -n "Checking for zip: " which zip || { $FAIL_CMD; FAILED=1; } echo -n "Checking for unzip: " which unzip || { $FAIL_CMD; FAILED=1; } echo -n "Checking for xz: " which xz || { $FAIL_CMD; FAILED=1; } echo -n "Checking for awk: " which awk || { $FAIL_CMD; FAILED=1; } echo -n "Checking for rsync: " which rsync || { $FAIL_CMD; FAILED=1; } if [ $platform = "w" ]; then echo -n "Checking for 7z: " which 7z || { $FAIL_CMD; FAILED=1; } echo -n "Checking for rcedit: " which rcedit || { $FAIL_CMD; FAILED=1; echo " -- Install with fetch_rcedit"; } fi if [ $platform = "w" ]; then echo echo "${hdr_start}Checking Windows packaging requirements:${hdr_stop}" echo echo -n "Checking for upx: " which upx || { $FAIL_CMD; FAILED=1; } echo -n "Checking for uuidgen: " which uuidgen || { $FAIL_CMD; FAILED=1; } echo -n "Checking for code-signing script: " if [ -x "$APP_ROOT_DIR/win/codesign" ]; then echo "$APP_ROOT_DIR/win/codesign" else $FAIL_CMD FAILED=1 fi echo -n "Checking for Unicode NSIS: " if [ -x "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" ]; then echo "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" else $FAIL_CMD FAILED=1 fi plugin_path=$(cd "$NSIS_DIR\\Plugins\\x86-unicode" && pwd) plugins="AppAssocReg ApplicationID InvokeShellVerb nsProcess ShellLink UAC" echo "Checking for NSIS plugins in $plugin_path" for i in $plugins; do echo -n " $i.dll: " if [ -f "$plugin_path/$i.dll" ]; then echo OK else $FAIL_CMD FAILED=1 fi done fi if [ $platform = "m" ]; then echo echo "${hdr_start}Checking Mac packaging requirements:${hdr_stop}" echo echo -n "Checking for codesign: " which /usr/bin/codesign || { $FAIL_CMD; FAILED=1; } fi echo echo "${hdr_start}Checking distribution requirements:${hdr_stop}" echo echo -n "Checking for Mozilla ARchive (MAR) tool: " which mar || { $FAIL_CMD; FAILED=1; echo " -- Install with fetch_mar_tools"; } echo -n "Checking for mbsdiff: " which mbsdiff || { $FAIL_CMD; FAILED=1; echo " -- Install with fetch_mar_tools"; } echo -n "Checking for rsync: " which rsync || { $FAIL_CMD; FAILED=1; } echo -n "Checking for sha512sum/shasum: " which sha512sum 2>/dev/null || which shasum 2>/dev/null || { $FAIL_CMD; FAILED=1; } echo -n "Checking for AWS CLI: " which aws || { $FAIL_CMD; FAILED=1; } echo -n "Checking for AWS S3 access: " aws s3 ls $S3_BUCKET/$S3_DIST_PATH | sed 's/^[[:blank:]]*//' || { $FAIL_CMD; FAILED=1; } echo -n "Checking for deploy host directory access: " ssh $DEPLOY_HOST ls -d $DEPLOY_PATH || { $FAIL_CMD; FAILED=1; } exit $FAILED zotero-11.0~beta.3/app/scripts/codesign_local0000644000000000000000000000347115270665264016217 0ustar #!/bin/bash set -euo pipefail # Perform ad-hoc code signing of Zotero.app for local usage # # Currently we sign only the Word dylib, since that's necessary for Zotero developers to work on # Word integration on Apple Silicon. If we discover other problems, we can uncomment some of the # other lines. If you're making a custom build, you can modify this file to sign the entire build # instead of just the bare minimum needed for development. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="$(dirname "$SCRIPT_DIR")" . "$ROOT_DIR/config.sh" if [ -z "${1:-}" ]; then echo "Usage: $0 path/to/staging/Zotero.app" exit 1 fi APPDIR=$1 DEVELOPER_ID="-" entitlements_file="$ROOT_DIR/mac/entitlements.xml" #/usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" \ # "$APPDIR/Contents/MacOS/XUL" \ # "$APPDIR/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater" #find "$APPDIR/Contents" -name '*.dylib' -exec /usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" {} \; #find "$APPDIR/Contents" -name '*.app' -exec /usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" {} \; #/usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" "$APPDIR/Contents/MacOS/zotero" # Skip signing of Safari extension, since it's not present for local builds # Sign final app package #echo #/usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" "$APPDIR" # Verify app #/usr/bin/codesign --verify -vvvv "$APPDIR" find "$APPDIR/Contents" -name 'libZoteroWordIntegration.dylib' -exec /usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" {} \; zotero-11.0~beta.3/app/scripts/createprecomplete.py0000644000000000000000000000631615270665264017405 0ustar # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ # Creates the precomplete file containing the remove and rmdir application # update instructions which is used to remove files and directories that are no # longer present in a complete update. The current working directory is used for # the location to enumerate and to create the precomplete file. import io import os def get_build_entries(root_path): """Iterates through the root_path, creating a list for each file and directory. Excludes any file paths ending with channel-prefs.js. """ rel_file_path_set = set() rel_dir_path_set = set() for root, dirs, files in os.walk(root_path): for file_name in files: parent_dir_rel_path = root[len(root_path) + 1 :] rel_path_file = os.path.join(parent_dir_rel_path, file_name) rel_path_file = rel_path_file.replace("\\", "/") if not ( rel_path_file.endswith("channel-prefs.js") or rel_path_file.endswith("update-settings.ini") or "/ChannelPrefs.framework/" in rel_path_file or rel_path_file.startswith("ChannelPrefs.framework/") or "/UpdateSettings.framework/" in rel_path_file or rel_path_file.startswith("UpdateSettings.framework/") or "distribution/" in rel_path_file ): rel_file_path_set.add(rel_path_file) for dir_name in dirs: parent_dir_rel_path = root[len(root_path) + 1 :] rel_path_dir = os.path.join(parent_dir_rel_path, dir_name) rel_path_dir = rel_path_dir.replace("\\", "/") + "/" if rel_path_dir.find("distribution/") == -1: rel_dir_path_set.add(rel_path_dir) rel_file_path_list = list(rel_file_path_set) rel_file_path_list.sort(reverse=True) rel_dir_path_list = list(rel_dir_path_set) rel_dir_path_list.sort(reverse=True) return rel_file_path_list, rel_dir_path_list def generate_precomplete(root_path): """Creates the precomplete file containing the remove and rmdir application update instructions. The given directory is used for the location to enumerate and to create the precomplete file. """ rel_path_precomplete = "precomplete" # If inside a Mac bundle use the root of the bundle for the path. if os.path.basename(root_path) == "Resources": root_path = os.path.abspath(os.path.join(root_path, "../../")) rel_path_precomplete = "Contents/Resources/precomplete" precomplete_file_path = os.path.join(root_path, rel_path_precomplete) # Open the file so it exists before building the list of files and open it # in binary mode to prevent OS specific line endings. precomplete_file = io.open(precomplete_file_path, mode="wt", newline="\n") rel_file_path_list, rel_dir_path_list = get_build_entries(root_path) for rel_file_path in rel_file_path_list: precomplete_file.write('remove "' + rel_file_path + '"\n') for rel_dir_path in rel_dir_path_list: precomplete_file.write('rmdir "' + rel_dir_path + '"\n') precomplete_file.close() if __name__ == "__main__": generate_precomplete(os.getcwd()) zotero-11.0~beta.3/app/scripts/dev_build_and_deploy0000644000000000000000000000232515270665264017402 0ustar #!/bin/bash set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APP_ROOT_DIR="$(dirname "$SCRIPT_DIR")" ROOT_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")" . "$APP_ROOT_DIR/config.sh" CHANNEL="dev" BRANCH="main" if [ "`uname`" = "Darwin" ]; then export SAFARI_APPEX="$ROOT_DIR/../safari-web-extension-builds/ZoteroSafariExtension.appex" export SAFARI_EXT_RESOURCES="$ROOT_DIR/../safari-web-extension-builds/dev/safari" if [ ! -d "$SAFARI_APPEX" ]; then echo "Safari extension stub not found at $SAFARI_APPEX -- aborting" >&2 exit 1 fi if [ ! -f "$SAFARI_EXT_RESOURCES/manifest.json" ]; then echo "Safari web extension not found in $SAFARI_EXT_RESOURCES -- aborting" >&2 exit 1 fi fi cd "$SCRIPT_DIR" ./check_requirements hash=`./get_repo_branch_hash $BRANCH` ./check_app_matches_commit $hash source_dir=`./get_commit_files $hash` build_dir=`mktemp -d` function cleanup { rm -rf "$source_dir" rm -rf "$build_dir" } trap cleanup EXIT ./prepare_build -s "$source_dir" -o "$build_dir" -c $CHANNEL -m $hash VERSION="`cat \"$build_dir/version\"`" ./build_for_deploy -d "$build_dir" -p $BUILD_PLATFORMS -c $CHANNEL -i 1 ssh $DEPLOY_HOST "$DEPLOY_PATH/deploy" $CHANNEL "$VERSION" $BUILD_PLATFORMS zotero-11.0~beta.3/app/scripts/dir_build0000644000000000000000000001037115270665264015204 0ustar #!/bin/bash set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APP_ROOT_DIR="$(dirname "$SCRIPT_DIR")" ROOT_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")" . "$APP_ROOT_DIR/config.sh" . "$SCRIPT_DIR/utils.sh" function usage { cat >&2 <&2 usage ;; esac done ;; a) arch="$OPTARG" ;; f) force_full=1 ;; \?) usage ;; esac done # Derive platform from host if not provided if [[ -z $platform ]]; then case "$(uname -s)" in Darwin) platform="m" ;; Linux) platform="l" ;; CYGWIN*|MINGW*) platform="w" ;; esac fi # Handle architecture rules if [[ $platform = "m" ]]; then # No arch for Mac — ignore anything provided if [[ -n $arch ]]; then echo "Ignoring -a $arch for Mac build (universal binary)" >&2 fi arch="" else # Windows / Linux: derive arch if not supplied if [[ -z $arch ]]; then # An x64 build of Git for Windows runs emulated on Windows on ARM, where it # reports x86_64 from `uname -m`, while `uname -s` reports the native # architecture if [[ $platform = "w" && "$(uname -s)" == *ARM64* ]]; then arch="arm64" else case "$(uname -m)" in arm64|aarch64) arch="arm64" ;; x86_64) arch="x64" ;; esac fi fi fi CHANNEL="source" # Remove stale symlinks left behind in build/ when source files are deleted, # which would otherwise break the build if [ -d "$ROOT_DIR/build" ]; then # With -L, -type l matches only broken symlinks stale_links=$(find -L "$ROOT_DIR/build" -type l -print) if [ -n "$stale_links" ]; then echo "Removing stale symlinks from build/:" >&2 echo "$stale_links" >&2 while IFS= read -r link; do rm "$link" done <<< "$stale_links" fi fi # Try to update the staged build in place instead of doing a full rebuild if [[ $force_full -eq 0 ]]; then incr_cmd=("$SCRIPT_DIR/incremental_update" -p "$platform") [[ -n $arch ]] && incr_cmd+=( -a "$arch" ) [[ $devtools -eq 1 ]] && incr_cmd+=( -t ) set +e "${incr_cmd[@]}" incr_status=$? set -e if [ $incr_status -ne 2 ]; then exit $incr_status fi fi hash=$(git -C "$ROOT_DIR" rev-parse --short HEAD) build_dir=$(mktemp -d) manifest_tmp="" cleanup() { rm -rf "$build_dir" if [ -n "$manifest_tmp" ]; then rm -f "$manifest_tmp" fi } trap cleanup EXIT # Snapshot the state of build/ and app/ before the build for later incremental # updates app_hash="" if [ -d "$ROOT_DIR/build" ]; then manifest_tmp=$(mktemp) generate_build_manifest "$ROOT_DIR/build" > "$manifest_tmp" app_hash=$(generate_app_hash "$APP_ROOT_DIR") fi "$SCRIPT_DIR/prepare_build" -s "$ROOT_DIR/build" -o "$build_dir" -c "$CHANNEL" -m "$hash" build_cmd=("$APP_ROOT_DIR/build.sh" -d "$build_dir" -p "$platform" -c "$CHANNEL" -s -q) [[ -n $arch ]] && build_cmd+=( -a "$arch" ) [[ $devtools -eq 1 ]] && build_cmd+=( -t ) "${build_cmd[@]}" # Save manifest for future incremental updates if [ -n "$manifest_tmp" ]; then if [[ -z "${ZOTERO_TEST:-}" ]] || [[ "${ZOTERO_TEST:-}" == "0" ]]; then include_tests=0 else include_tests=1 fi { echo "#format=2" echo "#include_tests=$include_tests" echo "#devtools=$devtools" echo "#app_hash=$app_hash" cat "$manifest_tmp" } > "$STAGE_DIR/.build-manifest" fi # Ad-hoc-sign the Word dylib so it works on Apple Silicon. This only needs to # happen when the staged build is fully rebuilt -- incremental updates don't # touch the dylib. if [[ $platform = "m" ]] && [[ "$(uname -s)" = "Darwin" ]]; then "$SCRIPT_DIR/codesign_local" "$STAGE_DIR/Zotero.app" fi echo Done zotero-11.0~beta.3/app/scripts/fetch_mar_tools0000644000000000000000000000235215270665264016417 0ustar #!/bin/bash set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APP_ROOT_DIR="$(dirname "$SCRIPT_DIR")" cd "$APP_ROOT_DIR" mkdir -p "xulrunner/bin" if [ "`uname`" = "Darwin" ]; then # Mozilla has Linux executables where the Mac files should be, so supply our own Mac builds curl -o "xulrunner/bin/mar" https://zotero-download.s3.us-east-1.amazonaws.com/tools/mac/102.11.0esr/mar curl -o "xulrunner/bin/mbsdiff" https://zotero-download.s3.us-east-1.amazonaws.com/tools/mac/102.11.0esr/mbsdiff elif [ "`uname -o 2> /dev/null`" = "Cygwin" ]; then # Mozilla doesn't seem to provide Windows versions via its file server anymore, so supply our own curl -o "xulrunner/bin/mar.exe" https://zotero-download.s3.us-east-1.amazonaws.com/tools/win/102.11.0esr/mar.exe curl -o "xulrunner/bin/mbsdiff.exe" https://zotero-download.s3.us-east-1.amazonaws.com/tools/win/102.11.0esr/mbsdiff.exe else curl -o "xulrunner/bin/mar" https://ftp.mozilla.org/pub/firefox/nightly/2022/05/2022-05-30-09-39-43-mozilla-central/mar-tools/linux64/mar curl -o "xulrunner/bin/mbsdiff" https://ftp.mozilla.org/pub/firefox/nightly/2022/05/2022-05-30-09-39-43-mozilla-central/mar-tools/linux64/mbsdiff fi chmod 755 xulrunner/bin/mar xulrunner/bin/mbsdiff zotero-11.0~beta.3/app/scripts/fetch_onecrl0000644000000000000000000000131315270665264015676 0ustar #!/bin/bash set -euo pipefail # Replace Firefox's bundled OneCRL list with the current one from Remote Settings # # Usage: fetch_onecrl FILE URL="https://firefox.settings.services.mozilla.com/v1/buckets/security-state/collections/onecrl/changeset?_expected=0" file="$1" tmp_file="$file.tmp" curl -sSf --retry 3 "$URL" -o "$tmp_file" python3 -c ' import json, sys with open(sys.argv[1]) as f: changeset = json.load(f) if not changeset["changes"]: raise Exception("OneCRL list is empty") with open(sys.argv[2], "w") as f: json.dump({"data": changeset["changes"], "timestamp": changeset["timestamp"]}, f) print("Fetched {} OneCRL records".format(len(changeset["changes"]))) ' "$tmp_file" "$file" rm "$tmp_file" zotero-11.0~beta.3/app/scripts/fetch_rcedit0000644000000000000000000000047415270665264015675 0ustar #!/bin/bash set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="$(dirname "$SCRIPT_DIR")" cd "$ROOT_DIR" mkdir -p "xulrunner/bin" curl -L -o "xulrunner/bin/rcedit.exe" https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x86.exe chmod 755 xulrunner/bin/rcedit zotero-11.0~beta.3/app/scripts/fetch_xulrunner0000644000000000000000000011352115270665264016463 0ustar #!/bin/bash set -euo pipefail # Copyright (c) 2011 Zotero # Center for History and New Media # George Mason University, Fairfax, Virginia, USA # http://zotero.org # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APP_ROOT_DIR="$(dirname "$SCRIPT_DIR")" . "$APP_ROOT_DIR/config.sh" . "$SCRIPT_DIR/utils.sh" cd "$APP_ROOT_DIR" usage() { cat >&2 <<'DONE' Usage: fetch_xulrunner.sh -p [-a ARCH] Required -p PLATFORM m (Mac), w (Windows), l (Linux) Optional / Conditional -a ARCH - Mac: disallowed (builds are universal) - Windows: x64 | arm64 | win32 - Linux: x64 (or x86_64) | arm64 If omitted on Windows/Linux, all standard archs are fetched. DONE exit 1 } BUILD_MAC=0 BUILD_WIN=0 BUILD_LINUX=0 arch="" while getopts 'p:a:' opt; do case $opt in p) for (( i=0; i<${#OPTARG}; i++ )); do case ${OPTARG:i:1} in m) BUILD_MAC=1;; w) BUILD_WIN=1;; l) BUILD_LINUX=1;; *) echo "Invalid platform: ${OPTARG:i:1}"; echo; usage;; esac done;; a) arch="$OPTARG";; *) usage;; esac shift $((OPTIND-1)); OPTIND=1 done # Require at least one platform if [[ $BUILD_MAC == 0 ]] && [[ $BUILD_WIN == 0 ]] && [[ $BUILD_LINUX == 0 ]]; then usage fi # Sanity‑check arch flag vs platform selections if [[ $BUILD_MAC == 1 ]]; then [[ -n $arch ]] && { echo "-a is not allowed for Mac" >&2; echo; usage; } fi if [[ $BUILD_WIN == 1 || $BUILD_LINUX == 1 ]]; then # arch optional; if provided validate & map aliases now if [[ -n $arch ]]; then if [[ $BUILD_WIN == 1 && $BUILD_LINUX == 1 ]]; then echo "-a cannot be used when building both Windows and Linux simultaneously" >&2; echo; usage fi if [[ $BUILD_WIN == 1 ]]; then case $arch in x64) arch="win-x64" ;; arm64) arch="win-arm64" ;; win32|win-x64|win-arm64) ;; *) echo "Invalid Windows arch: $arch" >&2; echo; usage;; esac fi if [[ $BUILD_LINUX == 1 ]]; then [[ $arch == x64 ]] && arch="x86_64" case $arch in x86_64|arm64) ;; *) echo "Invalid Linux arch: $arch" >&2; echo; usage;; esac fi fi fi function get_utf16_chars { str=$(echo -n "$1" | xxd -p | fold -w 2 | sed -r 's/(.+)/\\\\x{\1}\\\\x{00}/') # Add NUL padding if [ -n "${2:-}" ]; then # Multiply characters x 2 for UTF-16 for i in `seq 1 $(($2 * 2))`; do str+=$(echo '\\x{00}') done fi echo $str | xargs | sed 's/ //g' } # # Make various modifications to the stock Firefox app # function modify_omni { platform=$1 mkdir omni mv omni.ja omni cd omni # omni.ja is an "optimized" ZIP file, so use a script from Mozilla to avoid a warning from unzip # here and to make it work after rezipping below python3 "$APP_ROOT_DIR/scripts/optimizejars.py" --deoptimize ./ ./ ./ rm -f omni.ja.log unzip omni.ja rm omni.ja rm -r chrome/pdfjs rm -r modules/narrate #rm -r modules/translation rm actors/AboutTranslations{Parent,Child}.sys.mjs rm actors/CookieBanner{Parent,Child}.sys.mjs rm actors/PictureInPictureChild.sys.mjs rm actors/ThumbnailsChild.sys.mjs rm actors/Translations{Engine,}{Parent,Child}.sys.mjs rm actors/AudioPlayback{Parent,Child}.sys.mjs replace_line 'BROWSER_CHROME_URL:.+' 'BROWSER_CHROME_URL: "chrome:\/\/zotero\/content\/zoteroPane.xhtml",' modules/AppConstants.sys.mjs # Used by OSKeyStore as the master-key label, visible in macOS Keychain Access. # Verify that OSKeyStore still derives the label from MOZ_APP_BASENAME, so a # future Mozilla change to a hardcoded string doesn't silently rebrand the # keychain entry back to "Firefox Encrypted Storage". replace_line 'MOZ_APP_BASENAME: "Firefox"' 'MOZ_APP_BASENAME: "Zotero"' modules/AppConstants.sys.mjs check_line 'STORE_LABEL: AppConstants\.MOZ_APP_BASENAME \+ " Encrypted Storage"' modules/OSKeyStore.sys.mjs # https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/internals/preferences.html # # It's not clear that most of these do anything anymore when not compiled in, but just in case replace_line 'MOZ_REQUIRE_SIGNING:' 'MOZ_REQUIRE_SIGNING: false \&\&' modules/AppConstants.sys.mjs replace_line 'MOZ_DATA_REPORTING:' 'MOZ_DATA_REPORTING: false \&\&' modules/AppConstants.sys.mjs replace_line 'MOZ_TELEMETRY_REPORTING:' 'MOZ_TELEMETRY_REPORTING: false \&\&' modules/AppConstants.sys.mjs replace_line 'MOZ_CRASHREPORTER:' 'MOZ_CRASHREPORTER: false \&\&' modules/AppConstants.sys.mjs replace_line 'MOZ_UPDATE_CHANNEL:.+' 'MOZ_UPDATE_CHANNEL: "none",' modules/AppConstants.sys.mjs replace_line '"https:\/\/[^\/]+mozilla.com.+"' '""' modules/AppConstants.sys.mjs # Don't use Mozilla Maintenance Service on Windows replace_line 'MOZ_MAINTENANCE_SERVICE:' 'MOZ_MAINTENANCE_SERVICE: false \&\&' modules/AppConstants.sys.mjs # Continue using app.update.auto in prefs.js on Windows replace_line 'PER_INSTALLATION_PREFS_PLATFORMS = \["win"\]' 'PER_INSTALLATION_PREFS_PLATFORMS = []' modules/UpdateUtils.sys.mjs # Prompt if major update is available instead of installing automatically on restart replace_line 'if \(!updateAuto\) \{' 'if (update.type == "major") { LOG("UpdateService:_selectAndInstallUpdate - prompting because it is a major update"); AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_SHOWPROMPT_PREF); Services.obs.notifyObservers(update, "update-available", "show-prompt"); return; } if (!updateAuto) {' modules/UpdateService.sys.mjs # Avoid console warning about resource://gre/modules/FxAccountsCommon.js replace_line 'const logins = this._data.logins;' 'const logins = this._data.logins; if (this._data.logins.length != -1) return;' modules/LoginStore.sys.mjs # Prevent error during network requests replace_line 'async lazyInit\(\) \{' 'async lazyInit() { if (this.features) return false;' modules/UrlClassifierExceptionListService.sys.mjs # Silence CrashManager "Could not get children of [...]/Crash Reports/events" spam replace_line '\/\/ Missing events folders are allowed' '\/\/ Missing events folders are allowed (silence warning) if (ex) return entries;' modules/CrashManager.sys.mjs # Several services pull in services-settings (which we strip) and throw # at profile-after-change. Remove their #init() methods to prevent errors. replace_line 'async #init\(\) \{' 'async #init() {} async _unused_init() {' modules/EssentialDomainsRemoteSettings.sys.mjs replace_line 'async #init\(\) \{' 'async #init() {} async _unused_init() {' modules/SimpleURIUnknownSchemesRemoteObserver.sys.mjs # RemotePermissionService uses a top-level import, so even loading the # module throws replace_line 'import \{ RemoteSettings \} from "resource:\/\/services-settings\/remote-settings.sys.mjs";' \ 'const RemoteSettings = () => ({ on() {}, get: async () => [] });' \ modules/RemotePermissionService.sys.mjs replace_line 'pref\("network.captive-portal-service.enabled".+' 'pref("network.captive-portal-service.enabled", false);' greprefs.js replace_line 'pref\("network.connectivity-service.enabled".+' 'pref("network.connectivity-service.enabled", false);' greprefs.js replace_line 'pref\("toolkit.telemetry.server".+' 'pref("toolkit.telemetry.server", "");' greprefs.js replace_line 'pref\("toolkit.telemetry.unified".+' 'pref("toolkit.telemetry.unified", false);' greprefs.js replace_line 'pref\("media.gmp-manager.url".+' 'pref("media.gmp-manager.url", "");' greprefs.js # # # Disable transaction timeout # perl -pi -e 's/let timeoutPromise/\/*let timeoutPromise/' modules/Sqlite.jsm # perl -pi -e 's/return Promise.race\(\[transactionPromise, timeoutPromise\]\);/*\/return transactionPromise;/' modules/Sqlite.jsm # rm -f jsloader/resource/gre/modules/Sqlite.jsm # # Disable unwanted components remove_line '(RemoteSettings|services-|telemetry|Telemetry|URLDecorationAnnotationsService)' components/components.manifest file="modules/ActorManagerParent.sys.mjs" # Remove deleted actors # Entries in the JSWINDOWACTORS/JSPROCESSACTORS literals: remove_between '^ AudioPlayback: \{' '^ },' $file remove_between '^ CookieBanner: \{' '^ },' $file remove_between '^ Thumbnails: \{' '^ },' $file remove_between '^ Translations: \{' '^ },' $file remove_between '^ TranslationsEngine: \{' '^ },' $file # Entries added conditionally after the literals: remove_between '^ JSWINDOWACTORS\.AboutTranslations = \{' '^ \};' $file remove_between '^ JSWINDOWACTORS\.PictureInPictureLauncher = \{' '^ \};' $file remove_between '^ JSWINDOWACTORS\.PictureInPictureToggle = \{' '^ \};' $file remove_between '^ JSWINDOWACTORS\.PictureInPicture = \{' '^ \};' $file # Do not trigger LoginManager event that logs an error on autocomplete submission remove_line 'DOMInputPasswordAdded: \{\},' $file # On Mac/Linux, ignore relative paths in PATH in Subprocess.pathSearch(), used when a bare command is passed to Utilities.Internal.subprocess() if [[ $platform != win* ]]; then replace_line 'let path = PathUtils.join\(dir, bin\);' 'if (!dir.startsWith("\/")) continue; let path = PathUtils.join(dir, bin);' modules/subprocess/subprocess_unix.sys.mjs fi # Remove unwanted files pushd modules rm Bookmarks* rm FxAccounts* echo '' > FingerprintingWebCompatService.sys.mjs echo '' > PartitioningExceptionListService.sys.mjs rm Places* echo '' > PlacesExpiration.sys.mjs echo '' > PlacesFrecencyRecalculator.sys.mjs rm -rf services-settings/* touch services-settings/remote-settings.sys.mjs # Causes a startup error -- try an empty file or a shim instead? #rm Telemetry* rm URLDecorationAnnotationsService.sys.mjs popd pushd chrome/toolkit/content/mozapps/extensions rm -rf default-theme popd # This file loads remote-settings.sys.mjs, but if it's empty Zotero crashes replace_line 'async #init\(\) \{' 'async #init() { if (true) { return; }' modules/URLQueryStrippingListService.sys.mjs # Clear most WebExtension manifest properties replace_line 'manifest = normalized.value;' 'manifest = normalized.value; if (this.type == "extension") { if (!manifest.applications?.zotero?.id) { this.manifestError("applications.zotero.id not provided"); } if (!manifest.applications?.zotero?.update_url) { this.manifestError("applications.zotero.update_url not provided"); } if (!manifest.applications?.zotero?.strict_max_version) { this.manifestError("applications.zotero.strict_max_version not provided"); } manifest.browser_specific_settings = undefined; manifest.content_scripts = []; manifest.permissions = []; manifest.host_permissions = []; manifest.web_accessible_resources = undefined; manifest.experiment_apis = {}; }' modules/Extension.sys.mjs # Use applications.zotero instead of applications.gecko replace_line 'let bss = manifest.applications\?.gecko' 'let bss = manifest.applications?.zotero' modules/addons/XPIInstall.sys.mjs replace_line 'manifest.applications\?.gecko' 'manifest.applications?.zotero' modules/Extension.sys.mjs # When installing addon, use app version instead of toolkit version for targetApplication replace_line "id: TOOLKIT_ID," "id: '$APP_ID'," modules/addons/XPIInstall.sys.mjs # Set strictCompatibility to false in beta/dev/source builds to skip strict_max_version check replace_line 'addon.strictCompatibility = true;' \ 'let version = Services.appinfo.version; addon.strictCompatibility = !version.includes("-beta") && !version.includes("-dev") && !version.includes("SOURCE");' modules/addons/XPIInstall.sys.mjs # In beta/dev/source builds, ignore the persisted strictCompatibility flag for already-installed # plugins, so plugins installed on a stable build (where the flag was set to true) aren't marked # incompatible after upgrading. The manifest isn't re-parsed on app upgrade, so the flag set at # install time sticks around. replace_line '!this\.addon\.strictCompatibility' \ '(!this.addon.strictCompatibility || Services.appinfo.version.includes("-beta") || Services.appinfo.version.includes("-dev") || Services.appinfo.version.includes("SOURCE"))' modules/addons/XPIInstall.sys.mjs replace_line '!this\.strictCompatibility &&' \ '(!this.strictCompatibility || Services.appinfo.version.includes("-beta") || Services.appinfo.version.includes("-dev") || Services.appinfo.version.includes("SOURCE")) &&' modules/addons/XPIDatabase.sys.mjs # Accept zotero@chnm.gmu.edu for target application to allow Zotero 6 plugins to remain # installed in Zotero 7 replace_line "if \(targetApp.id == Services.appinfo.ID\) \{" "if (targetApp.id == 'zotero\@chnm.gmu.edu') targetApp.id = '$APP_ID'; if (targetApp.id == Services.appinfo.ID) {" modules/addons/XPIDatabase.sys.mjs # TEMP: Skip addons without ids until we figure out what's going on with the default theme. # This fixes plugin updating and other things. replace_line 'return addons;' 'return addons.filter(addon => addon.id);' modules/addons/XPIDatabase.sys.mjs # For updates, look for applications.zotero instead of applications.gecko in manifest.json and # use the app id and version for strict_min_version/strict_max_version comparisons replace_line 'gecko: \{\},' 'zotero: {},' modules/addons/AddonUpdateChecker.sys.mjs replace_line 'if \(!\("gecko" in applications\)\) \{' 'if (!("zotero" in applications)) {' modules/addons/AddonUpdateChecker.sys.mjs replace_line '"gecko not in application entry' '"zotero not in application entry' modules/addons/AddonUpdateChecker.sys.mjs replace_line 'let app = getProperty\(applications, "gecko", "object"\);' 'let app = getProperty(applications, "zotero", "object");' modules/addons/AddonUpdateChecker.sys.mjs replace_line "id: TOOLKIT_ID," "id: '$APP_ID'," modules/addons/AddonUpdateChecker.sys.mjs replace_line 'lazy.AddonManagerPrivate.webExtensionsMinPlatformVersion' '"7.0"' modules/addons/AddonUpdateChecker.sys.mjs replace_line 'result.targetApplications.push' 'false && result.targetApplications.push' modules/addons/AddonUpdateChecker.sys.mjs # In beta/dev/source builds, don't set strictCompatibility on parsed update entries so that # AddonUpdateChecker doesn't reject an available update whose maxVersion is lower than the # current (non-stable) app version. replace_line 'result\.strictCompatibility = appEntry\.maxVersion != "\*";' \ 'let appVer = Services.appinfo.version; result.strictCompatibility = appEntry.maxVersion != "*" && !appVer.includes("-beta") && !appVer.includes("-dev") && !appVer.includes("SOURCE");' modules/addons/AddonUpdateChecker.sys.mjs # Set uninstall flag to true if the update config has it set replace_line 'targetApplications: \[appEntry\],' \ 'targetApplications: \[appEntry\], uninstall: getProperty(update, "uninstall", "boolean"),' modules/addons/AddonUpdateChecker.sys.mjs # Prevent automatic installation of default theme # (chrome/toolkit/content/mozapps/extensions/default-theme, removed above) replace_line 'this.maybeInstallBuiltinAddon\(' 'if (false) this.maybeInstallBuiltinAddon(' modules/addons/XPIProvider.sys.mjs # Don't log a warning when checking 'distribution/extensions' for addons replace_line 'logger.warn\(`Checking' 'logger.debug(`Checking' modules/addons/XPIProvider.sys.mjs # Allow addon installation by bypassing confirmation dialogs. If we want a confirmation dialog, # we need to either add gXPInstallObserver from browser-addons.js [1][2] or provide our own with # Ci.amIWebInstallPrompt [3]. # # [1] https://searchfox.org/mozilla-esr102/rev/5a6d529652045050c5cdedc0558238949b113741/browser/base/content/browser.js#1902-1923 # [2] https://searchfox.org/mozilla-esr102/rev/5a6d529652045050c5cdedc0558238949b113741/browser/base/content/browser-addons.js#201 # [3] https://searchfox.org/mozilla-esr102/rev/5a6d529652045050c5cdedc0558238949b113741/toolkit/mozapps/extensions/AddonManager.sys.mjs#3114-3124 replace_line 'if \(info.addon.installPermissions\) \{' 'if (false) {' modules/AddonManager.sys.mjs replace_line '\} else if \(info.addon.sitePermissions\) \{' '} else if (false) {' modules/AddonManager.sys.mjs replace_line '\} else if \(requireConfirm\) \{' '} else if (false) {' modules/AddonManager.sys.mjs # Make addon listener methods wait for promises, to allow calling asynchronous plugin `shutdown` # and `uninstall` methods in our `onInstalling` handler replace_line 'callAddonListeners\(aMethod' 'async callAddonListeners(aMethod' modules/AddonManager.sys.mjs # Don't need this one to be async, but we can't easily avoid modifying its `listener[aMethod].apply()` call replace_line 'callManagerListeners\(aMethod' 'async callManagerListeners(aMethod' modules/AddonManager.sys.mjs replace_line 'AddonManagerInternal.callAddonListeners.apply\(AddonManagerInternal, aArgs\);' \ 'return AddonManagerInternal.callAddonListeners.apply(AddonManagerInternal, aArgs);' modules/AddonManager.sys.mjs replace_line 'listener\[aMethod\].apply\(listener, aArgs\);' \ 'let maybePromise = listener[aMethod].apply(listener, aArgs); if (maybePromise && maybePromise.then) await maybePromise;' modules/AddonManager.sys.mjs replace_line 'AddonManagerPrivate.callAddonListeners' 'await AddonManagerPrivate.callAddonListeners' modules/addons/XPIInstall.sys.mjs replace_line 'let uninstall = \(\) => \{' 'let uninstall = async () => {' modules/addons/XPIInstall.sys.mjs replace_line 'cancelUninstallAddon\(aAddon\)' 'async cancelUninstallAddon(aAddon)' modules/addons/XPIInstall.sys.mjs # Check for `uninstall` flag in update config and uninstall the addon if set replace_line 'if \(update && !this.addon.location.locked\) \{' \ 'if (update && !this.addon.location.locked) { if (update.uninstall) { let aId = this.addon.id; logger.debug(`AddonUpdateChecker: uninstall addon \${aId} with uninstall flag`); let addon = await AddonManager.getAddonByID(aId); if (addon && (addon.permissions & AddonManager.PERM_CAN_UNINSTALL)) { try { addon.uninstall(); } catch (err) { logger.error(`AddonUpdateChecker: error uninstalling addon \${aId} with uninstall flag`, err); } sendUpdateAvailableMessages(this, null); return; } else { logger.error(`AddonUpdateChecker: addon \${aId} with uninstall flag not found or cannot be uninstalled`); sendUpdateAvailableMessages(this, null); return; } } ' modules/addons/XPIInstall.sys.mjs # Prevent login manager from trying to load FxAccountsCommon.sys.mjs replace_line 'return login.hostname == lazy.FXA_PWDMGR_HOST;' 'return false;' modules/storage-json.sys.mjs # No idea why this is necessary, but without it initialization fails with "TypeError: "constructor" is read-only" replace_line 'LoginStore.prototype.constructor = LoginStore;' '\/\/LoginStore.prototype.constructor = LoginStore;' modules/LoginStore.sys.mjs # # # Allow proxy password saving # perl -pi -e 's/get _inPrivateBrowsing\(\) \{/get _inPrivateBrowsing() {if (true) { return false; }/' components/nsLoginManagerPrompter.js # # # Change text in update dialog # perl -pi -e 's/A security and stability update for/A new version of/' chrome/en-US/locale/en-US/mozapps/update/updates.properties # perl -pi -e 's/updateType_major=New Version/updateType_major=New Major Version/' chrome/en-US/locale/en-US/mozapps/update/updates.properties # perl -pi -e 's/updateType_minor=Security Update/updateType_minor=New Version/' chrome/en-US/locale/en-US/mozapps/update/updates.properties # perl -pi -e 's/update for &brandShortName; as soon as possible/update as soon as possible/' chrome/en-US/locale/en-US/mozapps/update/updates.dtd # # Set available locales cp "$APP_ROOT_DIR/assets/multilocale.txt" res/multilocale.txt # Use Zotero URL opening in Mozilla dialogs (e.g., app update dialog) replace_line 'function openURL\(aURL\) \{' 'function openURL(aURL) {let {Zotero} = ChromeUtils.importESModule("chrome:\/\/zotero\/content\/zotero.mjs"); Zotero.launchURL(aURL); if (true) { return; }' chrome/toolkit/content/global/contentAreaUtils.js # # Modify Add-ons window # # Prevent display: block from overriding display: none on
s replace_line 'display: block !important;' 'display: block;' chrome/toolkit/content/global/elements/panel-list.css file="chrome/toolkit/content/mozapps/extensions/aboutaddons.css" echo >> $file # Hide the search bar and the whole sidebar, since we only ever show plugins and the main pane # is already headed "Manage Your Plugins" echo '.main-search, #sidebar { display: none; }' >> $file # Center the content in the window now that it isn't offset by the sidebar echo '#full { grid-template-columns: 1fr; }' >> $file echo '#content { max-width: calc(var(--page-main-content-width) + var(--main-margin-start)); margin-inline: auto; }' >> $file echo '.main-heading { margin-top: 2em; }' >> $file # Hide Details/Permissions tabs in addon details so we only show details echo 'addon-details > button-group { display: none !important; }' >> $file # Hide "Run on sites with restrictions" row and helper message echo '.addon-detail-row-quarantined-domains { display: none; }' >> $file echo '.addon-detail-help-row:has([data-l10n-id="addon-detail-quarantined-domains-help"]) { display: none; }' >> $file # Hide "Report" button from plugin menu echo 'addon-card addon-options hr:first-of-type { display: none }' >> $file echo '[data-l10n-id="report-addon-button"] { display: none }' >> $file # Hide "Debug Addons" and "Manage Extension Shortcuts" echo 'panel-item[action="debug-addons"], panel-item[action="reset-update-states"] + hr, panel-item[action="manage-shortcuts"] { display: none }' >> $file # Show cursor feedback on plugin homepage links echo '.addon-detail-row-homepage .text-link { cursor: pointer; color: LinkText; }' >> $file echo '.addon-detail-row-homepage .text-link:hover { text-decoration: underline; }' >> $file file="chrome/toolkit/content/mozapps/extensions/aboutaddons-utils.mjs" # Hide unsigned-addon warning replace_line 'export function isUnsignedWarningMessageDisabled\(\) \{' \ 'export function isUnsignedWarningMessageDisabled() {if (true) return true;' $file # Use our own localized string for blocked plugin notification replace_line 'details-notification-hard-blocked-\$\{typeSuffix\}' 'plugins-blocked-plugin' $file # Hide Recommendations tab in sidebar and recommendations in main pane replace_line 'function isDiscoverEnabled\(\) \{' 'function isDiscoverEnabled() {return false;' $file file="chrome/toolkit/content/mozapps/extensions/components/addon-details.mjs" # Hide Private Browsing setting in addon details replace_line 'pbRow\.' '\/\/pbRow.' $file replace_line 'let isAllowed = await isAllowedInPrivateBrowsing' '\/\/let isAllowed = await isAllowedInPrivateBrowsing' $file # Open plugin links in external browser replace_line 'let homepageURL = homepageRow.querySelector\(\"a\"\);' 'let homepageURL = homepageRow.querySelector(\"\.text-link\");' $file replace_line 'homepageURL.href = addon.homepageURL;' 'homepageURL.setAttribute("href", addon.homepageURL);' $file replace_line '<\/a>' \ '