mirror of
https://github.com/knutwurst/patchdl.git
synced 2026-10-06 08:00:21 +02:00
Home-screen tile via sceAppInstUtilAppInstallTitleDir
Write param.json + icon0.png into /user/app/<TITLE_ID>/sce_sys/, then call sceAppInstUtilAppInstallTitleDir to register the directory as an app. No package, no code signing — the installer reads the metadata files directly. The tile uses TITLE_ID PTDL00001 and deeplinkUri http://127.0.0.1:12880/, so tapping it opens PatchDL's own UI in the on-console browser. Only useful while the ELF is running. Asset pipeline: param.json + icon0.png live under assets/ and get .incbin'd straight into .rodata. Makefile lists them as TILE_ASSETS so a touch on either forces a relink. Stat-guard: file_matches() diffs each asset against the on-disk copy first; when nothing changed the install API isn't called at all. Keeps repeated payload starts from re-registering the app. Repeated /api/install_tile calls return "already installed and up to date". Backend lazy-load: AppInstUtil isn't mapped until something pokes it, so the helper polls patchdl_install_backend_check() for up to ~15 s before resolving sceAppInstUtilAppInstallTitleDir. Wiring: /api/install_tile POST triggers the install on demand; patchdl_websrv_start() runs it at startup when home_shortcut is on; and flipping the toggle from off to on in /api/config also fires it. All three paths share the stat-guarded helper so they're safe to repeat.
This commit is contained in:
1 parent
d0ca22d42d
commit
fcd43b54ae
7 files changed
+302
-5
No files matched your search
@@ -23,7 +23,12 @@ SRCS := src/main.c \
|
||||
src/patchdl_resolve.c \
|
||||
src/patchdl_verxml.c \
|
||||
src/patchdl_install.c \
|
||||
src/patchdl_notify.c
|
||||
src/patchdl_notify.c \
|
||||
src/patchdl_tile.c
|
||||
|
||||
# patchdl_tile.c uses .incbin to embed param.json + icon0.png; touching the
|
||||
# assets must trigger a rebuild.
|
||||
TILE_ASSETS := assets/param.json assets/icon0.png
|
||||
|
||||
WEB_ASSETS := web/index.html web/styles.css web/app.js
|
||||
GEN_SRCS := $(patsubst web/%,gen/web/%.c,$(WEB_ASSETS))
|
||||
@@ -56,8 +61,8 @@ gen/web/%.c: web/% scripts/gen_asset_module.py | gen/web
|
||||
$(SQLITE_OBJ): $(SQLITE_DIR)/sqlite3.c
|
||||
$(CC) $(SQLITE_CFLAGS) -c -o $@ $<
|
||||
|
||||
$(BIN): $(SRCS) $(GEN_SRCS) $(SQLITE_OBJ)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDADD)
|
||||
$(BIN): $(SRCS) $(GEN_SRCS) $(SQLITE_OBJ) $(TILE_ASSETS)
|
||||
$(CC) $(CFLAGS) -o $@ $(SRCS) $(GEN_SRCS) $(SQLITE_OBJ) $(LDADD)
|
||||
|
||||
test: $(BIN)
|
||||
$(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^
|
||||
|
||||
Reference in new issue
Block a user