Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | #------------------------------------------------------------------------------ |
| 3 | # Winelauncher |
| 4 | # This shell script attempts to intelligently manage the process |
| 5 | # of launching a program with Wine. It adds some level of |
| 6 | # visual feedback to an end user. |
| 7 | # |
| 8 | # Usage: |
| 9 | # winelauncher [options] "<windows program> [program arguments]" |
| 10 | # |
| 11 | # This script is meant to be installed to /usr/bin/wine, and |
| 12 | # to be used to invoke a Windows executable. |
| 13 | # The options are passed through directly to Wine, and are |
| 14 | # documented in the Wine man page. |
| 15 | # |
| 16 | # Copyright (c) 2000 by Jeremy White for CodeWeavers |
| 17 | # |
| 18 | #------------------------------------------------------------------------------ |
| 19 | |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 20 | #------------------------------------------------------------------------------ |
| 21 | # Primary configuration area - change this if you installed Wine to |
| 22 | # a location other than @prefix@ |
| 23 | #------------------------------------------------------------------------------ |
| 24 | prefix=@prefix@ |
| 25 | |
| 26 | #------------------------------------------------------------------------------ |
| 27 | # Secondary configuration area; change these at your own risk. |
| 28 | #------------------------------------------------------------------------------ |
| 29 | exec_prefix=@exec_prefix@ |
| 30 | WINEBIN=@bindir@ |
| 31 | WINELIB=@libdir@ |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 32 | WINESERVERBIN= |
| 33 | WINELIBDLLS= |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 34 | |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 35 | #------------------------------------------------------------------------------ |
| 36 | # Establish Color Scheme |
| 37 | #------------------------------------------------------------------------------ |
| 38 | COLOR=' -xrm *.Command.background:darkgrey |
| 39 | -xrm *.Command.foreground:black |
| 40 | -xrm *.Text.background:black |
| 41 | -xrm *.Text.foreground:green |
| 42 | -xrm *.Form.background:grey |
| 43 | -xrm *.Form.foreground:green |
| 44 | -xrm *.foreground:green |
| 45 | -xrm *.background:black' |
| 46 | |
| 47 | |
| 48 | XMESSAGE="xmessage $COLOR" |
| 49 | |
| 50 | |
| 51 | #------------------------------------------------------------------------------ |
| 52 | # We're going to do a lot of fancy footwork below. |
| 53 | # Before we get started, it would be nice to know the argv0, |
| 54 | # of the actual script we're running (and lets remove at least |
| 55 | # one level of symlinking). |
| 56 | #------------------------------------------------------------------------------ |
| 57 | real_name=`find $0 -type l -printf "%l\n"` |
| 58 | if [ ! $real_name ]; then |
| 59 | real_name=$0; |
| 60 | fi |
| 61 | argv0_dir=`find $real_name -printf "%h\n"` |
| 62 | |
| 63 | if [ -z $argv0_dir ] ; then |
| 64 | argv0_dir=. |
| 65 | fi |
| 66 | |
| 67 | #------------------------------------------------------------------------------ |
| 68 | # Okay, now all that junk above was established at configure time. |
| 69 | # However, if this is an RPM install, they may have chosen |
| 70 | # to relocate this installation. If so, that stuff above |
| 71 | # is all broken and we should rejigger it. |
| 72 | #------------------------------------------------------------------------------ |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 73 | WINE_BIN_NAME=wine.bin |
| 74 | if [ ! -x $WINEBIN/$WINE_BIN_NAME ] ; then |
| 75 | WINEBIN=`find $argv0_dir -maxdepth 1 -perm +0111 -type f -name "$WINE_BIN_NAME" -printf "%h\n" | head -1` |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 76 | fi |
| 77 | |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 78 | if [ ! -x $WINEBIN/$WINE_BIN_NAME ] ; then |
| 79 | WINEBIN=`find $argv0_dir/../ -maxdepth 1 -perm +0111 -type f -name "$WINE_BIN_NAME" -printf "%h\n" | head -1` |
| 80 | fi |
| 81 | |
| 82 | if [ ! -x $WINEBIN/$WINE_BIN_NAME ] ; then |
| 83 | WINE_BIN_NAME=wine |
| 84 | if [ ! -x $WINEBIN/$WINE_BIN_NAME ] ; then |
| 85 | WINEBIN=`find $argv0_dir -maxdepth 1 -perm +0111 -type f -name "$WINE_BIN_NAME" -printf "%h\n" | head -1` |
| 86 | fi |
| 87 | |
| 88 | if [ ! -x $WINEBIN/$WINE_BIN_NAME ] ; then |
| 89 | WINEBIN=`find $argv0_dir/../ -maxdepth 1 -perm +0111 -type f -name "$WINE_BIN_NAME" -printf "%h\n" | head -1` |
| 90 | fi |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 91 | fi |
| 92 | |
| 93 | if [ ! -r $WINELIB/libwine.so ] ; then |
| 94 | WINELIB=`find $argv0_dir -maxdepth 2 -name 'libwine.so' -printf "%h\n" | head -1` |
| 95 | fi |
| 96 | |
| 97 | if [ ! -r $WINELIB/libwine.so ] ; then |
| 98 | WINELIB=`find $argv0_dir/../ -maxdepth 2 -name 'libwine.so' -printf "%h\n" | head -1` |
| 99 | fi |
| 100 | |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 101 | if [ -x $WINEBIN/wineserver ] ; then |
| 102 | WINESERVER=$WINEBIN/wineserver |
| 103 | fi |
| 104 | |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 105 | #------------------------------------------------------------------------------ |
| 106 | # Hey, if we built Wine from source, let's add a little extra fun to |
| 107 | # mix it up a bit |
| 108 | #------------------------------------------------------------------------------ |
| 109 | if [ -x $WINEBIN/server/wineserver ] ; then |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 110 | WINESERVER=$WINEBIN/server/wineserver |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 111 | fi |
| 112 | |
| 113 | if [ -r $WINELIB/dlls/libuser.so ] ; then |
| 114 | WINELIBDLLS=$WINELIB/dlls |
| 115 | fi |
| 116 | |
| 117 | |
| 118 | #------------------------------------------------------------------------------ |
| 119 | # Okay, set the paths and move on. |
| 120 | #------------------------------------------------------------------------------ |
| 121 | export LD_LIBRARY_PATH=$WINELIB:$WINELIBDLLS:$LD_LIBRARY_PATH |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 122 | export PATH=$WINEBIN:$PATH |
| 123 | export WINEDLLPATH=$WINELIBDLLS |
| 124 | export WINELOADER=$WINEBIN/$WINE_BIN_NAME |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 125 | |
| 126 | info_flag=~/.wine/.no_prelaunch_window_flag |
| 127 | debug_flag=~/.wine/.no_debug_window_flag |
| 128 | debug_options="-debugmsg warn+all" |
| 129 | |
| 130 | if [ -f $info_flag ] ; then |
| 131 | use_info_message=0 |
| 132 | else |
| 133 | use_info_message=1 |
| 134 | fi |
| 135 | |
| 136 | if [ -f $debug_flag ] ; then |
| 137 | use_debug_message=0 |
| 138 | else |
| 139 | use_debug_message=1 |
| 140 | fi |
| 141 | |
| 142 | |
| 143 | #------------------------------------------------------------------------------ |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 144 | # No arguments? Help 'em out |
| 145 | #------------------------------------------------------------------------------ |
| 146 | always_see_output=0 |
| 147 | no_args=0 |
| 148 | if [ $# -eq 0 ] ; then |
| 149 | no_args=1 |
| 150 | fi |
| 151 | |
| 152 | if [ $# -eq 1 -a foo$1 = foo ] ; then |
| 153 | no_args=1 |
| 154 | fi |
| 155 | |
| 156 | if [ $no_args -eq 1 ] ; then |
| 157 | echo "Wine called with no arguments." |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 158 | echo "Invoking $WINEBIN/$WINE_BIN_NAME $@ ..." |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 159 | $XMESSAGE -buttons " Okay ":0," See the Wine Usage Statement ":1," Configure Wine ":2 \ |
| 160 | -title "Welcome to Wine" \ |
| 161 | " |
| 162 | |
| 163 | You have started Wine without specifying any arguments. |
| 164 | |
| 165 | Wine requires a least one argument - the name of the Windows |
| 166 | application you would like to run. |
| 167 | |
| 168 | If you have launched this through the KDE menu system, |
| 169 | you can use the KDE file browser to select a Windows |
| 170 | exectuable and then click on it to launch Wine with |
| 171 | that application. |
| 172 | |
| 173 | You can similarly use the GNOME file manager to |
| 174 | select a Windows executable and double click on it. |
| 175 | |
| 176 | If you would like to see the command line arguments |
| 177 | for Wine, select the second option, below. |
| 178 | |
| 179 | " |
| 180 | welcome_rc=$? |
| 181 | if [ $welcome_rc -eq 0 ] ; then |
| 182 | exit |
| 183 | fi |
| 184 | |
| 185 | if [ $welcome_rc -eq 2 ] ; then |
| 186 | which winesetup |
| 187 | if [ $? -eq 0 ] ; then |
| 188 | winesetup |
| 189 | else |
| 190 | if [ -x /opt/wine/bin/winesetup ] ; then |
| 191 | /opt/wine/bin/winesetup |
| 192 | else |
| 193 | $XMESSAGE -title "Error" "Error: Unable to find winesetup in your PATH or in /opt/wine/bin" |
| 194 | fi |
| 195 | fi |
| 196 | exit |
| 197 | fi |
| 198 | |
| 199 | use_info_message=0 |
| 200 | always_see_output=1 |
| 201 | fi |
| 202 | |
| 203 | #------------------------------------------------------------------------------ |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 204 | # No config file? Offer to help 'em out... |
| 205 | #------------------------------------------------------------------------------ |
| 206 | conf=0 |
| 207 | |
| 208 | while [ $conf -eq 0 ] ; do |
| 209 | |
| 210 | if [ -f ~/.winerc ] ; then |
| 211 | conf=1 |
| 212 | fi |
| 213 | if [ -f ~/.wine/config ] ; then |
| 214 | conf=2 |
| 215 | fi |
| 216 | if [ -f /etc/wine.conf ] ; then |
| 217 | conf=3 |
| 218 | fi |
| 219 | |
| 220 | if [ $conf -ne 0 ] ; then |
| 221 | break; |
| 222 | fi |
| 223 | |
| 224 | echo "No configuration file detected." |
| 225 | $XMESSAGE -buttons " Cancel ":0," Proceed ":1," Configure Wine ":2 \ |
| 226 | -title "Welcome to Wine" \ |
| 227 | " |
| 228 | |
| 229 | You have started Wine but we cannot find a Wine |
| 230 | configuration file. |
| 231 | |
| 232 | This is normal if you have never run Wine before. |
| 233 | If this is the case, select the 'Configure Wine' |
| 234 | option, below, to create a configuration file. |
| 235 | |
| 236 | " |
| 237 | init_rc=$? |
| 238 | if [ $init_rc -eq 0 ] ; then |
| 239 | exit |
| 240 | fi |
| 241 | |
| 242 | if [ $init_rc -eq 1 ] ; then |
| 243 | break |
| 244 | fi |
| 245 | |
| 246 | if [ $init_rc -eq 2 ] ; then |
| 247 | which winesetup |
| 248 | if [ $? -eq 0 ] ; then |
| 249 | winesetup |
| 250 | else |
| 251 | if [ -x /opt/wine/bin/winesetup ] ; then |
| 252 | /opt/wine/bin/winesetup |
| 253 | else |
| 254 | $XMESSAGE -title "Error" "Error: Unable to find winesetup in your PATH or in /opt/wine/bin" |
| 255 | fi |
| 256 | fi |
| 257 | fi |
| 258 | |
| 259 | done |
| 260 | |
| 261 | #------------------------------------------------------------------------------ |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 262 | # Optionally Warn the user we're going to be launching Wine... |
| 263 | #------------------------------------------------------------------------------ |
| 264 | if [ $use_info_message -ne 0 ] ; then |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 265 | echo "Invoking $WINEBIN/$WINE_BIN_NAME $@ ..." |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 266 | $XMESSAGE -timeout 30 -buttons " Dismiss ":0," Never display this message again ":3 \ |
| 267 | -title "Wine Launch Window" \ |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 268 | "Invoking $WINEBIN/$WINE_BIN_NAME $@ ... |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 269 | |
| 270 | This dialog box is a temporary status dialog to let you know |
| 271 | that Wine is attempting to launch your application. |
| 272 | |
| 273 | Since Wine is still very much in a development stage, many |
| 274 | applications will fail silently. This dialog box is your indication |
| 275 | that we're *trying* to run your application. |
| 276 | |
| 277 | This dialog box will automatically disappear after 30 seconds, |
| 278 | or after your application finishes. |
| 279 | |
| 280 | You can permanently disable this dialog by selecting the option below. |
| 281 | " & |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 282 | info_message_pid=$! |
| 283 | fi |
| 284 | |
| 285 | #------------------------------------------------------------------------------ |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 286 | # Here's a little function to clean up after that dialog... |
| 287 | #------------------------------------------------------------------------------ |
| 288 | function clean_up_info_message () |
| 289 | { |
| 290 | if [ $use_info_message -ne 0 ] ; then |
| 291 | |
| 292 | #------------------------------------------------------------------------------ |
| 293 | # Okay, make sure that the notice window is dead (and kill it if it ain't) |
| 294 | #------------------------------------------------------------------------------ |
| 295 | ps $info_message_pid >/dev/null 2>&1 |
| 296 | if [ $? -ne 0 ] ; then |
| 297 | wait $info_message_pid |
| 298 | info_return=$? |
| 299 | else |
| 300 | info_return=0 |
| 301 | kill $info_message_pid |
| 302 | fi |
| 303 | |
| 304 | #------------------------------------------------------------------------------ |
| 305 | # If they didn't like the warning window, turn it off |
| 306 | #------------------------------------------------------------------------------ |
| 307 | if [ $info_return -eq 3 ] ; then |
| 308 | $XMESSAGE -title "Wine Prelaunch Control" \ |
| 309 | "Wine will now disable the prelaunch Window you just saw. |
| 310 | You will no longer be notified when Wine is attempting |
| 311 | to start a Windows application. |
| 312 | |
| 313 | You can reenable this Window by removing the $info_flag file." -buttons " Okay ":0," Cancel ":1 |
| 314 | if [ $? -eq 0 ] ; then |
| 315 | touch $info_flag |
| 316 | fi |
| 317 | fi |
| 318 | fi |
| 319 | |
| 320 | use_info_message=0 |
| 321 | } |
| 322 | #------------------------------------------------------------------------------ |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 323 | # Generate a temporary log file name |
| 324 | #------------------------------------------------------------------------------ |
| 325 | use_log_name=0 |
| 326 | log_name=`mktemp /tmp/wine.log.XXXXXX` |
| 327 | if [ $? -eq 0 ] ; then |
| 328 | which tail >/dev/null 2>&1 |
| 329 | if [ $? -eq 0 ]; then |
| 330 | use_log_name=1 |
| 331 | fi |
| 332 | fi |
| 333 | |
| 334 | #------------------------------------------------------------------------------ |
| 335 | # Okay, really launch Wine... |
| 336 | #------------------------------------------------------------------------------ |
| 337 | if [ $use_log_name -ne 0 ] ; then |
| 338 | #------------------------------------------------------------------------------ |
| 339 | # Okay, we bend over backwards to run Wine, get that status, |
| 340 | # but still display its output to the screen. |
| 341 | # The obvious thing to do is to run wine and pipe output to tee, |
| 342 | # but then I can't find a way to get the return code of wine; |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 343 | # I only get the return code of tee. |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 344 | #------------------------------------------------------------------------------ |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 345 | $WINEBIN/$WINE_BIN_NAME "$@" >$log_name 2>&1 & |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 346 | wine_pid=$! |
| 347 | |
| 348 | tail -f $log_name & |
| 349 | tail_pid=$! |
| 350 | |
| 351 | wait $wine_pid |
| 352 | wine_return=$? |
| 353 | |
| 354 | kill $tail_pid |
| 355 | else |
Jeremy White | 3a2b900 | 2000-12-01 20:43:51 +0000 | [diff] [blame] | 356 | $WINEBIN/$WINE_BIN_NAME "$@" |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 357 | wine_return=$? |
| 358 | fi |
| 359 | |
| 360 | #------------------------------------------------------------------------------ |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 361 | # Test the return code, and see if it fails |
| 362 | #------------------------------------------------------------------------------ |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 363 | if [ $always_see_output -eq 0 -a $wine_return -eq 0 ] ; then |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 364 | echo "Wine exited with a successful status" |
| 365 | if [ $use_log_name -ne 0 ] ; then |
| 366 | rm -f $log_name |
| 367 | fi |
| 368 | else |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 369 | if [ $always_see_output -eq 0 ] ; then |
| 370 | echo "Wine failed with return code $wine_return" |
| 371 | fi |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 372 | |
| 373 | #------------------------------------------------------------------------------ |
| 374 | # Gracefully display a debug message if they like... |
| 375 | #------------------------------------------------------------------------------ |
| 376 | while [ $use_debug_message -gt 0 ] ; do |
| 377 | |
| 378 | #------------------------------------------------------------------------------ |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 379 | # Build up the menu of choices they can make... |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 380 | #------------------------------------------------------------------------------ |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 381 | BUTTONS=' Okay :0' |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 382 | if [ $use_log_name -ne 0 ] ; then |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 383 | BUTTONS="$BUTTONS"', View Log :1' |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 384 | fi |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 385 | |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 386 | BUTTONS="$BUTTONS"', Debug :2' |
| 387 | BUTTONS="$BUTTONS"', Configure :4' |
| 388 | BUTTONS="$BUTTONS"', Disable :3' |
| 389 | |
| 390 | #------------------------------------------------------------------------------ |
| 391 | # Build an error message |
| 392 | #------------------------------------------------------------------------------ |
| 393 | MESSAGE=" |
| 394 | Wine has exited with a failure status of $wine_return. |
| 395 | |
| 396 | Wine is still development software, so there can be many |
| 397 | explanations for this problem. |
| 398 | |
| 399 | You can choose to run Wine again with a higher level |
| 400 | of debug messages (the debug option, below). |
| 401 | |
| 402 | You can attempt to reconfigure Wine to make it work better. |
| 403 | Note that one change you can make that will dramatically |
| 404 | effect Wine's behaviour is to change whether or not |
| 405 | Wine uses a true Windows partition, mounted under Linux, |
| 406 | or whether it uses an empty Windows directory. |
| 407 | The Wine Configuration program can assist you in making |
| 408 | those changes (select Configure, below, for more). |
| 409 | |
| 410 | You can disable this message entirely by selecting the |
| 411 | Disable option below." |
| 412 | |
| 413 | if [ $always_see_output -ne 0 -a $wine_return -eq 0 ] ; then |
| 414 | MESSAGE=" |
| 415 | Wine has exited with a failure status of $wine_return. |
| 416 | |
| 417 | You can disable this message entirely by selecting the |
| 418 | Disable option below." |
| 419 | |
| 420 | fi |
| 421 | |
| 422 | if [ $use_log_name -ne 0 ] ; then |
| 423 | MESSAGE="$MESSAGE |
| 424 | |
| 425 | Wine has captured a log of the Wine output in the file $log_name. |
| 426 | You may view this file by selecting View Log, below." |
| 427 | fi |
| 428 | |
| 429 | #------------------------------------------------------------------------------ |
| 430 | # Display the message |
| 431 | #------------------------------------------------------------------------------ |
| 432 | $XMESSAGE -title "Wine Finished With Error" -buttons "$BUTTONS" "$MESSAGE" |
| 433 | debug_return=$? |
| 434 | |
| 435 | #------------------------------------------------------------------------------ |
| 436 | # Dismiss the other window... |
| 437 | #------------------------------------------------------------------------------ |
| 438 | clean_up_info_message |
| 439 | |
| 440 | #------------------------------------------------------------------------------ |
| 441 | # Process a configure instruction |
| 442 | #------------------------------------------------------------------------------ |
| 443 | if [ $debug_return -eq 4 ] ; then |
| 444 | which winesetup |
| 445 | if [ $? -eq 0 ] ; then |
| 446 | winesetup |
| 447 | else |
| 448 | if [ -x /opt/wine/bin/winesetup ] ; then |
| 449 | /opt/wine/bin/winesetup |
| 450 | else |
| 451 | $XMESSAGE -title "Error" "Error: Unable to find winesetup in your PATH or in /opt/wine/bin" |
| 452 | fi |
| 453 | fi |
| 454 | continue; |
| 455 | fi |
| 456 | |
| 457 | #------------------------------------------------------------------------------ |
| 458 | # Process a view instruction |
| 459 | #------------------------------------------------------------------------------ |
| 460 | if [ $debug_return -eq 1 ] ; then |
| 461 | $XMESSAGE -title "View Wine Log" -file $log_name -buttons " Okay ":0,"Delete $log_name":1 |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 462 | if [ $? -eq 1 ] ; then |
| 463 | echo "Deleting $log_name" |
| 464 | rm -f $log_name |
| 465 | use_log_name=0 |
| 466 | fi |
| 467 | else |
| 468 | use_debug_message=0 |
| 469 | fi |
| 470 | |
| 471 | #------------------------------------------------------------------------------ |
| 472 | # If they didn't like the warning window, turn it off |
| 473 | #------------------------------------------------------------------------------ |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 474 | if [ $debug_return -eq 3 ] ; then |
| 475 | $XMESSAGE -title "Wine Debug Log Control" \ |
| 476 | "Wine will now disable the Wine debug output control window you just saw. |
| 477 | You will no longer be notified when Wine fails to start a |
| 478 | Windows application. |
| 479 | |
| 480 | You can reenable this Window by removing the $debug_flag file." -buttons " Okay ":0," Cancel ":1 |
| 481 | |
| 482 | if [ $? -eq 0 ] ; then |
| 483 | touch $debug_flag |
| 484 | fi |
| 485 | |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 486 | fi |
| 487 | |
| 488 | #------------------------------------------------------------------------------ |
| 489 | # If they want to retry with debug, let 'em. |
| 490 | #------------------------------------------------------------------------------ |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 491 | if [ $debug_return -eq 2 ] ; then |
| 492 | echo "Rerunning $0 $debug_options $@" |
| 493 | exec $0 $debug_options $@ |
Jeremy White | f9f030b | 2000-11-05 20:06:56 +0000 | [diff] [blame] | 494 | fi |
| 495 | done |
| 496 | fi |
| 497 | |
Jeremy White | 28fd558 | 2000-11-10 22:35:06 +0000 | [diff] [blame] | 498 | |
| 499 | clean_up_info_message |
| 500 | |