DMD: Unexpected Directory Structure
Wayne
wanderon at comcast.net
Sat Nov 11 11:22:50 PST 2006
Anders F Björklund wrote:
> Wayne wrote:
> > I've been following the D forum and announcements for a few months
> > now with great interest and finally decided to jump in.
> > I decided to start with the DMD package for Win32
> > (later I'll try GDC on my Mac). I unzipped the files
> > as instructed, but I got a directory structure that was unexpected;
> The extra "dm" directory in the dmd.zip contains some needed tools,
> same as in the DM C/C++ installation: (snn.lib, make.exe, lib.exe)
> 565760 Defl:N 214339 62% 08-12-06 09:41 fe2e0af7 dm/lib/snn.lib
> 48668 Defl:N 27272 44% 09-20-04 23:23 cf1eec7b dm/bin/make.exe
> 114716 Defl:N 67240 41% 10-12-02 13:58 4a169be5 dm/bin/lib.exe
> However, if you install both of them as instructed it should ask
> you whether you want to overwrite the earlier/identical ones... ?
> > While all this poking around was highly instructional, one
> > normally does not expect this kind of "exercise for the reader"
> > when starting out. Did I miss a step in the installation?
> It seems you missed the "Switch to the root directory." step,
> and whatever ZIP tool you used created an extra "dmd" directory ?
> (some tools do this when they encounter more than one file inside)
> I think there is enough confusion with it to warrant an installer ?
> http://www.algonet.se/~afb/d/dmc-setup.html (source: dmc.nsi)
> http://www.algonet.se/~afb/d/dmd-setup.html (source: dmd.nsi)
> But I'm only doing GDC installers, since those are re-distributable.
> I could update the DMD installers (EXE and RPM) for the 1.0 release.
> --anders
Thanks to all for the quick responses.
(BTW, this is a very positive observation I've had regarding the D Language Forum).
The default unzip utility on my Windows box is "Stuffit" by Allume Systems.
When I unzipped the dmd and dmc archives (starting from the root directory "cd \")
I got the following directory structure.
dm
many files and directories
dmd
dm
bin
lib.exe
make.exe
lib
snn.lib
dmd
many files and directories
Because I was confused by this, I also downloaded and unzipped the archives
on my Mac and got the exact same directory structure.
On the Mac, the default unzip utility is also Stuffit.
As Anders pointed out, evidently, some zip tools, when they encounter an
archive with more than one directory at the root level, unzip the directories into a sub-directory
with the same name as the archive. This looks like a bug in Stuffit, and probably is,
but it may also be an ambiguity in the zip file spec, (whatever that is).
After seeing the responses on the forum, I decided to try the unzip command
using the unix terminal on my Mac, which uses a different program,
and I got the correct directory structure. I was also prompted about the overlapping
files...
replace dm/lib/snn.lib? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: dm/lib/snn.lib
replace dm/bin/make.exe? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: dm/bin/make.exe
replace dm/bin/lib.exe? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: dm/bin/lib.exe
Since the files are identical between the two archives, it doesn't matter
whether you choose to replace or not, but a newbie has no way of knowing this.
I agree with Anders that an installer would be nice, since it could automatically
update the paths in any examples and .ini files depending on where the user decides
to put the package.
At any rate, I now have everything where it's supposed to be, but I think this situation needs to be
clarified in the installation instructions.
Wayne
More information about the Digitalmars-d
mailing list