Build and release
Build and release
The OS image, the CI, the releases, the manuals and this site.
The OS image
You need Docker and about 20 GB of free disk. Then run:
os/build.sh # the release image
os/build.sh debug # the debug image
The first build runs for about one hour. The next builds run for a few minutes. The output is:
| File | What it is |
|---|---|
os/out/printdeck.img.xz | The full disk image, compressed with xz |
os/out/printdeck-update.tar.xz | The update bundle |
os/out/printdeck-debug.img.xz, os/out/printdeck-debug-update.tar.xz | The same for the debug image |
The build files are in ~/.cache/printdeck-os, or in PRINTDECK_OS_CACHE. Other Buildroot targets go through the same script:
os/build.sh menuconfig # change the system configuration
os/build.sh savedefconfig # write it back to os/configs/printdeck_defconfig
os/build.sh clean # delete the build files
os/build.sh debug clean # the same for the debug image
After you turn off a package, build from the start (os/build.sh clean, then os/build.sh).
Build the Printdeck OS image in a Docker container.
os/build.sh build the release image
os/build.sh debug build the debug image: the release image with SSH and tools
os/build.sh menuconfig any other Buildroot target, for example linux-menuconfig or clean
os/build.sh debug clean a Buildroot target of the debug build
The images are os/out/printdeck.img.xz and os/out/printdeck-debug.img.xz, each with its update bundle. The Buildroot tree, the downloads and the build output are in ~/.cache/printdeck-os (set PRINTDECK_OS_CACHE to change it). A full build takes about one hour.
Continuous integration
The workflow .github/workflows/os.yml builds the image on GitHub:
Builds the Printdeck OS image with os/build.sh, and signs its update bundle with the secret PRINTDECK_SIGNING_KEY (deck/internal/system/sign.go has the public key). A push to main does not build the image: the build takes about an hour.
| Event | What runs |
|---|---|
| tag vX.Y.Z | a stable release with the images |
| tag vX.Y.Z-beta.N | a beta: a pre-release, for the Printdecks on the beta channel |
| pull request | a check build of a change to the image, with no signature; the images are an artifact of the run |
| run by hand | a test build (release or debug); the images are an artifact of the run |
A release has the files printdeck.img.xz, printdeck-update.tar.xz and Printdeck.curapackage, the notes that GitHub generates, and the change log of scripts/changelog.sh. A tag with a hyphen, such as v0.3.0-beta.1, is a pre-release. The deck gets the betas when Beta updates is on.
The change log
Prints the change log of a release in Markdown, from the commits since the previous v* tag.
scripts/changelog.sh TAG [PREV]
PREV is the nearest earlier v* tag when it is not given. With no earlier tag, the log has all the commits up to TAG. Merge commits and commits that change only Markdown files or docs/ are not in the log. The Issues list has the closed GitHub issues in the range and the issues that the commits name as #N. It needs gh. If gh fails, the list is "None".
The Cura plugin package
Builds Printdeck.curapackage: drag it onto the Cura window to install the plugin. The version is the version of plugin.json.
The documentation
The workflow .github/workflows/pages.yml publishes docs/ to GitHub Pages at https://beetlebug.org/printdeck/, with the print files of the Slate v4 under files/slate/ and of the pod under files/pod/. It runs on a push to main that changes those files. The pages are in the repository: these scripts write them, and a commit publishes them.
The manuals
Builds the manual two times: for a display that is mounted tall (this folder), as on the pod, and for a display that is mounted wide (wide/). The deck draws the pictures and writes index.html (the web manual) and booklet.html (the instruction booklet). Then Chromium prints each booklet two times:
printdeck-manual.pdf the half-letter pages (5.5 x 8.5 in) in order. A print shop
makes a saddle-stitched booklet from this file.
printdeck-manual-print.pdf two pages on each side of a letter sheet, in the order of a
folded booklet. Print it on both sides (flip on the short
edge), then fold the stack and staple it in the fold.
Run it after a change to the UI.
The Cura plugin booklet
Builds the booklet of the Cura plugin in this folder. The deck writes booklet.html, index.html and the cover pictures. The screenshots of Cura are in img/. Then Chromium prints the booklet two times:
printdeck-cura.pdf the half-letter pages (5.5 x 8.5 in) in order.
printdeck-cura-print.pdf two pages on each side of a letter sheet, in the order of a folded
booklet. Print it on both sides (flip on the short edge), then fold
the stack and staple it in the fold.
Run it after a change to the plugin or to cura.go.
The Slate v4
lulzbot/slate.py export writes the print files of the Slate v4 in lulzbot/stl/slate/. The print page has them.
The Slate v4: the desk case of Printdeck. It holds the Raspberry Pi Touch Display 2 (5 inch, tall) and the Raspberry Pi 5 with its Active Cooler. The navy case is the top, and the orange base is the bottom. Two M3 screws hold the case on the base.
The case has the shape of the pod (pod.py): the frame around the display, and the body around the Pi, with the ports of the Pi flush with its walls. pod.py makes the geometry, and this file uses it with no change. The body has two rings on its inner floor, at the holes of the pod mount, with a pocket for an M3 hex nut in each. - Resin: the frame and the body are one part, slate-case_resin.stl. The display goes in from the front with the Pi on its back, and four M2.5 screws from the box of the display hold it. Two wells through the back give access to the two lower screws. - FDM: one part needs supports, so the case is two parts, slate-frame_fdm.stl and slate-body_fdm.stl, with four M3 x 6 screws into heat-set inserts, as the frame and the body of the pod.
The base is one part, after the chin and the back plate of the earlier Slate: - the chin: a band across the full width of the glass, under its bottom edge, with a lip in front of the glass; - the cheeks: the two sides of the chin go up beside the frame, under the edges of the glass, to below the ports in the left wall; - the ribs under the bottom of the case; - the back plate behind the body, GAP behind it, so the air goes to the vents in the back of the body; - the boss at the top of the back plate and the pad at its bottom, on the back of the body. Two M3 x 8 screws from behind go through the boss and the back of the body into the nuts, and pull the back of the body onto the boss and the pad. The case is complete before it goes on the base; - the foot: a flat plate on the desk, back to FOOT_BACK.
The case leans back by pod.TILT (15 degrees), as the earlier Slate.
World coordinates: x to the right, y to the back, z up. The desk is z = 0, and the bottom front edge of the glass is at y = 0, z = H0. Case coordinates (u, v, w) are the pod coordinates of pod.py.
Run: uv run --no-project --with build123d --with numpy --with scipy --with trimesh --with shapely --with networkx python slate.py [export | check | render | steps | assembly]
export writes the print files to stl/slate/ and checks them. assembly writes the parts in their places in the Slate to stl/slate/assembly/, for the 3D views of the project page. check prints the overlap, the tip and the stiffness checks. render writes renders/slate-*.png, with the views of the joint (headless EGL: set PYOPENGL_PLATFORM=egl, and add --with pyrender --with pillow).
The pod
lulzbot/pod.py export writes the print files of the pod in lulzbot/stl/pod/. The pod page has them.
The deck pod: the Raspberry Pi Touch Display 2 (5 inch), with the Pi 5 and its Active Cooler on the back of the display, in a printed case that fits close around them. A bracket for each printer holds the pod: the TAZ Workhorse bracket is here.
The glass of the display is the front of the pod. It is wider than the case, so the case is a smaller body behind the glass. The display hangs with its ribbon end down, and the Pi is on it as Raspberry Pi mounts it: the USB ports up, the ribbon folded around the PCIe end of the Pi. The deck turns the picture 180 degrees (Settings, or display_rotate=180 in printdeck.txt).
The body has two parts: a thin part around the display frame, and a deep part close around the Pi. The ports are the Pi's own ports, flush with the walls of the deep part: the USB-C power port and the two micro HDMI ports in the left wall, and the USB-A and Ethernet ports in the top wall. The printer cable plugs straight into the Pi from above.
The case is three printed parts. Each prints flat on its back with no support. - the frame: the thin part round the display, with a flat back ring over the metal back of the display and an opening for the Pi. Four M2.5 x 4 screws from the box of the display hold it, through the back ring into the four raised tabs. - the body: the deep part round the Pi. Every opening in it is open to the front, or a hole in the back. Four M3 x 6 screws go from the back down posts at its corners into M3 heat-set inserts in the frame. - the mount: a plate with the dovetail, held to the back of the body by two M3 x 6 cap screws from inside the body into M3 heat-set inserts in the mount.
The pod hangs on the bracket: the dovetail of the mount drops into a slot in the bracket from above. The bracket stands on the two rail clips and the cover screw.
Pod coordinates: u across the glass to the right (seen from the front), v up from the bottom edge of the glass, w out of the glass (the front of the glass is w = 0). The Pi is on the back: w < 0.
Run: uv run --no-project --with build123d --with numpy --with scipy --with trimesh --with networkx --with pyrender --with PyOpenGL python pod.py [OUT_DIR | live | export]
export writes the STL files for printing to stl/pod/fdm/ and stl/pod/resin/ (see stl/pod/README.md). The resin frame and mount have captive M3 hex nuts in place of the heat-set inserts.
This site
Printdeck: write the documentation site in docs/ (https://beetlebug.org/printdeck/).
The pages come from the files of the repository, so the site follows them:
README.md, ARCHITECTURE.md, os/README.md, printer/README.md, slicer/README.md, slicer/cura-plugin/README.md, deck/internal/klipper/PORTING.md, desktop/meshes/README.md, watch/README.md, cloud/relay/README.md, lulzbot/README.md, lulzbot/stl/slate/README.md, lulzbot/stl/pod/README.md the text of the pages docs/specs/printdeck-architecture.html the architecture pages lulzbot/stl/slate/, lulzbot/stl/pod/ the print files of the Slate v4 and the pod docs/manual/index.html, docs/manual/wide/index.html the screens of the deck deck/cmd/printdeck/*.go, deck/internal/config/config.go, os/board/, .github/workflows/, the build scripts the reference pages
Run it after docs/manual/build.sh or docs/cura/build.sh, after slate.py export or pod.py export, and after a change to a README. It needs only Python 3. At the end it checks every link of the site, and stops with an error for a link that goes nowhere.
docs/build.py