www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DMD: Unexpected Directory Structure

reply Wayne <wanderon comcast.net> writes:
Hello,

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;
both by me and apparently by some of the files in the package itself.
As per the instructions my root directory had the dm and dmd
directories, but the dmd directory has an extra dm and dmd directory
within it.  On attempting to run the "all.sh" script I got a path
error.  I edited the script, changing "DMD=\dmd\bin\dmd"
to "DMD=\dmd\dmd\bin\dmd".  After this change the first example
compiled but I got another path error on linking.  After scratching
my head a bit and looking at some documentation, I discovered that the
link path is defined in the sc.ini file. I added an extra parent
directory bump to the path for the linker and most everything
seems to work.


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?
What's going on here?


Thanks,

Wayne

_________________

Wayne Anderson
Nov 10 2006
next sibling parent Chris Nicholson-Sauls <ibisbasenji gmail.com> writes:
Wayne wrote:
 Hello,
 
 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;
 both by me and apparently by some of the files in the package itself.
 As per the instructions my root directory had the dm and dmd
 directories, but the dmd directory has an extra dm and dmd directory
 within it.  On attempting to run the "all.sh" script I got a path
 error.  I edited the script, changing "DMD=\dmd\bin\dmd"
 to "DMD=\dmd\dmd\bin\dmd".  After this change the first example
 compiled but I got another path error on linking.  After scratching
 my head a bit and looking at some documentation, I discovered that the
 link path is defined in the sc.ini file. I added an extra parent
 directory bump to the path for the linker and most everything
 seems to work.
 
 
 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?
 What's going on here?
 
 
 Thanks,
 
 Wayne
 
 _________________
 
 Wayne Anderson
In short, I don't know what's going wrong. In... er, long: I don't think your download or installation went quite right, as there should not be an addition dm|dmd subtree like that. I recommend whiping your installation, re-downloading, and trying again. Its no wonder the scripts were confused... I would be too! (And apparently, so were you. We are crazy around here... but not (usually) quite that crazy.) -- Chris Nicholson-Sauls
Nov 10 2006
prev sibling next sibling parent Carlos Santander <csantander619 gmail.com> writes:
Wayne escribió:
 Hello,
 
 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;
 both by me and apparently by some of the files in the package itself.
 As per the instructions my root directory had the dm and dmd
 directories, but the dmd directory has an extra dm and dmd directory
 within it.  On attempting to run the "all.sh" script I got a path
 error.  I edited the script, changing "DMD=\dmd\bin\dmd"
 to "DMD=\dmd\dmd\bin\dmd".  After this change the first example
 compiled but I got another path error on linking.  After scratching
 my head a bit and looking at some documentation, I discovered that the
 link path is defined in the sc.ini file. I added an extra parent
 directory bump to the path for the linker and most everything
 seems to work.
 
 
 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?
 What's going on here?
 
 
 Thanks,
 
 Wayne
 
 _________________
 
 Wayne Anderson
The only thing I can think of is that you extracted the zip in c:\dmd, when it should have just been c:\. However, the steps you took to "fix the problem" (I don't see it as a problem: dmd can be almost anywhere you want) were the right ones. -- Carlos Santander Bernal
Nov 10 2006
prev sibling next sibling parent Walter Bright <newshound digitalmars.com> writes:
Wayne wrote:

 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?
 What's going on here?
Change to the root directory: cd \ and unzip from there: unzip dmd should do it.
Nov 10 2006
prev sibling parent reply =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= <afb algonet.se> writes:
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
Nov 11 2006
parent Wayne <wanderon comcast.net> writes:
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
Nov 11 2006