diff --git a/README.md b/README.md index 88173a82..08903849 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ Build settings are configurable in `tup.config`. - `CONFIG_DEFAULT_ADVPNG`: Command line to pass to `advpng`. - `CONFIG_TRAINERS_{OPTIPNG,ADVPNG}`: Compression options for `trainers/` only. - `CONFIG_DEX_{OPTIPNG,ADVPNG}`: Compression options for `dex/` only. +- `CONFIG_MODELS_{OPTIPNG,ADVPNG}`: Compression options for `models/` only. For example, these settings reflect the compression settings for the files chaos uploaded in `src/`: ``` diff --git a/Tupfile.lua b/Tupfile.lua index f8fc9da1..3237935e 100644 --- a/Tupfile.lua +++ b/Tupfile.lua @@ -32,7 +32,8 @@ tup.rule( function fbsprite(input, output) tup.foreach_rule( input, - "^ fbsprite %f^ tools/fbsprite.sh %f %o", + "^ fbsprite %f^ " .. makecmd{"tools/fbsprite.sh %f %o", + compresspng{config="MODELS"}}, output ) end @@ -40,7 +41,8 @@ end function twittersprite(input, output) tup.foreach_rule( input, - "^ twittersprite %f^ tools/twittersprite.sh %f %o", + "^ twittersprite %f^ " .. makecmd{"tools/twittersprite.sh %f %o", + compresspng{config="MODELS"}}, output ) end