2 # WINE Installation script
4 # Mar 31 1999 - Ove Kåven
6 # Dec 9 1999 - Ove Kåven
8 # Feb 25 2000 - Ove Kåven
9 # auto-add /usr/local/lib to /etc/ld.so.conf
13 sysconfdir
=/usr
/local
/etc
19 echo "WINE Installer v0.2"
23 echo "You're running this from the wrong directory."
24 echo "Change to the Wine directory and try again."
29 # run the configure script, if necessary
31 if [ -f Makefile
] && [ Makefile
-nt configure
]
33 echo "I see that WINE has already been configured, so I'll skip that."
36 # we'll run with defaults (we need libwine.a later)
37 echo "Running configure..."
42 echo "Configure failed, aborting install."
47 # make sure X was found
48 if ! grep -qs "have_x=yes" config.cache
50 echo "Install the X development headers and try again."
54 elif ! grep -qs "xpm_h=yes" config.cache
56 echo "Install the Xpm development headers and try again."
64 # now do the compilation
66 if [ -f wine
] && [ wine
-nt Makefile
]
68 echo "Hmm, looks like WINE is already compiled. I'll skip that too, I guess."
71 echo "Compiling WINE. Grab a lunch or two, rent a video, or whatever, in the meantime..."
73 if ! { make depend
&& make; }
76 echo "Compilation failed, aborting install."
84 # and installation, if root
86 if [ `whoami` != 'root' ]
88 echo "You aren't root, so I'll skip the make install."
91 echo "Now installing binaries onto the system..."
96 echo "Installation failed, aborting."
100 if [ -f /etc
/ld.so.conf
] && ! grep -qs "/usr/local/lib" /etc
/ld.so.conf
103 echo "/usr/local/lib didn't exist in your /etc/ld.so.conf, adding it now..."
104 echo /usr
/local
/lib
>>/etc
/ld.so.conf
105 echo "Re-running ldconfig..."
113 # now check whether we should generate wine.conf
118 if [ "$DOCONF" = 'auto' ]
120 # see if we already have a system wine.conf
121 if [ -f $sysconfdir/wine.conf
] ||
[ -f /etc
/wine.conf
]
127 if [ "$DOCONF" != 'no' ]
129 if [ `whoami` != 'root' ]
134 if [ "$DOCONF" != 'yes' ]
136 echo "Since you aren't root, and there's no system wine.conf, I assume"
137 echo "you want a user-specific .winerc. Am I correct? (yes/no)"
138 while [ "$DOCONF" != 'yes' ] && [ "$DOCONF" != 'no' ]
143 if [ "$DOCONF" = 'no' ]
144 then echo "Skipping generation of .winerc."
150 CONF
=$sysconfdir/wine.conf
158 if [ "$DOCONF" = 'yes' ]
160 echo "Now automatically generating $CONF for you..."
162 tools
/wineconf
> $CONF
164 echo "Done. You probably want to review the file, though."
169 # install default registry entries
170 if [ "$DOREG" = 'yes' ]
172 echo "Compiling regapi..."
174 (cd programs
/regapi
; make)
176 echo "Installing default registry entries, please wait..."
178 if ! programs
/regapi
/regapi setValue
< winedefault.reg
181 echo "Registry install failed. Perhaps you weren't running X."
185 # FIXME: perhaps install registry to $sysconfdir/winesystem.reg and $sysconfdir/wineuser.reg?
189 echo "Installation complete for now. Good luck (this is still alpha software)."
190 echo "If you have problems with WINE, please read the documentation first."