Using CONFIG.TXT for per-target data

Monkey Forums/Monkey Programming/Using CONFIG.TXT for per-target data

ChristianK(Posted 2012) [#1]
Is it possible to use the CONFIG.TXT file to determine which files will be copied to the build folder? For example, I don't want to include the "@2x" retina graphics for iOS when building for the Flash target.
I thought about something like this, but it doesn't work (doesn't copy any files at all):
IMAGE_FILES=iOS/*.png|iOS/*.jpg

Someone in this thread http://www.monkeycoder.co.nz/Community/posts.php?topic=538 suggested a solution over a year ago, using Import to include each file explicitly, but this is a bit unflexible when you have a lot of files.

Is there a better way to do it?


therevills(Posted 2012) [#2]
Could you try:
[monkeycode]
#if TARGET="ios"
#IMAGE_FILES="*.png"
#ElseIf TARGET="html5"
#IMAGE_FILES="*.jpg"
#End[/monkeycode]


marksibly(Posted 2012) [#3]
Hi,

> IMAGE_FILES=iOS/*.png|iOS/*.jpg

Weird, that should work...will investigate.