[SDL] Embed SDL.dll in the .exe

Sylvain Beucler beuc at beuc.net
Fri Sep 28 08:22:53 PDT 2007


On Fri, Sep 28, 2007 at 08:41:03AM -0600, Charles McGarvey wrote:
> FYI: Drag 'n drop installation works on Mac OS X without complete  
> static linking because applications are really "bundles" or  
> directories made to look like files.  So you can dynamic link to  
> libraries you put inside the bundle which provides the benefits of  
> brain-dead installation and the benefits of dynamic linking  
> (including satisfying the LGPL license).


I believe you still need an installer if you distribute the
application via Internet.


If I understand correctly:

- the app (something.app) is displayed as a single executable to the
  user, from the file browser ("Finder")

- but it's actually a directory that contains both the executable and
  the resources. Under Windows it is possible to embed resources
  directly in the .exe -- or for all platforms, you can simply cat it
  at the end of the .exe with an easy-to-recognize delimiter, as .zip
  auto-extrators do. The OSX way makes things easier for the
  programmer (just fopen()).

- when you drag 'n drop the .app, you actually move a directory, so
  it's a single operation with a file browser (but you already can do
  that with most games by moving the installation directory)

- if you got it from a HTTP or FTP website, you'd need to download
  each and every files from the something.app/ directory. So instead
  you have to bundle it in a single archive. Apparently OSX apps often
  come as a .dmg (can it do more than a .zip btw?)

-- 
Sylvain


More information about the SDL mailing list