Commit graph

154 commits

Author SHA1 Message Date
Dan Stillman
ce20a5f228 Ship legacy Safari App Extension alongside the web extension on Mac
Developer ID-signed Safari web extensions load only in Safari 18.4 and
later -- older Safari blocks them at the code-signing layer -- so macOS
11 and 12 users, whose Safari versions top out at 16.6 and 17.6, lost
the connector with the web extension conversion.

Embed the prebuilt legacy App Extension ($SAFARI_APP_EXTENSION, set by
the deploy scripts) at Contents/PlugIns/ZoteroSafariExtension.appex with
the historical bundle identifier, and move the web extension to
Contents/PlugIns/ZoteroSafariWebExtension.appex with a new
.SafariWebExtension identifier. The web extension's
SFSafariAppExtensionBundleIdentifiersToReplace key causes Safari
versions that can load it to hide the App Extension and migrate its
enabled state, while older Safari shows only the App Extension.

Also remove the removed-files entries for the App Extension's
resources, which would otherwise delete them on update.

https://forums.zotero.org/discussion/132925/
2026-07-28 07:24:27 -04:00
Dan Stillman
6fb30346e6 Bundle Safari web extension instead of Safari App Extension
Some checks are pending
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
The connector is now a Safari web extension, so the bundled appex is a
static wrapper stub whose placeholder resources are replaced at build
time with a connector build via $SAFARI_EXT_RESOURCES. The stub only
needs to be rebuilt when the native wrapper project changes, not for
connector releases.
2026-07-22 15:11:23 -04:00
Dan Stillman
dea2fb8491 Fix build_for_deploy dying silently on an empty incrementals file 2026-07-10 15:26:52 -04:00
Dan Stillman
094d5cc2b6
Update staged builds in place for faster dev builds (#5994)
After a full build, dir_build saves a manifest of build/ files to
staging/.build-manifest. On subsequent runs, if all changed files are
ones that build.sh copies into omni.ja unmodified (chrome/, components/,
resource/, and test/ when tests are staged), zip just those files into
the staged omni.ja instead of rebuilding, taking rebuilds from ~15
seconds to ~0.3 seconds on an M1 Mac. Files are prescreened by size and
mtime so that only changed files need to be hashed. Zotero .ftl files
are also updated at their localization/<locale>/ paths, and test files
are also copied to the staged tests/ directory.

Any other change triggers an automatic full rebuild: files transformed
by build.sh (defaults/, chrome.manifest, version, translators/, styles/,
mozilla .ftl files, CSL locales), removed files, changes to build inputs
in app/ (detected via a size/mtime fingerprint, with xulrunner runtimes
covered by the hash-* files written by fetch_xulrunner), or requesting
tests or devtools that the staged build doesn't include.

Other changes:

- dir_build no longer takes -q and always skips omni.ja compression and
  optimization, which only matter for distribution builds made via
  build.sh. Use -f (dir_build or build_and_run) to force a full rebuild.
- build_and_run now always rebuilds. -r is deprecated, and -n skips the
  rebuild and just launches the app.
- build_and_run no longer passes -purgecaches. Startup caches are
  invalidated automatically when the BuildID changes, which now happens
  whenever omni.ja is modified (including via add_omni_file), so
  relaunching an unchanged build can use the startup cache.
- build_and_run and runtests.sh invoke js-build directly instead of via
  'npm run', which saves ~270ms of npm overhead per build.
- The Word integration dylib is now ad-hoc-signed by dir_build, and only
  on full rebuilds, since incremental updates don't invalidate the
  existing signature. This also covers test builds, which were never
  signed before.
- dir_build removes broken symlinks left in build/ when source files are
  deleted, which previously broke rsync in prepare_build.
2026-07-08 10:07:58 -04:00
Tom Najdek
95ee1c616c
Fix xulrunner_hash to read the hash from openssl output on LibreSSL/macOS
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run
Previous command only worked with OpenSSL's labeled output where the hash is the second field; the update also handles LibreSSL (macOS), which prints just the bare hash.
2026-07-01 20:14:30 +02:00
Dan Stillman
40b272c46b Add -b (build-only) flag to beta_build_and_deploy 2026-06-30 17:44:49 -04:00
Dan Stillman
55434d14a1
Encrypt API key and WebDAV password using OS keychain (#5897)
Wraps the values stored in nsILoginManager with OSKeyStore, which derives
its master key from Keychain on macOS, DPAPI on Windows, and libsecret on
Linux. A copy of the profile alone is no longer enough to extract these
credentials.

Existing plaintext entries are mirrored once per session to a new
"(encrypted)" realm but preserved in the original realm so a user can
still downgrade to a release that doesn't know about encryption. Active
credential changes (sign in, sign out, password change) write to the
encrypted realm only and remove the legacy entry. A future version can
clear any remaining legacy entries on startup.

Patches MOZ_APP_BASENAME in the bundled runtime so the keychain master
key is labeled "Zotero Encrypted Storage" rather than "Firefox Encrypted
Storage", with a check_line guard so a future Mozilla change to the
OSKeyStore label format fails the build instead of silently rebranding
the entry. Also fixes check_line to take an explicit file argument.
2026-06-12 11:16:22 -04:00
Abe Jellinek
714d4416f8 Suppress Crash Reports and RemoteSettings console spam
Some checks failed
CI / Build, Upload, Test (push) Has been cancelled
2026-05-13 14:40:51 -04:00
windingwind
fda72a3434
Fix beta build plugin max version compatibility check (#5903)
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run
Ignore persisted compatibility flag from previous app version in non-stable releases to fix disabled for wrongly using old flag
Ignore max version compatibility for plugin update check on non-stable releases
Relevant: https://forums.zotero.org/discussion/131096/

---------

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2026-05-05 14:26:50 -04:00
Mi Ramon
462357e49e
"Updating add-ons" → "Updating plugins" (#5893) 2026-04-27 14:50:51 -04:00
Dan Stillman
1ed1fab55b Switch to 9.0 branch for 9.0 releases 2026-04-10 13:40:13 -04:00
Dan Stillman
a0198e2571 Support pinned incrementals from deploy server
Fetch pinned-incrementals-{platform} from the deploy server and merge
with the normal last-N incrementals list. This ensures incremental MARs
are always built from key versions (e.g., last release of each major
version) regardless of how many newer versions have been released.
2026-04-09 14:35:18 -04:00
Dan Stillman
e96d65f0ed Fix manage_incrementals on Cygwin
Remove Windows path conversion that was needed for aws s3 cp but
breaks scp (which interprets the drive letter colon as a hostname).
2026-04-09 12:32:03 -04:00
Dan Stillman
1a89239a13 Separate build and deploy for release scripts
Split build_and_deploy into build_for_deploy (builds, uploads to S3,
rsyncs manifests) and a deploy script in client-downloads (updates
updates JSON, updates incrementals, runs deploy command).

Release scripts support -b flag for build-only (deploy later manually).
Beta/dev/test scripts build and deploy automatically via SSH.

Move incrementals files from S3 to deploy server. Update DEPLOY_PATH to
root of client-downloads so manifests and deploy script paths are
derived from it.
2026-04-09 11:37:05 -04:00
Dan Stillman
ea230faa26 Add deployment script for 9.0
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run
2026-04-08 14:58:25 -04:00
Dan Stillman
7c61d282ee Use our own blocked-plugin message that doesn't mention Mozilla 2026-03-04 22:43:11 -05:00
Abe Jellinek
3f90e60cd0 Remove AudioPlayback actor
Not necessary, and it caused some error spam.
2026-03-02 14:13:39 -05:00
windingwind
94dbdd5981
Skip plugin strict_max_version check on non-stable releases (#5781)
Unless `extensions.strictCompatibility` is set to true

resolve: #5775
2026-02-09 22:30:09 -05:00
Dan Stillman
c35d7f21e9 Upload build-{os}.json manifests to deployment server
Needed by zotero/client-downloads@4b2060361, which reads build
metadata from these files instead of hardcoding it.
2026-02-09 15:24:07 -05:00
Yago Iglesias
fe3021701e
Use grep -E instead of egrep (#5789) 2026-02-09 09:54:19 -05:00
Dan Stillman
2f064a5604 Rename deployment scripts 2026-02-03 14:34:37 -05:00
Dan Stillman
86823e45ef Update to Firefox 140.6.0esr 2025-12-17 15:37:41 -05:00
Dan Stillman
eaf3f0c5df Use temporary download URL for Firefox 140.3.0esr candidate build
So we can address #5424 before the ESR is released on 9/16
2025-09-10 23:32:31 -04:00
Dan Stillman
12354bd23b Include Linux ARM64 in build_and_deploy 2025-07-30 22:30:54 -04:00
Dan Stillman
38cfc233cf Fix various bugs in the build scripts on Linux
After the arch-specific-builds overhaul
2025-07-30 22:30:54 -04:00
Dan Stillman
93edf4e099 Use SHA256 for custom Firefox components on macOS
(Not currently necessary)
2025-07-30 22:30:53 -04:00
Dan Stillman
44bba85ce8 Use custom xul.dll on Windows
Necessary for non-Mozilla C:\ProgramData folder now that we can no
longer do a string replace on the official DLL

The custom component ZIPs are currently stored in S3 and referenced by
SHA-256 hashes, which get committed. This is basically the same as Git
LFS, but since we now support per-arch fetch_xulrunner and building,
this avoids the need to download large xul.dll files for other
architectures. (Git LFS files also can't ever be removed, so
particularly while we're testing this, we don't necessarily want to
permanently store every copy.)
2025-07-30 22:30:53 -04:00
Dan Stillman
3e0d2c06f1 Support arch-specific builds on Windows and Linux
`fetch_xulrunner`, `dir_build`, and `build.sh` now take an optional `-a`
argument on Windows and Linux to specify the architecture to
fetch/build. If `-a` is omitted for `dir_build` (as in `build_and_run`),
it defaults to the current architecture.

xulrunner hashes are now computed for each architecture. This changes
some filenames in xulrunner/, so you may want to clean out some old
folders/files.

This removes the custom handling for CI, since it will now default to
the architecture of the test runner.
2025-07-30 22:30:53 -04:00
Dan Stillman
4657156c91 Always sign macOS test builds
Since they don't start after fx140, for reasons I didn't investigate
2025-07-30 22:30:51 -04:00
Dan Stillman
0f7590ad13 fx140: Comment out some lines that were failing
I didn't check to see which of these have just moved.
2025-07-30 22:18:34 -04:00
Dan Stillman
e715593eb7 fx140: browser-custom-element.js → browser-custom-element.mjs 2025-07-30 22:18:34 -04:00
Dan Stillman
fd4dde300d fx140: Remove obsolete AppConstants modifications 2025-07-30 22:18:29 -04:00
Dan Stillman
832575b7c0 Update build scripts for Linux ARM64
This doesn't include an ARM updater, so those lines in build.sh need to
be commented out for the build to succeed.

Addresses #3515
2025-07-30 22:15:31 -04:00
windingwind
086b0c3d84
Allow plugin to uninstall itself in update manifest (#5292)
Use `uninstall: true` in `update_url` JSON `updates` that is valid
for the installed plugin to uninstall the plugin the next time it
checks for updates
2025-05-16 06:10:45 -04:00
Abe Jellinek
d74db17cf1
Select Items dialog: Fix scrollbars and padding, add title (#5213) 2025-04-22 23:37:38 -04:00
Abe Jellinek
d9e8ea8ff7
Let creator autocomplete popup fill row width (#5141) 2025-03-27 03:11:00 -04:00
Tom Najdek
e9c0e47a17
Suggest running git lfs install in check_requirements instructions (#5102) 2025-03-12 06:54:05 -04:00
Abe Jellinek
9cdfadbbae
Fix space before ellipsis in editable-text (#5087) 2025-03-10 22:47:38 -04:00
Dan Stillman
659d5e864b build_and_run: Fix handling of ZOTERO_PROFILE containing spaces 2025-03-09 16:16:47 -04:00
Abe Jellinek
cab8e38806
Remove deleted actors to prevent console spam (#5074) 2025-03-04 09:45:08 -05:00
Dan Stillman
307753d313 "Select add-on to install" → "Select plugin to install"
https://forums.zotero.org/discussion/122235/title-in-the-plugin-selection-windows-dialog-add-on-plugin
2025-02-27 23:30:45 -05:00
Abe Jellinek
26221b6786 Fix broken browser window on print + remove many Mozilla files (#5050) 2025-02-26 03:00:04 -05:00
Yichao Yu
8cfcdeb8e6
Use uname -m instead of arch (#4982)
`uname` is used in the script elsewhere already and `arch` does not seem to be available everywhere
2025-01-13 23:37:49 -05:00
abaevbog
459d00448a
Hide "Report" button from plugin context menu (#4976)
Fixes: #4975
2025-01-10 01:25:51 -05:00
Dan Stillman
bad01686d8 Fix some spaces instead of tabs in fetch_xulrunner 2025-01-08 00:30:21 -05:00
abaevbog
5fd94e22df
remove wrong aria-autocomplete from search-textbox (#4966)
searchButton setter in search-textbox element adds aria-autocomplete
to the input. It makes screen readers announce that there is an autocomplete
popup, which is misleading (even though it is appropriate for
firefox that actually does have autocomplete-like dropdown).
This overrides the searchButton setter to remove aria-autocomplete
attribute.

Addresses: zotero#4932
2025-01-03 05:14:36 -05:00
Dan Stillman
7e7ceffd77 Move utility functions for build to separate file
`replace_line`, etc.

To make them available to both build.sh and fetch_xulrunner
2025-01-03 01:21:57 -05:00
Dan Stillman
878d1cc401 fetch_xulrunner: Automatically cache unmodified Windows Firefox 2024-12-18 04:25:47 -05:00
Dan Stillman
485033b4a4 fx128: Fix new errors trying to load removed remote-settings.sys.mjs
Fixed previously in 297af9b40
2024-12-18 04:15:38 -05:00
Dan Stillman
e80b5787fe Switch 'dev' channel builds back to main 2024-12-14 01:20:49 -05:00