b8248753f6228cb5fce4e70700e594c5c16a5234
[fw/sdcc] / doc / cygwininst.txt
1
2
3   sdcc - http://www.geocities.com/ResearchTriangle/Forum/1353 To all, 
4
5   First a correction.  I had a typo in the Cygnus URL.  Correct URL is shown below. 
6
7   Second, Douglas wrote: 
8
9     Why do you have to put cygnus on the c drive? I have run it for a while on
10     the D drive, which has worked fine until the latest release. Is there a
11     manual fix to let cygnus reside at D without problems?
12
13
14   The "bison" program (part of the Cygnus suite) is looking for a file on the c drive which is why the build does not work
15   properly.  Actually, it just references a path like /abc/xyz... which IMPLIES the c drive.  You can probably work around the
16   problem by mounting your D drive somewhere onto the main tree.  I did not attempt this because I assumed most people
17   trying to build on a Win 32 system do not know about UNIX administration. 
18
19   I do not know why it worked prior to this release.  I would have to go back and try to build one of the previous releases to
20   figure out if the problem resides with sdcc or Cygnus. 
21
22   Michael Jamet 
23   mjamet@computer.org 
24     
25
26   ====================================================================== 
27   How to install SDCC from source on a Windows 95 or Windows NT 4 system 
28
29   This document describes how to install SDCC on a Win 95 or Win NT 4 system. 
30   These instructions probably work for Win 98 as well, but have not been 
31   tested on that platform. 
32
33   There are lots of little differences between UNIX and the Win32 Cygnus 
34   environment which make porting more difficult than it should be.  If 
35   you want the details, please contact me.  Otherwise just follow these 
36   instructions. 
37
38   1. Install the Cygnus Software 
39   Go to http://sourceware.cygnus.com/cygwin.  Cygnus provides a UNIX like 
40   environment for Win 32 systems.  Download "full.exe" and install.  You 
41   MUST install it on your C drive.  "full.exe" contains a shell AND many 
42   common UNIX utilities. 
43
44   2. Download and Extract the Latest SDCC 
45   The latest version can be found at 
46    www.geocities.com/ResearchTriange/Forum/1353. 
47   It can be uncompressed with winzip. 
48
49   3.  Start a Cygnus Shell 
50   There should be an entry in the Start Menu for Cygnus.  Invoke the shell. 
51   This gives you a UNIX like environment.  FROM THIS POINT ON, DIRECTORIES 
52   MUST BE SPECIFIED WITH FORWARD SLASHES (/) NOT THE DOS STYLE BACK 
53   SLASHES (\) BECAUSE THIS IS WHAT UNIX EXPECTS.  - 
54    ex. "\winnt" would be "/winnt" under the shell. 
55
56   4. Change Directory to Where SDCC was extracted (referred to as INSTALLDIR) 
57
58   ex. cd /sdcc218Da.  If you extracted to a drive OTHER THAN C, the drive 
59   must be specified as part of the path. For example, if you extracted to 
60   your "g drive", type the following: "cd //g/mydir".  You must use "//" 
61   to specify the drive. 
62
63   5. Make Dirs Which are Automatically Made During the UNIX Installation 
64   From the INSTALLDIR, 
65
66    mkdir -p bin   (not a typo, just "bin") 
67    mkdir -p /bin 
68    mkdir -p /usr/local/bin 
69    mkdir -p /usr/local/share 
70    mkdir -p /usr/local/share/sdcc51lib 
71    mkdir -p /usr/local/share/sdcc51inc 
72    mkdir -p /tmp 
73
74   (When a path from the root directory is specified WITHOUT a drive, the 
75   drive defaults to c.  For example /michael/newuser => c:\michael\newuser) 
76
77   6.  Add Programs to /bin Expected by the Installation Process 
78    - Look at your path: echo $PATH 
79      One of the fields is the diretory with the CYGNUS programs. 
80     ex. /CYGNUS/CYGWIN~1/H-I586/BIN 
81
82    - cd to the directory found above.  You may have to fiddle with the 
83      case (upper or lower) here because the PATH is SHOWN as all upper 
84      case, but is actually mixed.  To help you along, you may type 
85      a letter or 2 followed by the escape key.  The shell will fill 
86      out the remaining letters IF THEY describe a unique directory. 
87      If you have problems here, cd one directory and type "ls".  "ls" 
88      is the equivalent of "dir/w". 
89
90    - Copy the following: 
91     cp sh.exe /bin 
92     cp pwd.exe /bin 
93     cp echo.exe /bin 
94
95   7. Go back to the INSTALLDIR 
96    cd INSTALLDIR 
97   ex. cd //d/sdcc218Da 
98
99   8. Run the configure Program 
100    ./configure 
101   The "./" is important because your current directory is NOT in your path. 
102   Under DOS, your current directory was implicitly always the first entry 
103   in your path. 
104
105   9. Run make 
106    make 
107
108   This process takes quite some time under Win 32. 
109
110   10. Install the Newly Built Software 
111    make install 
112
113   This will partially install the software into the /usr/local directories 
114   created in step 5.  What it actually doing is copying the .c, .h and 
115   library files to directories under /usr/local/share. 
116
117   It will NOT be able to install the actual programs (binaries) because 
118   it does not know programs on Win32 systems have ".exe" extensions. 
119   For example, it tries to install sdcc instead of sdcc.exe. 
120
121   After the automated part is finished, you must manually copy the binaries: 
122    cd bin  (This is the bin directory in your INSTALLDIR) 
123    cp * /usr/local/bin 
124
125   11. Make sure /usr/local/bin is in Your PATH 
126   You may add c:\usr\local\bin to your path however your Win32 system allows.  For 
127   example you may add it to the PATH statement in autoexec.bat. 
128
129   Good luck.  If you have any questions send them to me or post them 
130   to the list. 
131
132
133
134   sdcc - http://www.geocities.com/ResearchTriangle/Forum/1353 To all, 
135
136   First a correction.  I had a typo in the Cygnus URL.  Correct URL is shown below. 
137
138   Second, Douglas wrote: 
139
140     Why do you have to put cygnus on the c drive? I have run it for a while on
141     the D drive, which has worked fine until the latest release. Is there a
142     manual fix to let cygnus reside at D without problems?
143
144
145   The "bison" program (part of the Cygnus suite) is looking for a file on the c drive which is why the build does not work
146   properly.  Actually, it just references a path like /abc/xyz... which IMPLIES the c drive.  You can probably work around the
147   problem by mounting your D drive somewhere onto the main tree.  I did not attempt this because I assumed most people
148   trying to build on a Win 32 system do not know about UNIX administration. 
149
150   I do not know why it worked prior to this release.  I would have to go back and try to build one of the previous releases to
151   figure out if the problem resides with sdcc or Cygnus.