~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/tools/wineinstall

Version: ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~ [ wine-1.0-rc5 ] ~ [ wine-1.0-rc4 ] ~ [ wine-1.0-rc3 ] ~ [ wine-1.0-rc2 ] ~ [ wine-1.0-rc1 ] ~ [ wine-0.9.61 ] ~ [ wine-0.9.60 ] ~ [ wine-0.9.59 ] ~ [ wine-0.9.58 ] ~ [ wine-0.9.57 ] ~ [ wine-0.9.56 ] ~ [ wine-0.9.55 ] ~ [ wine-0.9.54 ] ~ [ wine-0.9.53 ] ~ [ wine-0.9.52 ] ~ [ wine-0.9.51 ] ~ [ wine-0.9.50 ] ~ [ wine-0.9.49 ] ~ [ wine-0.9.48 ] ~ [ wine-0.9.47 ] ~ [ wine-0.9.46 ] ~ [ wine-0.9.45 ] ~ [ wine-0.9.44 ] ~ [ wine-0.9.43 ] ~ [ wine-0.9.42 ] ~ [ wine-0.9.41 ] ~ [ wine-0.9.40 ] ~ [ wine-0.9.39 ] ~ [ wine-0.9.38 ] ~ [ wine-0.9.37 ] ~ [ wine-0.9.36 ] ~ [ wine-0.9.35 ] ~ [ wine-0.9.34 ] ~ [ wine-0.9.33 ] ~ [ wine-0.9.32 ] ~ [ wine-0.9.31 ] ~ [ wine-0.9.30 ] ~ [ wine-0.9.29 ] ~ [ wine-0.9.28 ] ~ [ wine-0.9.27 ] ~ [ wine-0.9.26 ] ~ [ wine-0.9.25 ] ~ [ wine-0.9.24 ] ~ [ wine-0.9.23 ] ~ [ wine-0.9.22 ] ~ [ wine-0.9.21 ] ~ [ wine-0.9.20 ] ~ [ wine-0.9.19 ] ~ [ wine-0.9.18 ] ~ [ wine-0.9.17 ] ~ [ wine-0.9.16 ] ~ [ wine-0.9.15 ] ~ [ wine-0.9.14 ] ~ [ wine-0.9.13 ] ~ [ wine-0.9.12 ] ~ [ wine-0.9.11 ] ~ [ wine-0.9.10 ] ~ [ wine-0.9.9 ] ~ [ wine-0.9.8 ] ~ [ wine-0.9.7 ] ~ [ wine-0.9.6 ] ~ [ wine-0.9.5 ] ~ [ wine-0.9.4 ] ~ [ wine-0.9.3 ] ~ [ wine-0.9.2 ] ~ [ wine-0.9.1 ] ~ [ wine-0.9 ] ~ [ wine20050930 ] ~ [ wine20050830 ] ~ [ wine20050725 ] ~ [ wine20050628 ] ~ [ wine20050524 ] ~ [ wine20050419 ] ~ [ wine20050310 ] ~ [ wine20050211 ] ~ [ wine20050111 ] ~ [ wine20041201 ] ~ [ wine20041019 ] ~ [ wine20040914 ] ~ [ wine20040813 ] ~ [ wine20040716 ] ~ [ wine20040615 ] ~ [ wine20040505 ] ~ [ wine20040408 ] ~ [ wine20040309 ] ~ [ wine20040213 ] ~ [ wine20040121 ] ~ [ wine20031212 ] ~ [ wine20031118 ] ~ [ wine20031016 ] ~ [ wine20030911 ] ~ [ wine20030813 ] ~ [ wine20030709 ] ~ [ wine20030618 ] ~ [ wine20030508 ] ~ [ wine20030408 ] ~ [ wine20030318 ] ~ [ wine20030219 ] ~ [ wine20030115 ] ~ [ wine20021219 ] ~ [ wine20021125 ] ~ [ wine20021031 ] ~ [ wine20021007 ] ~ [ wine20020904 ] ~ [ wine20020804 ] ~ [ wine20020710 ] ~ [ wine20020605 ] ~ [ wine20020509 ] ~ [ wine20020411 ] ~ [ wine20020310 ] ~ [ wine20020228 ] ~ [ wine20011226 ] ~ [ wine20011108 ] ~ [ wine20011004 ] ~ [ wine20010824 ] ~ [ wine20010731 ] ~ [ wine20010629 ] ~ [ wine20010510 ] ~ [ wine20010418 ] ~ [ wine20010326 ] ~ [ wine20010305 ] ~ [ wine20010216 ] ~ [ wine20010112 ] ~ [ wine20001222 ] ~ [ wine20001202 ] ~ [ wine20001026 ] ~ [ wine20001002 ] ~ [ wine20000909 ] ~ [ wine20000821 ] ~ [ wine20000801 ] ~ [ wine20000716 ] ~ [ wine20000326 ] ~ [ wine20000227 ] ~ [ wine20000130 ] ~ [ wine20000109 ] ~

  1 #!/bin/bash
  2 # WINE Installation script
  3 # Can do almost everything from compiling to configuring...
  4 #
  5 # Copyright 1999 Ove Kåven
  6 #
  7 # This library is free software; you can redistribute it and/or
  8 # modify it under the terms of the GNU Lesser General Public
  9 # License as published by the Free Software Foundation; either
 10 # version 2.1 of the License, or (at your option) any later version.
 11 #
 12 # This library is distributed in the hope that it will be useful,
 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15 # Lesser General Public License for more details.
 16 #
 17 # You should have received a copy of the GNU Lesser General Public
 18 # License along with this library; if not, write to the Free Software
 19 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 20 #
 21 
 22 #--- defaults (change these if you are a packager)
 23 CONFARGS=""                   # configure args, e.g. --prefix=/usr
 24 
 25 # functions
 26 
 27 function std_sleep {
 28   sleep 1
 29 }
 30 
 31 function conf_yesno_answer {
 32   unset ANSWER
 33   while [ "$ANSWER" != 'yes' ] && [ "$ANSWER" != 'no' ]
 34   do {
 35     echo -n "$1"
 36     read ANSWER
 37   }
 38   done
 39 }
 40 
 41 # startup...
 42 
 43 echo "Wine Installer v1.0"
 44 echo
 45 
 46 if ! [ -f configure ]
 47 then
 48     if [ -f ../configure ]
 49     then {
 50       cd ..
 51     }
 52     else {
 53       echo "You're running this from the wrong directory."
 54       echo "Change to the Wine source's main directory and try again."
 55       exit 1
 56     }
 57     fi
 58 fi
 59 
 60 if [ `whoami` = 'root' ]
 61 then
 62     echo "You are running wineinstall as root, this is not advisable. Please rerun as a user."
 63     echo "Aborting."
 64     exit 1
 65 fi
 66 
 67 if [ ! -w . ]
 68 then
 69     echo "The source directory is not writable. You probably extracted the sources as root."
 70     echo "You should remove the source tree and extract it again as a normal user."
 71     exit 1
 72 fi
 73 
 74 # check whether RPM installed, and if it is, remove any old wine rpm.
 75 hash rpm &>/dev/null
 76 RET=$?
 77 if [ $RET -eq 0 ]; then
 78     if [ -n "`rpm -qi wine 2>/dev/null|grep "^Name"`" ]; then
 79       echo "Warning: Old Wine RPM install detected. Do you want to remove it first?"
 80       conf_yesno_answer "(yes/no) "
 81       if [ "$ANSWER" = 'yes' ]; then
 82         echo "We need to remove the rpm as root, please enter your root password"
 83         echo
 84         echo Starting wine rpm removal...
 85         su -c "rpm -e wine; RET=$?"
 86         if [ $RET -eq 0 ]; then
 87           echo Done.
 88         else
 89           echo "FAILED. Probably you aren't installing as root."
 90           echo "Expect problems (library conflicts with existing install etc.)."
 91         fi
 92       else
 93         echo "Sorry, I won't install Wine when an rpm version is still installed."
 94         echo "(Wine support suffered from way too many conflicts between RPM"
 95         echo "and source installs)"
 96         echo "Have a nice day !"
 97         exit 1
 98       fi
 99     fi
100 fi
101 
102 # check whether wine binary still available
103 if [ -n "`wine --version 2>/dev/null`" ]
104 then
105     echo "Warning !! wine binary (still) found, which may indicate"
106     echo "a (conflicting) previous installation."
107     echo "You might want to abort and uninstall Wine first."
108     echo "(If you previously tried to install from source manually, "
109     echo "run 'make uninstall' from the wine root directory)"
110     std_sleep
111 fi
112 
113 # run the configure script, if necessary
114 
115 if [ -f Makefile ]
116 then
117     echo "I see that Wine has already been configured, so I'll skip that."
118     std_sleep
119 else
120     echo "Running configure..."
121     echo
122     if ! ./configure $CONFARGS
123     then {
124       echo
125       echo "Configure failed, aborting install."
126       exit 1
127     }
128     fi
129 fi
130 
131 # now do the compilation and install, we need to always do this because we
132 # don't want the 'make install' command we might run to run 'make' as root
133 
134 # ask the user if they want to build and install wine
135 echo
136 echo "We need to install wine as root user, do you want us to build wine,"
137 echo "'su root' and install Wine?  Enter 'no' to continue without installing"
138 conf_yesno_answer "(yes/no) "
139 ROOTINSTALL="$ANSWER"
140 
141 if [ "$ROOTINSTALL" = "yes" ]
142 then sucommand="make install"
143 fi
144 
145 echo
146 echo "Compiling Wine. Grab a lunch or two, rent a video, or whatever,"
147 echo "in the meantime..."
148 echo
149 std_sleep
150 
151 # try to just make wine, if this fails 'make depend' and try to remake
152 if ! { make; }
153 then
154     if ! { make depend && make; }
155     then
156       echo
157       echo "Compilation failed, aborting install."
158       exit 1
159     fi
160 fi
161 
162 if [ "$ROOTINSTALL" = "no" ]
163 then
164     exit 0
165 fi
166 
167 echo
168 echo "Performing 'make install' as root to install binaries, enter root password"
169 
170 if ! su root -c "$sucommand"
171 then
172     echo
173     echo "Incorrect root password. If you are running Ubuntu or a similar distribution,"
174     echo "'make install' needs to be run via the sudo wrapper, so trying that one now"
175     if ! sudo su root -c "$sucommand"
176     then
177          echo
178          echo "Either you entered an incorrect password or we failed to"
179          echo "run '$sucommand' correctly."
180          echo "If you didn't enter an incorrect password then please"
181          echo "report this error and any steps to possibly reproduce it to"
182          echo "http://bugs.winehq.org/"
183          echo
184          echo "Installation failed, aborting."
185          exit 1
186     fi
187 fi
188 
189 # it's a wrap
190 echo
191 echo "Installation complete."
192 echo "If you have problems with Wine, please read the documentation first,"
193 echo "as many kinds of potential problems are explained there."
194 
195 exit 0

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.