|Keep It Simple, Stupid|
Re: Perl Executableby rjt (Chaplain)
|on Aug 06, 2013 at 11:11 UTC||Need Help??|
As others have correctly mentioned, there is no such thing as a platform-independent executable. What you're asking for is not unlike taking a generic roll of wallpaper but then trying to pre-cut one piece of it in advance to fit any wall.
How are you planning on distributing the executables? Download? CD/DVD/USB drive? Network install? Virus?
Your two best options, in my opinion, are:
If you go the download route, you can easily offer downloads for each platform, and in most cases, you can take a very good guess at the user's OS by inspecting the User-agent request header. (But use that as the default selection only; the header may be wrong, or users may have reason to download for a different OS.)
If you go with physical media, you can have an autorun.inf for Windows, and add some magic to the folder for OS X. See this Stackoverflow question on autoplay for OS X and Windows. There's no general autorun for Linux, which I consider a feature. :-)
For network deployments, it really depends on your deployment method, but generally you'd have parallel methods for each OS at some point in the process.
Hope this helps.