Ship the manual with the Arch package, the Windows installer and the APK
The rendered manual was in the repository and nowhere else, so an installed application still had nothing to open. Each packager now carries docs/manual/index.html and its pictures, to where the application will look for them: /usr/share/darkroom/manual on Arch, manual\ beside darkroom.exe on Windows (where the models already are, and where dr_plat::system_data_dirs points), and assets/manual in the APK, stored rather than deflated since a GIF or PNG is already compressed. The manual is about 27 MB, which the APK and the installer both grow by; the pictures are 1600x1100 screenshots and short GIFs, and against an APK that already carries 170 MB of inference runtime and 70 MB of models they are not worth re-encoding for. The pictures are LFS objects, so each packager refuses a pointer where a picture should be, as it already does for the models: shipped, a pointer is a manual of broken images that nothing reports. The Android and Windows CI legs therefore fetch docs/manual/media, which they excluded while nothing they built read it, and the installer smoke test checks that the page and every picture were installed.
This commit is contained in:
@@ -69,6 +69,23 @@ for dir in face scene inpaint; do
|
||||
done
|
||||
echo "==> staged $(ls "${STAGE}/models" | wc -l) model file(s)"
|
||||
|
||||
# The manual: the rendered page and its pictures, beside the executable where
|
||||
# dr_ui::manual looks on Windows (dr_plat::system_data_dirs is the exe's own
|
||||
# directory there). The pictures are LFS objects; a pointer is ~130 bytes of
|
||||
# text that every browser draws as a broken image, so refuse it here rather
|
||||
# than ship a manual with no pictures in it.
|
||||
mkdir -p "${STAGE}/manual/media"
|
||||
cp "${REPO}/docs/manual/index.html" "${STAGE}/manual/"
|
||||
for f in "${REPO}/docs/manual/media"/*; do
|
||||
if head -c 40 "${f}" | grep -q '^version https://git-lfs'; then
|
||||
echo "error: $(basename "${f}") is an LFS pointer, not a picture." >&2
|
||||
echo " run: git lfs pull --include='docs/manual/media/**'" >&2
|
||||
exit 1
|
||||
fi
|
||||
cp "${f}" "${STAGE}/manual/media/"
|
||||
done
|
||||
echo "==> staged the manual and $(ls "${STAGE}/manual/media" | wc -l) picture(s)"
|
||||
|
||||
# One installer in the output directory, the one just built. The directory
|
||||
# is cached between CI runs, so after a version bump a glob over it would find
|
||||
# two and the smoke test would hand Wine both names as one path.
|
||||
|
||||
Reference in New Issue
Block a user