Re: Absolute path in argv[0]
From: Robert Heller (heller_at_deepsoft.com)
Date: 10/30/04
- Next message: /
- Previous message: Sebastian Hans: "Re: Absolute path in argv[0]"
- Maybe in reply to: Otto Wyss: "Absolute path in argv[0]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Oct 2004 18:24:07 +0200
Dances With Crows <danSPANceswitTRAPhcrows@gmail.com>,
In a message on 30 Oct 2004 15:29:25 GMT, wrote :
DWC> ["Followup-To:" header set to comp.os.linux.misc.]
DWC> On 30 Oct 2004 14:36:26 GMT, Grant Edwards staggered into the Black Sun
DWC> and said:
DWC> > On 2004-10-30, Alexander Skwar <alexander@skwar.name> wrote:
DWC> >> Otto Wyss wrote:
DWC> >>> Together with a future bundle it has a great advantage about the
DWC> >>> current solution. As soon as bundles are available user will switch
DWC> >>> to it simply because it's so much easier for them.
DWC> >> What do you mean with "bundle"?
DWC> > He's already been asked that several times, but he remains mute on the
DWC> > topic.
DWC>
DWC> ...or he expected people to be familiar with the "application bundles"
DWC> that OS X uses. I'll try to explain that, corrections welcome:
DWC>
DWC> MacOS has always been able to use "dual-forked" files. These files have
DWC> a "data fork" and a "resource fork". Executables in MacOS store most of
DWC> their information in the resource fork, separated into sections like
DWC> CODE (program code), BNDL (bundle?), STRG (string table), FONT
DWC> (program-specific fonts), etcetera. This allows a MacOS executable to
DWC> consist of *one* file, whereas a Unix or Windows executable would need
DWC> multiple files to store the same data, since Unix and Windows don't
DWC> really support having multiple streams/forks in one file.[0] Something
DWC> similar can be done with Java applications; a lot of them are shipped as
DWC> .jar files (ZIP files with a particular structure and a MANIFEST file;
DWC> all the Java classes and subsidiary files are included in the .jar.)
DWC>
DWC> Application bundles are an extension of this concept with a slightly
DWC> different format. An OS X application bundle is one file; you copy this
DWC> file to /Hard Disk/Applications/ , double-click this file, and the
DWC> application starts up. No installation process required. When you want
DWC> to uninstall the application, you just delete the bundle--no cleaning up
DWC> config files under /etc, no fiddling with the @#$%ing Registry.[1]
DWC>
DWC> This is an interesting idea, but it doesn't really fit in with the old
DWC> Unix Way. Bundles for most end-user applications also wouldn't fit in
DWC> with the RPM/DEB/portage systems used for package management in Linux.
DWC> If a bundle requires the shared libraries for X11 and GTK+, should the
DWC> bundle include all those libraries? Hello, memory usage and disk space
DWC> bloat. Developers on OS X can at least assume that a lot of shared
DWC> libraries are present, and developers can't really make that assumption
DWC> on Linux right now.
As an aside, there are a few 'bundle' hacks available, for Linux and
MS-Windows. The Tcl/Tk world has 'Freewrap'
(http://freewrap.sourceforge.net/) and startkits, which include some
sort of 'virtual' file system (which contains all of the support crud
-- libraries of scripts, help files, icons/images, etc.) based on a
slab of data appended to the end of the main executable (generally a
statically linked Tcl/Tk interpreter with a specialized main()). This
is useful in some contexts, such as a GUI installer run from a CD or as
a downloaded installer executable (eg the Free Delivery hack built on
top to Freewrap). Or for use as a self-contained demo that might get
run on a client's system where the bother of installing (and then
uninstalling) a pile of support crud is undesired. For these and other
such situations this is an interesting and useful way to go. I
certainly don't expect it to become anything the 'normal' way to go for
Linux/UNIX applications in the general case. Especially not for an
application that would one would normally install for normal use.
DWC>
DWC> [0] NTFS and ReiserFS4 support this. Very few Windows applications make
DWC> use of this because FAT32 doesn't support it and FAT32 is the LCD.
DWC> ReiserFS4 is pretty new and not that common, and few Linux applications
DWC> will support it because ext2 doesn't support it and ext2 is the LCD.
DWC>
DWC> [1] This is the theory, anyway. Reality is probably different. Can't
DWC> say for sure as all the Mac work I have to do requires OS 9 (yech!)
DWC>
DWC> --
DWC> Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
DWC> Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
DWC> http://www.brainbench.com / Hire me!
DWC> -----------------------------/ http://crow202.dyndns.org/~mhgraham/resume
DWC>
\/
Robert Heller ||InterNet: heller@cs.umass.edu
http://vis-www.cs.umass.edu/~heller || heller@deepsoft.com
http://www.deepsoft.com /\FidoNet: 1:321/153