Exclude files from TARGET

Monkey Forums/Monkey Programming/Exclude files from TARGET

Alex(Posted 2013) [#1]
Hi!

I know this is maybe a simple question, but searching haven't gave any result.

Is there a way to exclude files from particular target?

For example, I don't need to use retina images from IOS target in my FLASH version of the game.
Can I write something like this anywhere...
"*@2x.png" or "*@2x*"
... to exclude those.

Thanks!


therevills(Posted 2013) [#2]
I think you can use the import command to do something like this:

#If TARGET = "flash"
  Import "flash/sprite.jpg"
#ElseIf TARGET = "html5"
  Import "html5/sprite.jpg"
#EndIf


But that's a lot of work... I think the only way is to manually delete the unwanted files from the build folder... unless I am wrong? :)


Alex(Posted 2013) [#3]
One more thing is the FLASH throws an error on files that contains "@".

So deleting them manually is not an option =(


Paul - Taiphoz(Posted 2013) [#4]
you could use a different file format for each target and then use the config to filter out the format you dont want, which will allow you to use a lower quality, say jpg for flash and a higher quality png for retina.

each target has its own format requirements tho so just double check which are available to the targets your looking at.


programmer(Posted 2013) [#5]
Support this pull request from devolonter: https://github.com/blitz-research/monkey/pull/30


Polan(Posted 2013) [#6]
you could try
Import TARGET+"/sprite.jpg"

and then just create folder named as targets and delete unwanted folders when you are ready to release?