Takazudo Modular Docs

Type to search...

to open search from anywhere

l-build-tauri

Build Tauri apps and install to /Applications/. Supports --all, --wrappers, --standalone, or individual apps (--doc, --keyword, --mercari, --zmdpreview, --preorder-prev, --preorder-prod, --addac, --im...

Build Tauri Apps

Build one or more Tauri apps and install to /Applications/.

Arguments

Parse $ARGUMENTS for flags. If no flags provided, default to --all (build every app).

Flags

FlagDescription
--allBuild all 10 apps
--wrappersBuild all 6 wrapper apps
--standaloneBuild all 4 self-contained apps
--doctauri-doc (zmoddoc.app)
--keywordtauri-keyword-viewer (zkeywordviewer.app)
--mercaritauri-mercari-viewer (zmercariviewer.app)
--zmdpreviewtauri-zmdpreview (zmdpreview.app)
--preorder-prevtauri-zpreorder-prev (zpreorder-prev.app)
--preorder-prodtauri-zpreorder-prod (zpreorder-prod.app)
--addacaddac-order (addac-order.app)
--imgsimgs-viewer (imgs-viewer.app)
--image-stashimage-stash-viewer (image-stash-viewer.app)
--photo-managerphoto-manager (Photo Manager.app)

Multiple flags can be combined: --addac --imgs --doc

App Registry

Wrapper Apps (thin WebView wrappers around dev servers)

FlagSub-packageBuild CommandBundle PathApp Name
--docsub-packages/tauri-docpnpm buildtarget/release/bundle/macos/zmoddoc.appzmoddoc
--keywordsub-packages/tauri-keyword-viewerpnpm buildtarget/release/bundle/macos/zkeywordviewer.appzkeywordviewer
--mercarisub-packages/tauri-mercari-viewerpnpm buildtarget/release/bundle/macos/zmercariviewer.appzmercariviewer
--zmdpreviewsub-packages/tauri-zmdpreviewpnpm buildtarget/release/bundle/macos/zmdpreview.appzmdpreview
--preorder-prevsub-packages/tauri-zpreorder-prevpnpm buildtarget/release/bundle/macos/zpreorder-prev.appzpreorder-prev
--preorder-prodsub-packages/tauri-zpreorder-prodpnpm buildtarget/release/bundle/macos/zpreorder-prod.appzpreorder-prod

Self-Contained Apps (embedded Rust backend + Vite frontend)

FlagSub-packageBuild CommandBundle PathApp Name
--addacsub-packages/addac-orderpnpm tauri:buildsrc-tauri/target/release/bundle/macos/addac-order.appaddac-order
--imgssub-packages/imgs-viewerpnpm tauri:buildsrc-tauri/target/release/bundle/macos/imgs-viewer.appimgs-viewer
--image-stashsub-packages/image-stash-viewerpnpm tauri:buildsrc-tauri/target/release/bundle/macos/image-stash-viewer.appimage-stash-viewer
--photo-managersub-packages/photo-managerpnpm tauri:buildsrc-tauri/target/release/bundle/macos/Photo Manager.appPhoto Manager (Cargo crate: photo-manager)

Note on --photo-manager: the bundle dir, installed .app name, and binary inside Contents/MacOS/ all contain a literal space (Photo Manager). Quote every path that references it ("/Applications/Photo Manager.app", mv "src-tauri/.../Photo Manager.app" ...). For the cargo clean -p step use the Cargo crate name photo-manager (no space, hyphenated — from Cargo.toml’s [package].name), not the productName. For killall, use killall "Photo Manager" 2>/dev/null (quoted, with the space).

Build Procedure (per app)

Build apps sequentially (parallel builds compete for CPU/memory).

For each selected app:

Step 1: Clean Cargo cache (self-contained apps only)

Cargo can cache stale frontend assets even after Vite rebuilds. Always clean the crate before building self-contained apps:

cd <sub-package>/src-tauri && cargo clean -p <app-name> --release

This forces Cargo to re-link with the fresh dist/ assets. Skip this step for wrapper apps (they don’t embed frontend assets).

Step 2: Build

cd <sub-package> && <build-command>
  • beforeBuildCommand in tauri.conf.json automatically runs pnpm build (Vite) for self-contained apps
  • Verify the build time is reasonable (~30s+ for self-contained, ~20s+ for wrappers). If it finishes in under 5s, Cargo likely skipped recompilation — the clean step above prevents this

Read stdout/stderr carefully. If the build fails, report the error and skip to the next app.

Step 2: Kill running instance, remove old, install fresh

CRITICAL: cp -rf does NOT reliably update macOS .app bundles. The binary inside Contents/MacOS/ can stay stale. Always move the old bundle away first.

killall <app-name> 2>/dev/null; sleep 1
mv /Applications/<app-name>.app /tmp/<app-name>-old-$$.app 2>/dev/null
cp -R <sub-package>/<bundle-path> /Applications/<app-name>.app

Step 3: Verify binary timestamp

stat -f "%Sm" /Applications/<app-name>.app/Contents/MacOS/*

Confirm the timestamp is from just now (within the last few minutes).

Step 4: Clean up build artifacts

# Wrapper apps
rm -rf ./<sub-package>/target/release/bundle/

# Self-contained apps
rm -rf ./<sub-package>/src-tauri/target/release/bundle/

Step 5: Report

Report the app name, install path, and binary timestamp. Move to the next app.

After All Builds

Print a summary table:

AppStatusTimestamp
zmoddocOKApr 11 15:30
2026

Include any failures with error details.