Differences in built .app file size depending on folder built in

I’ve noticed that if I build my app to a subfolder of my project then the resulting .app file is around 21MB on disk.

If I built the exact same source to a folder elsewhere on disk (in an unrelated folder to the source) then the .app is about 15MB.

Anyone else seen this? [import]uid: 8353 topic_id: 3183 reply_id: 303183[/import]

Nope, I just build to the desktop. [import]uid: 5712 topic_id: 3183 reply_id: 9356[/import]

Funny, that this came up as a discussion.

I had a main.lua file on the desktop, It is a bit tiresome to create folders and each having the same file. so I just had that on the desktop to test, when I created a build, I found that it started to bundle every other file it could find in that directory (Source directory, which in my case was the desktop) and I was wondering why it was taking so long. I found after 5 minutes, that the .app file had reached 400 MB and was still going, so I had to kill it only to realise that it was still going… found the script that was responsible and killed that too.

Then moved the mail.lua into a folder and ran the build, this time no worries, just 3.5 MB (mainly due to OpenFient)

so check what other files get bundled with it.

cheers,

Jayant C Varma [import]uid: 3826 topic_id: 3183 reply_id: 9540[/import]

Yeah that’s the conclusion I came to too. I now always build to a clean folder which is outside the source code folders and no probs. [import]uid: 8353 topic_id: 3183 reply_id: 9553[/import]

Yup from memory it includes every file on the same and sub levels as main.lua. [import]uid: 5354 topic_id: 3183 reply_id: 9695[/import]

I have a very light test app with source code and resources in a source folder on the desktop. Size of the source folder is 600KB (lua code, PNGs, and MP3 files). Yet all of my iPhone builds are 7MB or so in size.

Is this normal?

(edit: the target build directory is set to build to desktop - not sure if that should make a difference. Can’t see why it would.)
[import]uid: 11393 topic_id: 3183 reply_id: 12814[/import]

Hi bedhouin,
you can look at the Corona Project Manager, it will create a separate directory for you with only the project related files.

As for your question, if your desktop has some shortcuts (links, you have a Mac) and some folder or files, these are all included into the project. The overhead that corona adds after compilation is about 1.2 MB, so 1.2 + 600K = ~2MB, the remaining are files and folders from the desktop.

Do you know how to look at the contents of an .app file? It is a folder, so rename it via the terminal (from Finder, it might still remain an app) or just right click and select browse to see the contents of the app, you will find the non-relavent files.

To fix this, just create a directory on the Desktop and move your main.lua and the resources into this directory and build from there.

hope this helps,

Jayant C Varma [import]uid: 3826 topic_id: 3183 reply_id: 12830[/import]

Hi Jayant,

Thanks for the tip. I did have a look at the contents of the .app file. There are a whole load of unrelated files there - I don’t know where they have come from.

There are a lot game/highscore/achievement/openfeint nib and resource files which I’ve never seen - they’re not anywhere in my build folder hierarchy.

My source directory is currently on the desktop, I’ve even tried putting my source directory into root HDD, and I still get the same result.

Anyone else ever encountered this? I know I’m not using openfeint and I’ve only included a couple of Lua libraries for HTTP and and file. [import]uid: 11393 topic_id: 3183 reply_id: 12832[/import]

Hi bedhouin,

The root directory would be the worst thing to do, if it starts to bundle everything, you might be creating an app with your Mac HDD in it…

As for the Openfient files, if you use the Corona GE (Game Edition) that is added for you, if you use the Corona SDK, then you won’t find these files. Maybe soon, Ansca might have conditional compile and these *might* be removed. Till then these are past of the build, even if you feel it is unrelated, it isn’t.

just create a directory, do not put your main.lua file and the resources anywhere. Think of that directory as the project directory.

Better, as I mentioned, try the Corona Project Manager, it will manage these for you.

cheers,

Jayant C Varma [import]uid: 3826 topic_id: 3183 reply_id: 12839[/import]

Hi Jayant,

I had the files in a directory under root, not in root.

However, your suggestion regarding which SDK version to use has solved the problem!

I compiled using Corona SDK instead of Corona Game SDK and it was only 985KB in size. And instead of a few minutes of build time, it compiled within 15 seconds which is an added bonus.

Lesson learned: Don’t use Game SDK to compile apps that don’t need the game libraries…

Thanks for the help.

edit: I’ve purchased CPM, just waiting for the download link via email. Looks quite handy, and happy to support JA in creating a better Corona experience. [import]uid: 11393 topic_id: 3183 reply_id: 12841[/import]

we are looking into *not* including OF if the user does not require it.

c. [import]uid: 24 topic_id: 3183 reply_id: 12900[/import]

I just *loved* your comment :wink:

That will make the final size really manageable.

Now, anything about the *thing* one puts on their face to hide their identity and Desktop based compilation tools?

I was without a net connection for about 12 scary hours when the ADSL port locked itself and had to be reprogrammed by the ISP.

cheers,

Jayant C Varma [import]uid: 3826 topic_id: 3183 reply_id: 12907[/import]