build.settings validation

Heya,

I’m continually coming a cropper with build.settings files and in particular custom fonts. I’d love it if there was some console output or other means by which I could verify that the build.settings file is valid and that the fonts I’ve specified have been successfully found.

Even a separate utility or something would be wonderful.

Thanks, [import]uid: 11757 topic_id: 17178 reply_id: 317178[/import]

I would like to something like this as well.

I found that if there is anything wrong with the build.settings file, even a misplaced comma, just causes the file to not be used. I would prefer if there was some sort of output that says there is a problem with the build.settings file. [import]uid: 5317 topic_id: 17178 reply_id: 64702[/import]

Yes, this is a known problem. But for basic syntax validation, you might be able to run luac on build.settings. If it doesn’t compile, you have a syntax error. You can get luac from various places, e.g. LuaCocoa or compile it yourself.

[import]uid: 7563 topic_id: 17178 reply_id: 64743[/import]

Thanks for the tip ewing, I’ll make sure I give that a go next time it’s not working.

I suspect that for most people, one of the most common causes of cursing the build.settings file is trying to embed custom fonts. Still, to this day, and I’ve done it on several projects now, the process remains one of dark magic and foul language. In hindsight, I think that this might be because a font needs to be installed before the simulator can use it which I don’t think is mentioned in the example.

Out of interest, could you confirm if that is the case? I couldn’t get the standard Harrowprint custom font example to work until I installed the font into Lion’s Fontbook, but it could be something else changed at the same time…

Thanks, [import]uid: 11757 topic_id: 17178 reply_id: 64818[/import]

Actually just had an interesting issue with my build.settings file. The following caused Corona to consistently crash when building my app (652 & 623):

settings =  
{  
 orientation =  
 {  
 default = "portrait",  
 supported =  
 {  
 "portrait", "portraitUpsideDown"  
 }  
 },  
 iphone =  
 {  
 plist =  
 {  
 UIInterfaceOrientation = "UIInterfaceOrientationPortrait",  
  
 UISupportedInterfaceOrientations =  
 {  
 "UIInterfaceOrientationPortrait",  
 "UIInterfaceOrientationPortraitUpsideDown"  
 },  
  
 UIApplicationExitsOnSuspend = true,  
 UIStatusBarHidden = true,  
 UIPrerenderedIcon = true  
 UIAppFonts =   
 {  
 "insula.ttf","DeiGrat.ttf",  
 },  
  
 }  
 }  
}  

It took me a while to spot the missing comma. Interestingly, the above worked fine in the simulator!

The console output I got was:

2011-11-01 11:53:58.028 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.028 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.028 Corona Simulator[992:2403] [value]=FWFXD4UMBP [465746584434554d4250] 2011-11-01 11:53:58.029 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.030 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.030 Corona Simulator[992:2403] [value]=CE6NEL757B [4345364e454c37353742] 2011-11-01 11:53:58.031 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.031 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.031 Corona Simulator[992:2403] [value]=FWFXD4UMBP [465746584434554d4250] 2011-11-01 11:53:58.032 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.032 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.032 Corona Simulator[992:2403] [value]=CE6NEL757B [4345364e454c37353742] 2011-11-01 11:53:58.033 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.033 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.033 Corona Simulator[992:2403] [value]=CE6NEL757B [4345364e454c37353742] 2011-11-01 11:53:58.034 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.034 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.034 Corona Simulator[992:2403] [value]=FWFXD4UMBP [465746584434554d4250] 2011-11-01 11:53:58.034 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.035 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.035 Corona Simulator[992:2403] [value]=FWFXD4UMBP [465746584434554d4250] 2011-11-01 11:53:58.035 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.035 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.036 Corona Simulator[992:2403] [value]=FWFXD4UMBP [465746584434554d4250] 2011-11-01 11:53:58.036 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.036 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.036 Corona Simulator[992:2403] [value]=FWFXD4UMBP [465746584434554d4250] 2011-11-01 11:53:58.037 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.037 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.037 Corona Simulator[992:2403] [value]=FWFXD4UMBP [465746584434554d4250] 2011-11-01 11:53:58.038 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.038 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.038 Corona Simulator[992:2403] [value]=CE6NEL757B [4345364e454c37353742] 2011-11-01 11:53:58.039 Corona Simulator[992:2403] [type]= í&âìÚ,d [0992268993f22c640101] 2011-11-01 11:53:58.039 Corona Simulator[992:2403] [valueType]=12 2011-11-01 11:53:58.039 Corona Simulator[992:2403] [value]=CE6NEL757B [import]uid: 11757 topic_id: 17178 reply_id: 64837[/import]

well,
it will be very nice to have a build.settings check when you publish (or in corona sdk), sometimes i forgot a comma, and the build is taking forever before i see where is the problem :slight_smile:

Also, it would be nice to have in the API section an explanation of the build.settings, and the options, because even if now i know how to do them, i had to search through many posts on the forum. [import]uid: 44010 topic_id: 17178 reply_id: 65087[/import]