3 # Configure script for wine
10 # Ask question 'str' and sets 'var' reply (defaulting to 'def' on CR)
19 echo -n "$str [$def]? "
20 input
=`head -1` # When using read, user must double all backslashes
27 echo -n 'Build Wine as emulator or library (E/L) [E]? '
29 if [ "$input" = 'l' -o "$input" = 'L' ]
31 WINELIB
='#define WINELIB -DWINELIB'
32 ALLDEFINES
="$ALLDEFINES -DWINELIB"
36 # Commented out until the processor emulator starts to work.
39 # echo -n 'Use processor emulator (*DOES*NOT*WORK*YET*) (Y/N) [N]? '
41 # if [ "$input" = 'y' -o "$input" = 'Y' ]
43 # PROCEMU='#define PROCEMU'
45 # echo -n 'bochs directory [/usr/src/bochs]? '
47 # if [ "$input" = '' ]
49 # ALLDEFINES="$ALLDEFINES -DPROC_EMU_DIR=/usr/src/bochs"
51 # ALLDEFINES="$ALLDEFINES -DPROC_EMU_DIR="$input
58 echo -n 'Short filenames (Y/N) [N]? '
60 if [ "$input" = 'y' -o "$input" = 'Y' ]
62 SHORTNAMES
='#define ShortNames -DSHORTNAMES'
63 ALLDEFINES
="$ALLDEFINES -DSHORTNAMES"
68 prompt
"Global configfile name" WINE_CONFIGFILE
/usr
/local
/etc
/wine.conf
70 WINE_INI_GLOBAL
='#define WINE_INI_GLOBAL "'$WINE_CONFIGFILE'"'
72 if [ -r $WINE_CONFIGFILE ]
80 echo -n "Do you want to make a config file now (Y/N) [$DEFAULT_ANS]? "
86 if [ "$input" = 'y' -o "$input" = 'Y' ]
88 if [ -r $WINE_CONFIGFILE ]
90 echo "Backing up the old file to ${WINE_CONFIGFILE}.old."
91 if cp $WINE_CONFIGFILE ${WINE_CONFIGFILE}.old
94 echo "Error while creating backup file. Fix it and run Configure again"
99 case `awk 'BEGIN {s=0} {if ($3=="msdos") s++} END {print s}' /etc/fstab` in
101 1) CF_C
=`awk '{if ($3=="msdos") print $2}' /etc/fstab`;;
102 *) CF_C
=`awk '{if ($3=="msdos") {print $2;exit}}' /etc/fstab`;;
105 prompt
"Which directory do you want to use as A:" CF_A
/a
106 prompt
"Which directory do you want to use as C:" CF_C
$CF_C
107 prompt
"Where is the Windows directory" CF_Windows
'c:\windows'
108 prompt
"Where is the System directory" CF_System
'c:\windows\system'
109 prompt
"Where should Windows apps store temp files" CF_Temp
'c:\temp'
110 prompt
"Which path should be used to find executables and DLL's" CF_Path
'c:\windows;c:\windows\system'
111 prompt
"Where is sysres.dll" CF_SystemResources
`pwd`/sysres.dll
112 prompt
"Where is COM1" CF_Com1
'/dev/cua0'
113 prompt
"Where is COM2" CF_Com2
'/dev/cua1'
114 prompt
"Where is LPT1" CF_Lpt1
'/dev/lp0'
115 prompt
"Log messages to which file (CON = stdout)" CF_File
'CON'
118 sed -n -e 's/^ *\"\(WM_[A-Z0-9]*\)\".*/\1/p' < misc
/spy.c | \
119 sort |
pr -ta4w83 |
sed '1 i\
120 Here is the list of messages:\
124 prompt
"Exclude which messages from the log" CF_Exclude
'WM_SIZE;WM_TIMER'
127 echo "The config file $WINE_CONFIGFILE now looks like this:"
128 tee $WINE_CONFIGFILE << EOF
138 SystemResources=$CF_SystemResources
153 echo -n "Do you want to edit it using $EDITOR (Y/N) [N]? "
155 if [ "$input" = 'y' -o "$input" = 'Y' ]
157 $EDITOR $WINE_CONFIGFILE
160 if [ ! -r $WINE_CONFIGFILE ]
162 echo 'Ok, remember to make it yourself later.'
167 if [ "`(domainname)`" = 'amscons.com' ]
170 echo -n 'New build program (Y/N) [N]? '
172 if [ "$input" = 'y' -o "$input" = 'Y' ]
174 NEWBUILD
='#define NewBuild -DNEWBUILD'
175 ALLDEFINES
="$ALLDEFINES -DNEWBUILD"
180 if grep -s seg_not_present
/usr
/include
/linux
/ldt.h
2> /dev
/null
182 NEWLINUXLDT
='#define NEW_LDT_STRUCT'
185 cat > autoconf.h
<< EOF
186 /* autoconf.h generated automatically. Run Configure. */
194 #define AutoDefines $ALLDEFINES
199 if [ 0 -lt `find . -name "*.rej" -print | wc -l` ]
203 WARNING: You have some files named "*.rej". Rejected patch files?
204 Maybe you tried to upgrade Wine by diff-files, and that patch failed.
205 If something doesn't work, this might be the reason. See "man patch".
207 List of "*.rej" files:
210 find .
-name "*.rej" -print