1999-04-18 15:16:29 +02:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
# WINE Installation script
|
|
|
|
|
|
|
|
|
|
# Mar 31 1999 - Ove K<>ven
|
|
|
|
|
# First version
|
2000-02-25 21:51:09 +01:00
|
|
|
|
# Dec 9 1999 - Ove K<>ven
|
|
|
|
|
# require Xpm
|
|
|
|
|
# Feb 25 2000 - Ove K<>ven
|
|
|
|
|
# auto-add /usr/local/lib to /etc/ld.so.conf
|
2000-03-04 20:13:52 +01:00
|
|
|
|
# Mar 2 2000 - Ove K<>ven
|
|
|
|
|
# source rather than grep config.cache
|
|
|
|
|
# use sourced config.cache to start ldconfig
|
|
|
|
|
# reconfigure if config.cache doesn't exist
|
1999-04-18 15:16:29 +02:00
|
|
|
|
|
|
|
|
|
# defaults
|
|
|
|
|
|
|
|
|
|
sysconfdir=/usr/local/etc
|
|
|
|
|
DOCONF=auto
|
|
|
|
|
DOREG=yes
|
|
|
|
|
|
|
|
|
|
# startup...
|
|
|
|
|
|
2000-02-25 21:51:09 +01:00
|
|
|
|
echo "WINE Installer v0.2"
|
1999-04-18 15:16:29 +02:00
|
|
|
|
echo
|
|
|
|
|
if ! [ -f configure ]
|
|
|
|
|
then {
|
|
|
|
|
echo "You're running this from the wrong directory."
|
|
|
|
|
echo "Change to the Wine directory and try again."
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# run the configure script, if necessary
|
|
|
|
|
|
2000-03-04 20:13:52 +01:00
|
|
|
|
if [ -f config.cache ] && [ -f Makefile ] && [ Makefile -nt configure ]
|
1999-04-18 15:16:29 +02:00
|
|
|
|
then {
|
|
|
|
|
echo "I see that WINE has already been configured, so I'll skip that."
|
2000-03-04 20:13:52 +01:00
|
|
|
|
# load configure results
|
|
|
|
|
. ./config.cache
|
1999-04-18 15:16:29 +02:00
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
# we'll run with defaults (we need libwine.a later)
|
|
|
|
|
echo "Running configure..."
|
|
|
|
|
echo
|
|
|
|
|
if ! ./configure
|
|
|
|
|
then {
|
|
|
|
|
echo
|
|
|
|
|
echo "Configure failed, aborting install."
|
|
|
|
|
rm -f config.cache
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
fi
|
2000-03-04 20:13:52 +01:00
|
|
|
|
# load configure results
|
|
|
|
|
. ./config.cache
|
1999-04-18 15:16:29 +02:00
|
|
|
|
# make sure X was found
|
2000-03-04 20:13:52 +01:00
|
|
|
|
eval "$ac_cv_have_x"
|
|
|
|
|
if [ "$have_x" != "yes" ]
|
1999-04-18 15:16:29 +02:00
|
|
|
|
then {
|
|
|
|
|
echo "Install the X development headers and try again."
|
|
|
|
|
rm -f config.cache
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
2000-03-04 20:13:52 +01:00
|
|
|
|
elif [ "$ac_cv_header_X11_xpm_h" != "yes" ]
|
2000-02-25 21:51:09 +01:00
|
|
|
|
then {
|
|
|
|
|
echo "Install the Xpm development headers and try again."
|
|
|
|
|
rm -f config.cache
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
1999-04-18 15:16:29 +02:00
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# now do the compilation
|
|
|
|
|
|
|
|
|
|
if [ -f wine ] && [ wine -nt Makefile ]
|
|
|
|
|
then {
|
|
|
|
|
echo "Hmm, looks like WINE is already compiled. I'll skip that too, I guess."
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo "Compiling WINE. Grab a lunch or two, rent a video, or whatever, in the meantime..."
|
|
|
|
|
echo
|
|
|
|
|
if ! { make depend && make; }
|
|
|
|
|
then {
|
|
|
|
|
echo
|
|
|
|
|
echo "Compilation failed, aborting install."
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
echo
|
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# and installation, if root
|
|
|
|
|
|
|
|
|
|
if [ `whoami` != 'root' ]
|
|
|
|
|
then {
|
|
|
|
|
echo "You aren't root, so I'll skip the make install."
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo "Now installing binaries onto the system..."
|
|
|
|
|
echo
|
|
|
|
|
if ! make install
|
|
|
|
|
then {
|
|
|
|
|
echo
|
|
|
|
|
echo "Installation failed, aborting."
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
fi
|
2000-02-25 21:51:09 +01:00
|
|
|
|
if [ -f /etc/ld.so.conf ] && ! grep -qs "/usr/local/lib" /etc/ld.so.conf
|
|
|
|
|
then {
|
|
|
|
|
echo
|
|
|
|
|
echo "/usr/local/lib didn't exist in your /etc/ld.so.conf, adding it now..."
|
|
|
|
|
echo /usr/local/lib >>/etc/ld.so.conf
|
|
|
|
|
echo "Re-running ldconfig..."
|
2000-03-04 20:13:52 +01:00
|
|
|
|
eval "$ac_cv_path_LDCONFIG"
|
2000-02-25 21:51:09 +01:00
|
|
|
|
}
|
|
|
|
|
fi
|
1999-04-18 15:16:29 +02:00
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# now check whether we should generate wine.conf
|
|
|
|
|
if [ -z "$DOCONF" ]
|
|
|
|
|
then DOCONF=auto
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$DOCONF" = 'auto' ]
|
|
|
|
|
then {
|
|
|
|
|
# see if we already have a system wine.conf
|
|
|
|
|
if [ -f $sysconfdir/wine.conf ] || [ -f /etc/wine.conf ]
|
|
|
|
|
then DOCONF=no
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$DOCONF" != 'no' ]
|
|
|
|
|
then {
|
|
|
|
|
if [ `whoami` != 'root' ]
|
|
|
|
|
then {
|
|
|
|
|
CONF=~/.winerc
|
|
|
|
|
if ! [ -f $CONF ]
|
|
|
|
|
then {
|
|
|
|
|
if [ "$DOCONF" != 'yes' ]
|
|
|
|
|
then {
|
|
|
|
|
echo "Since you aren't root, and there's no system wine.conf, I assume"
|
|
|
|
|
echo "you want a user-specific .winerc. Am I correct? (yes/no)"
|
|
|
|
|
while [ "$DOCONF" != 'yes' ] && [ "$DOCONF" != 'no' ]
|
|
|
|
|
do read DOCONF
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
if [ "$DOCONF" = 'no' ]
|
|
|
|
|
then echo "Skipping generation of .winerc."
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
CONF=$sysconfdir/wine.conf
|
1999-08-04 16:26:08 +02:00
|
|
|
|
mkdir -p $sysconfdir
|
1999-04-18 15:16:29 +02:00
|
|
|
|
DOCONF=yes
|
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$DOCONF" = 'yes' ]
|
|
|
|
|
then {
|
|
|
|
|
echo "Now automatically generating $CONF for you..."
|
|
|
|
|
echo
|
|
|
|
|
tools/wineconf > $CONF
|
|
|
|
|
echo
|
|
|
|
|
echo "Done. You probably want to review the file, though."
|
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# install default registry entries
|
|
|
|
|
if [ "$DOREG" = 'yes' ]
|
|
|
|
|
then {
|
|
|
|
|
echo "Compiling regapi..."
|
|
|
|
|
echo
|
|
|
|
|
(cd programs/regapi; make)
|
|
|
|
|
echo
|
|
|
|
|
echo "Installing default registry entries, please wait..."
|
|
|
|
|
echo
|
|
|
|
|
if ! programs/regapi/regapi setValue < winedefault.reg
|
|
|
|
|
then {
|
|
|
|
|
echo
|
|
|
|
|
echo "Registry install failed. Perhaps you weren't running X."
|
2000-02-25 21:51:09 +01:00
|
|
|
|
exit 1
|
1999-04-18 15:16:29 +02:00
|
|
|
|
}
|
|
|
|
|
fi
|
2000-02-25 21:51:09 +01:00
|
|
|
|
# FIXME: perhaps install registry to $sysconfdir/winesystem.reg and $sysconfdir/wineuser.reg?
|
1999-04-18 15:16:29 +02:00
|
|
|
|
}
|
|
|
|
|
fi
|
|
|
|
|
echo
|
|
|
|
|
echo "Installation complete for now. Good luck (this is still alpha software)."
|
|
|
|
|
echo "If you have problems with WINE, please read the documentation first."
|