The kernel is the merged library on every platform; Windows and Linux find it beside the app in libreoffice/program. All three run unipoll: macOS through GCD, Linux by answering one request per poll, Windows through a message-only window on the loop's thread (LOK's own main thread had deadlocked Calc loads). Patch 0043 flushes callbacks inline everywhere, so a request sees its result; 0042 stops MSVC's Boost auto-link. Linux paints with cairo, BGRA; the start-up check now paints red text and finds red in byte two on every platform, since getTileMode does not see Skia. ely-lok on Windows: 180 of 189 pass; on Linux 187. The rest are listed after 0.1.3 (spelling, Calc dark tiles, show layers and fields, a11y selection). Tests build file URLs portably and accept CRLF where Windows writes it. packaging/stage.sh lays out an app with its engines for Windows and Linux; licenses.sh finds each licence on all three. ElyMark finds its page beside the app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
82 lines
3.3 KiB
Bash
Executable File
82 lines
3.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Writes an app's licences and notices. Usage: licenses.sh <slug> <dir>
|
|
set -euo pipefail
|
|
|
|
root=$(cd "$(dirname "$0")/.." && pwd)
|
|
slug=${1:?app slug}
|
|
out=${2:?licence folder}
|
|
put() { # into, files...
|
|
local into=$out/$1
|
|
shift
|
|
mkdir -p "$into"
|
|
for file in "$@"; do
|
|
[ -s "$file" ] || {
|
|
echo "licenses.sh: no $file; the release cannot ship without it" >&2
|
|
exit 1
|
|
}
|
|
cp "$file" "$into/"
|
|
done
|
|
}
|
|
put . "$root/LICENSE"
|
|
case $slug in
|
|
ely-doc | ely-table | ely-show) crates=(ely-lok) ;;
|
|
ely-pdf) crates=(ely-pdf-engine) ;;
|
|
ely-mark) crates=(ely-web-content) ;;
|
|
*) crates=() ;;
|
|
esac
|
|
python3 "$root/packaging/crates.py" "$slug" ${crates[@]+"${crates[@]}"} >"$out/rust-crates.txt"
|
|
case $(uname) in
|
|
Darwin) lo=${ELY_LO_APP:-$root/engines/lo-src/instdir/LibreOffice.app}/Contents/Resources ;;
|
|
*) lo=${ELY_LO_DIR:-$root/engines/lo-src/instdir} ;;
|
|
esac
|
|
# Windows builds name LibreOffice's licence license.txt.
|
|
lo_licence=$lo/LICENSE
|
|
[ -e "$lo_licence" ] || lo_licence=$lo/license.txt
|
|
case $slug in
|
|
ely-doc | ely-table | ely-show)
|
|
put LibreOffice "$lo_licence" "$lo/LICENSE.html" "$lo/NOTICE" "$lo/CREDITS.fodt"
|
|
;;
|
|
ely-pdf)
|
|
put MuPDF "$root/engines/mupdf-src/COPYING"
|
|
# Every third party the MuPDF build compiled in.
|
|
for part in "$root"/engines/mupdf-build/thirdparty/*; do
|
|
name=${part##*/}
|
|
found=$(find "$root/engines/mupdf-src/thirdparty/$name" -maxdepth 1 -type f \
|
|
\( -iname 'licen[cs]e*' -o -iname 'copying*' -o -iname '*-license.txt' \))
|
|
[ "$name" = libjpeg ] && found=$root/engines/mupdf-src/thirdparty/libjpeg/README
|
|
[ -n "$found" ] || { echo "licenses.sh: no licence for MuPDF's $name" >&2; exit 1; }
|
|
# shellcheck disable=SC2086
|
|
put "MuPDF/$name" $found
|
|
done
|
|
# Every font family MuPDF built into the worker.
|
|
for part in "$root"/engines/mupdf-build/generated/resources/fonts/*; do
|
|
name=${part##*/}
|
|
fonts=$root/engines/mupdf-src/resources/fonts/$name
|
|
found=$(find "$fonts" -maxdepth 1 -type f \( -iname 'licen[cs]e*' -o -iname 'copying*' -o -iname 'notice*' -o -iname 'ofl*' \))
|
|
[ -n "$found" ] || { echo "licenses.sh: no licence for MuPDF's $name fonts" >&2; exit 1; }
|
|
# A README tells the fonts' source; never the licence.
|
|
found="$found $(find "$fonts" -maxdepth 1 -type f -iname 'readme*')"
|
|
# shellcheck disable=SC2086
|
|
put "MuPDF/fonts/$name" $found
|
|
done
|
|
case $(uname) in
|
|
MINGW* | MSYS*) put OpenSSL "$root/engines/vcpkg/installed/x64-windows-static/share/openssl/copyright" ;;
|
|
*) put OpenSSL "$(pkg-config --variable=prefix libcrypto)/LICENSE.txt" ;;
|
|
esac
|
|
put tessdata "${ELY_TESSDATA:-$root/engines/tessdata}/LICENSE"
|
|
put GreatVibes "$root/crates/ely-pdf-engine/fonts/OFL.txt"
|
|
;;
|
|
ely-mark)
|
|
put CEF "$root/reference/cef/LICENSE.txt" "${ELY_CEF:-$root/engines/cef}/CREDITS.html"
|
|
put content "$root/engines/content/ely-mark/THIRD-PARTY-NOTICES.txt"
|
|
;;
|
|
esac
|
|
# ElyTree carries Git; on Windows and Linux ElyMark does too.
|
|
if [ "$slug" = ely-tree ] || { [ "$slug" = ely-mark ] && [ "$(uname)" != Darwin ]; }; then
|
|
case $(uname) in
|
|
MINGW* | MSYS*) put Git "$root/engines/git/LICENSE.txt" ;;
|
|
*) put Git "$root/engines/git-src/COPYING" "$root/engines/git-src/LGPL-2.1" ;;
|
|
esac
|
|
put git-lfs "$root/engines/git/share/doc/git-lfs/LICENSE.md"
|
|
fi
|