Cloudflare Pages / Build and verify the site (push) Successful in 3m29s
Use the verified dependency lock across native hosts and bundled apps. Preserve saved styles, local app reactivation, and offline packages while integrating the latest practice, Habits, Lumi, and figure preview updates.
34 lines
2.9 KiB
Makefile
34 lines
2.9 KiB
Makefile
# App packages: the app bundles, the node apps and the codecs they share.
|
|
|
|
# App records cross the bundle boundary with codecs generated by Kryon's
|
|
# generator on top of Kryon's own widget codec.
|
|
APP_CODEC_SCHEMAS := $(KRYON_DIR)/scripts/generate-widget-codecs.py $(KRYON_DIR)/src/backend/widget_codec.zi apps/diary/diary_ui_types.zi $(addprefix src/apps/,inbe_ui_types.zi lists_ui_types.zi lumi_ui_types.zi lumi_types.zi habits_ui_types.zi practice_ui_types.zi)
|
|
src/apps/app_codec.zi: scripts/generate-app-codec.py $(APP_CODEC_SCHEMAS)
|
|
python3 scripts/generate-app-codec.py
|
|
|
|
ENTITY_DIR := build/packages/entity
|
|
ENTITY_SOURCES = $(wildcard $(ENTITY_DIR)/src/*.zi $(ENTITY_DIR)/assets/entity/*)
|
|
# Use the locked dependency graph for the reviewed Apps controller payload.
|
|
APPS_DIR := build/packages/apps
|
|
APPS_BUNDLE ?= build/apps-ui/apps.zx
|
|
NODE_APP_NAMES := $(shell python3 -c 'import json; print(" ".join(json.load(open("apps/versions.json")).get("node_apps", {})))')
|
|
NODE_APP_BUNDLES := $(addprefix $(BUILD_DIR)/node-apps/,$(addsuffix .zx,$(NODE_APP_NAMES)))
|
|
$(BUILD_DIR)/apps-ui/apps.zx: ziran.toml ziran.lock $(ZIRAN_BIN) $(wildcard $(ZIRAN_BUILD_DIR)/bin/zi2zx) scripts/build-apps.py $(wildcard $(APPS_DIR)/ziran.lock $(APPS_DIR)/src/*.zi $(APPS_DIR)/ui/*.zi $(APPS_DIR)/ui/locales/*.json)
|
|
env -u DISPLAY -u WAYLAND_DISPLAY PATH="$(abspath $(dir $(ZIRAN_BIN))):$$PATH" \
|
|
python3 scripts/build-apps.py --ziran $(abspath $(ZIRAN_BIN)) --output $(abspath $(dir $@))
|
|
.PHONY: apps
|
|
apps: $(APP_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE)
|
|
|
|
$(APP_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE): scripts/package-paths.sh $(KRYON_DIR)/ziran.toml CHANGELOG.md $(wildcard locales/changelog/*.md) scripts/release_notes.py $(APPS_BUNDLE) src/apps/apps_controller.zi
|
|
$(APP_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE): $(NODE_APP_BUNDLES) scripts/small_app_bundling.py apps/bundled.json $(wildcard apps/bundled/*.zx apps/bundled/*.games/*.zx)
|
|
|
|
$(APP_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE) &: $(ENTITY_SOURCES) $(APP_SOURCES) $(APP_RESOURCES) ziran.lock apps/versions.json scripts/check-package-versions.py scripts/generate-package-versions.py scripts/prepare-package-assets.py scripts/achievement_icons.py scripts/animation_inventory.py scripts/build-apps.sh src/practices/sun_salutation/sun_salutation_assets.zi src/practices/sun_salutation/sun_salutation_inventory.zi $(IMAGE_FILES) $(SOUND_FILES) $(FONT_FILES) $(STYLE_FILES) $(LOCALE_FILES) $(ZIRAN_BIN)
|
|
sh scripts/build-apps.sh $(ZIRAN_BIN) $(BUILD_DIR)/apps $(APPS_BUNDLE)
|
|
|
|
# Build node apps independently before selecting the small offline baselines.
|
|
$(NODE_APP_BUNDLES) &: $(APP_SOURCES) $(shell rg --files $(addprefix assets/,$(NODE_APP_NAMES)) 2>/dev/null) apps/versions.json scripts/build-node-apps.sh scripts/prepare-package-assets.py scripts/achievement_icons.py $(ZIRAN_BIN) $(APPS_BUNDLE)
|
|
APPS_BUNDLE="$(abspath $(APPS_BUNDLE))" sh scripts/build-node-apps.sh $(ZIRAN_BIN)
|
|
|
|
.PHONY: node-apps
|
|
node-apps: $(NODE_APP_BUNDLES)
|