Files
wmaker/Install
T

271 lines
5.6 KiB
Bash
Raw Normal View History

1998-09-29 22:36:29 +00:00
#!/bin/sh
#
# WindowMaker configuration and compilation script.
#
1999-01-25 19:06:50 +00:00
# Copyright (c) 1997, 1998, 1999 Alfredo K. Kojima
1998-09-29 22:36:29 +00:00
#
export LINGUAS;LINGUAS=""
if test "$NLSDIR" = ""; then
export NLSDIR;NLSDIR="/usr/lib/locale"
fi
1998-11-03 12:53:26 +00:00
1998-09-29 22:36:29 +00:00
OPTIONS=""
PREFIX="/usr/local"
perai() {
echo "Type <Return> to continue"
read nada
}
1998-10-21 14:43:47 +00:00
perform() {
1998-11-03 12:53:26 +00:00
if ! $* ; then
1998-10-21 14:43:47 +00:00
echo
echo "Window Maker installation failed or aborted by user."
exit 1
fi
}
trap "echo Window Maker installation aborted. ; exit 1" 2 3
echo
echo "========================="
echo "Window Maker Installation"
echo "========================="
1998-09-29 22:36:29 +00:00
echo
1998-10-21 14:43:47 +00:00
echo "NOTE: If this script fails, read the INSTALL file and"
echo "install by hand."
1998-09-29 22:36:29 +00:00
echo
1999-03-09 14:58:01 +00:00
echo "Please read the README, INSTALL and FAQ files before e-mailing "
echo "questions. We will IGNORE any questions that are already"
echo "answered in the documentation."
echo
perai
echo
echo "Did you install libPropList? If not, please install it now."
echo
1998-09-29 22:36:29 +00:00
perai
1999-01-11 12:28:12 +00:00
echo "Did you read the INSTALL file?"
echo -n "<y/n> "
read rtfm
if [ "$rtfm" != y ]; then
echo "Please read the INSTALL file before installing"
exit
fi
echo "Are you sure?"
echo -n "<y/n> "
read rtfm
if [ "$rtfm" != y ]; then
echo "Please read the INSTALL file before installing"
exit
fi
1999-01-25 19:06:50 +00:00
echo "Are you lying?"
echo -n "<y/n> "
read rtfm
if [ "$rtfm" != n ]; then
echo "What a shame!"
echo "Please read the INSTALL file before installing"
exit
fi
echo "Do you *swear* that you really read the INSTALL file?"
echo -n "<y/n> "
read rtfm
if [ "$rtfm" != y ]; then
echo "Please read the INSTALL file before installing"
exit
fi
echo "Last chance. You will not get help if you have some problem"
echo "because you didn't read that file. Even if your computer explodes."
echo "Do you *really* read it?"
echo -n "<y/n> "
read rtfm
if [ "$rtfm" != y ]; then
echo "Please read the INSTALL file before installing"
exit
fi
echo
echo "Ok, you have been warned."
echo
perai
1998-09-29 22:36:29 +00:00
if test "$USER" != "root"; then
echo
1998-10-21 14:43:47 +00:00
echo "Warning: you must run this script as root to install"
echo "Window Maker. Hit <Control>-<C> to quit this script."
perai
1998-09-29 22:36:29 +00:00
echo
fi
echo
echo "Option Selection"
echo "================"
1999-01-06 15:22:33 +00:00
######################## KDE
echo
echo "Do you want KDE support?"
1999-01-11 12:28:12 +00:00
echo -n "<y/n> [n] "
1999-01-06 15:22:33 +00:00
read kde
if [ "$kde" = y -o "$kde" = Y ]; then
OPTIONS="$OPTIONS --enable-kde"
fi
######################## GNOME
echo
echo "Do you want GNOME support?"
1999-01-11 12:28:12 +00:00
echo -n "<y/n> [n] "
1999-01-06 15:22:33 +00:00
read gnome
if [ "$gnome" = y -o "$gnome" = Y ]; then
OPTIONS="$OPTIONS --enable-gnome"
fi
1998-09-29 22:36:29 +00:00
1999-01-25 19:06:50 +00:00
######################## OLWM
echo
echo "Do you want OPEN LOOK(tm)/olwm support?"
echo -n "<y/n> [n] "
read olwm
if [ "$olwm" = y -o "$olwm" = Y ]; then
OPTIONS="$OPTIONS --enable-openlook"
fi
1998-09-29 22:36:29 +00:00
######################## NLS
echo
echo "Do you want National Language Support?"
echo -n "<y/n> [n] "
read NLS
if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
NLS="Y"
echo "The supported locales are:"
ling=` (cd po; /bin/ls *.po) `
ALL_LINGUAS=""
for l in $ling; do
lname=`(cd po; grep Language-Team $l|cut -f 2 -d: |cut -f 2 -d\ )`
lname=`echo $lname`
lcode=`basename $l .po`
ALL_LINGUAS="$ALL_LINGUAS $lcode"
echo "$lcode $lname"
done
1998-11-03 12:53:26 +00:00
echo "Type in the locales you want (all will install everything) [none]"
1998-09-29 22:36:29 +00:00
read foo
1998-11-03 12:53:26 +00:00
if test "$foo" = "all"; then
LINGUAS="$ALL_LINGUAS"
1998-09-29 22:36:29 +00:00
else
LINGUAS="$foo"
fi
echo "Selected locales are: $LINGUAS"
MB=""
for i in $LINGUAS; do
ok=0
for b in $ALL_LINGUAS; do
if test "$b" = "$i"; then
ok=1
break
fi
done
if test "$ok" = "0"; then
echo
echo "$i is not a supported locale"
perai
continue
fi
done
echo
echo "Where do you want to put the message files? [$NLSDIR]"
echo -n "? "
read foo
if test "x$foo" != "x"; then
NLSDIR=$foo
fi
fi
##################### Installation path
done=0
while [ $done = 0 ]; do
echo
1998-10-21 14:43:47 +00:00
echo "Where do you want to install Window Maker? [$PREFIX]"
1998-09-29 22:36:29 +00:00
echo "Don't change it if you don't know what you're doing."
1999-01-11 12:28:12 +00:00
if test "$USER" != "root"; then
1998-10-21 14:43:47 +00:00
echo "Make sure to specify a path where you have write permission."
fi
echo "(The default will put Window Maker in $PREFIX/bin, $PREFIX/lib etc.)"
1998-09-29 22:36:29 +00:00
echo -n "? "
read foo
1998-10-21 14:43:47 +00:00
if test "x$foo" != "x"; then
if [ "$foo" = "y" -o "$foo" = "n" ]; then
1998-09-29 22:36:29 +00:00
echo
1998-10-21 14:43:47 +00:00
echo "Hmm... I don't think you really want to install Window Maker into \"$foo\""
1998-09-29 22:36:29 +00:00
echo
else
done=1
PREFIX=$foo
fi
else
done=1
fi
echo
1999-01-25 19:06:50 +00:00
echo " $PREFIX/bin must be in the PATH environment variable"
echo "of all users who will use Window Maker"
1998-09-29 22:36:29 +00:00
perai
done
OPTIONS="$OPTIONS --prefix=$PREFIX"
##################### Configure
echo "--------------------------"
1998-10-21 14:43:47 +00:00
echo "Configuring Window Maker..."
1998-09-29 22:36:29 +00:00
echo "--------------------------"
if [ `uname -s` = "SCO_SV" ]; then
echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
1998-10-21 14:43:47 +00:00
1998-11-03 12:53:26 +00:00
CFLAGS="$CFLAGS -belf -DANSICPP"
perform ./configure $OPTIONS
1998-09-29 22:36:29 +00:00
else
echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
1998-10-21 14:43:47 +00:00
1998-11-03 12:53:26 +00:00
CFLAGS="$CFLAGS $GCCFLAGS"
perform ./configure $OPTIONS
1998-09-29 22:36:29 +00:00
fi
#################### Compile
echo "-------------------------"
1998-10-21 14:43:47 +00:00
echo "Compiling Window Maker..."
1998-09-29 22:36:29 +00:00
echo "-------------------------"
1998-11-03 12:53:26 +00:00
(cd src; perform make clean)
1998-10-21 14:43:47 +00:00
perform make
echo "--------------------------"
echo "Installing Window Maker..."
echo "--------------------------"
1998-09-29 22:36:29 +00:00
1998-10-21 14:43:47 +00:00
perform make install
1998-09-29 22:36:29 +00:00
1999-01-11 12:28:12 +00:00
if [ `uname -s` = "Linux" ]; then
echo
echo " Make sure $PREFIX/lib is in the /etc/ld.so.conf file"
1999-01-25 19:06:50 +00:00
/sbin/ldconfig
1999-01-11 12:28:12 +00:00
fi
1998-09-29 22:36:29 +00:00
echo
echo "Installation Finished!"
echo
echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
echo "script that was just installed."
if test "$NLS" = "Y"; then
echo "Don't forget to set the LANG environment variable to your locale"
fi