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:
@@ -59,6 +59,21 @@ package() {
|
||||
|
||||
install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
|
||||
|
||||
# The manual: the rendered page and its pictures, where the app's Help
|
||||
# opens it (dr_ui::manual, through dr_plat::system_data_dirs). Offline by
|
||||
# design — the help sheet's "See it" links land here, on a machine that
|
||||
# may have no network. The pictures are in LFS like the models, and a
|
||||
# pointer shipped in their place is a manual of broken images, so the
|
||||
# same refusal applies.
|
||||
install -Dm644 "docs/manual/index.html" "${pkgdir}/usr/share/darkroom/manual/index.html"
|
||||
for _f in 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 — run: git lfs pull" >&2
|
||||
return 1
|
||||
fi
|
||||
install -Dm644 "${_f}" "${pkgdir}/usr/share/darkroom/manual/media/$(basename "${_f}")"
|
||||
done
|
||||
|
||||
# The face models, into the last directory the app searches. A pair the
|
||||
# user placed in their own data directory outranks these, so installing
|
||||
# them cannot override a deliberate choice of weights.
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
;
|
||||
; makensis -DVERSION=0.12.0 -DSTAGE=/path/to/staging -DOUT=/path/to/setup.exe darkroom.nsi
|
||||
;
|
||||
; STAGE holds exactly what §5.2 installs: darkroom.exe, models\ and LICENSE.
|
||||
; STAGE holds exactly what §5.2 installs: darkroom.exe, models\, manual\ and
|
||||
; LICENSE.
|
||||
; package.sh assembles it and applies the LFS-pointer guard before this runs.
|
||||
|
||||
; A 64-bit installer, not NSIS's default 32-bit stub. The application is
|
||||
@@ -76,6 +77,13 @@ Section "DarkRoom" SecMain
|
||||
SetOutPath "$INSTDIR\models"
|
||||
File /r "${STAGE}\models\*"
|
||||
|
||||
; The manual and its pictures, opened by Help and by the help sheet's
|
||||
; "See it" links (dr_ui::manual). Beside the executable for the same reason
|
||||
; the models are: it is the one directory the application can find without
|
||||
; asking the registry.
|
||||
SetOutPath "$INSTDIR\manual"
|
||||
File /r "${STAGE}\manual\*"
|
||||
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
|
||||
; Add/Remove Programs. HKCU, to match the per-user install.
|
||||
@@ -114,6 +122,7 @@ Section "Uninstall"
|
||||
Delete "$INSTDIR\LICENSE"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
RMDir /r "$INSTDIR\models"
|
||||
RMDir /r "$INSTDIR\manual"
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
Delete "$SMPROGRAMS\${NAME}\${NAME}.lnk"
|
||||
|
||||
Reference in New Issue
Block a user