lingmodeler
↓ 0 downloadsLingModeler: box modeling with quads and tris, rigging + weight painting, 2D vector illustration and animation, procedural textures and game assets; .lmesh / .ling native formats, OBJ, glTF and SVG import / export
Keywords 3d, modeling, vector, svg, gltf, obj, rigging, animation, textures, ling
lingfu install lingmodelerCode / Files (67)
tools/lingos_qemu_test.sh
#!/usr/bin/env bash
# Boot the LingOS x86-64 image that carries LingModeler in headless QEMU, open it from the Applications menu
# (Super, Down x9 = the built-in app row, Enter) and screendump it. Run under WSL (qemu, grub-mkrescue, ffmpeg).
# wsl bash tools/lingos_qemu_test.sh
set -uo pipefail
HERE="$(cd "$(dirname "$0")/.." && pwd)"
OS="$HERE/../LingOS"
ELF="$OS/dist/kernel/lingos-lingmodeler-x86_64"
OUT="$HERE/screenshots/lingos"; mkdir -p "$OUT"
WORK="$(mktemp -d)"
[ -f "$ELF" ] || { echo "build it first: tools/build_lingos.ps1 -Only x86"; exit 1; }
mkdir -p "$WORK/iso/boot/grub"
cp "$ELF" "$WORK/iso/boot/lingmodeler.elf"
printf 'set timeout=0\nset default=0\nmenuentry "LingOS + LingModeler" {\n multiboot2 /boot/lingmodeler.elf\n boot\n}\n' > "$WORK/iso/boot/grub/grub.cfg"
grub-mkrescue -o "$WORK/lm.iso" "$WORK/iso" >/dev/null 2>&1 || { echo "grub-mkrescue failed"; exit 1; }
qemu-img create -f raw "$WORK/disk.img" 64M >/dev/null
{
sleep 20
echo "sendkey ret" # locale
sleep 3
echo "sendkey n" # services prompt -> desktop
sleep 12
echo "screendump $OUT/desktop.ppm"
echo "sendkey meta_l" # Applications menu
sleep 1
for i in 1 2 3 4 5 6 7 8 9; do echo "sendkey down"; sleep 0.6; done
echo "screendump $OUT/menu.ppm"
echo "sendkey ret" # the built-in app: LingModeler
sleep ${WAIT:-40}
echo "screendump $OUT/app.ppm"
for i in $(seq 1 30); do echo "mouse_move 6 3"; sleep 0.1; done # some pointer activity
sleep 2
sleep 1
# click the Vector mode tab (pointer is near 183,97 after the moves above)
for i in $(seq 1 26); do echo "mouse_move 10 -2"; sleep 0.1; done
sleep 2
echo "screendump $OUT/app-hover.ppm"
echo "mouse_button 1"; sleep 0.5; echo "mouse_button 0"
sleep 15
echo "screendump $OUT/app-vector.ppm"
sleep 1
echo "quit"
} | qemu-system-x86_64 -cdrom "$WORK/lm.iso" -drive file="$WORK/disk.img",format=raw,if=ide,index=0 \
-serial file:"$OUT/serial.log" -display none -monitor stdio -m 512M >/dev/null 2>&1
for n in desktop menu app app-hover app-vector; do ffmpeg -y -loglevel error -i "$OUT/$n.ppm" "$OUT/$n.png" && rm -f "$OUT/$n.ppm"; done
rm -rf "$WORK"
ls -la "$OUT"