8 Commits
Author SHA1 Message Date
yenru0 935e2b0bd0 image_viewer: Remove PDF annotation and form editing
Congratsbot / check-author (push) Skipped
Congratsbot / congrats (push) Waiting for needed jobs
deploy_nightly_docs / deploy_docs (push) Skipped
run_tests / orchestrate (push) Skipped
run_tests / check_style (push) Skipped
run_tests / clippy_windows (push) Skipped
run_tests / clippy_linux (push) Skipped
run_tests / clippy_mac (push) Skipped
run_tests / clippy_mac_x86_64 (push) Skipped
run_tests / run_tests_windows (push) Skipped
run_tests / run_tests_linux (push) Skipped
run_tests / run_tests_mac (push) Skipped
run_tests / miri_scheduler (push) Skipped
run_tests / doctests (push) Skipped
run_tests / check_workspace_binaries (push) Skipped
run_tests / build_visual_tests_binary (push) Skipped
run_tests / check_wasm (push) Skipped
run_tests / check_dependencies (push) Skipped
run_tests / check_docs (push) Skipped
run_tests / check_licenses (push) Skipped
run_tests / check_scripts (push) Skipped
run_tests / check_remote_server_linux_x86_64 (push) Skipped
run_tests / check_remote_server_mac_aarch64 (push) Skipped
run_tests / check_remote_server_windows_x86_64 (push) Skipped
run_tests / check_postgres_and_protobuf_migrations (push) Skipped
run_tests / extension_tests (push) Skipped
run_tests / tests_pass (push) Skipped
The annotation and form-filling surface is being dropped, so remove it
end to end rather than leave it half-maintained.

pdf_viewer loses the editing APIs and everything only they used:
add_ink_annotation, add_highlight_annotation, delete_annotation,
apply_form_edits, the form widget and annotation extraction, the
PdfFormWidget/PdfFormEdit/PdfAnnotation types, the document
serialization helper, and the pdfium guards and constants those
functions were the sole users of. Rendering, text, links, outline and
metadata are untouched; annotation rendering stays on because it paints
markup already embedded in viewed documents.

image_viewer loses the tool palette, form widget overlays, inline form
editors, pen canvas, option menus, the annotate toolbar button, the
Undo Edit and Delete Annotation actions and their key bindings, plus
the associated state and handlers. Text selection, find, links,
thumbnails, outline, properties, rotation, presentation and Save a Copy
remain.
2026-10-08 14:28:45 +09:00
yenru0 4ac68ee5af image_viewer: Make the full page width reachable when zoomed
Three layout issues kept horizontal scrolling from working when a page
was wider than the viewport: the viewport scrollbar was vertical-only,
so nothing could be dragged; centering the pages hid the left half of
an overflowing page, because scroll offsets cannot go positive; and the
centering came from a stretched flex child, which made the container
report no horizontal overflow at all.

The container now aligns children to the start so they keep their
content width, and pages center themselves with an auto margin only
while they still fit. The scrollbar covers both axes.

The interaction test asserts the invariants: the page's left edge
tracks the viewport edge plus the scroll offset, and the scroll range
spans the full page-minus-viewport overflow.
2026-10-08 14:08:30 +09:00
yenru0 0030767614 image_viewer: Fix PDF zoom lag and silent annotation no-ops
Zoom lag: page rasterization ran synchronously on the UI thread with the
exact zoom in the cache key, so every wheel tick re-rendered every
visible page before the next frame. Rasterization now happens in a
background task at a quantized zoom bucket (x1.25) while the closest
already-rendered bitmap stays on screen scaled to the layout; completed
renders swap in via notify. Frames the cache refuses (larger than the
budget) are never re-rendered, which previously spun an infinite
render loop.

The mock fallback renderer skipped the MAX_PAGE_DIMENSION clamp the
native path applies, so its frames grew past the cache budget at high
zoom and were refused on every attempt; the cap is now shared, and
lowered from 8192 to 4096 (a 1080p viewport is oversampled ~4x at that
point, and the worst-case frame drops from 207MB to 67MB).

Annotations: the bundled libpdfium.so was never loaded because the
loader only tried working-directory-relative paths; it now also
resolves next to the executable, matching the bundled layout. Ink,
highlight, and delete editing returned Ok with unchanged bytes when no
native engine was present, so strokes silently did nothing; they now
return errors that surface through the existing logging.
2026-10-08 12:00:01 +09:00
yenru0 67b9fe8b73 image_viewer: Cover pinch zoom in the PDF interaction test
Assert that a pinch gesture scales the PDF zoom by the gesture delta,
pinning the on_pinch wiring across real event dispatch.
2026-10-03 21:14:03 +09:00
yenru0 157c4646bb image_viewer: Add horizontal panning to the PDF viewer
The PDF scroll container only scrolled vertically, so zoomed-in pages
could not be moved sideways. Switch it to two-axis scrolling: ctrl+wheel
and pinch zoom now anchor both axes, middle-drag pans both directions,
and the container shows a closed-hand cursor while panning. The anchor
scroll math is shared per axis.
2026-10-03 20:42:04 +09:00
yenru0 5fd4113081 image_viewer: Add anchored zoom and pan to the PDF viewer
The PDF viewport lacked the interaction set the image view already had:
ctrl/cmd+wheel and pinch zoomed nothing (plain wheel just scrolled),
middle-drag did not pan, and the zoom actions only applied image-mode
pan math, which does nothing for the scroll-based PDF layout.

- Ctrl/cmd+wheel zooms around the cursor: the native scroll handler on
  the same element runs first in the bubble phase, so the applied wheel
  delta is undone before anchoring the zoom.
- Pinch zooms around the touch point; zoom actions anchor the viewport
  center.
- Middle-drag pans, keeping left-drag for text selection and pen input.
- extract_document_details now falls back to a single mock US-Letter
  page when no native libpdfium is present, mirroring the mock
  rasterizer, so PDFs open on machines without the engine instead of
  failing with an image-format error.
- The annotation mouse test gates on native pdfium like the channel
  order test, since mock pages carry no text.

Anchor math lives in pdf_anchored_scroll_y with unit tests, and a
gpui integration test drives real wheel/drag events to assert the
document point under the cursor stays put while zooming.
2026-10-03 20:33:08 +09:00
yenru0 5ee6aa1e50 image_viewer: Fix swapped red and blue channels in PDF pages
GPUI's RenderImage contract is BGRA (assets.rs) and every platform atlas
uploads the bytes raw into BGRA8 textures. All other decode paths swap
R/B before building a RenderImage; the PDF path fed pdfium's RGBA buffer
straight through, so PDF pages rendered with swapped channels on every
platform (white/gray unaffected, colors wrong).

Swap R/B at both RenderImage construction sites (page view + thumbnails)
and pin pdf_viewer's RGBA raster contract with a native channel-order
regression test (skips when no libpdfium is present).
2026-10-03 20:09:25 +09:00
yenru0 312b37539c gwen: Bundle pdfium in macOS builds
Issue Triage Queue Board / Sync triage queue board (push) Has been cancelled
release_nightly / build_nix_linux_x86_64 (push) Has been cancelled
release_nightly / run_tests_linux (push) Has been cancelled
release_nightly / bundle_linux_aarch64 (push) Has been cancelled
release_nightly / bundle_linux_x86_64 (push) Has been cancelled
release_nightly / build_static_bwrap_linux_aarch64 (push) Has been cancelled
release_nightly / build_static_bwrap_linux_x86_64 (push) Has been cancelled
release_nightly / bundle_mac_aarch64 (push) Has been cancelled
release_nightly / bundle_mac_x86_64 (push) Has been cancelled
release_nightly / bundle_windows_aarch64 (push) Has been cancelled
release_nightly / bundle_windows_x86_64 (push) Has been cancelled
release_nightly / build_nix_mac_aarch64 (push) Has been cancelled
release_nightly / update_nightly_tag (push) Has been cancelled
release_nightly / notify_on_failure (push) Has been cancelled
Congratsbot / check-author (push) Has been cancelled
deploy_nightly_docs / deploy_docs (push) Has been cancelled
run_tests / orchestrate (push) Has been cancelled
run_tests / check_style (push) Has been cancelled
Update Duplicate Magnets Issue / update-duplicate-magnets (push) Has been cancelled
Congratsbot / congrats (push) Has been cancelled
run_tests / clippy_windows (push) Has been cancelled
run_tests / clippy_linux (push) Has been cancelled
run_tests / clippy_mac (push) Has been cancelled
run_tests / clippy_mac_x86_64 (push) Has been cancelled
run_tests / run_tests_windows (push) Has been cancelled
run_tests / run_tests_linux (push) Has been cancelled
run_tests / run_tests_mac (push) Has been cancelled
run_tests / miri_scheduler (push) Has been cancelled
run_tests / doctests (push) Has been cancelled
run_tests / check_workspace_binaries (push) Has been cancelled
run_tests / build_visual_tests_binary (push) Has been cancelled
run_tests / check_wasm (push) Has been cancelled
run_tests / check_dependencies (push) Has been cancelled
run_tests / check_docs (push) Has been cancelled
run_tests / check_licenses (push) Has been cancelled
run_tests / check_scripts (push) Has been cancelled
run_tests / check_remote_server_linux_x86_64 (push) Has been cancelled
run_tests / check_remote_server_mac_aarch64 (push) Has been cancelled
run_tests / check_remote_server_windows_x86_64 (push) Has been cancelled
run_tests / check_postgres_and_protobuf_migrations (push) Has been cancelled
run_tests / extension_tests (push) Has been cancelled
run_tests / tests_pass (push) Has been cancelled
Guild Stale Assignments / sweep (push) Has been cancelled
Community PR Cleanup / cleanup (push) Has been cancelled
PR Board Meta Fields Refresh / refresh (push) Has been cancelled
Hotfix Review Monitor / check-hotfix-reviews (push) Has been cancelled
Track duplicate bot effectiveness / classify-closed-issue (push) Has been cancelled
Track duplicate bot effectiveness / classify-open (push) Has been cancelled
Stale PR Review Reminder / check-stale-prs (push) Has been cancelled
Update Weekly Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Bump collab-staging Tag / update-collab-staging-tag (push) Has been cancelled
Close Stale Issues / stale (push) Has been cancelled
compliance_check / scheduled_compliance_check (push) Has been cancelled
release_nightly / check_nightly_tag (push) Has been cancelled
Update All Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Guild Weekly Shipped / digest (push) Has been cancelled
script/bundle-mac now downloads the pinned pdfium-mac tarball from
bblanchon/pdfium-binaries into Zed.app/Contents/Frameworks, matching
what bundle-linux and bundle-windows.ps1 already do, so the bundled
pdf_viewer no longer falls back to synthetic rendering on macOS. The
runtime loader probes ../Frameworks next to the executable.
2026-10-01 10:37:32 +09:00
11 changed files with 784 additions and 2414 deletions

No files matched your search

-1
View File
@@ -1630,7 +1630,6 @@
"ctrl-g": "image_viewer::FindNext", "ctrl-g": "image_viewer::FindNext",
"ctrl-shift-g": "image_viewer::FindPrevious", "ctrl-shift-g": "image_viewer::FindPrevious",
"ctrl-s": "image_viewer::SaveCopyAs", "ctrl-s": "image_viewer::SaveCopyAs",
"ctrl-z": "image_viewer::UndoEdit",
"ctrl-shift-t": "image_viewer::ToggleTextPanel" "ctrl-shift-t": "image_viewer::ToggleTextPanel"
}, },
}, },
-1
View File
@@ -1682,7 +1682,6 @@
"cmd-g": "image_viewer::FindNext", "cmd-g": "image_viewer::FindNext",
"cmd-shift-g": "image_viewer::FindPrevious", "cmd-shift-g": "image_viewer::FindPrevious",
"cmd-s": "image_viewer::SaveCopyAs", "cmd-s": "image_viewer::SaveCopyAs",
"cmd-z": "image_viewer::UndoEdit",
"cmd-shift-t": "image_viewer::ToggleTextPanel" "cmd-shift-t": "image_viewer::ToggleTextPanel"
}, },
}, },
-1
View File
@@ -1605,7 +1605,6 @@
"ctrl-g": "image_viewer::FindNext", "ctrl-g": "image_viewer::FindNext",
"ctrl-shift-g": "image_viewer::FindPrevious", "ctrl-shift-g": "image_viewer::FindPrevious",
"ctrl-s": "image_viewer::SaveCopyAs", "ctrl-s": "image_viewer::SaveCopyAs",
"ctrl-z": "image_viewer::UndoEdit",
"ctrl-shift-t": "image_viewer::ToggleTextPanel" "ctrl-shift-t": "image_viewer::ToggleTextPanel"
}, },
}, },
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -52,8 +52,9 @@ A native, high performance PDF viewing engine and GPUI workspace item engineered
## 2. Scope Boundaries ## 2. Scope Boundaries
- **Continuous Scroll & Text Selection**: Supports fluid high frame rate document browsing and visual text selection. - **Continuous Scroll & Text Selection**: Supports fluid high frame rate document browsing and visual text selection.
- **Excluded from initial scope**: - **Excluded from scope**:
- Interactive PDF form field editing. - Interactive PDF form field editing.
- Annotation authoring, editing and deletion.
- *Rationale*: Delivering an ultra fast, stutter free viewing experience with zero UI locks takes precedence. - *Rationale*: Delivering an ultra fast, stutter free viewing experience with zero UI locks takes precedence.
--- ---
+20
View File
@@ -191,6 +191,26 @@ impl<T: CacheablePage> PageLruCache<T> {
false false
} }
/// Returns true if an entry with exactly this key is currently cached.
pub fn contains(&self, key: &CacheKey) -> bool {
self.entries.contains_key(key)
}
/// Returns the cached page for `page_index` whose zoom is closest to `zoom_factor`,
/// ignoring LRU order, so a zoom change can keep showing the previous bitmap while a
/// fresh one renders.
pub fn closest_to_zoom(&self, page_index: usize, zoom_factor: f32) -> Option<&T> {
self.entries
.iter()
.filter(|(key, _)| key.page_index == page_index)
.min_by(|(a, _), (b, _)| {
let distance_a = (a.zoom_bucket as f32 - zoom_factor * 100.0).abs();
let distance_b = (b.zoom_bucket as f32 - zoom_factor * 100.0).abs();
distance_a.total_cmp(&distance_b)
})
.map(|(_, value)| value)
}
/// Clears all entries from the cache and resets memory tracking. /// Clears all entries from the cache and resets memory tracking.
pub fn clear(&mut self) { pub fn clear(&mut self) {
self.entries.clear(); self.entries.clear();
+2 -3
View File
@@ -22,9 +22,8 @@ pub mod watcher;
pub use cache::{CacheKey, CacheablePage, DEFAULT_MEMORY_BUDGET_BYTES, PageLruCache, RenderedPage}; pub use cache::{CacheKey, CacheablePage, DEFAULT_MEMORY_BUDGET_BYTES, PageLruCache, RenderedPage};
pub use document::{PageDimensions, PdfDocument}; pub use document::{PageDimensions, PdfDocument};
pub use pdfium::{ pub use pdfium::{
PdfAnnotationColor, PdfAnnotationInfo, PdfAnnotationKind, PdfCharBox, PdfDocumentDetails, PdfCharBox, PdfDocumentDetails, PdfLinkAnnotation, PdfMetadata, PdfOutlineItem, PdfPageDetails,
PdfFormEdit, PdfFormWidget, PdfFormWidgetKind, PdfLinkAnnotation, PdfMetadata, PdfOutlineItem, PdfTextSegment, PdfiumEngine,
PdfPageDetails, PdfTextSegment, PdfiumEngine,
}; };
pub use rasterizer::{LuminosityToneMapper, PageRasterizer, RasterizerOptions}; pub use rasterizer::{LuminosityToneMapper, PageRasterizer, RasterizerOptions};
pub use settings::{DefaultZoomPolicy, PageLayoutMode, PdfViewerSettings}; pub use settings::{DefaultZoomPolicy, PageLayoutMode, PdfViewerSettings};
File diff suppressed because it is too large. Load diff
+11 -1
View File
@@ -5,6 +5,7 @@
use crate::cache::RenderedPage; use crate::cache::RenderedPage;
use crate::document::PageDimensions; use crate::document::PageDimensions;
use crate::pdfium::compute_target_dimensions;
use anyhow::Result; use anyhow::Result;
/// Rendering and tone mapping configuration. /// Rendering and tone mapping configuration.
@@ -160,7 +161,16 @@ impl PageRasterizer {
dimensions: PageDimensions, dimensions: PageDimensions,
options: RasterizerOptions, options: RasterizerOptions,
) -> Result<RenderedPage> { ) -> Result<RenderedPage> {
let (width, height) = dimensions.to_pixel_size(options.zoom_factor, options.target_dpi); // Mirror the native renderer's clamp: an unclamped frame at high zoom can grow
// past the page cache budget, which would make the cache refuse the entry and
// the caller re-render it forever.
let (width, height) = compute_target_dimensions(
dimensions.width,
dimensions.height,
options.target_dpi,
options.zoom_factor,
);
let (width, height) = (width.max(1) as u32, height.max(1) as u32);
let total_bytes = (width as usize) * (height as usize) * 4; let total_bytes = (width as usize) * (height as usize) * 4;
// Create standard white paper background with an inner border // Create standard white paper background with an inner border
+82 -1
View File
@@ -1,4 +1,5 @@
use pdf_viewer::{PageLayoutMode, PdfToolbarState, PdfView, PdfViewerSettings}; use pdf_viewer::rasterizer::RasterizerOptions;
use pdf_viewer::{PageLayoutMode, PdfToolbarState, PdfView, PdfViewerSettings, PdfiumEngine};
use std::time::Duration; use std::time::Duration;
const MINIMAL_PDF: &[u8] = b"%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] >>\nendobj\nxref\n0 4\n0000000000 65535 f \n0000000010 00000 n \n0000000060 00000 n \n0000000117 00000 n \ntrailer\n<< /Size 4 /Root 1 0 R >>\nstartxref\n185\n%%EOF\n"; const MINIMAL_PDF: &[u8] = b"%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] >>\nendobj\nxref\n0 4\n0000000000 65535 f \n0000000010 00000 n \n0000000060 00000 n \n0000000117 00000 n \ntrailer\n<< /Size 4 /Root 1 0 R >>\nstartxref\n185\n%%EOF\n";
@@ -105,3 +106,83 @@ fn test_toolbar_synchronization_with_view_state() {
assert!(toolbar_state.dark_mode); assert!(toolbar_state.dark_mode);
assert_eq!(toolbar_state.layout_mode, PageLayoutMode::Continuous); assert_eq!(toolbar_state.layout_mode, PageLayoutMode::Continuous);
} }
/// Builds a single-page PDF whose entire canvas is filled pure red, with a fully
/// computed xref table so no repair parsing is involved.
fn red_page_pdf() -> Vec<u8> {
let content = b"1 0 0 rg 0 0 612 792 re f";
let objects: Vec<Vec<u8>> = vec![
b"<< /Type /Catalog /Pages 2 0 R >>".to_vec(),
b"<< /Type /Pages /Kids [3 0 R] /Count 1 >>".to_vec(),
b"<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] /Resources << >> /Contents 4 0 R >>"
.to_vec(),
format!(
"<< /Length {} >>\nstream\n{}\nendstream",
content.len(),
String::from_utf8_lossy(content)
)
.into_bytes(),
];
let mut out = b"%PDF-1.7\n".to_vec();
let mut offsets = Vec::with_capacity(objects.len());
for (index, object) in objects.iter().enumerate() {
offsets.push(out.len() as u32);
out.extend_from_slice(format!("{} 0 obj\n", index + 1).as_bytes());
out.extend_from_slice(object);
out.extend_from_slice(b"\nendobj\n");
}
let xref_offset = out.len() as u32;
out.extend_from_slice(format!("xref\n0 {}\n", objects.len() + 1).as_bytes());
out.extend_from_slice(b"0000000000 65535 f \n");
for offset in &offsets {
out.extend_from_slice(format!("{offset:010} 00000 n \n").as_bytes());
}
out.extend_from_slice(
format!(
"trailer\n<< /Size {} /Root 1 0 R >>\nstartxref\n{}\n%%EOF",
objects.len() + 1,
xref_offset
)
.as_bytes(),
);
out
}
/// Guards against PDFium's native BGRA bitmap order leaking through: the rasterizer
/// must hand out RGBA buffers, so a red page must read as high-R/low-B. The mock
/// renderer also draws red, so this only proves something when a native engine
/// bound; without libpdfium the test cannot exercise the real byte order.
#[test]
fn test_native_render_outputs_rgba_channel_order() {
let engine = PdfiumEngine::new();
if !engine.is_native_available() {
eprintln!("skipping: native libpdfium not available on this machine");
return;
}
let rendered = engine
.render_page_from_bytes(&red_page_pdf(), 0, RasterizerOptions::default())
.expect("native render should succeed");
let stride = rendered.width as usize * 4;
assert_eq!(rendered.rgba_buffer.len(), stride * rendered.height as usize);
for (x, y) in [
(rendered.width as usize / 2, rendered.height as usize / 2),
(rendered.width as usize / 4, rendered.height as usize / 4),
(
rendered.width as usize * 3 / 4,
rendered.height as usize * 3 / 4,
),
] {
let pixel = &rendered.rgba_buffer[y * stride + x * 4..y * stride + x * 4 + 4];
let (r, g, b, a) = (pixel[0], pixel[1], pixel[2], pixel[3]);
assert!(
r > 200 && b < 60,
"buffer is not RGBA-ordered at ({x},{y}): R={r} G={g} B={b} A={a}"
);
assert_eq!(a, 255, "opaque page should carry alpha 255");
}
}
+41
View File
@@ -146,6 +146,7 @@ fi
GIT_VERSION="v2.43.3" GIT_VERSION="v2.43.3"
GIT_VERSION_SHA="fa29823" GIT_VERSION_SHA="fa29823"
PDFIUM_TAG="chromium/8066"
function download_and_unpack() { function download_and_unpack() {
local url=$1 local url=$1
@@ -192,6 +193,42 @@ function download_git() {
rm -rf "$tmp_dir" rm -rf "$tmp_dir"
} }
function download_pdfium() {
local architecture=$1
local target_path=$2
case "$architecture" in
aarch64-apple-darwin)
pdfium_flavor="mac-arm64"
pdfium_sha256="336219e80580b93c6523f44db7dc1de59cc497b13a7390ddac84223f68ca162b"
;;
x86_64-apple-darwin)
pdfium_flavor="mac-x64"
pdfium_sha256="841ecac278cdd46288dd065873522cf72f3996560d8978f473d336f01d59942c"
;;
*)
echo "Unsupported architecture for pdfium: $architecture"
exit 1
;;
esac
# sha256sum is not present on stock macOS, so checksums go through shasum.
pdfium_tgz="${target_dir}/pdfium-${pdfium_flavor}.tgz"
if ! echo "${pdfium_sha256} ${pdfium_tgz}" | shasum -a 256 -c >/dev/null 2>&1; then
mkdir -p "${target_dir}"
curl --silent --fail --location --output "${pdfium_tgz}" \
"https://github.com/bblanchon/pdfium-binaries/releases/download/${PDFIUM_TAG}/pdfium-${pdfium_flavor}.tgz"
echo "${pdfium_sha256} ${pdfium_tgz}" | shasum -a 256 -c
fi
pdfium_tmp=$(mktemp -d)
tar -xzf "${pdfium_tgz}" -C "${pdfium_tmp}" "lib/libpdfium.dylib" "LICENSE" "licenses"
cp "${pdfium_tmp}/lib/libpdfium.dylib" "${target_path}"
mkdir -p "${app_path}/Contents/Resources/pdfium-licenses"
cp "${pdfium_tmp}/LICENSE" "${pdfium_tmp}/licenses/"* "${app_path}/Contents/Resources/pdfium-licenses/"
rm -rf "${pdfium_tmp}"
}
function sign_app_binaries() { function sign_app_binaries() {
rm -rf "${app_path}/Contents/Frameworks" rm -rf "${app_path}/Contents/Frameworks"
mkdir -p "${app_path}/Contents/Frameworks" mkdir -p "${app_path}/Contents/Frameworks"
@@ -199,6 +236,10 @@ function sign_app_binaries() {
echo "Downloading git binary" echo "Downloading git binary"
download_git "${target_triple}" "${app_path}/Contents/MacOS/git" download_git "${target_triple}" "${app_path}/Contents/MacOS/git"
# PDFium is dlopen'd at runtime by the bundled pdf_viewer for native PDF viewing.
echo "Downloading pdfium library"
download_pdfium "${target_triple}" "${app_path}/Contents/Frameworks/libpdfium.dylib"
# Note: The app identifier for our development builds is the same as the app identifier for nightly. # Note: The app identifier for our development builds is the same as the app identifier for nightly.
cp crates/zed/contents/$channel/embedded.provisionprofile "${app_path}/Contents/" cp crates/zed/contents/$channel/embedded.provisionprofile "${app_path}/Contents/"