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
10 # Mar 2 2000 - Ove Kåven
11 # source rather than grep config.cache
12 # use sourced config.cache to start ldconfig
13 # reconfigure if config.cache doesn't exist
17 sysconfdir
=/usr
/local
/etc
23 echo "WINE Installer v0.2"
27 echo "You're running this from the wrong directory."
28 echo "Change to the Wine directory and try again."
33 # run the configure script, if necessary
35 if [ -f config.cache
] && [ -f Makefile
] && [ Makefile
-nt configure
]
37 echo "I see that WINE has already been configured, so I'll skip that."
38 # load configure results
42 # we'll run with defaults (we need libwine.a later)
43 echo "Running configure..."
48 echo "Configure failed, aborting install."
53 # load configure results
55 # make sure X was found
57 if [ "$have_x" != "yes" ]
59 echo "Install the X development headers and try again."
63 elif [ "$ac_cv_header_X11_xpm_h" != "yes" ]
65 echo "Install the Xpm development headers and try again."
73 # now do the compilation
75 if [ -f wine
] && [ wine
-nt Makefile
]
77 echo "Hmm, looks like WINE is already compiled. I'll skip that too, I guess."
80 echo "Compiling WINE. Grab a lunch or two, rent a video, or whatever, in the meantime..."
82 if ! { make depend
&& make; }
85 echo "Compilation failed, aborting install."
93 # and installation, if root
95 if [ `whoami` != 'root' ]
97 echo "You aren't root, so I'll skip the make install."
100 echo "Now installing binaries onto the system..."
105 echo "Installation failed, aborting."
109 if [ -f /etc
/ld.so.conf
] && ! grep -qs "/usr/local/lib" /etc
/ld.so.conf
112 echo "/usr/local/lib didn't exist in your /etc/ld.so.conf, adding it now..."
113 echo /usr
/local
/lib
>>/etc
/ld.so.conf
114 echo "Re-running ldconfig..."
115 eval "$ac_cv_path_LDCONFIG"
122 # now check whether we should generate wine.conf
127 if [ "$DOCONF" = 'auto' ]
129 # see if we already have a system wine.conf
130 if [ -f $sysconfdir/wine.conf
] ||
[ -f /etc
/wine.conf
]
136 if [ "$DOCONF" != 'no' ]
138 if [ `whoami` != 'root' ]
143 if [ "$DOCONF" != 'yes' ]
145 echo "Since you aren't root, and there's no system wine.conf, I assume"
146 echo "you want a user-specific .winerc. Am I correct? (yes/no)"
147 while [ "$DOCONF" != 'yes' ] && [ "$DOCONF" != 'no' ]
152 if [ "$DOCONF" = 'no' ]
153 then echo "Skipping generation of .winerc."
159 CONF
=$sysconfdir/wine.conf
167 if [ "$DOCONF" = 'yes' ]
169 echo "Now automatically generating $CONF for you..."
171 tools
/wineconf
> $CONF
173 echo "Done. You probably want to review the file, though."
178 # install default registry entries
179 if [ "$DOREG" = 'yes' ]
181 echo "Compiling regapi..."
183 (cd programs
/regapi
; make)
185 echo "Installing default registry entries, please wait..."
187 if ! programs
/regapi
/regapi setValue
< winedefault.reg
190 echo "Registry install failed. Perhaps you weren't running X."
194 # FIXME: perhaps install registry to $sysconfdir/winesystem.reg and $sysconfdir/wineuser.reg?
198 echo "Installation complete for now. Good luck (this is still alpha software)."
199 echo "If you have problems with WINE, please read the documentation first."