Release apps use the GUI subsystem; workers, Git and cmd start with CREATE_NO_WINDOW. Each exe embeds its icon as resource 1, which gpui also loads for the window. Patch 0044: Win32 devices take no client buffer, so tiles and slide layers paint at full size, then copy. ely.xcd gives both schemes one notes colour: Calc rewrote the comment style on each switch and left an undo step. lo-patches.sh keeps LF. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
49 lines
1.5 KiB
Bash
Executable File
49 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# The series applies from a prefix, then as a no-op.
|
|
set -euo pipefail
|
|
|
|
root=$(cd "$(dirname "$0")/../.." && pwd)
|
|
src=$root/engines/lo-src
|
|
[ -d "$src/.git" ] || { echo "SKIP: no engines/lo-src"; exit 0; }
|
|
patches=("$root"/patches/libreoffice/*.patch)
|
|
files=$(sed -n 's|^+++ b/||p' "${patches[@]}" | sort -u)
|
|
work=$(mktemp -d)
|
|
trap 'rm -rf "$work"' EXIT
|
|
|
|
# Just the touched files at the pinned commit.
|
|
tree=$work/tree
|
|
mkdir -p "$tree"
|
|
git -C "$tree" init -q
|
|
# LF, as every tree here; Windows defaults convert.
|
|
git -C "$tree" config core.autocrlf false
|
|
for f in $files; do
|
|
if git -C "$src" cat-file -e "HEAD:$f" 2>/dev/null; then
|
|
mkdir -p "$tree/$(dirname "$f")"
|
|
git -C "$src" show "HEAD:$f" >"$tree/$f"
|
|
fi
|
|
done
|
|
git -C "$tree" add -A
|
|
git -C "$tree" -c user.name=t -c user.email=t@t commit -qm pin
|
|
|
|
half=$((${#patches[@]} / 2))
|
|
for ((i = 0; i < half; i++)); do
|
|
git -C "$tree" apply "${patches[$i]}"
|
|
done
|
|
out=$("$root/scripts/apply-lo-patches.sh" "$tree")
|
|
grep -q "^apply-lo-patches.sh: $half of ${#patches[@]} patches already" <<<"$out" || {
|
|
echo "FAIL: the prefix was not found: $out"
|
|
exit 1
|
|
}
|
|
out=$("$root/scripts/apply-lo-patches.sh" "$tree")
|
|
grep -q "${#patches[@]} of ${#patches[@]} patches already" <<<"$out" || {
|
|
echo "FAIL: a second run was not a no-op: $out"
|
|
exit 1
|
|
}
|
|
for f in $files; do
|
|
[ ! -e "$tree/$f" ] || cmp -s "$tree/$f" "$src/$f" || {
|
|
echo "FAIL: $f differs from engines/lo-src"
|
|
exit 1
|
|
}
|
|
done
|
|
echo "lo-patches: the series applies from patch $half and again as a no-op"
|