Windows and Linux build environments; check clean on both (E-01)
MuPDF builds with MSBuild on Windows (/MT, OpenSSL from vcpkg); Git for Windows' MinGit stands in for the source build there. CEF loads from where libcef lives and sets its API version first on every platform. File identity on Windows compares volume and index. The checkout and reference/ keep LF on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d59159cea2
commit
68b5af76e0
40 files changed
+380
-82
No files matched your search
@@ -7,6 +7,26 @@ src=$root/engines/git-src
|
||||
out=$root/engines/git
|
||||
jobs=$(sysctl -n hw.ncpu 2>/dev/null || nproc)
|
||||
|
||||
# Windows: Git for Windows' MinGit at the same version, checked.
|
||||
case $(uname -s) in
|
||||
MINGW* | MSYS*)
|
||||
asset=MinGit-2.56.0-64-bit.zip
|
||||
sum=064b440ff870ed5198527e8f3a92cdf5bd2fd0fedf5e718af95e3fdaddeff718
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
curl -fsSL -o "$work/$asset" "https://github.com/git-for-windows/git/releases/download/v2.56.0.windows.1/$asset"
|
||||
got=$(shasum -a 256 "$work/$asset" | cut -d' ' -f1)
|
||||
[ "$got" = "$sum" ] || {
|
||||
echo "build-git.sh: $asset hash $got, want $sum" >&2
|
||||
exit 1
|
||||
}
|
||||
rm -rf "$out"
|
||||
unzip -q "$work/$asset" -d "$out"
|
||||
"$out/cmd/git.exe" --version
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# reference/ stays read-only; the build runs in a copy.
|
||||
mkdir -p "$src"
|
||||
rsync -a --delete --exclude .git "$root/reference/git/" "$src/"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds the pinned LibreOffice with the macOS LOK patches.
|
||||
# Builds the pinned LibreOffice with Ely's LOK patches.
|
||||
set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/.." && pwd)
|
||||
@@ -40,10 +40,44 @@ options=(
|
||||
--with-myspell-dicts
|
||||
)
|
||||
|
||||
[ "$(uname)" = Darwin ] || {
|
||||
echo "build-libreoffice.sh: macOS only; Linux and Windows use the TDF builds" >&2
|
||||
exit 1
|
||||
}
|
||||
case $(uname) in
|
||||
Darwin)
|
||||
app=$src/instdir/LibreOffice.app/Contents/Resources
|
||||
jobs=$(sysctl -n hw.ncpu)
|
||||
;;
|
||||
Linux)
|
||||
# Collabora's LOKit set: headless, bundled libraries.
|
||||
options+=(
|
||||
--disable-gui
|
||||
--enable-cairo-rgba
|
||||
--disable-dbus
|
||||
--disable-gio
|
||||
--disable-dconf
|
||||
--disable-randr
|
||||
--disable-gstreamer-1-0
|
||||
--without-system-cairo
|
||||
--without-system-fontconfig
|
||||
--without-system-freetype
|
||||
--without-system-graphite
|
||||
--without-system-harfbuzz
|
||||
--without-system-openssl
|
||||
--without-system-libpng
|
||||
--without-system-libxml
|
||||
--without-system-jpeg
|
||||
--without-system-expat
|
||||
--without-system-curl
|
||||
--without-system-icu
|
||||
--without-system-nss
|
||||
--without-system-zlib
|
||||
)
|
||||
app=$src/instdir/share
|
||||
jobs=$(nproc)
|
||||
;;
|
||||
*)
|
||||
echo "build-libreoffice.sh: no build for $(uname)" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
if [ ! -d "$src/.git" ]; then
|
||||
git init -q "$src"
|
||||
git -C "$src" remote add origin https://github.com/LibreOffice/core.git
|
||||
@@ -59,21 +93,23 @@ git -C "$src" submodule update -q --init --depth 1 dictionaries
|
||||
}
|
||||
"$root/scripts/apply-lo-patches.sh" "$src"
|
||||
|
||||
for tool in make gnu-sed bison flex gettext; do
|
||||
prefix=$(brew --prefix "$tool")
|
||||
PATH=$prefix/libexec/gnubin:$prefix/bin:$PATH
|
||||
done
|
||||
export PATH PKG_CONFIG_LIBDIR=/var/empty PKG_CONFIG_PATH=
|
||||
if [ "$(uname)" = Darwin ]; then
|
||||
for tool in make gnu-sed bison flex gettext; do
|
||||
prefix=$(brew --prefix "$tool")
|
||||
PATH=$prefix/libexec/gnubin:$prefix/bin:$PATH
|
||||
done
|
||||
export PATH PKG_CONFIG_LIBDIR=/var/empty PKG_CONFIG_PATH=
|
||||
fi
|
||||
|
||||
cd "$src"
|
||||
if [ ! -f config_host.mk ] || ! printf '%s\n' "${options[@]}" | cmp -s - autogen.lastrun; then
|
||||
./autogen.sh "${options[@]}"
|
||||
fi
|
||||
make -j"$(sysctl -n hw.ncpu)"
|
||||
make -j"$jobs"
|
||||
|
||||
# Bundled dictionaries: English only; each one slows LOK start (PERF-01).
|
||||
keep=(dict-en)
|
||||
extensions=$src/instdir/LibreOffice.app/Contents/Resources/extensions
|
||||
extensions=$app/extensions
|
||||
for dict in "$extensions"/dict-*; do
|
||||
name=$(basename "$dict")
|
||||
if [[ " ${keep[*]} " != *" $name "* ]]; then
|
||||
@@ -82,6 +118,8 @@ for dict in "$extensions"/dict-*; do
|
||||
done
|
||||
echo "build-libreoffice.sh: dictionaries kept: $(ls "$extensions" | tr '\n' ' ')"
|
||||
# Ely's kernel defaults: Excel A1 formulas.
|
||||
cp "$root/packaging/libreoffice/ely.xcd" "$src/instdir/LibreOffice.app/Contents/Resources/registry/"
|
||||
cp "$root/packaging/libreoffice/ely.xcd" "$app/registry/"
|
||||
|
||||
"$root/scripts/inert-lo.sh" "$src/instdir/LibreOffice.app"
|
||||
if [ "$(uname)" = Darwin ]; then
|
||||
"$root/scripts/inert-lo.sh" "$src/instdir/LibreOffice.app"
|
||||
fi
|
||||
+36
-1
@@ -9,10 +9,45 @@ jobs=$(sysctl -n hw.ncpu 2>/dev/null || nproc)
|
||||
|
||||
# reference/ stays read-only; the copy takes the patches.
|
||||
mkdir -p "$src"
|
||||
rsync -a --delete --exclude .git "$root/reference/mupdf/" "$src/"
|
||||
case $(uname -s) in
|
||||
MINGW* | MSYS*)
|
||||
rm -rf "$src" && mkdir -p "$src"
|
||||
tar -C "$root/reference/mupdf" --exclude .git -cf - . | tar -C "$src" -xf -
|
||||
;;
|
||||
*) rsync -a --delete --exclude .git "$root/reference/mupdf/" "$src/" ;;
|
||||
esac
|
||||
for patch in "$root"/patches/mupdf/*.patch; do
|
||||
patch -d "$src" -p1 --forward --batch --quiet <"$patch"
|
||||
done
|
||||
case $(uname -s) in
|
||||
MINGW* | MSYS*)
|
||||
# MSVC: the static runtime Rust links, OpenSSL from vcpkg.
|
||||
ssl=$(cygpath -w "$root/engines/vcpkg/installed/x64-windows-static")
|
||||
[ -f "$ssl/lib/libcrypto.lib" ] || {
|
||||
echo "build-mupdf.sh: no static OpenSSL; run engines/vcpkg/vcpkg install openssl:x64-windows-static" >&2
|
||||
exit 1
|
||||
}
|
||||
cat >"$src/ely.props" <<PROPS
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>HAVE_LIBCRYPTO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$ssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
PROPS
|
||||
msbuild=$("/c/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe" -latest -find 'MSBuild\**\Bin\MSBuild.exe' | tr -d '\r')
|
||||
"$msbuild" "$(cygpath -w "$src/platform/win32/mupdf.sln")" -m -nologo -v:minimal \
|
||||
-t:libmupdf -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v143 \
|
||||
-p:ForceImportAfterCppTargets="$(cygpath -w "$src/ely.props")"
|
||||
rm -rf "$out" && mkdir -p "$out"
|
||||
cp "$src"/platform/win32/x64/Release/*.lib "$out/"
|
||||
ls "$out"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
flags="build=release HAVE_X11=no HAVE_GLUT=no HAVE_CURL=no HAVE_LIBCRYPTO=yes tesseract=yes"
|
||||
# make does not track flags; a change rebuilds all.
|
||||
if [ "$(cat "$out/.flags" 2>/dev/null)" != "$flags" ]; then
|
||||
|
||||
@@ -4,7 +4,9 @@ set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/.." && pwd)
|
||||
[ -d "$root/reference/cef-rs" ] || { echo "fetch-cef: run scripts/fetch-references.sh first" >&2; exit 1; }
|
||||
work=$(mktemp -d)
|
||||
# Not the system temp: Windows may block programs there.
|
||||
mkdir -p "$root/engines"
|
||||
work=$(mktemp -d "$root/engines/cef-export.XXXXXX")
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
cd "$root/reference/cef-rs"
|
||||
# The exporter checks each archive against CEF's own index.
|
||||
|
||||
@@ -4,12 +4,18 @@ set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/.." && pwd)
|
||||
exec_dir=$root/engines/git/libexec/git-core
|
||||
git=$root/engines/git/bin/git
|
||||
exe=
|
||||
version=v3.8.0
|
||||
case "$(uname -s)-$(uname -m)" in
|
||||
Darwin-arm64) asset=git-lfs-darwin-arm64-$version.zip sum=caff76a7d070d8160c89bc39b6e85d98f24135b6fed038a3b4de2590d25102d8 ;;
|
||||
Darwin-x86_64) asset=git-lfs-darwin-amd64-$version.zip sum=f1c17aeca0b4eaab9ea606226477dbed3b84b56fe0811a9f967d2ea2b2393c53 ;;
|
||||
Linux-x86_64) asset=git-lfs-linux-amd64-$version.tar.gz sum=e455e00f15d9b95661b8d53498ffb0c3367962cf1ec73c31ab7369516cd6ab8d ;;
|
||||
Linux-aarch64) asset=git-lfs-linux-arm64-$version.tar.gz sum=ac9c8efac980bb0505ead384d087e2acb6486fd8498691a2165fa174ec6118c2 ;;
|
||||
MINGW*-x86_64 | MSYS*-x86_64)
|
||||
asset=git-lfs-windows-amd64-$version.zip sum=b62e7b8ceddee635f691233d77de8eaa4b213e9209e0173811d8cfa77f7882c1
|
||||
exec_dir=$root/engines/git/ucrt64/libexec/git-core git=$root/engines/git/cmd/git.exe exe=.exe
|
||||
;;
|
||||
*) echo "fetch-git-lfs: no pinned build for $(uname -s)-$(uname -m)" >&2; exit 1 ;;
|
||||
esac
|
||||
[ -d "$exec_dir" ] || { echo "fetch-git-lfs: build Git first (scripts/build-git.sh)" >&2; exit 1; }
|
||||
@@ -25,7 +31,7 @@ case "$asset" in
|
||||
*.zip) unzip -q "$work/$asset" -d "$work/x" ;;
|
||||
*) mkdir "$work/x" && tar -xzf "$work/$asset" -C "$work/x" ;;
|
||||
esac
|
||||
install -m 755 "$(find "$work/x" -type f -name git-lfs | head -1)" "$exec_dir/git-lfs"
|
||||
install -m 755 "$(find "$work/x" -type f -name "git-lfs$exe" | head -1)" "$exec_dir/git-lfs$exe"
|
||||
# The archive has no licence; the tag's own, checked.
|
||||
curl -fsSL -o "$work/LICENSE.md" "https://raw.githubusercontent.com/git-lfs/git-lfs/$version/LICENSE.md"
|
||||
got=$(shasum -a 256 "$work/LICENSE.md" | cut -d' ' -f1)
|
||||
@@ -35,4 +41,4 @@ got=$(shasum -a 256 "$work/LICENSE.md" | cut -d' ' -f1)
|
||||
}
|
||||
mkdir -p "$root/engines/git/share/doc/git-lfs"
|
||||
install -m 644 "$work/LICENSE.md" "$root/engines/git/share/doc/git-lfs/LICENSE.md"
|
||||
"$root/engines/git/bin/git" lfs version
|
||||
"$git" lfs version
|
||||
@@ -21,6 +21,9 @@ fetch() { # name url rev [sparse paths...]
|
||||
fi
|
||||
rm -rf "$dir"
|
||||
git init -q "$dir"
|
||||
# Upstream bytes, whatever the host's line-ending setting.
|
||||
git -C "$dir" config core.autocrlf false
|
||||
git -C "$dir" config core.eol lf
|
||||
git -C "$dir" remote add origin "$url"
|
||||
if [ $# -gt 0 ]; then
|
||||
git -C "$dir" sparse-checkout init --cone
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: review.sh <item-id> <round> [path...] — codex high review.
|
||||
# Usage: review.sh <item-id> <round> [path...] — codex high, fast review.
|
||||
set -euo pipefail
|
||||
|
||||
[ "${HERDR_ENV:-}" = 1 ] || { echo "review.sh: not inside herdr" >&2; exit 2; }
|
||||
@@ -22,6 +22,7 @@ Read the line for $id in $list and the PRD.md sections it cites (for tasks/BUGS.
|
||||
Scope: $scope
|
||||
Find defects only: behavior that breaks the PRD, errors swallowed, silent fallbacks, dead code, files over 500 lines, comments over one line or ten words, boxes inside boxes or useless subtitles in UI, abstractions with one user, missing or weak tests, claims no evidence backs. Build and run the tests yourself.
|
||||
Copies of the tree you build for probes use their own CARGO_TARGET_DIR, never ./target: crates bake their source path in. Delete those copies and their target dirs before you write the verdict; keep only small logs.
|
||||
On Windows, build and run nothing under %TEMP%: Application Control blocks programs there. Linux runs in WSL (wsl -d Ubuntu); its clone at ~/Documents/Github/ElyOffice holds this tree's changes.
|
||||
Do not suggest enhancements. Do not reject for taste. Edit no file except the verdict.
|
||||
Round 2 and later: read the previous verdict tasks/reviews/$id-r$((round - 1)).md, confirm each defect is fixed, then look for new defects in changed code.
|
||||
Write the verdict to $verdict. Line one is PASS or FAIL. After that, one entry per defect: file:line, what is wrong, a concrete failing scenario, the direction of the fix.
|
||||
@@ -36,7 +37,7 @@ pane=$(herdr pane split --current --direction right --cwd "$PWD" --no-focus | jq
|
||||
echo "$pane" >"$last"
|
||||
started=
|
||||
for _ in 1 2 3 4 5; do
|
||||
if err=$(herdr agent start "$name" --kind codex --pane "$pane" --timeout 120000 -- --model gpt-6.1-sol -c 'model_reasoning_effort="high"' -c check_for_update_on_startup=false 2>&1); then
|
||||
if err=$(herdr agent start "$name" --kind codex --pane "$pane" --timeout 120000 -- --yolo --model gpt-6.1-sol -c 'model_reasoning_effort="high"' -c 'service_tier="fast"' -c check_for_update_on_startup=false 2>&1); then
|
||||
started=1
|
||||
break
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user