Commit graph

437 commits

Author SHA1 Message Date
Dan Stillman
1d1d32a211 Update builds to Firefox 153.1.0esr
Some checks are pending
CI / Detect changes (push) Waiting to run
CI / Test () (push) Blocked by required conditions
CI / Test (macOS NFS) (push) Blocked by required conditions
CI / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
This also fixes a broken reader with existing profiles due to a Cache
API DB schema version bump in 140.14.0esr that wasn't in 153.0esr.
2026-08-27 15:41:27 -04:00
Dan Stillman
5f978c71ca Detect Windows-on-ARM in dir_build under an emulated shell
The GitHub runner image installs the x64 build of Git for Windows, so
its bash and everything run from it execute under x64 emulation on
Windows on ARM, where uname -m reports x86_64 and the staged build got
the wrong architecture. uname -s still reports the machine, as
MINGW64_NT-10.0-26200-ARM64, so use that instead. If the image ever
installs a native arm64 Git for Windows, uname -m will be correct and
this can go.
2026-08-20 12:34:41 -04:00
Dan Stillman
22b3daf845 Don't require rsync in build.sh
rsync isn't available on Windows, so fall back to cp for directory
copies.
2026-08-20 12:34:40 -04:00
Dan Stillman
aa49b48915 Don't use rsync and find in prepare_build
Neither is reliably available on Windows, so copy the source tree with
Python when rsync is missing and delete the CSL locale support files
with a directory walk.
2026-08-20 12:34:40 -04:00
Dan Stillman
5757396197 Fix changelog URL generation for two-digit major versions
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 short version was derived from the first three characters of the
version string, so 10.0 produced a detailsURL of "10._changelog".
2026-08-17 12:10:35 -04:00
Dan Stillman
1d6158dfd8 Remove Linux i686 build support 2026-08-12 16:36:41 -04:00
Dan Stillman
5df473cf96 Fix grep warnings about stray backslashes during MAR builds 2026-08-12 16:29:20 -04:00
Dan Stillman
e7767c5bfa Don't build Linux i686 updates for Zotero 11
i686 builds are gone as of Zotero 11, so a full build failed trying to
package a linux-i686 MAR from a staging directory that no longer exists.
Skip the architecture entirely, and don't download it for older FROM
versions when building incrementals.
2026-08-12 16:29:20 -04:00
Dan Stillman
d9d52de516 Check that local app/ matches commit being built before deploying
The build-and-deploy scripts run scripts and config from the local
checkout but build source files from the tip of the remote branch, so
a stale or wrong-branch checkout could silently build with the wrong
Gecko version or omni patches.
2026-08-12 12:46:30 -04:00
Dan Stillman
a9e765e37f Remove 8.0 release build script 2026-08-12 12:46:30 -04:00
Dan Stillman
8fb2870f93 Restore dxcompiler.dll on Windows for WebGPU and leave WebGPU pref on
mozinference (which is currently CPU-only) is better for many tasks, but
plugins may want WebGPU for some features (e.g., chatbots), so just
follow Firefox, which currently enables it by default for Windows and
Apple Silicon macOS. Adds 5.8 MB compressed to the Windows installer.
2026-08-05 14:10:04 -04:00
Dan Stillman
aaeb9c6c9a fx153: Don't bundle unused Firefox runtime files
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
Skip crashhelper (all platforms -- the crash reporter is disabled) and
desktop-launcher and nmhproxy.exe (Windows).

Also skip dxcompiler.dll (Windows, 22 MB), which is loaded only by
WebGPU, now also disabled via pref. Nothing renders with WebGPU, and
local ML -- including any future plugin API -- should go through
Firefox's inference libraries (mozinference/onnxruntime), which are
compiled CPU-only.
2026-08-04 14:42:40 -04:00
Dan Stillman
adc5648d29 fx153: Restore pass-through clicks on toolbarbutton dropmarkers
XULButtonElement only opens a type=menu button's menu when the button
is the event's original target, which worked before because xul.css
gave .toolbarbutton-menu-dropmarker 'pointer-events: none'. That rule
was removed along with the dropmarker element, so clicks on our
recreated dropmarker did nothing.
2026-08-04 14:42:39 -04:00
Dan Stillman
97de8858fe fx153: Use font glyphs for Windows titlebar buttons
Firefox 153 removed the chrome://browser/skin/window-controls/ SVGs and
now draws the caption buttons with Segoe Fluent Icons glyphs (falling
back to Segoe MDL2 Assets on Windows 10), which broke the Windows build.
Port the new browser.css button styling and stop keeping the removed
directory in build.sh.
2026-08-04 14:42:06 -04:00
Dan Stillman
770f44568c Update Windows build to Firefox 153.0esr 2026-08-04 12:55:27 -04:00
Dan Stillman
1dffe21de0 fx153: Don't embed source-repo info in custom Windows builds
Some checks failed
CI / Test (shard 3) (push) Has been cancelled
CI / Test (shard 4) (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
CI / Test (shard 1) (push) Has been cancelled
CI / Test (shard 2) (push) Has been cancelled
Better fix than d5aacafe3f -- we don't need source-repo info in our
builds at all, so just disable MOZ_INCLUDE_SOURCE_INFO rather than
synthesizing it.
2026-08-03 18:59:01 -04:00
Dan Stillman
d5aacafe3f fx153: Stamp the git source repo and changeset for Windows packaging
Firefox's official-build source-repo.h generator only auto-detects
Mercurial, so building from our git checkout left the file empty and
packaging failed with "no preprocessor directives found". Derive
MOZ_SOURCE_REPO and MOZ_SOURCE_CHANGESET from git in the mozconfig so
configure records them for any invocation, including a manual
./mach package.
2026-08-03 18:32:11 -04:00
Dan Stillman
72115c3cb4 Set Rust default toolchain before adding the target
Some checks failed
CI / Test (shard 1) (push) Has been cancelled
CI / Test (shard 2) (push) Has been cancelled
CI / Test (shard 3) (push) Has been cancelled
CI / Test (shard 4) (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
app/win/build added the cross-compilation target to whatever toolchain
was default before switching to RUST_VERSION, so after a Rust version
bump the new toolchain lacked the aarch64/i686 target and the arm and
win32 builds failed at configure. Set the default first.
2026-08-03 13:06:24 -04:00
Dan Stillman
6f3e4b5499 fx153: Update Mozilla patch for Windows 2026-08-03 12:33:59 -04:00
Dan Stillman
e4ee85296c fx153: Update Rust version for Mozilla builds 2026-08-03 12:09:02 -04:00
Dan Stillman
35a70117b0 fx153: Restore the toolbarbutton dropmarker
Bug 1980856 removed both wantdropmarker support and the rule that gave
.toolbarbutton-menu-dropmarker its image, once Firefox's last consumer
stopped using it, so the New Item, Add Attachment, and New Note buttons
lost their chevrons, along with the ones in advanced search, the feed
settings dialog, and Scaffold.

Draw it with a background, since a <dropmarker> doesn't render
list-style-image, and use chevron-6 to match the quick search dropmarker
and the menu marker on our own buttons. The rule also moves out of the
toolbarbutton block, since a plain <button> can host one too.
2026-08-03 11:48:42 -04:00
Dan Stillman
3430ad241b fx153: Keep our own Assets.car in the Mac app
Firefox 153 ships an asset catalog with its own AppIcon, which the merge
from Firefox's Resources copied over ours, so the app got the Firefox
icon.
2026-08-03 11:48:42 -04:00
Dan Stillman
00cad2ced0 Remove 32-bit Linux build support
Mozilla stopped publishing linux-i686 builds after Firefox 144, so there's
no 153 runtime to build against.
2026-08-03 11:48:42 -04:00
Dan Stillman
d43dc2fa37 Fail the xulrunner download on an HTTP error
Without -f, curl saves the error page and the download appears to succeed,
so a missing build fails later with a confusing "Unrecognized archive
format" from tar.
2026-08-03 11:48:42 -04:00
Dan Stillman
78d21617af fx153: Hide the about:addons sidebar
The sidebar customizations all broke: the category buttons are
moz-page-nav-buttons now rather than button[name="..."], and the Settings
and Support links moved out of <sidebar-footer> into a secondary nav. The
sidebar also has a heading now that duplicates the main pane's "Manage
Your Plugins", so hide the whole column instead of the pieces.
2026-08-03 11:48:41 -04:00
Dan Stillman
8110ab4eea Add a newline after the Zotero prefs in the built prefs file
Babel strips the trailing newline from defaults/preferences/zotero.js, so
the platform-specific prefs appended after it shared a line with the last
Zotero pref.
2026-08-03 11:48:41 -04:00
Dan Stillman
45e38322e1 fx153: Keep backup-constants.mjs
SelectableProfile.sys.mjs now statically imports BackupService, which
statically imports chrome://browser/content/backup/backup-constants.mjs,
so startup failed once SelectableProfileService was instantiated as a
command-line handler.
2026-08-03 11:48:41 -04:00
Dan Stillman
b7232f130f fx153: Don't remove the Pocket actor, removed from Firefox 2026-08-03 11:48:39 -04:00
Dan Stillman
c192127ab1 fx153: Take over <search-textbox>, removed from Firefox
Mozilla removed the widget and its stylesheet in bug 1968916 without a
drop-in replacement, so bring both into Zotero. The two rules that lived
in Firefox's UA sheets (text-shadow and -moz-window-dragging) move to
_search.scss, and the aria-autocomplete removal that fetch_xulrunner
used to patch in is now part of the widget itself.
2026-08-03 11:48:39 -04:00
Dan Stillman
d701c43862 fx153: Restore autocomplete popup sizing from the anchor element
Firefox now sizes autocomplete popups to their content (bug 2045828), so
add the --panel-width calculation back instead of adjusting it.
2026-08-03 11:48:39 -04:00
Dan Stillman
06848ce17f fx153: Update about:addons patches for the ES module split
aboutaddons.js and aboutaddonsCommon.js were split into
aboutaddons-utils.mjs plus per-component modules under components/, and
the addon details template moved out of aboutaddons.html into
addon-details.mjs.

The unsigned-addon warning is now suppressed through Firefox's own
isUnsignedWarningMessageDisabled(), which is otherwise gated on
MOZILLA_OFFICIAL.
2026-08-03 11:48:38 -04:00
Dan Stillman
408179ad09 fx153: Anchor the actor-removal patterns in ActorManagerParent
AboutTranslations and the PictureInPicture actors moved out of the
JSWINDOWACTORS literal into conditional assignments after it.

Anchor every pattern to the start of the line while we're here, since
'PictureInPicture: {' matched the MozTogglePictureInPicture event name in
the new file and silently deleted everything through the next '  },'.
2026-08-03 11:48:38 -04:00
Dan Stillman
242bbccda5 Update Mac and Linux builds to Firefox 153.0esr 2026-08-03 11:48:38 -04:00
Mynacol
b5ea455c1f
Fix release build on x86 mac (#5926)
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
While trying to [fix](https://github.com/NixOS/nixpkgs/pull/519431) another issue in the Zotero package for nixpkgs, I discovered a new bug. When setting a non-`source` update channel, the build fails on MacOS with x86 architectures.

The build fails with:
```
source not found twice in ChannelPrefs

source

stringWithCString:encoding:
```
Which definitely means it is caused by the `strings` command [here](https://github.com/zotero/zotero/blob/main/app/mac/set-channel-prefs-channel#L29).

When manually executing the strings command on the file, I can repeat getting only one `source` result on x86 mac, while getting two on arm64 or linux. After digging around, I tried with the flag `-arch all`, and both `source` values are found on x86 mac. Full command: `strings -n 3 -arch all $binary`.
2026-07-31 13:41:33 -04:00
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
91d7e73d26 Strip com.apple.FinderInfo xattrs from files in Mac disk images
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
hdiutil makehybrid gives every file on the image non-empty Finder info
(it sets an icon location), which appears as a com.apple.FinderInfo
extended attribute. codesign --verify --strict rejects FinderInfo as
detritus, and it can cause Safari to fail to load the web extension.
(Reported by a user with Safari 17.6 on macOS 12. No other reports from
the beta, so maybe not universal.) The Safari App Extension apparently
wasn't affected, since it shipped with the same attributes for years.

Convert the hybrid image to a read-write image, mount it, strip the
attributes from its files, and compress from that. The volume header is
untouched, so the open-folder flag that makes Finder open the volume
window on mount is preserved.

Only fresh installs from the DMG were affected. The updater writes fresh
files without the attributes, so copies updated in place were clean.
(Notably, this is the reverse of the post-update extension breakage for
which the standard advice has always been to delete Zotero.app and
redownload. Following that advice is exactly what resulted in a broken
copy here.)

https://forums.zotero.org/discussion/132925/
2026-07-27 15:31:18 -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
228799774f Sign both per-arch JNA .jnilibs in LibreOffice plugin during Mac build
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
JNA 5.x ships per-architecture macOS native libraries instead of a
single com/sun/jna/darwin/ directory, so the notarization re-signing
step failed with "filename not matched".

This step can be removed entirely once the plugin ships a jna.jar
without the macOS natives, which are never loaded.
2026-07-16 12:54:47 -04:00
Dan Stillman
bdea584a17 Update LibreOffice submodule 2026-07-14 13:39:07 -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
1c9bf88888 Unpack update archives for different architectures in parallel
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
2026-07-08 12:10:46 -04:00
Dan Stillman
39a1c56f6c Cache update diffs and compressed files across builds
Cache patches and compressed files by content hash so that they're reused
across FROM versions and releases. Cache entries are touched when used and
expire after 60 days.

The cache key includes a tag covering the xz/mbsdiff versions and the
compression options, so entries are invalidated when the toolchain changes.
2026-07-08 12:10:45 -04:00
Dan Stillman
d07dd66c21 Parallelize update MAR generation
Run the per-file mbsdiff/xz work in make_incremental_update.sh and
make_full_update.sh through a parallel job pool, largest files first, and
assemble the manifests serially afterward, producing byte-identical MARs.

Set UPDATE_PACKAGING_JOBS to override the number of parallel jobs.
2026-07-08 12:10:45 -04:00
Dan Stillman
bd25413213 runtests.sh: Add -p option to run a shard of the test files (e.g., -p 2/4)
The sorted file list is split into contiguous chunks of roughly equal total
file size, using size as a stand-in for run time, so new test files are
included automatically and slow test files are spread across shards rather
than landing in the same shard by chance. Contiguous chunks preserve the
alphabetical run order of a full run, so files keep the same preceding files
as in a full run except at chunk starts, and a shard can be reproduced locally
by passing its first and last files to -s and -e.
2026-07-08 10:50:32 -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
1d8cdb13c1 Update Windows build to Firefox 140.12.0esr 2026-06-30 16:41:38 -04:00
Dan Stillman
d28bdd8d6e Update Mac and Linux builds to Firefox 140.12.0esr
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run
2026-06-30 15:09:55 -04:00
Adomas Venčkauskas
9cffc1c7c2 Update LibreOffice submodule 2026-06-30 14:35:38 +03:00