build.settings/config.lua for 2 separate builds: 1) iPhone/iPod touch 2) iPad

Hi,

So, I decided I'll have 2 separate builds, one for iPhone/iPod touch and one for iPad.

I will have assets at different resolutions for each build.

This being said, I do not want to entirely duplicated my code base.

I kinda figured I should be able to do this via the build.settings/config.lua files.

For config.lua, I was think of something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if system.getInfo("model") == "iPad" then
  application = {
                  content = {
                              width   = 1024,
                              height  = 768,
                              scale   = "none",
                              imageSuffix = {
                                              ["~iPad"] = 1
                                            }
                            }
                }
else
  application = {
                  content = {
                              width   = 320,
                              height  = 480,
                              scale   = "zoomeven",
                              imageSuffix = {
                                              ["@2"] = 2
                                            }
                            }
                }
end

I'm curious if this worked for you?

views:806 update:2011/9/27 18:14:54
corona forums © 2003-2011