Build questions

Member
Posts: 306
Joined: 2009.03
Post: #1
I have 2 build targets, regular and lite. 2 questions about this.
1)Right now I have a #define IS_LITE that I have to manually comment in or out to make the code behave differently. I am sure you can do this via the build target. Anyone have an example of how?

2)Has anyone actually submitted an app to apple that changed the icon.png filename in their plist? That way i could have liteicon.png and icon.png. It seems like this would work but wanted to see if anyone actually has done it and had no problems.

Thanks.
Quote this message in a reply
Member
Posts: 166
Joined: 2009.04
Post: #2
kendric Wrote:I have 2 build targets, regular and lite. 2 questions about this.
1)Right now I have a #define IS_LITE that I have to manually comment in or out to make the code behave differently. I am sure you can do this via the build target. Anyone have an example of how?

2)Has anyone actually submitted an app to apple that changed the icon.png filename in their plist? That way i could have liteicon.png and icon.png. It seems like this would work but wanted to see if anyone actually has done it and had no problems.

Thanks.

You could simply define IS_LITE only for the light target in OTHER_C_FLAGS ( or something along these lines)
Quote this message in a reply
Member
Posts: 306
Joined: 2009.03
Post: #3
If that works, that would be awsome. So OTHER_C_FLAGS are just #defines?
Quote this message in a reply
Member
Posts: 166
Joined: 2009.04
Post: #4
kendric Wrote:If that works, that would be awsome. So OTHER_C_FLAGS are just #defines?

I do that when compiling common code in different targets for ges/gles2 and it works just fine.

PS.
The OTHER_C_FLAGS setting is just a compiler setting and there is a more friendly way to set these defines using preprocessor section in the target properties ( I don't remember the exact field name)
Quote this message in a reply
Member
Posts: 306
Joined: 2009.03
Post: #5
I got it to work by defining a new variable using the gear button at the bottom left corner of the build settings tab. That variable is called:GCC_PREPROCESSOR_DEFINITIONS
It can be a list of things you want to be #defined or also can be a key=value if you need them to have values.

Thanks for your help! The icon thing appears to work but I haven't found any confirmation that apple doesn't do something different for the appstore and manually look for icon.png or something like that.
Quote this message in a reply
Post Reply