SDL frameworks are giant.

Member
Posts: 86
Joined: 2005.01
Post: #1
When taking my game code and dropping the SDL_image, SDL_mixer and SDL frameworks into the app package (all latest versions), it takes up almost 10MB more than the Windows version which is otherwise identical, seemingly purely for the frameworks.

Is there any way to shrink down these frameworks and still maintain Universal compatibility? I assume they've got debug symbols or extraneous files or something.

Newest game: Glow, a sci-fi RPG with lots of zombie bashing. Get it: OS X
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #2
In the build settings I have, it doesn't have debugging symbols. However, you run into the fact that you essentially have to have 2 versions of the binary in order to have it be UB. Also, the headers for SDL take up about .6 MB. Other than that, it's possible that either the Mac version has more code or the binaries are simply larger. (or the ObjectiveC portions translate into more machine code)
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
Try running strip on the frameworks' binaries, to see if that helps.

Also, make sure that you're copying the frameworks correctly -- it's easy to copy the files the symlinks point to, rather than copying the symlinks. That'll radically increase the framework size Wink
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #4
10MB? That seems a bit much.

SDL is 1.5 MB, SDL_image is 732KB, and SDL_mixer is 2.9MB. They gzip down to 1.7 MB.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 86
Joined: 2005.01
Post: #5
I'm using a Copy Files build step, so I dunno if that maintains symbolic links properly or not.

Newest game: Glow, a sci-fi RPG with lots of zombie bashing. Get it: OS X
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
ravuya Wrote:I'm using a Copy Files build step, so I dunno if that maintains symbolic links properly or not.

Well, check Rasp
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #7
Skorche Wrote:10MB? That seems a bit much.

SDL is 1.5 MB, SDL_image is 732KB, and SDL_mixer is 2.9MB. They gzip down to 1.7 MB.
The version of SDL I have is 3 MB. (which is a Universal Binary)
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #8
akb825 Wrote:The version of SDL I have is 3 MB. (which is a Universal Binary)

I have the UB of 1.2.11. (only a few days old)

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 86
Joined: 2005.01
Post: #9
The frameworks seem to check out with your sizes, but the application binary itself is 40MB! That's almost four times what my game data is, including uncompressed oggs and wavs.

The binary on Windows is about 956KB, so it can't possibly all be due to Universalization.

Edit: Dammit. I forgot to turn debug symbols off (I assumed it was doing so because it was in Deployment mode). After running it through GNU strip (does this break Universalization? It shouldn't) the binary is now 1.6MB. That can't possibly all be debug symbols -- is some of it for Malloc Guard?

Newest game: Glow, a sci-fi RPG with lots of zombie bashing. Get it: OS X
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  physfs or howto make frameworks ? seoushi 2 2,830 Sep 16, 2006 05:58 PM
Last Post: seoushi
  LGPL and Frameworks? chuck 1 2,535 Sep 10, 2006 06:09 PM
Last Post: OneSadCookie
  Adding frameworks and resources to .app visage 9 6,146 Aug 11, 2006 05:18 AM
Last Post: ferum
  Adding frameworks to a framework vbuser1338 4 4,312 May 25, 2006 04:02 AM
Last Post: vbuser1338