Page 1 of 1

Slight improvement to external binding mechanism

Posted: Wed Apr 28, 2010 6:22 am
by pderocco
Currently (at least in 3.5), when you bind an external to a stack, you specify the entire name of the file containing the external. Since this name has a different extension for different platforms, you can't just set the externals property, save the file (or build standalones), and have it work in all platforms.

If the externals property recorded the name minus the extension, and the extension was added automatically by the platform support code, then the same property value could be used regardless of the platform, simplifying the task of binding externals to cross-platform apps.

Re: Slight improvement to external binding mechanism

Posted: Wed Apr 28, 2010 8:34 pm
by mwieder
Why not just give the external the same name on each platform?

Re: Slight improvement to external binding mechanism

Posted: Wed Apr 28, 2010 9:27 pm
by pderocco
mwieder wrote:Why not just give the external the same name on each platform?
I don't know that you can actually do that. I believe on the Mac, the ".bundle" extension is what tells the system to treat what's physically a directory with subdirectories as a single object. And on Windows, I don't know that it's possible to run a DLL unless it has the extension ".dll". But it would be an ugly hack to name my DLL "foo.bundle" under Windows.

Re: Slight improvement to external binding mechanism

Posted: Sat May 01, 2010 8:07 pm
by mwieder
You can name a dll anything you want, so "foo.bundle" works just fine for a dll name on Windows. Yes, it's a bit of a nonintuititive name for a dll, but it's something that's *only* going to be used as a runrev external, not a general-purpose library, so "bundle" makes as much sense (or more) in that context.

The "externals" property of an object is just stored as an absolute path to the library file itself, so naming conventions don't really come into play much except as far as the OS is concerned with them.