switchbrew / switch-examples

Switch examples for devkitA64 and libnx.
https://devkitpro.org/viewforum.php?f=42
559 stars 99 forks source link

Is there a way to only re-pack romfs content of an app? #95

Closed iUltimateLP closed 2 years ago

iUltimateLP commented 2 years ago

Hey there! When working with a lot of romfs content, currently I always have to alter one character in any source file so make will repack the *.nro file - otherwise it'll say that there's nothing to do (since no source file changed, only romfs files did).

Is there some command to only force a romfs repack?

Thanks!

averne commented 2 years ago

This is an old question, but anyways: you can add an additional dependency on the nro target, that accounts for changes in your romfs assets.

For instance, in https://github.com/switchbrew/switch-examples/blob/master/templates/application/Makefile#L190-L193, add $(shell find $(ROMFS) -type 'f') after each target. This makes the nro target depend on every file found in your romfs directory, ie. your nro and its romfs will be rebuilt if any file in that directory has a timestamp newer than that of the nro.