From 849cc1a01464cc474139991bec9fb8fcd335cee5ba02a757af9f724a871df3a0 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 16 Oct 2017 09:09:58 +0000 Subject: [PATCH] - Update to 2.19 development snapshot - Support for 32-bit float audio on Android. - Named pipes now fully handled by the Wine server. - Support for a new Microsoft root certificate. - More transform fixes in GdiPlus. - Some heap allocation optimizations. - Various bug fixes. - updated winetricks OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=441 --- wine-2.18.tar.xz | 3 - wine-2.18.tar.xz.sign | 16 - wine-2.19.tar.xz | 3 + wine-2.19.tar.xz.sign | 16 + wine.changes | 12 + wine.spec | 4 +- winetricks | 3713 ++++++++++++++++++++++------------------- 7 files changed, 1984 insertions(+), 1783 deletions(-) delete mode 100644 wine-2.18.tar.xz delete mode 100644 wine-2.18.tar.xz.sign create mode 100644 wine-2.19.tar.xz create mode 100644 wine-2.19.tar.xz.sign diff --git a/wine-2.18.tar.xz b/wine-2.18.tar.xz deleted file mode 100644 index 9556d1b..0000000 --- a/wine-2.18.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f0931129878157d717cb39f16cd33bf49f40aac77331c93d0ad30f2ccac4f50 -size 19546360 diff --git a/wine-2.18.tar.xz.sign b/wine-2.18.tar.xz.sign deleted file mode 100644 index dd1b5e3..0000000 --- a/wine-2.18.tar.xz.sign +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEE2iNXmnTUrZr50/lFzvrI6q8XUZ0FAlnOkY4ACgkQzvrI6q8X -UZ11ng/9HvQoaKE5gtj96u/XBwuTA+ScSJabHmQjvLfy76Nh653oK/q9/puIePGm -vctDKC7G0pGKQ554ZQBE/jT8HcNBh4ly2dhlP8pDkfo+CSnilpipzjBkGQIZQ5qG -VkaIdEjHqPy9GcazSvuocFt2W7CABfyE2DAg974E9Sf7EqAsFKiEwMhpSmOJCb1b -QzKdco8KafLQA+udVuzLKq4W1/oILQ5SECbBiD6D17GYDPHNrJLUqugCzLYewnKR -XN3pbTO7clkYrYZtym5DfgGnQhoHPtQUZIyJO52VmzMo+l2RdnkSNMPLFLp94atH -H7tXTGchGQXW2v1hr2DknS+C8BUTs3ewlpiaz2r+rx9pSwgL4mwAIczs9O2KnnQf -rb6RzyWeHo5JepGiMoeDRpbsYPgrfqCFISn3MklZu6uKtH3Ty4/foKKpk7UmEXIi -eXIFTBTIY3pi93hJzAm8nlOB+LakolOaUjqbDi2xREv8Prc4A8GCKiDUTRUF4eUi -MzuRGydvZreePdpfNIjsTr10zglcYU1S0bKzVOlWMZIZdTbDMkEs/JIfbhci1FJT -04JyccpWbOgezei5zSJkZitaCtxR2RSrnhm+yGUTWPIULDhZDnFEPx+GXu4YhA2H -SOwvo4NdlHGvhga5nlopeWivZ6panawMrAUebllp/KHzziVCWUY= -=ncCR ------END PGP SIGNATURE----- diff --git a/wine-2.19.tar.xz b/wine-2.19.tar.xz new file mode 100644 index 0000000..ee6f4ab --- /dev/null +++ b/wine-2.19.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:487131e69875ae9c2d042798f954160146e603e449c3c97981f29b42f4a66095 +size 19549464 diff --git a/wine-2.19.tar.xz.sign b/wine-2.19.tar.xz.sign new file mode 100644 index 0000000..3402b68 --- /dev/null +++ b/wine-2.19.tar.xz.sign @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE2iNXmnTUrZr50/lFzvrI6q8XUZ0FAlnhT5YACgkQzvrI6q8X +UZ2x5A//WoSYdqrgrtdWSdtksy3zVa9mx4hGhIoiffmwwRN3IntfFko55I1XezuP +OmDkUnUMGorPbGnl4T+pBQCaCImwVeWORaaQ+Po3ghwhseAUIwMiVUN4MkYyEhRR +JxYHYTcKfOttF2iS5g5kN+o+wsv8F+cykps8e6miQPaTveLdWhjJfjPQwS1dG9vK +R3RedNiPaVUYOeSAB67iMDHOXTE8xQRs2zwBOqFXtipdBuI++pNHKMoVDoeV/cbf +9UXSeBIdI66kWKoFt4TMXLPO/hVI8+8+ZU3arr61b1h4HSENgEbxFZTueKQaDQoP +KtYIPE3LRxor1Rz1FqatM94QQc3Er2VYVA/kNWhNhSjgHBreX8SOfhyJqVdGuIeN +9beJ4Yltgs8Wf42ZCmHJYIO06mDrsAO+Voqr1jVoho84Ey3nmww88zlvGXqw3/i5 +U0P2Ysqk4KaBiKpXLCK3ITKiELb27CAv3QEaJNIuaK2eugbvhrvzMmEHe7ahtVGU +Z/qAaedwvBamgXVg/hFQ5MaytRgIJmcgl6gybdKo7wCGe96Q5/hmebUfSexAP2aX +QW6cmPll6D1eWE8hoJ5laC/Wqb0AHQ72l2pfvw1hiEwSN/YuQL9RC7F182wRAVkF +wgvuMYftjcq8zZOHCIBaHbjtY8MFiX1eTBfflqcYGhycxKJUknM= +=wD70 +-----END PGP SIGNATURE----- diff --git a/wine.changes b/wine.changes index 58c5781..d7c1e0f 100644 --- a/wine.changes +++ b/wine.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Oct 16 09:09:11 UTC 2017 - meissner@suse.com + +- Update to 2.19 development snapshot + - Support for 32-bit float audio on Android. + - Named pipes now fully handled by the Wine server. + - Support for a new Microsoft root certificate. + - More transform fixes in GdiPlus. + - Some heap allocation optimizations. + - Various bug fixes. +- updated winetricks + ------------------------------------------------------------------- Fri Sep 29 20:37:24 UTC 2017 - meissner@suse.com diff --git a/wine.spec b/wine.spec index b495d4e..71b2b42 100644 --- a/wine.spec +++ b/wine.spec @@ -61,8 +61,8 @@ BuildRequires: update-desktop-files BuildRequires: valgrind-devel BuildRequires: xorg-x11-devel BuildRequires: pkgconfig(libudev) -%define realver 2.18 -Version: 2.18 +%define realver 2.19 +Version: 2.19 Release: 0 Summary: An MS Windows Emulator License: LGPL-2.1+ diff --git a/winetricks b/winetricks index 537eee9..905a187 100644 --- a/winetricks +++ b/winetricks @@ -29,13 +29,14 @@ WINETRICKS_VERSION=20170823-next # - ar, cabextract, unrar, unzip, and 7z are needed by some verbs. # - aria2c, wget, curl, or fetch is needed for downloading. # - sha256sum, sha256, or shasum (OSX 10.5 does not support these, 10.6+ is required): -# - note: some legacy verbs may still sha1sum, sha1, or shasum, but this is deprecated and -# will be removed in a future release +# note: some legacy verbs may still use sha1sum, sha1, or shasum, but this is +# deprecated and will be removed in a future release. # - zenity is needed by the GUI, though it can limp along somewhat with kdialog/xmessage. # - xdg-open (if present) or open (for OS X) is used to open download pages # for the user when downloads cannot be fully automated. # - sudo is used to mount .iso images if the user cached them with -k option. -# - perl is used to munge steam config files +# - perl is used to munge steam config files. +# - torify is used with option "--torify" if sites are blocked in single countries. # On Ubuntu, the following lines can be used to install all the prerequisites: # sudo add-apt-repository ppa:ubuntu-wine/ppa # sudo apt-get update @@ -113,13 +114,14 @@ WINETRICKS_VERSION=20170823-next # - Open curly braces ('{'), # then should go on the same line as 'if/elif' # close curlies ('}') and 'fi' should line up with the matching { or if, -# cases aligned with 'case' and 'esac'. For instance, +# cases indented 4 spaces from 'case' and 'esac'. For instance, # # if test "$FOO" = "bar"; then # echo "FOO is bar" # fi -# case "$FOO" of -# bar) echo "FOO is still bar" ;; +# +# case "$FOO" in +# bar) echo "FOO is still bar" ;; # esac # # Commenting: @@ -142,8 +144,8 @@ WINETRICKS_VERSION=20170823-next # - Important or frequently used message should be internationalized # so translations can be easily added. For example: # case $LANG in -# de*) echo "Das ist die deutsche Meldung" ;; -# *) echo "This is the English message" ;; +# de*) echo "Das ist die deutsche Meldung" ;; +# *) echo "This is the English message" ;; # esac # # Support: @@ -187,16 +189,16 @@ w_askpermission() fi case $WINETRICKS_GUI in - zenity) $WINETRICKS_GUI "$_W_timeout" --question --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')" --no-wrap;; - kdialog) $WINETRICKS_GUI --title winetricks --warningcontinuecancel "$@" ;; - none) printf %s "Press Y or N, then Enter: " ; read -r response ; test "$response" = Y || test "$response" = y;; + zenity) $WINETRICKS_GUI "$_W_timeout" --question --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')" --no-wrap;; + kdialog) $WINETRICKS_GUI --title winetricks --warningcontinuecancel "$@" ;; + none) printf %s "Press Y or N, then Enter: " ; read -r response ; test "$response" = Y || test "$response" = y;; esac if test $? -ne 0; then case $LANG in - uk*) w_die "Операція скасована." ;; - pl*) w_die "Anulowano operację, opuszczanie." ;; - *) w_die "Operation cancelled, quitting." ;; + uk*) w_die "Операція скасована." ;; + pl*) w_die "Anulowano operację, opuszczanie." ;; + *) w_die "Operation cancelled, quitting." ;; esac exec false fi @@ -217,9 +219,9 @@ w_info() _W_timeout="--timeout 3" case $WINETRICKS_GUI in - zenity) $WINETRICKS_GUI "$_W_timeout" --info --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')" --no-wrap;; - kdialog) $WINETRICKS_GUI --title winetricks --msgbox "$@" ;; - none) ;; + zenity) $WINETRICKS_GUI "$_W_timeout" --info --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')" --no-wrap;; + kdialog) $WINETRICKS_GUI --title winetricks --msgbox "$@" ;; + none) ;; esac unset _W_timeout @@ -240,9 +242,9 @@ w_warn() fi case $WINETRICKS_GUI in - zenity) $WINETRICKS_GUI "$_W_timeout" --error --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";; - kdialog) $WINETRICKS_GUI --title winetricks --error "$@" ;; - none) ;; + zenity) $WINETRICKS_GUI "$_W_timeout" --error --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";; + kdialog) $WINETRICKS_GUI --title winetricks --error "$@" ;; + none) ;; esac unset _W_timeout @@ -263,9 +265,9 @@ w_warn_cancel() # Zenity has no cancel button, but will set status to 1 if you click the go-away X case $WINETRICKS_GUI in - zenity) $WINETRICKS_GUI "$_W_timeout" --error --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";; - kdialog) $WINETRICKS_GUI --title winetricks --warningcontinuecancel "$@" ;; - none) ;; + zenity) $WINETRICKS_GUI "$_W_timeout" --error --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";; + kdialog) $WINETRICKS_GUI --title winetricks --warningcontinuecancel "$@" ;; + none) ;; esac # can't unset, it clears status @@ -294,22 +296,24 @@ w_package_broken_win64() if [ "$W_ARCH" = "win64" ] ; then if [ -n "$1" ] ; then - w_die "This package is broken on 64-bit Wine. Using a prefix made with WINEARCH=win32 to work around this. See: ${bug_link}" + w_die "This package ($W_PACKAGE) is broken on 64-bit Wine. Using a prefix made with WINEARCH=win32 to work around this. See: ${bug_link}" else - w_die "This package is broken on 64-bit Wine. Using a prefix made with WINEARCH=win32 to work around this." + w_die "This package ($W_PACKAGE) is broken on 64-bit Wine. Using a prefix made with WINEARCH=win32 to work around this." fi fi } # Some packages don't support win64, die with an appropriate message # Note: this is for packages that natively don't support win64, not packages that are broken on wine64, for that, use w_package_broken_win64() +# Returns 32 (for tests/winetricks-test) w_package_unsupported_win64() { if [ "$W_ARCH" = "win64" ] ; then case $LANG in ru*) w_die "Данный пакет не работает в 64-битном окружении. Используйте префикс, созданный с помощью WINEARCH=win32." ;; - *) w_die "This package does not work on a 64-bit installation. You must use a prefix made with WINEARCH=win32." ;; + *) w_die "This package ($W_PACKAGE) does not work on a 64-bit installation. You must use a prefix made with WINEARCH=win32." ;; esac + exit 32 fi } @@ -319,7 +323,7 @@ w_package_warn_win64() if [ "$W_ARCH" = "win64" ] ; then case $LANG in ru*) w_warn "Данный пакет может работать не полностью в 64-битном окружении. 32-битные префиксы могут работать лучше." ;; - *) w_warn "This package may not fully work on a 64-bit installation. 32-bit prefixes may work better." ;; + *) w_warn "This package ($W_PACKAGE) may not fully work on a 64-bit installation. 32-bit prefixes may work better." ;; esac fi } @@ -341,13 +345,13 @@ w_try() # If $1 ends in .exe, we know we're running on real Windows, otherwise # $1 would be 'wine'. case "$1" in - *.exe) - chmod +x "$1" || true # don't care if it fails - cmd /c "$@" - ;; - *) - "$@" - ;; + *.exe) + chmod +x "$1" || true # don't care if it fails + cmd /c "$@" + ;; + *) + "$@" + ;; esac status=$? if test $status -ne 0; then @@ -422,16 +426,43 @@ w_try_msiexec64() w_try "$WINE" start /wait "$W_SYSTEM64_DLLS_WIN32/msiexec.exe" $W_UNATTENDED_SLASH_Q "$@" } -w_try_regedit() +# fixme: cleanup. For wow64 registries, some/all entries need to be duplicated. +# Not sure of the best way yet, but thinking running wine/wine64 regedit for each? +w_try_regedit32() { # on windows, doesn't work without cmd /c case "$W_PLATFORM" in - windows_cmd|wine_cmd) cmdc="cmd /c";; - *) unset cmdc ;; + windows_cmd|wine_cmd) cmdc="cmd /c";; + *) unset cmdc ;; esac # shellcheck disable=SC2086 - w_try winetricks_early_wine $cmdc regedit $W_UNATTENDED_SLASH_S "$@" + w_try "$WINE_MULTI" $cmdc regedit $W_UNATTENDED_SLASH_S "$@" +} + +w_try_regedit64() +{ + # on windows, doesn't work without cmd /c + case "$W_PLATFORM" in + windows_cmd|wine_cmd) cmdc="cmd /c";; + *) unset cmdc ;; + esac + + # shellcheck disable=SC2086 + w_try "$WINE64" $cmdc regedit $W_UNATTENDED_SLASH_S "$@" +} + +w_try_regedit() +{ + # If on wow64, run under both wine and wine64 (otherwise they only go in the 32-bit registry afaict) + + # shellcheck disable=SC2086 + if [ "$W_ARCH" = "win32" ]; then + w_try_regedit32 "$@" + elif [ "$W_ARCH" = "win64" ]; then + w_try_regedit32 "$@" + w_try_regedit64 "$@" + fi } w_try_regsvr() @@ -501,37 +532,39 @@ w_read_key() if ! test -f "$_W_keyfile"; then # read key from user case $LANG in - da*) _W_keymsg="Angiv venligst registrerings-nøglen for pakken '$W_PACKAGE'" - _W_nokeymsg="Ingen nøgle angivet" - ;; - de*) _W_keymsg="Bitte einen Key für Paket '$W_PACKAGE' eingeben" - _W_nokeymsg="Keinen Key eingegeben?" - ;; - pl*) _W_keymsg="Proszę podać klucz dla programu '$W_PACKAGE'" - _W_nokeymsg="Nie podano klucza" - ;; - ru*) _W_keymsg="Пожалуйста, введите ключ для приложения '$W_PACKAGE'" - _W_nokeymsg="Ключ не введён" - ;; - uk*) _W_keymsg="Будь ласка, введіть ключ для додатка '$W_PACKAGE'" - _W_nokeymsg="Ключ не надано" - ;; - zh_CN*) _W_keymsg="按任意键为 '$W_PACKAGE'" - _W_nokeymsg="No key given" - ;; - zh_TW*|zh_HK*) _W_keymsg="按任意鍵為 '$W_PACKAGE'" - _W_nokeymsg="No key given" - ;; - *) _W_keymsg="Please enter the key for app '$W_PACKAGE'" - _W_nokeymsg="No key given" - ;; + da*) _W_keymsg="Angiv venligst registrerings-nøglen for pakken '$W_PACKAGE'" + _W_nokeymsg="Ingen nøgle angivet" + ;; + de*) _W_keymsg="Bitte einen Key für Paket '$W_PACKAGE' eingeben" + _W_nokeymsg="Keinen Key eingegeben?" + ;; + pl*) _W_keymsg="Proszę podać klucz dla programu '$W_PACKAGE'" + _W_nokeymsg="Nie podano klucza" + ;; + ru*) _W_keymsg="Пожалуйста, введите ключ для приложения '$W_PACKAGE'" + _W_nokeymsg="Ключ не введён" + ;; + uk*) _W_keymsg="Будь ласка, введіть ключ для додатка '$W_PACKAGE'" + _W_nokeymsg="Ключ не надано" + ;; + zh_CN*) _W_keymsg="按任意键为 '$W_PACKAGE'" + _W_nokeymsg="No key given" + ;; + zh_TW*|zh_HK*) _W_keymsg="按任意鍵為 '$W_PACKAGE'" + _W_nokeymsg="No key given" + ;; + *) _W_keymsg="Please enter the key for app '$W_PACKAGE'" + _W_nokeymsg="No key given" + ;; esac + case $WINETRICKS_GUI in - *zenity) W_KEY=$(zenity --entry --text "$_W_keymsg") ;; - *kdialog) W_KEY=$(kdialog --inputbox "$_W_keymsg") ;; - *xmessage) w_die "sorry, can't read key from GUI with xmessage" ;; - none) printf %s "$_W_keymsg": ; read -r W_KEY ;; + *zenity) W_KEY=$(zenity --entry --text "$_W_keymsg") ;; + *kdialog) W_KEY=$(kdialog --inputbox "$_W_keymsg") ;; + *xmessage) w_die "sorry, can't read key from GUI with xmessage" ;; + none) printf %s "$_W_keymsg": ; read -r W_KEY ;; esac + if test "$W_KEY" = ""; then w_die "$_W_nokeymsg" fi @@ -698,6 +731,18 @@ w_verify_shasum() # It uses minimal buffering, so each line is output immediately # and the user can watch progress as it happens. +# wrapper around wineserver, to let users know that it will wait indefinitely/kill stuff +w_wineserver() +{ + case "$@" in + *-k) w_warn "Running $WINESERVER -k. This will kill all running wine processes in prefix=$WINEPREFIX";; + *-w) w_warn "Running $WINESERVER -w. This will hang until all wine processes in prefix=$WINEPREFIX terminate";; + *) w_warn "Invoking wineserver with '$*'";; + esac + # shellcheck disable=SC2068 + "$WINESERVER" $@ +} + winetricks_parse_wget_progress() { # Parse a percentage, a size, and a time into $1, $2 and $3 @@ -714,30 +759,30 @@ winetricks_parse_wget_progress() winetricks_wget_progress() { case $WINETRICKS_GUI in - zenity) - # Usa a subshell so if the user clicks 'Cancel', - # the --auto-kill kills the subshell, not the current shell - ( - ${torify} wget "$@" 2>&1 | - winetricks_parse_wget_progress | \ - $WINETRICKS_GUI --progress --width 400 --title="$_W_file" --auto-kill --auto-close - ) - err=$? - if test $err -gt 128; then - # 129 is 'killed by SIGHUP' - # Sadly, --auto-kill only applies to parent process, - # which was the subshell, not all the elements of the pipeline... - # have to go find and kill the wget. - # If we ran wget in the background, we could kill it more directly, perhaps... - if pid=$(pgrep -f ."$_W_file"); then - echo User aborted download, killing wget - # shellcheck disable=SC2086 - kill $pid + zenity) + # Use a subshell so if the user clicks 'Cancel', + # the --auto-kill kills the subshell, not the current shell + ( + ${torify} wget "$@" 2>&1 | + winetricks_parse_wget_progress | \ + $WINETRICKS_GUI --progress --width 400 --title="$_W_file" --auto-kill --auto-close + ) + err=$? + if test $err -gt 128; then + # 129 is 'killed by SIGHUP' + # Sadly, --auto-kill only applies to parent process, + # which was the subshell, not all the elements of the pipeline... + # have to go find and kill the wget. + # If we ran wget in the background, we could kill it more directly, perhaps... + if pid=$(pgrep -f ."$_W_file"); then + echo User aborted download, killing wget + # shellcheck disable=SC2086 + kill $pid + fi fi - fi - return $err - ;; - *) ${torify} wget "$@" ;; + return $err + ;; + *) ${torify} wget "$@" ;; esac } @@ -890,7 +935,7 @@ w_download_to() _W_cookiejar="$5" case $_W_packagename in - .) w_die "bug: please do not download packages to top of cache" ;; + .) w_die "bug: please do not download packages to top of cache" ;; esac if echo "$_W_url" | grep ' ' ; then @@ -980,8 +1025,8 @@ w_download_to() # For sites that prefer Mozilla in the user-agent header, set W_BROWSERAGENT=1 case "$W_BROWSERAGENT" in - 1) _W_agent="Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" ;; - *) _W_agent="" ;; + 1) _W_agent="Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" ;; + *) _W_agent="" ;; esac if [ "${WINETRICKS_DOWNLOADER}" = "aria2c" ] ; then @@ -1065,15 +1110,15 @@ w_download_to() # FIXME: gzip hack below may no longer be needed, but need to investigate before removing _W_filetype=$(which file 2>/dev/null) case $_W_filetype-$_W_file in - /*-*.exe|/*-*.ttf|/*-*.zip) - case $(file "$_W_file") in - *:*gzip*) mv "$_W_file" "$_W_file.gz"; gunzip < "$_W_file.gz" > "$_W_file";; - esac + /*-*.exe|/*-*.ttf|/*-*.zip) + case $(file "$_W_file") in + *:*gzip*) mv "$_W_file" "$_W_file.gz"; gunzip < "$_W_file.gz" > "$_W_file";; + esac esac # On Cygwin, .exe's must be marked +x case "$_W_file" in - *.exe) chmod +x "$_W_file" ;; + *.exe) chmod +x "$_W_file" ;; esac w_try_cd "$_W_dl_olddir" @@ -1335,15 +1380,15 @@ done w_question() { case $WINETRICKS_GUI in - *zenity) $WINETRICKS_GUI --entry --text "$1" ;; - *kdialog) $WINETRICKS_GUI --inputbox "$1" ;; - *xmessage) w_die "sorry, can't ask question with xmessage" ;; - none) - # Using printf instead of echo because we don't want a newline - printf "%s" "$1" >&2 ; - read -r W_ANSWER ; - echo "$W_ANSWER"; - unset W_ANSWER;; + *zenity) $WINETRICKS_GUI --entry --text "$1" ;; + *kdialog) $WINETRICKS_GUI --inputbox "$1" ;; + *xmessage) w_die "sorry, can't ask question with xmessage" ;; + none) + # Using printf instead of echo because we don't want a newline + printf "%s" "$1" >&2 ; + read -r W_ANSWER ; + echo "$W_ANSWER"; + unset W_ANSWER;; esac } @@ -1560,21 +1605,21 @@ winetricks_load_gog() for file_and_size_and_sha1 in $files do case "$file_and_size_and_sha1" in - *,*,*) - sha1sum=$(echo "$file_and_size_and_sha1" | sed "s/.*,//") - minsize=$(echo "$file_and_size_and_sha1" | sed 's/[^,]*,\([^,]*\),.*/\1/') - file=$(echo "$file_and_size_and_sha1" | sed 's/,.*//') - ;; - *,*) - sha1sum="" - minsize=$(echo "$file_and_size_and_sha1" | sed 's/.*,//') - file=$(echo "$file_and_size_and_sha1" | sed 's/,.*//') - ;; - *) - sha1sum="" - minsize=1 - file=$file_and_size_and_sha1 - ;; + *,*,*) + sha1sum=$(echo "$file_and_size_and_sha1" | sed "s/.*,//") + minsize=$(echo "$file_and_size_and_sha1" | sed 's/[^,]*,\([^,]*\),.*/\1/') + file=$(echo "$file_and_size_and_sha1" | sed 's/,.*//') + ;; + *,*) + sha1sum="" + minsize=$(echo "$file_and_size_and_sha1" | sed 's/.*,//') + file=$(echo "$file_and_size_and_sha1" | sed 's/,.*//') + ;; + *) + sha1sum="" + minsize=1 + file=$file_and_size_and_sha1 + ;; esac file_path="$installer_path/$file" # shellcheck disable=SC2046 @@ -1658,10 +1703,10 @@ w_mount() fi case "$WINETRICKS_OPT_KEEPISOS" in - 1) - winetricks_cache_iso "$1" - winetricks_mount_cached_iso - ;; + 1) + winetricks_cache_iso "$1" + winetricks_mount_cached_iso + ;; esac fi } @@ -1675,17 +1720,19 @@ w_umount() w_try vcdmount.exe /u else echo "Running $WINETRICKS_SUDO umount $W_ISO_MOUNT_ROOT" + case "$WINETRICKS_SUDO" in - gksudo) - # -l lazy unmount in case executable still running - "$WINETRICKS_SUDO" "umount -l $W_ISO_MOUNT_ROOT" - w_try "$WINETRICKS_SUDO" "rm -rf $W_ISO_MOUNT_ROOT" - ;; - *) - "$WINETRICKS_SUDO" "umount -l $W_ISO_MOUNT_ROOT" - w_try "$WINETRICKS_SUDO" "rm -rf $W_ISO_MOUNT_ROOT" - ;; + gksudo) + # -l lazy unmount in case executable still running + "$WINETRICKS_SUDO" "umount -l $W_ISO_MOUNT_ROOT" + w_try "$WINETRICKS_SUDO" "rm -rf $W_ISO_MOUNT_ROOT" + ;; + *) + "$WINETRICKS_SUDO" "umount -l $W_ISO_MOUNT_ROOT" + w_try "$WINETRICKS_SUDO" "rm -rf $W_ISO_MOUNT_ROOT" + ;; esac + "$WINE" eject "${W_ISO_MOUNT_LETTER}:" rm -f "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}:" rm -f "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}::" @@ -1722,10 +1769,10 @@ _EOF_ w_skip_windows() { case "$W_PLATFORM" in - windows_cmd) - echo "Skipping operation '$1' on Windows" - return 0 - ;; + windows_cmd) + echo "Skipping operation '$1' on Windows" + return 0 + ;; esac return 1 } @@ -2193,24 +2240,23 @@ w_set_winver() ) > /dev/null 2>&1 case "$1" in - win31) - echo "Setting Windows version to $1" - cat > "$W_TMP"/set-winver.reg <<_EOF_ + win31) + echo "Setting Windows version to $1" + cat > "$W_TMP"/set-winver.reg <<_EOF_ REGEDIT4 [HKEY_USERS\S-1-5-4\Software\Wine] "Version"="win31" _EOF_ + w_try_regedit "$W_TMP_WIN"\\set-winver.reg + return + ;; + win95) + # This key is only used for Windows 95/98: - w_try_regedit "$W_TMP_WIN"\\set-winver.reg - return - ;; - win95) - # This key is only used for Windows 95/98: - - echo "Setting Windows version to $1" - cat > "$W_TMP"/set-winver.reg <<_EOF_ + echo "Setting Windows version to $1" + cat > "$W_TMP"/set-winver.reg <<_EOF_ REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion] @@ -2219,14 +2265,14 @@ REGEDIT4 "VersionNumber"="4.0.950" _EOF_ - w_try_regedit "$W_TMP_WIN"\\set-winver.reg - return - ;; - win98) - # This key is only used for Windows 95/98: + w_try_regedit "$W_TMP_WIN"\\set-winver.reg + return + ;; + win98) + # This key is only used for Windows 95/98: - echo "Setting Windows version to $1" - cat > "$W_TMP"/set-winver.reg <<_EOF_ + echo "Setting Windows version to $1" + cat > "$W_TMP"/set-winver.reg <<_EOF_ REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion] @@ -2235,14 +2281,14 @@ REGEDIT4 "VersionNumber"="4.10.2222" _EOF_ - w_try_regedit "$W_TMP_WIN"\\set-winver.reg - return - ;; - nt40) - # Similar to modern version, but sets two extra keys: + w_try_regedit "$W_TMP_WIN"\\set-winver.reg + return + ;; + nt40) + # Similar to modern version, but sets two extra keys: - echo "Setting Windows version to $1" - cat > "$W_TMP"/set-winver.reg <<_EOF_ + echo "Setting Windows version to $1" + cat > "$W_TMP"/set-winver.reg <<_EOF_ REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion] @@ -2260,73 +2306,73 @@ REGEDIT4 "CSDVersion"=dword:00000600 _EOF_ - w_try_regedit "$W_TMP_WIN"\\set-winver.reg - return - ;; - win2k) - csdversion="Service Pack 4" - currentbuildnumber="2195" - currentversion="5.0" - csdversion_hex=dword:00000400 - ;; - winxp) - csdversion="Service Pack 3" - currentbuildnumber="2600" - currentversion="5.1" - csdversion_hex=dword:00000300 - ;; - win2k3) - csdversion="Service Pack 2" - currentbuildnumber="3790" - currentversion="5.2" - csdversion_hex=dword:00000200 - "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "ServerNT" /f - ;; - vista) - csdversion="Service Pack 2" - currentbuildnumber="6002" - currentversion="6.0" - csdversion_hex=dword:00000200 - "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f - ;; - win7) - csdversion="Service Pack 1" - currentbuildnumber="7601" - currentversion="6.1" - csdversion_hex=dword:00000100 - "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f - ;; - win2k8) - csdversion="Service Pack 1" - currentbuildnumber="7601" - currentversion="6.1" - csdversion_hex=dword:00000100 - "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "ServerNT" /f - ;; - win8) - csdversion="" - currentbuildnumber="9200" - currentversion="6.2" - csdversion_hex=dword:00000000 - "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f - ;; - win81) - csdversion="" - currentbuildnumber="9600" - currentversion="6.3" - csdversion_hex=dword:00000000 - "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f - ;; - win10) - csdversion="" - currentbuildnumber="10240" - currentversion="10.0" - csdversion_hex=dword:00000000 - "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f - ;; - *) - w_die "Invalid Windows version given." - ;; + w_try_regedit "$W_TMP_WIN"\\set-winver.reg + return + ;; + win2k) + csdversion="Service Pack 4" + currentbuildnumber="2195" + currentversion="5.0" + csdversion_hex=dword:00000400 + ;; + winxp) + csdversion="Service Pack 3" + currentbuildnumber="2600" + currentversion="5.1" + csdversion_hex=dword:00000300 + ;; + win2k3) + csdversion="Service Pack 2" + currentbuildnumber="3790" + currentversion="5.2" + csdversion_hex=dword:00000200 + "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "ServerNT" /f + ;; + vista) + csdversion="Service Pack 2" + currentbuildnumber="6002" + currentversion="6.0" + csdversion_hex=dword:00000200 + "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f + ;; + win7) + csdversion="Service Pack 1" + currentbuildnumber="7601" + currentversion="6.1" + csdversion_hex=dword:00000100 + "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f + ;; + win2k8) + csdversion="Service Pack 1" + currentbuildnumber="7601" + currentversion="6.1" + csdversion_hex=dword:00000100 + "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "ServerNT" /f + ;; + win8) + csdversion="" + currentbuildnumber="9200" + currentversion="6.2" + csdversion_hex=dword:00000000 + "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f + ;; + win81) + csdversion="" + currentbuildnumber="9600" + currentversion="6.3" + csdversion_hex=dword:00000000 + "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f + ;; + win10) + csdversion="" + currentbuildnumber="10240" + currentversion="10.0" + csdversion_hex=dword:00000000 + "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f + ;; + *) + w_die "Invalid Windows version given." + ;; esac echo "Setting Windows version to $1" @@ -2345,7 +2391,7 @@ _EOF_ w_try_regedit "$W_TMP_WIN"\\set-winver.reg # Prevent a race when calling from another verb - "$WINESERVER" -w + w_wineserver -w } w_unset_winver() @@ -2440,9 +2486,9 @@ w_workaround_wine_bug() return 1 fi case "$2" in - [0-9]*) w_die "bug: want message in w_workaround_wine_bug arg 2, got $2" ;; - "") _W_msg="";; - *) _W_msg="-- $2";; + [0-9]*) w_die "bug: want message in w_workaround_wine_bug arg 2, got $2" ;; + "") _W_msg="";; + *) _W_msg="-- $2";; esac # shellcheck disable=SC2086 @@ -2452,21 +2498,23 @@ w_workaround_wine_bug() fi case "$1" in - "$WINETRICKS_BLACKLIST") - echo "Wine bug $1 workaround blacklisted, skipping" - return 1 - ;; + "$WINETRICKS_BLACKLIST") + echo "Wine bug $1 workaround blacklisted, skipping" + return 1 + ;; esac + case $LANG in - da*) w_warn "Arbejder uden om wine-fejl ${1} $_W_msg" ;; - de*) w_warn "Wine-Fehler ${1} wird umgegangen $_W_msg" ;; - pl*) w_warn "Obchodzenie błędu w wine ${1} $_W_msg" ;; - ru*) w_warn "Обход ошибки ${1} $_W_msg" ;; - uk*) w_warn "Обхід помилки ${1} $_W_msg" ;; - zh_CN*) w_warn "绕过 wine bug ${1} $_W_msg" ;; - zh_TW*|zh_HK*) w_warn "繞過 wine bug ${1} $_W_msg" ;; - *) w_warn "Working around wine bug ${1} $_W_msg" ;; + da*) w_warn "Arbejder uden om wine-fejl ${1} $_W_msg" ;; + de*) w_warn "Wine-Fehler ${1} wird umgegangen $_W_msg" ;; + pl*) w_warn "Obchodzenie błędu w wine ${1} $_W_msg" ;; + ru*) w_warn "Обход ошибки ${1} $_W_msg" ;; + uk*) w_warn "Обхід помилки ${1} $_W_msg" ;; + zh_CN*) w_warn "绕过 wine bug ${1} $_W_msg" ;; + zh_TW*|zh_HK*) w_warn "繞過 wine bug ${1} $_W_msg" ;; + *) w_warn "Working around wine bug ${1} $_W_msg" ;; esac + winetricks_stats_log_command "w_workaround_wine_bug-$1" return 0 } @@ -2505,12 +2553,9 @@ w_metadata() for arg do case "$arg" in - installed_exe1=/*) - w_die "bug: w_metadata $_W_md_cmd has a unix path for installed_exe1, should be a windows path";; - installed_file1=/*) - w_die "bug: w_metadata $_W_md_cmd has a unix path for installed_file1, should be a windows path";; - media=download_manual) - w_die "bug: verb $_W_md_cmd has media=download_manual, should be manual_download" ;; + installed_exe1=/*) w_die "bug: w_metadata $_W_md_cmd has a unix path for installed_exe1, should be a windows path";; + installed_file1=/*) w_die "bug: w_metadata $_W_md_cmd has a unix path for installed_file1, should be a windows path";; + media=download_manual) w_die "bug: verb $_W_md_cmd has media=download_manual, should be manual_download" ;; esac # Use longest match when stripping value, # and shortest match when stripping name, @@ -2527,13 +2572,13 @@ w_metadata() # Do sanity check unless running on Cygwin, where it's way too slow. case "$W_PLATFORM" in - windows_cmd) - ;; - *) - if grep '[^"]$' "$file"; then - w_die "bug: w_metadata $_W_md_cmd corrupt, might need forward slashes?" - fi - ;; + windows_cmd) + ;; + *) + if grep '[^"]$' "$file"; then + w_die "bug: w_metadata $_W_md_cmd corrupt, might need forward slashes?" + fi + ;; esac unset _W_md_cmd @@ -2581,8 +2626,8 @@ w_do_call() fi case "$1" in - *=*) arg=$(echo "$1" | sed 's/.*=//'); cmd=$(echo "$1" | sed 's/=.*//');; - *) cmd=$1; arg=$2 ;; + *=*) arg=$(echo "$1" | sed 's/.*=//'); cmd=$(echo "$1" | sed 's/=.*//');; + *) cmd=$1; arg=$2 ;; esac # Kludge: use Temp instead of temp to avoid \t expansion in w_try @@ -2616,19 +2661,18 @@ w_do_call() # If needed, set the app's wineprefix case "$W_PLATFORM" in - windows_cmd|wine_cmd) - ;; - *) - # shellcheck disable=SC2154 - case "${category}-${WINETRICKS_OPT_SHAREDPREFIX}" in - apps-0|benchmarks-0|games-0) - winetricks_set_wineprefix "$cmd" - # If it's a new wineprefix, give it metadata - if test ! -f "$WINEPREFIX"/wrapper.cfg; then - echo ww_name=\""$title"\" > "$WINEPREFIX"/wrapper.cfg - fi - ;; - esac + windows_cmd|wine_cmd) ;; + *) + # shellcheck disable=SC2154 + case "${category}-${WINETRICKS_OPT_SHAREDPREFIX}" in + apps-0|benchmarks-0|games-0) + winetricks_set_wineprefix "$cmd" + # If it's a new wineprefix, give it metadata + if test ! -f "$WINEPREFIX"/wrapper.cfg; then + echo ww_name=\""$title"\" > "$WINEPREFIX"/wrapper.cfg + fi + ;; + esac ;; esac @@ -2704,7 +2748,7 @@ w_register_font() font=$1 case "$file" in - *.TTF|*.ttf) font="$font (TrueType)";; + *.TTF|*.ttf) font="$font (TrueType)";; esac # Kludge: use _r to avoid \r expansion in w_try @@ -2798,14 +2842,14 @@ winetricks_download_setup() WINETRICKS_DOWNLOADER_TIMEOUT=${WINETRICKS_DOWNLOADER_TIMEOUT:-15} case "$WINETRICKS_OPT_TORIFY" in - 1) torify=torify - # torify needs --async-dns=false, see https://github.com/tatsuhiro-t/aria2/issues/613 - aria2c_torify_opts="--async-dns=false" - if [ ! -x "$(which torify 2>/dev/null)" ]; then - w_die "--torify was used, but torify is not installed, please install it." ; exit 1 - fi ;; - *) torify= - aria2c_torify_opts="" ;; + 1) torify=torify + # torify needs --async-dns=false, see https://github.com/tatsuhiro-t/aria2/issues/613 + aria2c_torify_opts="--async-dns=false" + if [ ! -x "$(which torify 2>/dev/null)" ]; then + w_die "--torify was used, but torify is not installed, please install it." ; exit 1 + fi ;; + *) torify= + aria2c_torify_opts="" ;; esac } @@ -2940,7 +2984,10 @@ winetricks_latest_version_check() # Check that $latest_version is an actual number in case github is down if ! echo "${latest_version}" | grep -q -E "[0-9]{8}" || [ -z "${latest_version}" ] ; then - w_warn "Github down? version '${latest_version}' doesn't appear to be a valid version" + case $LANG in + ru*) w_warn "Отсутствует подключение к Github? версия '${latest_version}' может быть неактуальной" ;; + *) w_warn "Github down? version '${latest_version}' doesn't appear to be a valid version" ;; + esac fi if [ ! "$WINETRICKS_VERSION" = "${latest_version}" ] && [ ! "$WINETRICKS_VERSION" = "${latest_version}-next" ]; then @@ -2950,8 +2997,16 @@ winetricks_latest_version_check() w_info "auto-update enabled: running winetricks_selfupdate" winetricks_selfupdate else - w_warn "You are running winetricks-${WINETRICKS_VERSION}, latest upstream is winetricks-${latest_version}!" - w_warn "You should update using your distribution's package manager, --self-update, or manually." + case $LANG in + ru*) + w_warn "Запущен winetricks-${WINETRICKS_VERSION}, последняя версия winetricks-${latest_version}!" + w_warn "Вы можете ее обновить с помощью менеджера пакетов, --self-update или вручную." + ;; + *) + w_warn "You are running winetricks-${WINETRICKS_VERSION}, latest upstream is winetricks-${latest_version}!" + w_warn "You should update using your distribution's package manager, --self-update, or manually." + ;; + esac fi fi } @@ -3008,6 +3063,7 @@ winetricks_detect_sudo() if test "$WINETRICKS_GUI" = "none"; then return fi + if test x"$DISPLAY" != x""; then if test -x "$(which gksudo 2>/dev/null)"; then WINETRICKS_SUDO=gksudo @@ -3036,174 +3092,174 @@ winetricks_get_prefix_var() winetricks_prefixmenu() { case $LANG in - ru*) _W_msg_title="Winetricks - выберите путь wine (wineprefix)" - _W_msg_body='Что вы хотите сделать?' - _W_msg_apps='Установить программу' - _W_msg_games='Установить игру' - _W_msg_benchmarks='Установить приложение для оценки производительности' - _W_msg_default="Выберите путь для wine по умолчанию" - _W_msg_unattended0="Отключить автоматическую установку" - _W_msg_unattended1="Включить автоматическую установку" - _W_msg_showbroken0="Спрятать нерабочие программы (например, использующие DRM)" - _W_msg_showbroken1="Отобразить нерабочие программы (например, использующие DRM)" - _W_msg_help="Просмотр справки (в веб-браузере)" - ;; - uk*) _W_msg_title="Winetricks - виберіть wineprefix" - _W_msg_body='Що Ви хочете зробити?' - _W_msg_apps='Встановити додаток' - _W_msg_games='Встановити гру' - _W_msg_benchmarks='Встановити benchmark' - _W_msg_default="Вибрати wineprefix за замовчуванням" - _W_msg_unattended0="Вимкнути автоматичне встановлення" - _W_msg_unattended1="Увімкнути автоматичне встановлення" - _W_msg_showbroken0="Сховати нестабільні додатки (наприклад з проблемами з DRM)" - _W_msg_showbroken1="Показати нестабільні додатки (наприклад з проблемами з DRM)" - _W_msg_help="Переглянути довідку" - ;; - zh_CN*) _W_msg_title="Windows 应用安装向导 - 选择一个 wine 容器" - _W_msg_body='君欲何为?' - _W_msg_apps='安装一个 windows 应用' - _W_msg_games='安装一个游戏' - _W_msg_benchmarks='安装一个基准测试软件' - _W_msg_default="选择默认的 wine 容器" - _W_msg_unattended0="禁用静默安装" - _W_msg_unattended1="启用静默安装" - _W_msg_showbroken0="隐藏有问题的程序 (例如那些有数字版权问题)" - _W_msg_showbroken1="有问题的程序 (例如那些有数字版权问题)" - _W_msg_help="查看帮助" - ;; - zh_TW*|zh_HK*) _W_msg_title="Windows 應用安裝向導 - 選取一個 wine 容器" - _W_msg_body='君欲何為?' - _W_msg_apps='安裝一個 windows 應用' - _W_msg_games='安裝一個游戲' - _W_msg_benchmarks='安裝一個基准測試軟體' - _W_msg_default="選取預設的 wine 容器" - _W_msg_unattended0="禁用靜默安裝" - _W_msg_unattended1="啟用靜默安裝" - _W_msg_showbroken0="隱藏有問題的程式 (例如那些有數字版權問題)" - _W_msg_showbroken1="有問題的程式 (例如那些有數字版權問題)" - _W_msg_help="檢視輔助說明" - ;; - de*) _W_msg_title="Winetricks - wineprefix auswählen" - _W_msg_body='Was möchten Sie tun?' - _W_msg_apps='Ein Programm installieren' - _W_msg_games='Ein Spiel installieren' - _W_msg_benchmarks='Einen Benchmark-Test installieren' - _W_msg_default="Standard wineprefix auswählen" - _W_msg_unattended0="Automatische Installation deaktivieren" - _W_msg_unattended1="Automatische Installation aktivieren" - _W_msg_showbroken0="Defekte Programme nicht anzeigen (z.B. solche mit DRM Problemen)" - _W_msg_showbroken1="Defekte Programme anzeigen (z.B. solche mit DRM Problemen)" - _W_msg_help="Hilfe anzeigen" - ;; - pl*) _W_msg_title="Winetricks - wybierz prefiks Wine" - _W_msg_body='Co chcesz zrobić?' - _W_msg_apps='Zainstalować aplikację' - _W_msg_games='Zainstalować grę' - _W_msg_benchmarks='Zainstalować program sprawdzający wydajność komputera' - _W_msg_default="Wybrać domyślny prefiks Wine" - _W_msg_unattended0="Wyłącz cichą instalację" - _W_msg_unattended1="Włącz cichą instalację" - _W_msg_showbroken0="Ukrywaj uszkodzone aplikacje (np. z problemami z DRM)" - _W_msg_showbroken1="Pokazuj uszkodzone aplikacje (np. z problemami z DRM)" - _W_msg_help="Wyświetl pomoc" - ;; - *) _W_msg_title="Winetricks - choose a wineprefix" - _W_msg_body='What do you want to do?' - _W_msg_apps='Install an application' - _W_msg_games='Install a game' - _W_msg_benchmarks='Install a benchmark' - _W_msg_default="Select the default wineprefix" - _W_msg_unattended0="Disable silent install" - _W_msg_unattended1="Enable silent install" - _W_msg_showbroken0="Hide broken apps (e.g. those with DRM problems)" - _W_msg_showbroken1="Show broken apps (e.g. those with DRM problems)" - _W_msg_help="View help" - ;; + ru*) _W_msg_title="Winetricks - выберите путь wine (wineprefix)" + _W_msg_body='Что вы хотите сделать?' + _W_msg_apps='Установить программу' + _W_msg_games='Установить игру' + _W_msg_benchmarks='Установить приложение для оценки производительности' + _W_msg_default="Выберите путь для wine по умолчанию" + _W_msg_unattended0="Отключить автоматическую установку" + _W_msg_unattended1="Включить автоматическую установку" + _W_msg_showbroken0="Спрятать нерабочие программы (например, использующие DRM)" + _W_msg_showbroken1="Отобразить нерабочие программы (например, использующие DRM)" + _W_msg_help="Просмотр справки (в веб-браузере)" + ;; + uk*) _W_msg_title="Winetricks - виберіть wineprefix" + _W_msg_body='Що Ви хочете зробити?' + _W_msg_apps='Встановити додаток' + _W_msg_games='Встановити гру' + _W_msg_benchmarks='Встановити benchmark' + _W_msg_default="Вибрати wineprefix за замовчуванням" + _W_msg_unattended0="Вимкнути автоматичне встановлення" + _W_msg_unattended1="Увімкнути автоматичне встановлення" + _W_msg_showbroken0="Сховати нестабільні додатки (наприклад з проблемами з DRM)" + _W_msg_showbroken1="Показати нестабільні додатки (наприклад з проблемами з DRM)" + _W_msg_help="Переглянути довідку" + ;; + zh_CN*) _W_msg_title="Windows 应用安装向导 - 选择一个 wine 容器" + _W_msg_body='君欲何为?' + _W_msg_apps='安装一个 windows 应用' + _W_msg_games='安装一个游戏' + _W_msg_benchmarks='安装一个基准测试软件' + _W_msg_default="选择默认的 wine 容器" + _W_msg_unattended0="禁用静默安装" + _W_msg_unattended1="启用静默安装" + _W_msg_showbroken0="隐藏有问题的程序 (例如那些有数字版权问题)" + _W_msg_showbroken1="有问题的程序 (例如那些有数字版权问题)" + _W_msg_help="查看帮助" + ;; + zh_TW*|zh_HK*) _W_msg_title="Windows 應用安裝向導 - 選取一個 wine 容器" + _W_msg_body='君欲何為?' + _W_msg_apps='安裝一個 windows 應用' + _W_msg_games='安裝一個游戲' + _W_msg_benchmarks='安裝一個基准測試軟體' + _W_msg_default="選取預設的 wine 容器" + _W_msg_unattended0="禁用靜默安裝" + _W_msg_unattended1="啟用靜默安裝" + _W_msg_showbroken0="隱藏有問題的程式 (例如那些有數字版權問題)" + _W_msg_showbroken1="有問題的程式 (例如那些有數字版權問題)" + _W_msg_help="檢視輔助說明" + ;; + de*) _W_msg_title="Winetricks - wineprefix auswählen" + _W_msg_body='Was möchten Sie tun?' + _W_msg_apps='Ein Programm installieren' + _W_msg_games='Ein Spiel installieren' + _W_msg_benchmarks='Einen Benchmark-Test installieren' + _W_msg_default="Standard wineprefix auswählen" + _W_msg_unattended0="Automatische Installation deaktivieren" + _W_msg_unattended1="Automatische Installation aktivieren" + _W_msg_showbroken0="Defekte Programme nicht anzeigen (z.B. solche mit DRM Problemen)" + _W_msg_showbroken1="Defekte Programme anzeigen (z.B. solche mit DRM Problemen)" + _W_msg_help="Hilfe anzeigen" + ;; + pl*) _W_msg_title="Winetricks - wybierz prefiks Wine" + _W_msg_body='Co chcesz zrobić?' + _W_msg_apps='Zainstalować aplikację' + _W_msg_games='Zainstalować grę' + _W_msg_benchmarks='Zainstalować program sprawdzający wydajność komputera' + _W_msg_default="Wybrać domyślny prefiks Wine" + _W_msg_unattended0="Wyłącz cichą instalację" + _W_msg_unattended1="Włącz cichą instalację" + _W_msg_showbroken0="Ukrywaj uszkodzone aplikacje (np. z problemami z DRM)" + _W_msg_showbroken1="Pokazuj uszkodzone aplikacje (np. z problemami z DRM)" + _W_msg_help="Wyświetl pomoc" + ;; + *) _W_msg_title="Winetricks - choose a wineprefix" + _W_msg_body='What do you want to do?' + _W_msg_apps='Install an application' + _W_msg_games='Install a game' + _W_msg_benchmarks='Install a benchmark' + _W_msg_default="Select the default wineprefix" + _W_msg_unattended0="Disable silent install" + _W_msg_unattended1="Enable silent install" + _W_msg_showbroken0="Hide broken apps (e.g. those with DRM problems)" + _W_msg_showbroken1="Show broken apps (e.g. those with DRM problems)" + _W_msg_help="View help" + ;; esac case "$W_OPT_UNATTENDED" in - 1) _W_cmd_unattended=attended; _W_msg_unattended="$_W_msg_unattended0" ;; - *) _W_cmd_unattended=unattended; _W_msg_unattended="$_W_msg_unattended1" ;; + 1) _W_cmd_unattended=attended; _W_msg_unattended="$_W_msg_unattended0" ;; + *) _W_cmd_unattended=unattended; _W_msg_unattended="$_W_msg_unattended1" ;; esac case "$W_OPT_SHOWBROKEN" in - 1) _W_cmd_showbroken=hidebroken; _W_msg_showbroken="$_W_msg_showbroken0" ;; - *) _W_cmd_showbroken=showbroken; _W_msg_showbroken="$_W_msg_showbroken1" ;; + 1) _W_cmd_showbroken=hidebroken; _W_msg_showbroken="$_W_msg_showbroken0" ;; + *) _W_cmd_showbroken=showbroken; _W_msg_showbroken="$_W_msg_showbroken1" ;; esac case $WINETRICKS_GUI in - zenity) - printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --radiolist \ - --column '' \ - --column '' \ - --column '' \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - --hide-column 2 \ - FALSE help '$_W_msg_help' \ - FALSE apps '$_W_msg_apps' \ - FALSE benchmarks '$_W_msg_benchmarks' \ - FALSE games '$_W_msg_games' \ - TRUE main '$_W_msg_default' \ - " \ - > "$WINETRICKS_WORKDIR"/zenity.sh + zenity) + printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --radiolist \ + --column '' \ + --column '' \ + --column '' \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + --hide-column 2 \ + FALSE help '$_W_msg_help' \ + FALSE apps '$_W_msg_apps' \ + FALSE benchmarks '$_W_msg_benchmarks' \ + FALSE games '$_W_msg_games' \ + TRUE main '$_W_msg_default' \ + " \ + > "$WINETRICKS_WORKDIR"/zenity.sh - if ls -d "$W_PREFIXES_ROOT"/*/dosdevices > /dev/null 2>&1; then - for prefix in "$W_PREFIXES_ROOT"/*/dosdevices - do - q="${prefix%%/dosdevices}" - p="${q##*/}" - if test -f "$W_PREFIXES_ROOT/$p/wrapper.cfg"; then - _W_msg_name="$p ($(winetricks_get_prefix_var name))" - else - _W_msg_name="$p" - fi - case $LANG in - zh_CN*) printf %s " FALSE prefix='$p' '选择管理 $_W_msg_name' " ;; - zh_TW*|zh_HK*) printf %s " FALSE prefix='$p' '選擇管理 $_W_msg_name' " ;; - de*) printf %s " FALSE prefix='$p' '$_W_msg_name auswählen' " ;; - pl*) printf %s " FALSE prefix='$p' 'Wybierz $_W_msg_name' " ;; - *) printf %s " FALSE prefix='$p' 'Select $_W_msg_name' " ;; - esac - done >> "$WINETRICKS_WORKDIR"/zenity.sh - fi - printf %s " FALSE $_W_cmd_unattended '$_W_msg_unattended'" >> "$WINETRICKS_WORKDIR"/zenity.sh - printf %s " FALSE $_W_cmd_showbroken '$_W_msg_showbroken'" >> "$WINETRICKS_WORKDIR"/zenity.sh + if ls -d "$W_PREFIXES_ROOT"/*/dosdevices > /dev/null 2>&1; then + for prefix in "$W_PREFIXES_ROOT"/*/dosdevices + do + q="${prefix%%/dosdevices}" + p="${q##*/}" + if test -f "$W_PREFIXES_ROOT/$p/wrapper.cfg"; then + _W_msg_name="$p ($(winetricks_get_prefix_var name))" + else + _W_msg_name="$p" + fi + case $LANG in + zh_CN*) printf %s " FALSE prefix='$p' '选择管理 $_W_msg_name' " ;; + zh_TW*|zh_HK*) printf %s " FALSE prefix='$p' '選擇管理 $_W_msg_name' " ;; + de*) printf %s " FALSE prefix='$p' '$_W_msg_name auswählen' " ;; + pl*) printf %s " FALSE prefix='$p' 'Wybierz $_W_msg_name' " ;; + *) printf %s " FALSE prefix='$p' 'Select $_W_msg_name' " ;; + esac + done >> "$WINETRICKS_WORKDIR"/zenity.sh + fi + printf %s " FALSE $_W_cmd_unattended '$_W_msg_unattended'" >> "$WINETRICKS_WORKDIR"/zenity.sh + printf %s " FALSE $_W_cmd_showbroken '$_W_msg_showbroken'" >> "$WINETRICKS_WORKDIR"/zenity.sh - sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' ' - ;; + sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' ' + ;; - kdialog) - ( - printf %s "kdialog \ - --geometry 600x400+100+100 \ - --title '$_W_msg_title' \ - --separate-output \ - --radiolist '$_W_msg_body' \ - help '$_W_msg_help' off \ - games '$_W_msg_games' off \ - benchmarks '$_W_msg_benchmarks' off \ - apps '$_W_msg_apps' off \ - main '$_W_msg_default' on " - if ls -d "$W_PREFIXES_ROOT"/*/dosdevices > /dev/null 2>&1; then - for prefix in "$W_PREFIXES_ROOT"/*/dosdevices - do - q="${prefix%%/dosdevices}" - p="${q##*/}" - if test -f "$W_PREFIXES_ROOT/$p/wrapper.cfg"; then - _W_msg_name="$p ($(winetricks_get_prefix_var name))" - else - _W_msg_name="$p" - fi - printf %s "prefix='$p' 'Select $_W_msg_name' off " - done - fi - ) > "$WINETRICKS_WORKDIR"/kdialog.sh - sh "$WINETRICKS_WORKDIR"/kdialog.sh - ;; + kdialog) + ( + printf %s "kdialog \ + --geometry 600x400+100+100 \ + --title '$_W_msg_title' \ + --separate-output \ + --radiolist '$_W_msg_body' \ + help '$_W_msg_help' off \ + games '$_W_msg_games' off \ + benchmarks '$_W_msg_benchmarks' off \ + apps '$_W_msg_apps' off \ + main '$_W_msg_default' on " + if ls -d "$W_PREFIXES_ROOT"/*/dosdevices > /dev/null 2>&1; then + for prefix in "$W_PREFIXES_ROOT"/*/dosdevices + do + q="${prefix%%/dosdevices}" + p="${q##*/}" + if test -f "$W_PREFIXES_ROOT/$p/wrapper.cfg"; then + _W_msg_name="$p ($(winetricks_get_prefix_var name))" + else + _W_msg_name="$p" + fi + printf %s "prefix='$p' 'Select $_W_msg_name' off " + done + fi + ) > "$WINETRICKS_WORKDIR"/kdialog.sh + sh "$WINETRICKS_WORKDIR"/kdialog.sh + ;; esac unset _W_msg_help _W_msg_body _W_msg_title _W_msg_new _W_msg_default _W_msg_name } @@ -3212,160 +3268,161 @@ winetricks_prefixmenu() winetricks_mainmenu() { case $LANG in - da*) _W_msg_title='Vælg en pakke-kategori' - _W_msg_body='Hvad ønsker du at gøre?' - _W_msg_dlls="Install a Windows DLL" - _W_msg_fonts='Install a font' - _W_msg_settings='Change Wine settings' - _W_msg_winecfg='Run winecfg' - _W_msg_regedit='Run regedit' - _W_msg_taskmgr='Run taskmgr' - _W_msg_uninstaller='Run uninstaller' - _W_msg_shell='Run a commandline shell (for debugging)' - _W_msg_folder='Browse files' - _W_msg_annihilate="Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX" - ;; - de*) _W_msg_title='Pakettyp auswählen' - _W_msg_body='Was möchten Sie tun?' - _W_msg_dlls="Windows-DLL installieren" - _W_msg_fonts='Schriftart installieren' - _W_msg_settings='Wine Einstellungen ändern' - _W_msg_winecfg='winecfg starten' - _W_msg_regedit='regedit starten' - _W_msg_taskmgr='taskmgr starten' - _W_msg_uninstaller='uninstaller starten' - _W_msg_shell='Eine Kommandozeile zum debuggen starten' - _W_msg_folder='Ordner durchsuchen' - _W_msg_annihilate="ALLE DATEIEN UND PROGRAMME IN DIESEM WINEPREFIX Löschen" - ;; - pl*) _W_msg_title="Winetricks - obecny prefiks to \"$WINEPREFIX\"" - _W_msg_body='Co chcesz zrobić w tym prefiksie?' - _W_msg_dlls="Zainstalować windowsową bibliotekę DLL lub komponent" - _W_msg_fonts='Zainstalować czcionkę' - _W_msg_settings='Zmienić ustawienia' - _W_msg_winecfg='Uruchomić winecfg' - _W_msg_regedit='Uruchomić edytor rejestru' - _W_msg_taskmgr='Uruchomić menedżer zadań' - _W_msg_uninstaller='Uruchomić program odinstalowujący' - _W_msg_shell='Uruchomić powłokę wiersza poleceń (dla debugowania)' - _W_msg_folder='Przeglądać pliki' - _W_msg_annihilate="Usuńąć WSZYSTKIE DANE I APLIKACJE WEWNĄTRZ TEGO PREFIKSU WINE" - ;; - ru*) _W_msg_title="Winetricks - текущий путь для wine (wineprefix) \"$WINEPREFIX\"" - _W_msg_body='Что вы хотите сделать с этим wineprefix?' - _W_msg_dlls="Установить библиотеку DLL или компонент Windows" - _W_msg_fonts='Установить шрифт' - _W_msg_settings='Поменять настройки' - _W_msg_winecfg='Запустить winecfg (редактор настроек wine)' - _W_msg_regedit='Запустить regedit (редактор реестра)' - _W_msg_taskmgr='Запустить taskmgr (менеджер задач)' - _W_msg_uninstaller='Запустить uninstaller (деинсталлятор)' - _W_msg_shell='Запустить графический терминал (для отладки)' - _W_msg_folder='Проводник файлов' - _W_msg_annihilate="Удалить ВСЕ ДАННЫЕ И ПРИЛОЖЕНИЯ В ЭТОМ WINEPREFIX" - ;; - uk*) _W_msg_title="Winetricks - поточний prefix \"$WINEPREFIX\"" - _W_msg_body='Що Ви хочете зробити для цього wineprefix?' - _W_msg_dlls="Встановити Windows DLL чи компонент(и)" - _W_msg_fonts='Встановити шрифт' - _W_msg_settings='Змінити налаштування' - _W_msg_winecfg='Запустити winecfg' - _W_msg_regedit='Запустити regedit' - _W_msg_taskmgr='Запустити taskmgr' - _W_msg_uninstaller='Встановлення/видалення програм' - _W_msg_shell='Запуск командної оболонки (для налагодження)' - _W_msg_folder='Перегляд файлів' - _W_msg_annihilate="Видалити УСІ ДАНІ ТА ПРОГРАМИ З ЦЬОГО WINEPREFIX" - ;; - zh_CN*) _W_msg_title="Windows 应用安装向导 - 当前容器路径是 \"$WINEPREFIX\"" - _W_msg_body='管理当前容器' - _W_msg_dlls="安装 Windows DLL 或组件" - _W_msg_fonts='安装字体' - _W_msg_settings='修改设置' - _W_msg_winecfg='运行 winecfg' - _W_msg_regedit='运行注册表' - _W_msg_taskmgr='运行任务管理器' - _W_msg_uninstaller='运行卸载程序' - _W_msg_shell='运行命令提示窗口 (作为调试)' - _W_msg_folder='浏览容器中的文件' - _W_msg_annihilate="删除当前容器所有相关文件,包括启动器,完全卸载" - ;; - zh_TW*|zh_HK*) _W_msg_title="Windows 應用裝載向導 - 目前容器路徑是 \"$WINEPREFIX\"" - _W_msg_body='管理目前容器' - _W_msg_dlls="裝載 Windows DLL 或套件" - _W_msg_fonts='裝載字型' - _W_msg_settings='修改設定' - _W_msg_winecfg='執行 winecfg' - _W_msg_regedit='執行註冊表' - _W_msg_taskmgr='執行工作管理者' - _W_msg_uninstaller='執行反安裝程式' - _W_msg_shell='執行指令輔助說明視窗 (作為除錯)' - _W_msg_folder='瀏覽容器中的檔案' - _W_msg_annihilate="移除目前容器所有相依檔案,包括啟動器,完全卸載" - ;; - *) _W_msg_title="Winetricks - current prefix is \"$WINEPREFIX\"" - _W_msg_body='What would you like to do to this wineprefix?' - _W_msg_dlls="Install a Windows DLL or component" - _W_msg_fonts='Install a font' - _W_msg_settings='Change settings' - _W_msg_winecfg='Run winecfg' - _W_msg_regedit='Run regedit' - _W_msg_taskmgr='Run taskmgr' - _W_msg_uninstaller='Run uninstaller' - _W_msg_shell='Run a commandline shell (for debugging)' - _W_msg_folder='Browse files' - _W_msg_annihilate="Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX" - ;; + da*) _W_msg_title='Vælg en pakke-kategori' + _W_msg_body='Hvad ønsker du at gøre?' + _W_msg_dlls="Install a Windows DLL" + _W_msg_fonts='Install a font' + _W_msg_settings='Change Wine settings' + _W_msg_winecfg='Run winecfg' + _W_msg_regedit='Run regedit' + _W_msg_taskmgr='Run taskmgr' + _W_msg_uninstaller='Run uninstaller' + _W_msg_shell='Run a commandline shell (for debugging)' + _W_msg_folder='Browse files' + _W_msg_annihilate="Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX" + ;; + de*) _W_msg_title='Pakettyp auswählen' + _W_msg_body='Was möchten Sie tun?' + _W_msg_dlls="Windows-DLL installieren" + _W_msg_fonts='Schriftart installieren' + _W_msg_settings='Wine Einstellungen ändern' + _W_msg_winecfg='winecfg starten' + _W_msg_regedit='regedit starten' + _W_msg_taskmgr='taskmgr starten' + _W_msg_uninstaller='uninstaller starten' + _W_msg_shell='Eine Kommandozeile zum debuggen starten' + _W_msg_folder='Ordner durchsuchen' + _W_msg_annihilate="ALLE DATEIEN UND PROGRAMME IN DIESEM WINEPREFIX Löschen" + ;; + pl*) _W_msg_title="Winetricks - obecny prefiks to \"$WINEPREFIX\"" + _W_msg_body='Co chcesz zrobić w tym prefiksie?' + _W_msg_dlls="Zainstalować windowsową bibliotekę DLL lub komponent" + _W_msg_fonts='Zainstalować czcionkę' + _W_msg_settings='Zmienić ustawienia' + _W_msg_winecfg='Uruchomić winecfg' + _W_msg_regedit='Uruchomić edytor rejestru' + _W_msg_taskmgr='Uruchomić menedżer zadań' + _W_msg_uninstaller='Uruchomić program odinstalowujący' + _W_msg_shell='Uruchomić powłokę wiersza poleceń (dla debugowania)' + _W_msg_folder='Przeglądać pliki' + _W_msg_annihilate="Usuńąć WSZYSTKIE DANE I APLIKACJE WEWNĄTRZ TEGO PREFIKSU WINE" + ;; + ru*) _W_msg_title="Winetricks - текущий путь для wine (wineprefix) \"$WINEPREFIX\"" + _W_msg_body='Что вы хотите сделать с этим wineprefix?' + _W_msg_dlls="Установить библиотеку DLL или компонент Windows" + _W_msg_fonts='Установить шрифт' + _W_msg_settings='Поменять настройки' + _W_msg_winecfg='Запустить winecfg (редактор настроек wine)' + _W_msg_regedit='Запустить regedit (редактор реестра)' + _W_msg_taskmgr='Запустить taskmgr (менеджер задач)' + _W_msg_uninstaller='Запустить uninstaller (деинсталлятор)' + _W_msg_shell='Запустить графический терминал (для отладки)' + _W_msg_folder='Проводник файлов' + _W_msg_annihilate="Удалить ВСЕ ДАННЫЕ И ПРИЛОЖЕНИЯ В ЭТОМ WINEPREFIX" + ;; + uk*) _W_msg_title="Winetricks - поточний prefix \"$WINEPREFIX\"" + _W_msg_body='Що Ви хочете зробити для цього wineprefix?' + _W_msg_dlls="Встановити Windows DLL чи компонент(и)" + _W_msg_fonts='Встановити шрифт' + _W_msg_settings='Змінити налаштування' + _W_msg_winecfg='Запустити winecfg' + _W_msg_regedit='Запустити regedit' + _W_msg_taskmgr='Запустити taskmgr' + _W_msg_uninstaller='Встановлення/видалення програм' + _W_msg_shell='Запуск командної оболонки (для налагодження)' + _W_msg_folder='Перегляд файлів' + _W_msg_annihilate="Видалити УСІ ДАНІ ТА ПРОГРАМИ З ЦЬОГО WINEPREFIX" + ;; + zh_CN*) _W_msg_title="Windows 应用安装向导 - 当前容器路径是 \"$WINEPREFIX\"" + _W_msg_body='管理当前容器' + _W_msg_dlls="安装 Windows DLL 或组件" + _W_msg_fonts='安装字体' + _W_msg_settings='修改设置' + _W_msg_winecfg='运行 winecfg' + _W_msg_regedit='运行注册表' + _W_msg_taskmgr='运行任务管理器' + _W_msg_uninstaller='运行卸载程序' + _W_msg_shell='运行命令提示窗口 (作为调试)' + _W_msg_folder='浏览容器中的文件' + _W_msg_annihilate="删除当前容器所有相关文件,包括启动器,完全卸载" + ;; + zh_TW*|zh_HK*) _W_msg_title="Windows 應用裝載向導 - 目前容器路徑是 \"$WINEPREFIX\"" + _W_msg_body='管理目前容器' + _W_msg_dlls="裝載 Windows DLL 或套件" + _W_msg_fonts='裝載字型' + _W_msg_settings='修改設定' + _W_msg_winecfg='執行 winecfg' + _W_msg_regedit='執行註冊表' + _W_msg_taskmgr='執行工作管理者' + _W_msg_uninstaller='執行反安裝程式' + _W_msg_shell='執行指令輔助說明視窗 (作為除錯)' + _W_msg_folder='瀏覽容器中的檔案' + _W_msg_annihilate="移除目前容器所有相依檔案,包括啟動器,完全卸載" + ;; + *) _W_msg_title="Winetricks - current prefix is \"$WINEPREFIX\"" + _W_msg_body='What would you like to do to this wineprefix?' + _W_msg_dlls="Install a Windows DLL or component" + _W_msg_fonts='Install a font' + _W_msg_settings='Change settings' + _W_msg_winecfg='Run winecfg' + _W_msg_regedit='Run regedit' + _W_msg_taskmgr='Run taskmgr' + _W_msg_uninstaller='Run uninstaller' + _W_msg_shell='Run a commandline shell (for debugging)' + _W_msg_folder='Browse files' + _W_msg_annihilate="Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX" + ;; esac case $WINETRICKS_GUI in - zenity) - ( - printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --radiolist \ - --column '' \ - --column '' \ - --column '' \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - --hide-column 2 \ - FALSE dlls '$_W_msg_dlls' \ - FALSE fonts '$_W_msg_fonts' \ - FALSE settings '$_W_msg_settings' \ - FALSE winecfg '$_W_msg_winecfg' \ - FALSE regedit '$_W_msg_regedit' \ - FALSE taskmgr '$_W_msg_taskmgr' \ - FALSE uninstaller '$_W_msg_uninstaller' \ - FALSE shell '$_W_msg_shell' \ - FALSE folder '$_W_msg_folder' \ - FALSE annihilate '$_W_msg_annihilate' \ - " - ) > "$WINETRICKS_WORKDIR"/zenity.sh - sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' ' - ;; + zenity) + ( + printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --radiolist \ + --column '' \ + --column '' \ + --column '' \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + --hide-column 2 \ + FALSE dlls '$_W_msg_dlls' \ + FALSE fonts '$_W_msg_fonts' \ + FALSE settings '$_W_msg_settings' \ + FALSE winecfg '$_W_msg_winecfg' \ + FALSE regedit '$_W_msg_regedit' \ + FALSE taskmgr '$_W_msg_taskmgr' \ + FALSE uninstaller '$_W_msg_uninstaller' \ + FALSE shell '$_W_msg_shell' \ + FALSE folder '$_W_msg_folder' \ + FALSE annihilate '$_W_msg_annihilate' \ + " + ) > "$WINETRICKS_WORKDIR"/zenity.sh - kdialog) - $WINETRICKS_GUI --geometry 600x400+100+100 \ - --title "$_W_msg_title" \ - --separate-output \ - --radiolist \ - "$_W_msg_body"\ - dlls "$_W_msg_dlls" off \ - fonts "$_W_msg_fonts" off \ - settings "$_W_msg_settings" off \ - winecfg "$_W_msg_winecfg" off \ - regedit "$_W_msg_regedit" off \ - taskmgr "$_W_msg_taskmgr" off \ - uninstaller "$_W_msg_uninstaller" off \ - shell "$_W_msg_shell" off \ - folder "$_W_msg_folder" off \ - annihilate "$_W_msg_annihilate" off \ - $_W_cmd_unattended "$_W_msg_unattended" off \ + sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' ' + ;; - ;; + kdialog) + $WINETRICKS_GUI --geometry 600x400+100+100 \ + --title "$_W_msg_title" \ + --separate-output \ + --radiolist \ + "$_W_msg_body"\ + dlls "$_W_msg_dlls" off \ + fonts "$_W_msg_fonts" off \ + settings "$_W_msg_settings" off \ + winecfg "$_W_msg_winecfg" off \ + regedit "$_W_msg_regedit" off \ + taskmgr "$_W_msg_taskmgr" off \ + uninstaller "$_W_msg_uninstaller" off \ + shell "$_W_msg_shell" off \ + folder "$_W_msg_folder" off \ + annihilate "$_W_msg_annihilate" off \ + $_W_cmd_unattended "$_W_msg_unattended" off \ + + ;; esac unset _W_msg_body _W_msg_title _W_msg_apps _W_msg_benchmarks _W_msg_dlls _W_msg_games _W_msg_settings } @@ -3374,165 +3431,169 @@ winetricks_settings_menu() { # FIXME: these translations should really be centralized/reused: case $LANG in - da*) _W_msg_title='Vælg en pakke' - _W_msg_body='Which settings would you like to change?' - ;; - de*) _W_msg_title="Winetricks - Aktueller Prefix ist \"$WINEPREFIX\"" - _W_msg_body='Welche Einstellungen möchten Sie ändern?' - ;; - pl*) _W_msg_title="Winetricks - obecny prefiks to \"$WINEPREFIX\"" - _W_msg_body='Jakie ustawienia chcesz zmienić?' - ;; - ru*) _W_msg_title="Winetricks - текущий путь wine (wineprefix) \"$WINEPREFIX\"" - _W_msg_body='Какие настройки вы хотите изменить?' - ;; - uk*) _W_msg_title="Winetricks - поточний prefix \"$WINEPREFIX\"" - _W_msg_body='Які налаштування Ви хочете змінити?' - ;; - zh_CN*) _W_msg_title="Windows 应用安装向导 - 当前容器路径是 \"$WINEPREFIX\"" - _W_msg_body='君欲更改哪项设置?' - ;; - zh_TW*|zh_HK*) _W_msg_title="Windows 應用裝載向導 - 目前容器路徑是 \"$WINEPREFIX\"" - _W_msg_body='君欲變更哪項設定?' - ;; - *) _W_msg_title="Winetricks - current prefix is \"$WINEPREFIX\"" - _W_msg_body='Which settings would you like to change?' - ;; + da*) _W_msg_title='Vælg en pakke' + _W_msg_body='Which settings would you like to change?' + ;; + de*) _W_msg_title="Winetricks - Aktueller Prefix ist \"$WINEPREFIX\"" + _W_msg_body='Welche Einstellungen möchten Sie ändern?' + ;; + pl*) _W_msg_title="Winetricks - obecny prefiks to \"$WINEPREFIX\"" + _W_msg_body='Jakie ustawienia chcesz zmienić?' + ;; + ru*) _W_msg_title="Winetricks - текущий путь wine (wineprefix) \"$WINEPREFIX\"" + _W_msg_body='Какие настройки вы хотите изменить?' + ;; + uk*) _W_msg_title="Winetricks - поточний prefix \"$WINEPREFIX\"" + _W_msg_body='Які налаштування Ви хочете змінити?' + ;; + zh_CN*) _W_msg_title="Windows 应用安装向导 - 当前容器路径是 \"$WINEPREFIX\"" + _W_msg_body='君欲更改哪项设置?' + ;; + zh_TW*|zh_HK*) _W_msg_title="Windows 應用裝載向導 - 目前容器路徑是 \"$WINEPREFIX\"" + _W_msg_body='君欲變更哪項設定?' + ;; + *) _W_msg_title="Winetricks - current prefix is \"$WINEPREFIX\"" + _W_msg_body='Which settings would you like to change?' + ;; esac case $WINETRICKS_GUI in - zenity) - case $LANG in - da*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Pakke \ - --column Navn \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - de*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Einstellung \ - --column Name \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - pl*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Ustawienie \ - --column Nazwa \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - ru*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Установка \ - --column Имя \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - uk*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Установка \ - --column Назва \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - zh_CN*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column 设置 \ - --column 标题 \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - zh_TW*|zh_HK*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column 設定 \ - --column 標題 \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - *) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Setting \ - --column Title \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - esac > "$WINETRICKS_WORKDIR"/zenity.sh - - for metadatafile in "$WINETRICKS_METADATA"/$WINETRICKS_CURMENU/*.vars - do - code=$(winetricks_metadata_basename "$metadatafile") - ( - title='?' - # shellcheck disable=SC1090 - . "$metadatafile" - # Begin 'title' strings localization code - # shellcheck disable=SC2154 + zenity) case $LANG in - uk*) case "$title_uk" in - "") ;; - *) title="$title_uk";; - esac - esac - # End of code - printf "%s %s %s %s" " " FALSE \ - "$code" \ - "\"$title\"" - ) - done >> "$WINETRICKS_WORKDIR"/zenity.sh + da*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Pakke \ + --column Navn \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + de*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Einstellung \ + --column Name \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + pl*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Ustawienie \ + --column Nazwa \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + ru*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Установка \ + --column Имя \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + uk*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Установка \ + --column Назва \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + zh_CN*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column 设置 \ + --column 标题 \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + zh_TW*|zh_HK*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column 設定 \ + --column 標題 \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + *) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Setting \ + --column Title \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + esac > "$WINETRICKS_WORKDIR"/zenity.sh - sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' ' - ;; + for metadatafile in "$WINETRICKS_METADATA"/$WINETRICKS_CURMENU/*.vars + do + code=$(winetricks_metadata_basename "$metadatafile") + ( + title='?' + # shellcheck disable=SC1090 + . "$metadatafile" - kdialog) - ( - printf %s "kdialog --geometry 600x400+100+100 --title '$_W_msg_title' --separate-output --checklist '$_W_msg_body' " - winetricks_list_all | sed 's/\([^ ]*\) *\(.*\)/\1 "\1 - \2" off /' | tr '\012' ' ' - ) > "$WINETRICKS_WORKDIR"/kdialog.sh - sh "$WINETRICKS_WORKDIR"/kdialog.sh - ;; + # Begin 'title' strings localization code + # shellcheck disable=SC2154 + case $LANG in + uk*) + case "$title_uk" in + "") ;; + *) title="$title_uk";; + esac + esac + + # End of code + printf "%s %s %s %s" " " FALSE \ + "$code" \ + "\"$title\"" + ) + done >> "$WINETRICKS_WORKDIR"/zenity.sh + + sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' ' + ;; + + kdialog) + ( + printf %s "kdialog --geometry 600x400+100+100 --title '$_W_msg_title' --separate-output --checklist '$_W_msg_body' " + winetricks_list_all | sed 's/\([^ ]*\) *\(.*\)/\1 "\1 - \2" off /' | tr '\012' ' ' + ) > "$WINETRICKS_WORKDIR"/kdialog.sh + + sh "$WINETRICKS_WORKDIR"/kdialog.sh + ;; esac unset _W_msg_body _W_msg_title @@ -3542,236 +3603,238 @@ winetricks_settings_menu() winetricks_showmenu() { case $LANG in - da*) _W_msg_title='Vælg en pakke' - _W_msg_body='Vilken pakke vil du installere?' - _W_cached="cached" - ;; - de*) _W_msg_title="Winetricks - Aktueller Prefix ist \"$WINEPREFIX\"" - _W_msg_body='Welche Paket(e) möchten Sie installieren?' - _W_cached="gecached" - ;; - pl*) _W_msg_title="Winetricks - obecny prefiks to \"$WINEPREFIX\"" - _W_msg_body='Które paczki chesz zainstalować?' - _W_cached="zarchiwizowane" - ;; - ru*) _W_msg_title="Winetricks - текущий путь wine (wineprefix) \"$WINEPREFIX\"" - _W_msg_body='Какое приложение(я) вы хотите установить?' - _W_cached="в кэше" - ;; - uk*) _W_msg_title="Winetricks - поточний prefix \"$WINEPREFIX\"" - _W_msg_body='Які пакунки Ви хочете встановити?' - _W_cached="кешовано" - ;; - zh_CN*) _W_msg_title="Windows 应用安装向导 - 当前容器路径是 \"$WINEPREFIX\"" - _W_msg_body='君欲安装何种应用?' - _W_cached="已缓存" - ;; - zh_TW*|zh_HK*) _W_msg_title="Windows 應用裝載向導 - 目前容器路徑是 \"$WINEPREFIX\"" - _W_msg_body='君欲裝載何種應用?' - _W_cached="已緩存" - ;; - *) _W_msg_title="Winetricks - current prefix is \"$WINEPREFIX\"" - _W_msg_body='Which package(s) would you like to install?' - _W_cached="cached" - ;; + da*) _W_msg_title='Vælg en pakke' + _W_msg_body='Vilken pakke vil du installere?' + _W_cached="cached" + ;; + de*) _W_msg_title="Winetricks - Aktueller Prefix ist \"$WINEPREFIX\"" + _W_msg_body='Welche Paket(e) möchten Sie installieren?' + _W_cached="gecached" + ;; + pl*) _W_msg_title="Winetricks - obecny prefiks to \"$WINEPREFIX\"" + _W_msg_body='Które paczki chesz zainstalować?' + _W_cached="zarchiwizowane" + ;; + ru*) _W_msg_title="Winetricks - текущий путь wine (wineprefix) \"$WINEPREFIX\"" + _W_msg_body='Какое приложение(я) вы хотите установить?' + _W_cached="в кэше" + ;; + uk*) _W_msg_title="Winetricks - поточний prefix \"$WINEPREFIX\"" + _W_msg_body='Які пакунки Ви хочете встановити?' + _W_cached="кешовано" + ;; + zh_CN*) _W_msg_title="Windows 应用安装向导 - 当前容器路径是 \"$WINEPREFIX\"" + _W_msg_body='君欲安装何种应用?' + _W_cached="已缓存" + ;; + zh_TW*|zh_HK*) _W_msg_title="Windows 應用裝載向導 - 目前容器路徑是 \"$WINEPREFIX\"" + _W_msg_body='君欲裝載何種應用?' + _W_cached="已緩存" + ;; + *) _W_msg_title="Winetricks - current prefix is \"$WINEPREFIX\"" + _W_msg_body='Which package(s) would you like to install?' + _W_cached="cached" + ;; esac case $WINETRICKS_GUI in - zenity) - case $LANG in - da*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Pakke \ - --column Navn \ - --column Udgiver \ - --column År \ - --column Medie \ - --column Status \ - --column 'Size (MB)' \ - --column 'Time (sec)' \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " + zenity) + case $LANG in + da*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Pakke \ + --column Navn \ + --column Udgiver \ + --column År \ + --column Medie \ + --column Status \ + --column 'Size (MB)' \ + --column 'Time (sec)' \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + de*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Paket \ + --column Name \ + --column Herausgeber \ + --column Jahr \ + --column Media \ + --column Status \ + --column 'Größe (MB)' \ + --column 'Zeit (sec)' \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + pl*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Pakiet \ + --column Nazwa \ + --column Wydawca \ + --column Rok \ + --column Media \ + --column Status \ + --column 'Rozmiar (MB)' \ + --column 'Czas (sek)' \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + ru*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Пакет \ + --column Название \ + --column Издатель \ + --column Год \ + --column Источник \ + --column Статус \ + --column 'Размер (МБ)' \ + --column 'Время (сек)' \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + uk*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Пакунок \ + --column Назва \ + --column Видавець \ + --column Рік \ + --column Медіа \ + --column Статус \ + --column 'Розмір (МБ)' \ + --column 'Час (сек)' \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + zh_CN*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column 包名 \ + --column 软件名 \ + --column 发行商 \ + --column 发行年 \ + --column 媒介 \ + --column 状态 \ + --column '文件大小 (MB)' \ + --column '时间 (秒)' \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + zh_TW*|zh_HK*) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column 包名 \ + --column 軟體名 \ + --column 發行商 \ + --column 發行年 \ + --column 媒介 \ + --column 狀態 \ + --column '檔案大小 (MB)' \ + --column '時間 (秒)' \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + *) printf %s "zenity \ + --title '$_W_msg_title' \ + --text '$_W_msg_body' \ + --list \ + --checklist \ + --column '' \ + --column Package \ + --column Title \ + --column Publisher \ + --column Year \ + --column Media \ + --column Status \ + --column 'Size (MB)' \ + --column 'Time (sec)' \ + --height $WINETRICKS_MENU_HEIGHT \ + --width $WINETRICKS_MENU_WIDTH \ + " + ;; + esac > "$WINETRICKS_WORKDIR"/zenity.sh + + true > "$WINETRICKS_WORKDIR"/installed.txt + + for metadatafile in "$WINETRICKS_METADATA"/$WINETRICKS_CURMENU/*.vars + do + code=$(winetricks_metadata_basename "$metadatafile") + ( + title='?' + # shellcheck disable=SC1090 + . "$metadatafile" + # shellcheck disable=SC2154 + if test "$W_OPT_SHOWBROKEN" = 1 || test "$wine_showstoppers" = ""; then + # Compute cached and downloadable flags + flags="" + winetricks_is_cached "$code" && flags="$_W_cached" + installed=FALSE + if winetricks_is_installed "$code"; then + installed=TRUE + echo "$code" >> "$WINETRICKS_WORKDIR"/installed.txt + fi + printf %s " $installed \ + $code \ + \"$title\" \ + \"$publisher\" \ + \"$year\" \ + \"$media\" \ + \"$flags\" \ + \"$size_MB\" \ + \"$time_sec\" \ + " + fi + ) + done >> "$WINETRICKS_WORKDIR"/zenity.sh + + # Filter out any verb that's already installed + sh "$WINETRICKS_WORKDIR"/zenity.sh | + tr '|' '\012' | + grep -F -v -x -f "$WINETRICKS_WORKDIR"/installed.txt | + tr '\012' ' ' ;; - de*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Paket \ - --column Name \ - --column Herausgeber \ - --column Jahr \ - --column Media \ - --column Status \ - --column 'Größe (MB)' \ - --column 'Zeit (sec)' \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - pl*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Pakiet \ - --column Nazwa \ - --column Wydawca \ - --column Rok \ - --column Media \ - --column Status \ - --column 'Rozmiar (MB)' \ - --column 'Czas (sek)' \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - ru*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Пакет \ - --column Название \ - --column Издатель \ - --column Год \ - --column Источник \ - --column Статус \ - --column 'Размер (МБ)' \ - --column 'Время (сек)' \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - uk*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Пакунок \ - --column Назва \ - --column Видавець \ - --column Рік \ - --column Медіа \ - --column Статус \ - --column 'Розмір (МБ)' \ - --column 'Час (сек)' \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - zh_CN*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column 包名 \ - --column 软件名 \ - --column 发行商 \ - --column 发行年 \ - --column 媒介 \ - --column 状态 \ - --column '文件大小 (MB)' \ - --column '时间 (秒)' \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - zh_TW*|zh_HK*) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column 包名 \ - --column 軟體名 \ - --column 發行商 \ - --column 發行年 \ - --column 媒介 \ - --column 狀態 \ - --column '檔案大小 (MB)' \ - --column '時間 (秒)' \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - *) printf %s "zenity \ - --title '$_W_msg_title' \ - --text '$_W_msg_body' \ - --list \ - --checklist \ - --column '' \ - --column Package \ - --column Title \ - --column Publisher \ - --column Year \ - --column Media \ - --column Status \ - --column 'Size (MB)' \ - --column 'Time (sec)' \ - --height $WINETRICKS_MENU_HEIGHT \ - --width $WINETRICKS_MENU_WIDTH \ - " - ;; - esac > "$WINETRICKS_WORKDIR"/zenity.sh - true > "$WINETRICKS_WORKDIR"/installed.txt - for metadatafile in "$WINETRICKS_METADATA"/$WINETRICKS_CURMENU/*.vars - do - code=$(winetricks_metadata_basename "$metadatafile") + kdialog) ( - title='?' - # shellcheck disable=SC1090 - . "$metadatafile" - # shellcheck disable=SC2154 - if test "$W_OPT_SHOWBROKEN" = 1 || test "$wine_showstoppers" = ""; then - # Compute cached and downloadable flags - flags="" - winetricks_is_cached "$code" && flags="$_W_cached" - installed=FALSE - if winetricks_is_installed "$code"; then - installed=TRUE - echo "$code" >> "$WINETRICKS_WORKDIR"/installed.txt - fi - printf %s " $installed \ - $code \ - \"$title\" \ - \"$publisher\" \ - \"$year\" \ - \"$media\" \ - \"$flags\" \ - \"$size_MB\" \ - \"$time_sec\" \ - " - fi - ) - done >> "$WINETRICKS_WORKDIR"/zenity.sh + printf %s "kdialog --geometry 600x400+100+100 --title '$_W_msg_title' --separate-output --checklist '$_W_msg_body' " + winetricks_list_all | sed 's/\([^ ]*\) *\(.*\)/\1 "\1 - \2" off /' | tr '\012' ' ' + ) > "$WINETRICKS_WORKDIR"/kdialog.sh - # Filter out any verb that's already installed - sh "$WINETRICKS_WORKDIR"/zenity.sh | - tr '|' '\012' | - grep -F -v -x -f "$WINETRICKS_WORKDIR"/installed.txt | - tr '\012' ' ' - ;; - - kdialog) - ( - printf %s "kdialog --geometry 600x400+100+100 --title '$_W_msg_title' --separate-output --checklist '$_W_msg_body' " - winetricks_list_all | sed 's/\([^ ]*\) *\(.*\)/\1 "\1 - \2" off /' | tr '\012' ' ' - ) > "$WINETRICKS_WORKDIR"/kdialog.sh - sh "$WINETRICKS_WORKDIR"/kdialog.sh - ;; + sh "$WINETRICKS_WORKDIR"/kdialog.sh + ;; esac unset _W_msg_body _W_msg_title @@ -3804,16 +3867,18 @@ winetricks_is_cached() # shellcheck disable=SC2154 _W_path="$W_CACHE/$1/$file1" case "$_W_path" in - *..*) - # Remove /foo/.. so verbs that don't have their own cache directories - # can refer to siblings - _W_path="$(echo "$_W_path" | sed 's,/[^/]*/\.\.,,')" - ;; + *..*) + # Remove /foo/.. so verbs that don't have their own cache directories + # can refer to siblings + _W_path="$(echo "$_W_path" | sed 's,/[^/]*/\.\.,,')" + ;; esac + if test -f "$_W_path"; then unset _W_path return 0 fi + unset _W_path return 1 } @@ -3832,41 +3897,41 @@ winetricks_is_installed() fi case "$W_PLATFORM" in - windows_cmd|wine_cmd) - # On Windows, there's no wineprefix, just check if file's there - _W_file_unix="$(w_pathconv -u "$_W_file")" - if test -f "$_W_file_unix"; then - unset _W_file _W_file_unix _W_prefix - return 0 # installed - fi - ;; - *) - # Compute wineprefix for this app - case "${category}-${WINETRICKS_OPT_SHAREDPREFIX}" in - apps-0|benchmarks-0|games-0) - _W_prefix="$W_PREFIXES_ROOT/$1" - ;; - *) - _W_prefix="$WINEPREFIX" - ;; - esac - if test -d "$_W_prefix/dosdevices"; then - # 'win7 vcrun2005' creates different file than 'winxp vcrun2005' - # so let it specify multiple, separated by | - _W_IFS="$IFS" - IFS='|' - for _W_file_ in $_W_file - do - _W_file_unix="$(WINEPREFIX="$_W_prefix" w_pathconv -u "$_W_file_")" - if test -f "$_W_file_unix" && ! grep -q "Wine placeholder DLL" "$_W_file_unix"; then - IFS="$_W_IFS" - unset _W_file _W_file_ _W_file_unix _W_prefix _W_IFS + windows_cmd|wine_cmd) + # On Windows, there's no wineprefix, just check if file's there + _W_file_unix="$(w_pathconv -u "$_W_file")" + if test -f "$_W_file_unix"; then + unset _W_file _W_file_unix _W_prefix return 0 # installed fi - done - IFS="$_W_IFS" - fi - ;; + ;; + *) + # Compute wineprefix for this app + case "${category}-${WINETRICKS_OPT_SHAREDPREFIX}" in + apps-0|benchmarks-0|games-0) + _W_prefix="$W_PREFIXES_ROOT/$1" + ;; + *) + _W_prefix="$WINEPREFIX" + ;; + esac + if test -d "$_W_prefix/dosdevices"; then + # 'win7 vcrun2005' creates different file than 'winxp vcrun2005' + # so let it specify multiple, separated by | + _W_IFS="$IFS" + IFS='|' + for _W_file_ in $_W_file + do + _W_file_unix="$(WINEPREFIX="$_W_prefix" w_pathconv -u "$_W_file_")" + if test -f "$_W_file_unix" && ! grep -q "Wine placeholder DLL" "$_W_file_unix"; then + IFS="$_W_IFS" + unset _W_file _W_file_ _W_file_unix _W_prefix _W_IFS + return 0 # installed + fi + done + IFS="$_W_IFS" + fi + ;; esac unset _W_file _W_prefix # leak _W_file_unix for caller. Is this wise? unset _W_IFS _W_file_ @@ -3948,18 +4013,18 @@ winetricks_list_all() { # Note: doh123 relies on 'winetricks list' to list main menu categories case $WINETRICKS_CURMENU in - prefix|main) echo "$WINETRICKS_CATEGORIES" | tr ' ' '\012' ; return;; + prefix|main) echo "$WINETRICKS_CATEGORIES" | tr ' ' '\012' ; return;; esac case $LANG in - da*) _W_cached="cached" ; _W_download="kan hentes" ;; - de*) _W_cached="gecached" ; _W_download="herunterladbar";; - pl*) _W_cached="zarchiwizowane" ; _W_download="do pobrania" ;; - ru*) _W_cached="в кэше" ; _W_download="доступно для скачивания" ;; - uk*) _W_cached="кешовано" ; _W_download="завантажуване" ;; - zh_CN*) _W_cached="已缓存" ; _W_download="可下载" ;; - zh_TW*|zh_HK*) _W_cached="已緩存" ; _W_download="可下載" ;; - *) _W_cached="cached" ; _W_download="downloadable" ;; + da*) _W_cached="cached" ; _W_download="kan hentes" ;; + de*) _W_cached="gecached" ; _W_download="herunterladbar";; + pl*) _W_cached="zarchiwizowane" ; _W_download="do pobrania" ;; + ru*) _W_cached="в кэше" ; _W_download="доступно для скачивания" ;; + uk*) _W_cached="кешовано" ; _W_download="завантажуване" ;; + zh_CN*) _W_cached="已缓存" ; _W_download="可下载" ;; + zh_TW*|zh_HK*) _W_cached="已緩存" ; _W_download="可下載" ;; + *) _W_cached="cached" ; _W_download="downloadable" ;; esac for _W_metadatafile in "$WINETRICKS_METADATA"/$WINETRICKS_CURMENU/*.vars @@ -4064,8 +4129,8 @@ winetricks_read_udf_volume_name() tagid=$(winetricks_read_hex 524288 2 "$1") : echo "tagid is $tagid" case "$tagid" in - "02 00") : echo "Found AVDP" ;; - *) echo "Did not find AVDP (tagid was $tagid)"; exit 1;; + "02 00") : echo "Found AVDP" ;; + *) echo "Did not find AVDP (tagid was $tagid)"; exit 1;; esac # 2. read the location of the main volume descriptor: @@ -4078,8 +4143,8 @@ winetricks_read_udf_volume_name() tagid=$(winetricks_read_hex $offset 2 "$1") : echo "tagid is $tagid" case "$tagid" in - "01 00") : echo Found MVD ;; - *) echo Did not find MVD; exit 1;; + "01 00") : echo Found MVD ;; + *) echo Did not find MVD; exit 1;; esac # 4. Read whether the name is in 8 or 16 bit chars @@ -4090,9 +4155,9 @@ winetricks_read_udf_volume_name() # 5. Profit! case $width in - 08) winetricks_read_bytes $offset 30 "$1" | sed 's/ *$//' ;; - 10) winetricks_read_bytes $offset 30 "$1" | tr -d '\000' | sed 's/ *$//' ;; - *) echo "Unhandled dvd volname character width '$width'"; exit 1;; + 08) winetricks_read_bytes $offset 30 "$1" | sed 's/ *$//' ;; + 10) winetricks_read_bytes $offset 30 "$1" | tr -d '\000' | sed 's/ *$//' ;; + *) echo "Unhandled dvd volname character width '$width'"; exit 1;; esac echo "" @@ -4118,9 +4183,9 @@ winetricks_read_volume_name() : echo "std_id is $std_id" case $std_id in - CD001) winetricks_read_iso9660_volume_name "$1" ;; - BEA01) winetricks_read_udf_volume_name "$1" ;; - *) echo "Unrecognized disk type $std_id"; exit 1 ;; + CD001) winetricks_read_iso9660_volume_name "$1" ;; + BEA01) winetricks_read_udf_volume_name "$1" ;; + *) echo "Unrecognized disk type $std_id"; exit 1 ;; esac } @@ -4139,8 +4204,8 @@ winetricks_volname() winetricks_detect_optical_drive() { case "$WINETRICKS_DEV" in - "") ;; - *) return ;; + "") ;; + *) return ;; esac for WINETRICKS_DEV in /dev/cdrom /dev/dvd /dev/sr0 @@ -4149,7 +4214,7 @@ winetricks_detect_optical_drive() done case "$WINETRICKS_DEV" in - "x") w_die "can't find cd/dvd drive" ;; + "x") w_die "can't find cd/dvd drive" ;; esac } @@ -4164,8 +4229,8 @@ winetricks_cache_iso() # Horrible hack for Gentoo - make sure we can read from the drive if ! test -r $WINETRICKS_DEV; then case "$WINETRICKS_SUDO" in - gksudo) $WINETRICKS_SUDO "chmod 666 $WINETRICKS_DEV" ;; - *) $WINETRICKS_SUDO chmod 666 $WINETRICKS_DEV ;; + gksudo) $WINETRICKS_SUDO "chmod 666 $WINETRICKS_DEV" ;; + *) $WINETRICKS_SUDO chmod 666 $WINETRICKS_DEV ;; esac fi @@ -4186,14 +4251,14 @@ winetricks_cache_iso() _W_volname=$(winetricks_volname $WINETRICKS_DEV) if test "$_W_expected_volname" != "$_W_volname"; then case $LANG in - da*) w_warn "Forkert disk [$_W_volname] indsat. Indsæt venligst disken [$_W_expected_volname]" ;; - de*) w_warn "Falsche Disk [$_W_volname] eingelegt. Bitte legen Sie Disk [$_W_expected_volname] ein!" ;; - pl*) w_warn "Umieszczono zły dysk [$_W_volname]. Proszę włożyć dysk [$_W_expected_volname]" ;; - ru*) w_warn "Неверный диск [$_W_volname]. Пожалуйста, вставьте диск [$_W_expected_volname]" ;; - uk*) w_warn "Неправильний диск [$_W_volname]. Будь ласка, вставте диск [$_W_expected_volname]" ;; - zh_CN*) w_warn " [$_W_volname] 光盘插入错误,请插入光盘 [$_W_expected_volname]" ;; - zh_TW*|zh_HK*) w_warn " [$_W_volname] 光碟插入錯誤,請插入光碟 [$_W_expected_volname]" ;; - *) w_warn "Wrong disc [$_W_volname] inserted. Please insert disc [$_W_expected_volname]" ;; + da*) w_warn "Forkert disk [$_W_volname] indsat. Indsæt venligst disken [$_W_expected_volname]" ;; + de*) w_warn "Falsche Disk [$_W_volname] eingelegt. Bitte legen Sie Disk [$_W_expected_volname] ein!" ;; + pl*) w_warn "Umieszczono zły dysk [$_W_volname]. Proszę włożyć dysk [$_W_expected_volname]" ;; + ru*) w_warn "Неверный диск [$_W_volname]. Пожалуйста, вставьте диск [$_W_expected_volname]" ;; + uk*) w_warn "Неправильний диск [$_W_volname]. Будь ласка, вставте диск [$_W_expected_volname]" ;; + zh_CN*) w_warn " [$_W_volname] 光盘插入错误,请插入光盘 [$_W_expected_volname]" ;; + zh_TW*|zh_HK*) w_warn " [$_W_volname] 光碟插入錯誤,請插入光碟 [$_W_expected_volname]" ;; + *) w_warn "Wrong disc [$_W_volname] inserted. Please insert disc [$_W_expected_volname]" ;; esac sleep 10 @@ -4205,37 +4270,38 @@ winetricks_cache_iso() # Copy disc to .iso file, display progress every 5 seconds # Use conv=noerror,sync to replace unreadable blocks with zeroes case $WINETRICKS_OPT_DD in - dd) - $WINETRICKS_OPT_DD if=$WINETRICKS_DEV of="$W_CACHE"/temp.iso bs=2048 conv=noerror,sync & - WINETRICKS_DD_PID=$! - ;; - ddrescue) - if [ ! -x "$(which ddrescue)" ]; then - w_die "Please install ddrescue first." - fi - $WINETRICKS_OPT_DD -v -b 2048 $WINETRICKS_DEV "$W_CACHE"/temp.iso & - WINETRICKS_DD_PID=$! - ;; + dd) + $WINETRICKS_OPT_DD if=$WINETRICKS_DEV of="$W_CACHE"/temp.iso bs=2048 conv=noerror,sync & + WINETRICKS_DD_PID=$! + ;; + ddrescue) + if [ ! -x "$(which ddrescue)" ]; then + w_die "Please install ddrescue first." + fi + $WINETRICKS_OPT_DD -v -b 2048 $WINETRICKS_DEV "$W_CACHE"/temp.iso & + WINETRICKS_DD_PID=$! + ;; esac + echo "$WINETRICKS_DD_PID" > "$WINETRICKS_WORKDIR"/dd-pid # Note: if user presses ^C, winetricks_cleanup will call winetricks_iso_cleanup # FIXME: add progress bar for kde, too case $WINETRICKS_GUI in - none|kdialog) - while ps -p "$WINETRICKS_DD_PID" > /dev/null 2>&1 - do - sleep 5 - ls -l "$W_CACHE"/temp.iso - done - ;; - zenity) - while ps -p "$WINETRICKS_DD_PID" > /dev/null 2>&1 - do - echo 1 - sleep 2 - done | $WINETRICKS_GUI --title "Copying to $_W_expected_volname.iso" --progress --pulsate --auto-kill - ;; + none|kdialog) + while ps -p "$WINETRICKS_DD_PID" > /dev/null 2>&1 + do + sleep 5 + ls -l "$W_CACHE"/temp.iso + done + ;; + zenity) + while ps -p "$WINETRICKS_DD_PID" > /dev/null 2>&1 + do + echo 1 + sleep 2 + done | $WINETRICKS_GUI --title "Copying to $_W_expected_volname.iso" --progress --pulsate --auto-kill + ;; esac rm "$WINETRICKS_WORKDIR"/dd-pid @@ -4312,14 +4378,14 @@ winetricks_mount_cached_iso() # FIXME: find a way to mount or copy from image without sudo _W_USERID=$(id -u) case "$WINETRICKS_SUDO" in - gksudo) - w_try $WINETRICKS_SUDO "mkdir -p $W_ISO_MOUNT_ROOT" - w_try $WINETRICKS_SUDO "mount -o ro,loop,uid=$_W_USERID,unhide $WINETRICKS_IMG $W_ISO_MOUNT_ROOT" - ;; - *) - w_try $WINETRICKS_SUDO mkdir -p $W_ISO_MOUNT_ROOT - w_try $WINETRICKS_SUDO mount -o ro,loop,uid="$_W_USERID",unhide "$WINETRICKS_IMG" $W_ISO_MOUNT_ROOT - ;; + gksudo) + w_try $WINETRICKS_SUDO "mkdir -p $W_ISO_MOUNT_ROOT" + w_try $WINETRICKS_SUDO "mount -o ro,loop,uid=$_W_USERID,unhide $WINETRICKS_IMG $W_ISO_MOUNT_ROOT" + ;; + *) + w_try $WINETRICKS_SUDO mkdir -p $W_ISO_MOUNT_ROOT + w_try $WINETRICKS_SUDO mount -o ro,loop,uid="$_W_USERID",unhide "$WINETRICKS_IMG" $W_ISO_MOUNT_ROOT + ;; esac echo "Mounting as drive ${W_ISO_MOUNT_LETTER}:" @@ -4397,14 +4463,14 @@ winetricks_mount_real_volume() # Wait for user to insert disc. case $LANG in - da*)_W_mountmsg="Indsæt venligst disken '$_W_expected_volname' (krævet af pakken '$W_PACKAGE')" ;; - de*)_W_mountmsg="Bitte Disk '$_W_expected_volname' einlegen (für Paket '$W_PACKAGE')" ;; - pl*) _W_mountmsg="Proszę włożyć dysk '$_W_expected_volname' (potrzebny paczce '$W_PACKAGE')" ;; - ru*) _W_mountmsg="Пожалуйста, вставьте том '$_W_expected_volname' (требуется для пакета '$W_PACKAGE')" ;; - uk*) _W_mountmsg="Будь ласка, вставте том '$_W_expected_volname' (потрібний для пакунка '$W_PACKAGE')" ;; - zh_CN*) _W_mountmsg="请插入卷 '$_W_expected_volname' (为包 '$W_PACKAGE 所需')" ;; - zh_TW*|zh_HK*) _W_mountmsg="請插入卷 '$_W_expected_volname' (為包 '$W_PACKAGE 所需')" ;; - *) _W_mountmsg="Please insert volume '$_W_expected_volname' (needed for package '$W_PACKAGE')" ;; + da*)_W_mountmsg="Indsæt venligst disken '$_W_expected_volname' (krævet af pakken '$W_PACKAGE')" ;; + de*)_W_mountmsg="Bitte Disk '$_W_expected_volname' einlegen (für Paket '$W_PACKAGE')" ;; + pl*) _W_mountmsg="Proszę włożyć dysk '$_W_expected_volname' (potrzebny paczce '$W_PACKAGE')" ;; + ru*) _W_mountmsg="Пожалуйста, вставьте том '$_W_expected_volname' (требуется для пакета '$W_PACKAGE')" ;; + uk*) _W_mountmsg="Будь ласка, вставте том '$_W_expected_volname' (потрібний для пакунка '$W_PACKAGE')" ;; + zh_CN*) _W_mountmsg="请插入卷 '$_W_expected_volname' (为包 '$W_PACKAGE 所需')" ;; + zh_TW*|zh_HK*) _W_mountmsg="請插入卷 '$_W_expected_volname' (為包 '$W_PACKAGE 所需')" ;; + *) _W_mountmsg="Please insert volume '$_W_expected_volname' (needed for package '$W_PACKAGE')" ;; esac if test "$WINE" = ""; then @@ -4460,33 +4526,33 @@ winetricks_set_unattended() # So in attended mode, W_OPT_UNATTENDED should be empty. case "$1" in - 1) - W_OPT_UNATTENDED=1 - # Might want to trim our stable of variables here a bit... - W_UNATTENDED_DASH_Q="-q" - W_UNATTENDED_SLASH_Q="/q" - W_UNATTENDED_SLASH_QB="/qb" - W_UNATTENDED_SLASH_QN="/qn" - W_UNATTENDED_SLASH_QNT="/qnt" - W_UNATTENDED_SLASH_QT="/qt" - W_UNATTENDED_SLASH_QUIET="/quiet" - W_UNATTENDED_SLASH_S="/S" - W_UNATTENDED_DASH_SILENT="-silent" - W_UNATTENDED_SLASH_SILENT="/silent" - ;; - *) - W_OPT_UNATTENDED="" - W_UNATTENDED_DASH_Q="" - W_UNATTENDED_SLASH_Q="" - W_UNATTENDED_SLASH_QB="" - W_UNATTENDED_SLASH_QN="" - W_UNATTENDED_SLASH_QNT="" - W_UNATTENDED_SLASH_QT="" - W_UNATTENDED_SLASH_QUIET="" - W_UNATTENDED_SLASH_S="" - W_UNATTENDED_DASH_SILENT="" - W_UNATTENDED_SLASH_SILENT="" - ;; + 1) + W_OPT_UNATTENDED=1 + # Might want to trim our stable of variables here a bit... + W_UNATTENDED_DASH_Q="-q" + W_UNATTENDED_SLASH_Q="/q" + W_UNATTENDED_SLASH_QB="/qb" + W_UNATTENDED_SLASH_QN="/qn" + W_UNATTENDED_SLASH_QNT="/qnt" + W_UNATTENDED_SLASH_QT="/qt" + W_UNATTENDED_SLASH_QUIET="/quiet" + W_UNATTENDED_SLASH_S="/S" + W_UNATTENDED_DASH_SILENT="-silent" + W_UNATTENDED_SLASH_SILENT="/silent" + ;; + *) + W_OPT_UNATTENDED="" + W_UNATTENDED_DASH_Q="" + W_UNATTENDED_SLASH_Q="" + W_UNATTENDED_SLASH_QB="" + W_UNATTENDED_SLASH_QN="" + W_UNATTENDED_SLASH_QNT="" + W_UNATTENDED_SLASH_QT="" + W_UNATTENDED_SLASH_QUIET="" + W_UNATTENDED_SLASH_S="" + W_UNATTENDED_DASH_SILENT="" + W_UNATTENDED_SLASH_SILENT="" + ;; esac } @@ -4500,6 +4566,7 @@ winetricks_set_wineprefix() else WINEPREFIX="$W_PREFIXES_ROOT/$1" fi + export WINEPREFIX #echo "WINEPREFIX is now $WINEPREFIX" >&2 mkdir -p "$(dirname "$WINEPREFIX")" @@ -4508,16 +4575,16 @@ winetricks_set_wineprefix() # The folder-name is localized! W_PROGRAMS_WIN="$(w_expand_env ProgramFiles)" case "$W_PROGRAMS_WIN" in - "") w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned empty string, error message \"$(cat $W_TMP_EARLY/early_wine.err.txt)\" ";; - %*) w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned unexpanded string '$W_PROGRAMS_WIN' ... this can be caused by a corrupt wineprefix, by an old wine, or by not owning $WINEPREFIX" ;; - *unknown*) w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned a string containing the word 'unknown', as if a voice had cried out in terror, and was suddenly silenced." ;; + "") w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned empty string, error message \"$(cat $W_TMP_EARLY/early_wine.err.txt)\" ";; + %*) w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned unexpanded string '$W_PROGRAMS_WIN' ... this can be caused by a corrupt wineprefix, by an old wine, or by not owning $WINEPREFIX" ;; + *unknown*) w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned a string containing the word 'unknown', as if a voice had cried out in terror, and was suddenly silenced." ;; esac case "$W_PLATFORM" in - windows_cmd) - W_DRIVE_C="/cygdrive/c" ;; - *) - W_DRIVE_C="$WINEPREFIX/dosdevices/c:" ;; + windows_cmd) + W_DRIVE_C="/cygdrive/c" ;; + *) + W_DRIVE_C="$WINEPREFIX/dosdevices/c:" ;; esac # Kludge: use Temp instead of temp to avoid \t expansion in w_try @@ -4533,24 +4600,22 @@ winetricks_set_wineprefix() fi case "$W_PLATFORM" in - "windows_cmd|wine_cmd") - W_CACHE_WIN="$(w_pathconv -w "$W_CACHE")" - ;; - *) - # For case where Z: doesn't exist or / is writable (!), - # make a drive letter for W_CACHE. Clean it up on exit. - test "$WINETRICKS_CACHE_SYMLINK" && rm -f "$WINETRICKS_CACHE_SYMLINK" - for letter in y x w v u t s r q p o n m - do - if ! test -d "$WINEPREFIX"/dosdevices/${letter}:; then - mkdir -p "$WINEPREFIX"/dosdevices - WINETRICKS_CACHE_SYMLINK="$WINEPREFIX"/dosdevices/${letter}: - ln -sf "$W_CACHE" "$WINETRICKS_CACHE_SYMLINK" - break - fi - done - W_CACHE_WIN="${letter}:" - ;; + "windows_cmd|wine_cmd") W_CACHE_WIN="$(w_pathconv -w "$W_CACHE")" ;; + *) + # For case where Z: doesn't exist or / is writable (!), + # make a drive letter for W_CACHE. Clean it up on exit. + test "$WINETRICKS_CACHE_SYMLINK" && rm -f "$WINETRICKS_CACHE_SYMLINK" + for letter in y x w v u t s r q p o n m + do + if ! test -d "$WINEPREFIX"/dosdevices/${letter}:; then + mkdir -p "$WINEPREFIX"/dosdevices + WINETRICKS_CACHE_SYMLINK="$WINEPREFIX"/dosdevices/${letter}: + ln -sf "$W_CACHE" "$WINETRICKS_CACHE_SYMLINK" + break + fi + done + W_CACHE_WIN="${letter}:" + ;; esac W_COMMONFILES_X86_WIN="$(w_expand_env CommonProgramFiles)" @@ -4563,6 +4628,9 @@ winetricks_set_wineprefix() W_COMMONFILES_WIN="$W_COMMONFILES_X86_WIN" fi + W_COMMONFILES_X86="$(w_pathconv -u "$W_COMMONFILES_X86_WIN")" + #W_COMMONFILES="$(w_pathconv -u "$W_COMMONFILES_WIN")" + W_PROGRAMS_UNIX="$(w_pathconv -u "$W_PROGRAMS_WIN")" W_WINDIR_UNIX="$W_DRIVE_C/windows" @@ -4603,6 +4671,17 @@ winetricks_set_wineprefix() W_SYSTEM64_DLLS_WIN32="C:\\windows\\sysnative" # path to access 64-bit dlls from 32-bit apps # shellcheck disable=SC2034 W_SYSTEM64_DLLS_WIN64="C:\\windows\\system32" # path to access 64-bit dlls from 64-bit apps + # Common variable for 32-bit dlls on win32/win64: + W_32BIT_DLLS="$W_WINDIR_UNIX/syswow64" + + # Probably need fancier handling/checking, but for a basic start: + # WINE64 = wine64, available on 64-bit prefixes + # WINE_ARCH = the native wine for the prefix (wine for 32-bit, wine64 for 64-bit) + # WINE_MULTI = generic wine, new name + WINE64="${WINE}64" + WINE_ARCH="${WINE64}" + WINE_MULTI="${WINE}" + # 64-bit prefixes still have plenty of issues: case $LANG in ru*) w_warn "Вы используете 64-битный WINEPREFIX. Важно: многие ветки устанавливают только 32-битные версии пакетов. Если у вас возникли проблемы, пожалуйста, проверьте еще раз на чистом 32-битном WINEPREFIX до отправки отчета об ошибке." ;; @@ -4612,6 +4691,12 @@ winetricks_set_wineprefix() W_ARCH=win32 W_SYSTEM32_DLLS="$W_WINDIR_UNIX/system32" W_SYSTEM32_DLLS_WIN="C:\\windows\\system32" + # Common variable for 32-bit dlls on win32/win64: + W_32BIT_DLLS="$W_WINDIR_UNIX/system32" + + WINE64="false" + WINE_ARCH="${WINE}" + WINE_MULTI="${WINE}" fi } @@ -4620,10 +4705,11 @@ winetricks_annihilate_wineprefix() w_skip_windows "No wineprefix to delete on windows" && return case $LANG in - uk*) w_askpermission "Бажаєте видалити '$WINEPREFIX'?" ;; - pl*) w_askpermission "Czy na pewno chcesz usunąć prefiks $WINEPREFIX i wszystkie jego elementy?" ;; - *) w_askpermission "Delete $WINEPREFIX, its apps, icons, and menu items?" ;; + uk*) w_askpermission "Бажаєте видалити '$WINEPREFIX'?" ;; + pl*) w_askpermission "Czy na pewno chcesz usunąć prefiks $WINEPREFIX i wszystkie jego elementy?" ;; + *) w_askpermission "Delete $WINEPREFIX, its apps, icons, and menu items?" ;; esac + rm -rf "$WINEPREFIX" # Also remove menu items. @@ -4726,67 +4812,86 @@ winetricks_init() WINETRICKS_CONFIG="${XDG_CONFIG_HOME}/winetricks" #test -d "$WINETRICKS_CONFIG" || mkdir -p "$WINETRICKS_CONFIG" + # Pin a task to a single cpu. Helps prevent race conditions. + # + # Linux/FreeBSD: supported + # OSX: doesn't have a utility for this + # Solaris: no access, PR welcome + + if [ -x "$(which taskset 2>/dev/null)" ]; then + W_TASKSET="taskset -c 0" + elif [ -x "$(which cpuset 2>/dev/null)" ]; then + W_TASKSET="cpuset -l 0" + else + # not using w_warn so we don't annoy everyone running via GUI, but still printed to terminal: + echo "warning: taskset/cpuset not available on your platform!" + W_TASKSET="" + fi + # System-specific variables case "$W_PLATFORM" in - windows_cmd) - WINE="" - WINESERVER="" - W_DRIVE_C="C:/" - ;; - *) - WINE="${WINE:-wine}" - # Find wineserver. - # Some distributions (Debian before wine 1.8-2) don't have it on the path. - for x in \ - "$WINESERVER" \ - "${WINE}server" \ - "$(which wineserver 2> /dev/null)" \ - "$(dirname $WINE)/server/wineserver" \ - /usr/bin/wineserver-development \ - /usr/lib/wine/wineserver \ - /usr/lib/i386-kfreebsd-gnu/wine/wineserver \ - /usr/lib/i386-linux-gnu/wine/wineserver \ - /usr/lib/powerpc-linux-gnu/wine/wineserver \ - /usr/lib/i386-kfreebsd-gnu/wine/bin/wineserver \ - /usr/lib/i386-linux-gnu/wine/bin/wineserver \ - /usr/lib/powerpc-linux-gnu/wine/bin/wineserver \ - /usr/lib/x86_64-linux-gnu/wine/bin/wineserver \ - /usr/lib/i386-kfreebsd-gnu/wine-development/wineserver \ - /usr/lib/i386-linux-gnu/wine-development/wineserver \ - /usr/lib/powerpc-linux-gnu/wine-development/wineserver \ - /usr/lib/x86_64-linux-gnu/wine-development/wineserver \ - file-not-found - do - if test -x "$x"; then - case "$x" in - /usr/lib/*/wine-development/wineserver|/usr/bin/wineserver-development) - if test -x /usr/bin/wine-development; then - WINE="/usr/bin/wine-development" - fi - ;; - esac - break - fi - done - case "$x" in - file-not-found) - w_die "wineserver not found!" ;; + windows_cmd) + WINE="" + WINE64="" + WINE_ARCH="" + WINE_MULTI="" + WINESERVER="" + W_DRIVE_C="C:/" + ;; *) - WINESERVER="$x" ;; - esac + WINE="${WINE:-wine}" + # Find wineserver. + # Some distributions (Debian before wine 1.8-2) don't have it on the path. + for x in \ + "$WINESERVER" \ + "${WINE}server" \ + "$(which wineserver 2> /dev/null)" \ + "$(dirname $WINE)/server/wineserver" \ + /usr/bin/wineserver-development \ + /usr/lib/wine/wineserver \ + /usr/lib/i386-kfreebsd-gnu/wine/wineserver \ + /usr/lib/i386-linux-gnu/wine/wineserver \ + /usr/lib/powerpc-linux-gnu/wine/wineserver \ + /usr/lib/i386-kfreebsd-gnu/wine/bin/wineserver \ + /usr/lib/i386-linux-gnu/wine/bin/wineserver \ + /usr/lib/powerpc-linux-gnu/wine/bin/wineserver \ + /usr/lib/x86_64-linux-gnu/wine/bin/wineserver \ + /usr/lib/i386-kfreebsd-gnu/wine-development/wineserver \ + /usr/lib/i386-linux-gnu/wine-development/wineserver \ + /usr/lib/powerpc-linux-gnu/wine-development/wineserver \ + /usr/lib/x86_64-linux-gnu/wine-development/wineserver \ + file-not-found + do + if test -x "$x"; then + case "$x" in + /usr/lib/*/wine-development/wineserver|/usr/bin/wineserver-development) + if test -x /usr/bin/wine-development; then + WINE="/usr/bin/wine-development" + fi + ;; + esac + break + fi + done - if test "$WINEPREFIX"; then - WINETRICKS_ORIGINAL_WINEPREFIX="$WINEPREFIX" - else - WINETRICKS_ORIGINAL_WINEPREFIX="$HOME/.wine" - fi - _abswine="$(which "$WINE" 2>/dev/null)" - if ! test -x "$_abswine" || ! test -f "$_abswine"; then - w_die "WINE is $WINE, which is neither on the path nor an executable file" - fi - unset _abswine - ;; + case "$x" in + file-not-found) w_die "wineserver not found!" ;; + *) WINESERVER="$x" ;; + esac + + if test "$WINEPREFIX"; then + WINETRICKS_ORIGINAL_WINEPREFIX="$WINEPREFIX" + else + WINETRICKS_ORIGINAL_WINEPREFIX="$HOME/.wine" + fi + _abswine="$(which "$WINE" 2>/dev/null)" + if ! test -x "$_abswine" || ! test -f "$_abswine"; then + w_die "WINE is $WINE, which is neither on the path nor an executable file" + fi + unset _abswine + ;; esac + winetricks_set_wineprefix "$1" # Whether to automate installs (0=no, 1=yes) @@ -4823,8 +4928,8 @@ winetricks_init() winetricks_usage() { case $LANG in - da*) - cat <<_EOF_ + da*) + cat <<_EOF_ Brug: $0 [tilvalg] [verbum|sti-til-verbum] ... Kører de angivne verber. Hvert verbum installerer et program eller ændrer en indstilling. Tilvalg: @@ -4842,9 +4947,9 @@ list-download: vis en liste over verber for programmer der kan hentes list-manual-download: list applications which can be downloaded with some help from the user list-installed: list already-installed applications _EOF_ - ;; - de*) - cat <<_EOF_ + ;; + de*) + cat <<_EOF_ Benutzung: $0 [options] [Kommando|Verb|Pfad-zu-Verb] ... Angegebene Verben ausführen. Jedes Verb installiert eine Anwendung oder ändert eine Einstellung. @@ -4878,9 +4983,9 @@ list-manual-download Verben für vom Benutzer herunterladbare Anwendungen aufli list-installed Bereits installierte Verben auflisten prefix=foobar WINEPREFIX=$W_PREFIXES_ROOT/foobar auswählen _EOF_ - ;; - *) - cat <<_EOF_ + ;; + *) + cat <<_EOF_ Usage: $0 [options] [command|verb|path-to-verb] ... Executes given verbs. Each verb installs an application or changes a setting. @@ -4915,34 +5020,34 @@ list-manual-download list verbs which download with some help from the user list-installed list already-installed verbs prefix=foobar select WINEPREFIX=$W_PREFIXES_ROOT/foobar _EOF_ - ;; + ;; esac } winetricks_handle_option() { case "$1" in - --force) WINETRICKS_FORCE=1;; - --gui) winetricks_detect_gui;; - -h|--help) winetricks_usage ; exit 0 ;; - --isolate) WINETRICKS_OPT_SHAREDPREFIX=0 ;; - -k|--keep_isos) WINETRICKS_OPT_KEEPISOS=1 ;; - --no-clean) W_OPT_NOCLEAN=1 ;; - --no-isolate) WINETRICKS_OPT_SHAREDPREFIX=1 ;; - --optin) WINETRICKS_STATS_REPORT=1;; - --optout) WINETRICKS_STATS_REPORT=0;; - -q|--unattended) winetricks_set_unattended 1 ;; - -r|--ddrescue) WINETRICKS_OPT_DD=ddrescue ;; - --self-update) winetricks_selfupdate;; - --showbroken) W_OPT_SHOWBROKEN=1 ;; - -t|--torify) WINETRICKS_OPT_TORIFY=1 ;; - --update-rollback) winetricks_selfupdate_rollback;; - -v|--verbose) WINETRICKS_OPT_VERBOSE=1 ; set -x;; - -V|--version) winetricks_print_version ; exit 0;; - --verify) WINETRICKS_VERIFY=1 ;; - -vv|--really-verbose) WINETRICKS_OPT_VERBOSE=2 ; set -x ;; - -*) w_die "unknown option $1" ;; - *) return 1 ;; + --force) WINETRICKS_FORCE=1;; + --gui) winetricks_detect_gui;; + -h|--help) winetricks_usage ; exit 0 ;; + --isolate) WINETRICKS_OPT_SHAREDPREFIX=0 ;; + -k|--keep_isos) WINETRICKS_OPT_KEEPISOS=1 ;; + --no-clean) W_OPT_NOCLEAN=1 ;; + --no-isolate) WINETRICKS_OPT_SHAREDPREFIX=1 ;; + --optin) WINETRICKS_STATS_REPORT=1;; + --optout) WINETRICKS_STATS_REPORT=0;; + -q|--unattended) winetricks_set_unattended 1 ;; + -r|--ddrescue) WINETRICKS_OPT_DD=ddrescue ;; + --self-update) winetricks_selfupdate;; + --showbroken) W_OPT_SHOWBROKEN=1 ;; + -t|--torify) WINETRICKS_OPT_TORIFY=1 ;; + --update-rollback) winetricks_selfupdate_rollback;; + -v|--verbose) WINETRICKS_OPT_VERBOSE=1 ; set -x;; + -V|--version) winetricks_print_version ; exit 0;; + --verify) WINETRICKS_VERIFY=1 ;; + -vv|--really-verbose) WINETRICKS_OPT_VERBOSE=2 ; set -x ;; + -*) w_die "unknown option $1" ;; + *) return 1 ;; esac return 0 } @@ -4976,14 +5081,14 @@ fi winetricks_install_app() { case $LANG in - da*) fail_msg="Installationen af pakken $1 fejlede" ;; - de*) fail_msg="Installieren von Paket $1 gescheitert" ;; - pl*) fail_msg="Niepowodzenie przy instalacji paczki $1" ;; - ru*) fail_msg="Ошибка установки пакета $1" ;; - uk*) fail_msg="Помилка встановлення пакунка $1" ;; - zh_CN*) fail_msg="$1 安装失败" ;; - zh_TW*|zh_HK*) fail_msg="$1 安裝失敗" ;; - *) fail_msg="Failed to install package $1" ;; + da*) fail_msg="Installationen af pakken $1 fejlede" ;; + de*) fail_msg="Installieren von Paket $1 gescheitert" ;; + pl*) fail_msg="Niepowodzenie przy instalacji paczki $1" ;; + ru*) fail_msg="Ошибка установки пакета $1" ;; + uk*) fail_msg="Помилка встановлення пакунка $1" ;; + zh_CN*) fail_msg="$1 安装失败" ;; + zh_TW*|zh_HK*) fail_msg="$1 安裝失敗" ;; + *) fail_msg="Failed to install package $1" ;; esac # FIXME: initialize a new wineprefix for this app, set lots of global variables @@ -5363,7 +5468,7 @@ w_metadata binkw32 dlls \ load_binkw32() { - # Mirror: http://www.dlldump.com/download-dll-files_new.php/dllfiles/B/binkw32.dll/1.0q/download.html + # Mirror: https://www.dlldump.com/download-dll-files_new.php/dllfiles/B/binkw32.dll/1.0q/download.html # sha256sum of the decompressed file: 1fd7ef7873c8a3be7e2f127b306d0d24d7d88e20cf9188894eff87b5af0d495f # # Zip sha256sum: @@ -6488,10 +6593,10 @@ load_dotnet20sp1() w_warn "Setting windows version so installer works" # Stop services # Recipe from https://bugs.winehq.org/show_bug.cgi?id=16956 - $WINESERVER -k + w_wineserver -k # Fight a race condition, see bug 16956 comment 43 w_set_winver win2k - $WINESERVER -w + w_wineserver -w WINEDLLOVERRIDES=ngen.exe,regsvcs.exe,mscorsvw.exe=b export WINEDLLOVERRIDES @@ -6504,10 +6609,10 @@ load_dotnet20sp1() status=$? case $status in - 0) ;; - 105) echo "exit status $status - normal, user selected 'restart now'" ;; - 194) echo "exit status $status - normal, user selected 'restart later'" ;; - *) w_die "exit status $status - $W_PACKAGE installation failed" ;; + 0) ;; + 105) echo "exit status $status - normal, user selected 'restart now'" ;; + 194) echo "exit status $status - normal, user selected 'restart later'" ;; + *) w_die "exit status $status - $W_PACKAGE installation failed" ;; esac # We can't stop installing dotnet20sp1 in win2k mode until Wine supports @@ -6549,7 +6654,7 @@ load_dotnet20sp2() w_call remove_mono w_call dotnet20 - $WINESERVER -w + w_wineserver -w w_try_cd "$W_CACHE/$W_PACKAGE" w_ahk_do " @@ -6575,10 +6680,10 @@ load_dotnet20sp2() status=$? case $status in - 0) ;; - 105) echo "exit status $status - normal, user selected 'restart now'" ;; - 194) echo "exit status $status - normal, user selected 'restart later'" ;; - *) w_die "exit status $status - $W_PACKAGE installation failed" ;; + 0) ;; + 105) echo "exit status $status - normal, user selected 'restart now'" ;; + 194) echo "exit status $status - normal, user selected 'restart later'" ;; + *) w_die "exit status $status - $W_PACKAGE installation failed" ;; esac w_unset_winver @@ -6616,18 +6721,18 @@ load_dotnet30() if test -f /proc/sys/kernel/yama/ptrace_scope; then case $(cat /proc/sys/kernel/yama/ptrace_scope) in - 0) ;; - *) w_warn "If install fails, set /proc/sys/kernel/yama/ptrace_scope to 0. See https://bugs.winehq.org/show_bug.cgi?id=30410" ;; + 0) ;; + *) w_warn "If install fails, set /proc/sys/kernel/yama/ptrace_scope to 0. See https://bugs.winehq.org/show_bug.cgi?id=30410" ;; esac fi case "$W_PLATFORM" in - windows_cmd) - osver=$(cmd /c ver) - case "$osver" in - *Version?6*) w_die "Vista and up bundle .NET 3.0, so you can't install it like this" ;; - esac - ;; + windows_cmd) + osver=$(cmd /c ver) + case "$osver" in + *Version?6*) w_die "Vista and up bundle .NET 3.0, so you can't install it like this" ;; + esac + ;; esac w_call dotnet20 @@ -6685,9 +6790,9 @@ load_dotnet30sp1() w_call remove_mono w_call dotnet30 - $WINESERVER -w + w_wineserver -w w_call dotnet20sp1 - $WINESERVER -w + w_wineserver -w w_try_cd "$W_CACHE/$W_PACKAGE" @@ -6738,7 +6843,7 @@ load_dotnet35() w_call remove_mono w_call dotnet30sp1 - $WINESERVER -w + w_wineserver -w if w_workaround_wine_bug 33450 "Installing msxml3" ,1.5.28; then w_call msxml3 @@ -6775,8 +6880,8 @@ load_dotnet35sp1() w_package_unsupported_win64 case "$W_PLATFORM" in - windows_cmd) ;; - *) w_warn "dotnet35sp1 does not yet fully work or install on wine. Caveat emptor." ;; + windows_cmd) ;; + *) w_warn "dotnet35sp1 does not yet fully work or install on wine. Caveat emptor." ;; esac w_verify_cabextract_available @@ -6787,9 +6892,9 @@ load_dotnet35sp1() w_call remove_mono w_call dotnet35 - $WINESERVER -w + w_wineserver -w w_call dotnet20sp2 - $WINESERVER -w + w_wineserver -w # Work around hang in https://bugs.winehq.org/show_bug.cgi?id=25060#c19 WINEDLLOVERRIDES=ngen.exe,mscorsvw.exe=b @@ -6846,6 +6951,10 @@ load_dotnet40() *) w_warn "dotnet40 does not yet fully work or install on wine. Caveat emptor." ;; esac + if [ "$W_ARCH" = "win64" ] && w_workaround_wine_bug 42701; then + w_warn "On 64-bit, you'll run into https://bugs.winehq.org/show_bug.cgi?id=42701 (missing api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll.RoGetParameterizedTypeInstanceIID" + fi + # https://www.microsoft.com/en-us/download/details.aspx?id=17718 w_download https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe 65e064258f2e418816b304f646ff9e87af101e4c9552ab064bb74d281c38659f @@ -7086,7 +7195,7 @@ load_dotnet462() w_package_warn_win64 if w_workaround_wine_bug 42170 "Running un-official repacked .NET 4.6.2 setup until the official version is fixed."; then - # Un-official slim version. See http://repacks.net/forum/viewtopic.php?t=7 + # Un-official slim version. See https://repacks.net/forum/viewtopic.php?t=7 file_package="dotNetFx462_Full_x86_x64_Slim.exe" w_download https://www.dropbox.com/s/1bdocgbate8hc8z/dotNetFx462_Full_x86_x64_Slim.exe?dl=1 8f03c8a9b2f4666c3707abe2d70145f200cb2f0f3b792626e64d167d1ad0565f $file_package unattended_args="/ai /gm2" @@ -7429,7 +7538,7 @@ load_gmdls() { # Originally at https://download.microsoft.com/download/whistler/Update/8.1/W982KMeXP/EN-US/DX81Redist.exe # Only archive.org seems to have it now - w_download_to directx8 http://web.archive.org/web/20070105100243if_/http://download.microsoft.com:80/download/whistler/Update/8.1/W982KMeXP/EN-US/DX81Redist.exe 5ddc1a8e204381254dc5d65f406584787155983adf245a75000dcd0d2efb04c6 + w_download_to directx8 https://web.archive.org/web/20070105100243if_/download.microsoft.com/download/whistler/Update/8.1/W982KMeXP/EN-US/DX81Redist.exe 5ddc1a8e204381254dc5d65f406584787155983adf245a75000dcd0d2efb04c6 w_try_unzip "$W_TMP" "$W_CACHE"/directx8/DX81Redist.exe "*/*/DirectX.cab" w_try_cabextract -d "$W_TMP" -F gm16.dls "$W_TMP"/*/*/DirectX.cab @@ -7681,6 +7790,9 @@ w_metadata ie8_kb2936068 dlls \ load_ie8_kb2936068() { + # If we really need win64 support, should check if there's an x64 version of the hotfix + w_package_unsupported_win64 + w_call ie8 w_download https://download.microsoft.com/download/3/8/C/38CE0ABB-01FD-4C0A-A569-BC5E82C34A17/IE8-WindowsXP-KB2936068-x86-ENU.exe 8bda23c78cdcd9d01c364a01c6d639dfb2d11550a5521b8a81c808c1a2b1824e @@ -7740,8 +7852,8 @@ load_kindle() w_try_cd "$W_CACHE/$W_PACKAGE" w_try "$WINE" "$file1" ${W_OPT_UNATTENDED:+ /S} - if w_workaround_wine_bug 35041; then - w_warn "You may need to run with taskset -c 0 to avoid a libX11 crash." + if w_workaround_wine_bug 35041 && [ ! -z "$W_TASKSET" ] ; then + w_warn "You may need to run with $W_TASKSET to avoid a libX11 crash." fi if w_workaround_wine_bug 29045; then @@ -8287,7 +8399,7 @@ w_metadata ogg dlls \ load_ogg() { - w_download http://downloads.xiph.org/releases/oggdsf/opencodecs_0.85.17777.exe fcec3cea637e806501aff447d902de3b5bfef226b629e43ab67e46dbb23f13e7 + w_download https://downloads.xiph.org/releases/oggdsf/opencodecs_0.85.17777.exe fcec3cea637e806501aff447d902de3b5bfef226b629e43ab67e46dbb23f13e7 w_try_cd "$W_CACHE/$W_PACKAGE" w_try "$WINE" "$file1" $W_UNATTENDED_SLASH_S } @@ -8624,20 +8736,20 @@ w_metadata remove_mono settings \ load_remove_mono() { - mono_uuid="$($WINE uninstaller --list | grep Mono | cut -f1 -d\|)" + mono_uuid="$("${WINE_ARCH}" uninstaller --list | grep Mono | cut -f1 -d\|)" if test "$mono_uuid"; then - "$WINE" uninstaller --remove "$mono_uuid" + "${WINE_ARCH}" uninstaller --remove "$mono_uuid" else w_warn "Mono does not appear to be installed." fi # FIXME: verify on pristine Windows XP: if w_workaround_wine_bug 34803; then - "$WINE" reg delete 'HKLM\Software\Microsoft\.NETFramework\v2.0.50727\SBSDisabled' /f + "${WINE_ARCH}" reg delete 'HKLM\Software\Microsoft\.NETFramework\v2.0.50727\SBSDisabled' /f fi - "$WINE" reg delete "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5" /f || true - "$WINE" reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f || true + "${WINE_ARCH}" reg delete "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5" /f || true + "${WINE_ARCH}" reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f || true w_try rm -f "$W_WINDIR_UNIX/system32/mscoree.dll" } @@ -8748,7 +8860,7 @@ load_secur32() if [ "$W_ARCH" = "win64" ]; then helper_win7sp1_x64 amd64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_04709031736ac277/secur32.dll - w_try "$W_TMP/amd64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_04709031736ac277/secur32.dll" "$W_SYSTEM64_DLLS/secur32.dll" + w_try cp "$W_TMP/amd64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_04709031736ac277/secur32.dll" "$W_SYSTEM64_DLLS/secur32.dll" fi w_override_dlls native,builtin secur32 @@ -8812,9 +8924,22 @@ load_speechsdk() # Otherwise it only installs the SDK and not the redistributable: w_set_winver win2k + # Only added in wine-2.18 + for stub in "$W_SYSTEM32_DLLS/Speech/Common/sapi.dll" "$W_SYSTEM64_DLLS/Speech/Common/sapi.dll"; do + if [ -f "$stub" ]; then + w_try rm "$stub" + fi + done + w_try_cd "$W_TMP" w_try "$WINE" msiexec /i "Microsoft Speech SDK 5.1.msi" $W_UNATTENDED_SLASH_Q + # If sapi.dll isn't in original location, applications won't start, see + # e.g., https://bugs.winehq.org/show_bug.cgi?id=43841 + w_try ln -s "$W_COMMONFILES_X86/Microsoft Shared/Speech/sapi.dll" "$W_32BIT_DLLS/Speech/Common" + + w_override_dlls native sapi + w_unset_winver } @@ -8986,8 +9111,8 @@ load_vb6run() status=$? case $status in - 0|43) ;; - *) w_die "$W_PACKAGE installation failed" + 0|43) ;; + *) w_die "$W_PACKAGE installation failed" esac } @@ -9028,8 +9153,8 @@ load_vcrun6() status=$? case $status in - 0|43) ;; - *) w_die vcrun6 installation failed + 0|43) ;; + *) w_die vcrun6 installation failed esac # And then some apps need mfc42u.dll, dunno what the right way @@ -9101,8 +9226,8 @@ load_vcrun6sp6() status=$? case $status in - 0|43) ;; - *) w_die "$W_PACKAGE installation failed" + 0|43) ;; + *) w_die "$W_PACKAGE installation failed" esac # And then some apps need mfc42u.dll, dont know what right way @@ -9226,26 +9351,26 @@ load_vcrun2008() w_try "$WINE" "$file1" $W_UNATTENDED_SLASH_Q case "$W_ARCH" in - win64) - # Also install the 64-bit version - # 2016/11/15: b811f2c047a3e828517c234bd4aa4883e1ec591d88fad21289ae68a6915a6665 - w_download https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe b811f2c047a3e828517c234bd4aa4883e1ec591d88fad21289ae68a6915a6665 - if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then - rm -f "$W_TMP"/* # Avoid permission error - w_try_cabextract --directory="$W_TMP" vcredist_x64.exe - w_try_cabextract --directory="$W_TMP" "$W_TMP/vc_red.cab" + win64) + # Also install the 64-bit version + # 2016/11/15: b811f2c047a3e828517c234bd4aa4883e1ec591d88fad21289ae68a6915a6665 + w_download https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe b811f2c047a3e828517c234bd4aa4883e1ec591d88fad21289ae68a6915a6665 + if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then + rm -f "$W_TMP"/* # Avoid permission error + w_try_cabextract --directory="$W_TMP" vcredist_x64.exe + w_try_cabextract --directory="$W_TMP" "$W_TMP/vc_red.cab" - w_try cp "$W_TMP"/atl90.dll.30729.6161.Microsoft_VC90_ATL_x64.QFE "$W_SYSTEM64_DLLS"/atl90.dll - w_try cp "$W_TMP"/mfc90.dll.30729.6161.Microsoft_VC90_MFC_x64.QFE "$W_SYSTEM64_DLLS"/mfc90.dll - w_try cp "$W_TMP"/mfcm90.dll.30729.6161.Microsoft_VC90_MFC_x64.QFE "$W_SYSTEM64_DLLS"/mfcm90.dll - w_try cp "$W_TMP"/msvcm90.dll.30729.6161.Microsoft_VC90_CRT_x64.QFE "$W_SYSTEM64_DLLS"/msvcm90.dll - w_try cp "$W_TMP"/msvcp90.dll.30729.6161.Microsoft_VC90_CRT_x64.QFE "$W_SYSTEM64_DLLS"/msvcp90.dll - w_try cp "$W_TMP"/msvcr90.dll.30729.6161.Microsoft_VC90_CRT_x64.QFE "$W_SYSTEM64_DLLS"/msvcr90.dll - w_try cp "$W_TMP"/vcomp90.dll.30729.6161.Microsoft_VC90_OpenMP_x64.QFE "$W_SYSTEM64_DLLS"/vcomp90.dll - else - w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q - fi - ;; + w_try cp "$W_TMP"/atl90.dll.30729.6161.Microsoft_VC90_ATL_x64.QFE "$W_SYSTEM64_DLLS"/atl90.dll + w_try cp "$W_TMP"/mfc90.dll.30729.6161.Microsoft_VC90_MFC_x64.QFE "$W_SYSTEM64_DLLS"/mfc90.dll + w_try cp "$W_TMP"/mfcm90.dll.30729.6161.Microsoft_VC90_MFC_x64.QFE "$W_SYSTEM64_DLLS"/mfcm90.dll + w_try cp "$W_TMP"/msvcm90.dll.30729.6161.Microsoft_VC90_CRT_x64.QFE "$W_SYSTEM64_DLLS"/msvcm90.dll + w_try cp "$W_TMP"/msvcp90.dll.30729.6161.Microsoft_VC90_CRT_x64.QFE "$W_SYSTEM64_DLLS"/msvcp90.dll + w_try cp "$W_TMP"/msvcr90.dll.30729.6161.Microsoft_VC90_CRT_x64.QFE "$W_SYSTEM64_DLLS"/msvcr90.dll + w_try cp "$W_TMP"/vcomp90.dll.30729.6161.Microsoft_VC90_OpenMP_x64.QFE "$W_SYSTEM64_DLLS"/vcomp90.dll + else + w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q + fi + ;; esac } @@ -9269,23 +9394,23 @@ load_vcrun2010() w_try "$WINE" vcredist_x86.exe $W_UNATTENDED_SLASH_Q case "$W_ARCH" in - win64) - # Also install the 64-bit version - # https://www.microsoft.com/en-us/download/details.aspx?id=13523 - w_download https://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe c6cd2d3f0b11dc2a604ffdc4dd97861a83b77e21709ba71b962a47759c93f4c8 - if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then - w_try_cabextract --directory="$W_TMP" vcredist_x64.exe -F '*.cab' - w_try_cabextract --directory="$W_TMP" "$W_TMP"/vc_red.cab - cp "$W_TMP"/F_CENTRAL_mfc100_x64 "$W_SYSTEM64_DLLS"/mfc100.dll - cp "$W_TMP"/F_CENTRAL_mfc100u_x64 "$W_SYSTEM64_DLLS"/mfc100u.dll - cp "$W_TMP"/F_CENTRAL_msvcr100_x64 "$W_SYSTEM64_DLLS"/msvcr100.dll - cp "$W_TMP"/F_CENTRAL_msvcp100_x64 "$W_SYSTEM64_DLLS"/msvcp100.dll - cp "$W_TMP"/F_CENTRAL_vcomp100_x64 "$W_SYSTEM64_DLLS"/vcomp100.dll - cp "$W_TMP"/F_CENTRAL_atl100_x64 "$W_SYSTEM64_DLLS"/atl100.dll - else - w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q - fi - ;; + win64) + # Also install the 64-bit version + # https://www.microsoft.com/en-us/download/details.aspx?id=13523 + w_download https://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe c6cd2d3f0b11dc2a604ffdc4dd97861a83b77e21709ba71b962a47759c93f4c8 + if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then + w_try_cabextract --directory="$W_TMP" vcredist_x64.exe -F '*.cab' + w_try_cabextract --directory="$W_TMP" "$W_TMP"/vc_red.cab + cp "$W_TMP"/F_CENTRAL_mfc100_x64 "$W_SYSTEM64_DLLS"/mfc100.dll + cp "$W_TMP"/F_CENTRAL_mfc100u_x64 "$W_SYSTEM64_DLLS"/mfc100u.dll + cp "$W_TMP"/F_CENTRAL_msvcr100_x64 "$W_SYSTEM64_DLLS"/msvcr100.dll + cp "$W_TMP"/F_CENTRAL_msvcp100_x64 "$W_SYSTEM64_DLLS"/msvcp100.dll + cp "$W_TMP"/F_CENTRAL_vcomp100_x64 "$W_SYSTEM64_DLLS"/vcomp100.dll + cp "$W_TMP"/F_CENTRAL_atl100_x64 "$W_SYSTEM64_DLLS"/atl100.dll + else + w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q + fi + ;; esac } @@ -9309,25 +9434,25 @@ load_vcrun2012() w_try "$WINE" vcredist_x86.exe $W_UNATTENDED_SLASH_Q case "$W_ARCH" in - win64) - # Also install the 64-bit version - # 2015/10/19: 681be3e5ba9fd3da02c09d7e565adfa078640ed66a0d58583efad2c1e3cc4064 - w_download https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe 681be3e5ba9fd3da02c09d7e565adfa078640ed66a0d58583efad2c1e3cc4064 - if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then - rm -f "$W_TMP"/* # Avoid permission error - w_try_cabextract --directory="$W_TMP" vcredist_x64.exe - w_try_cabextract --directory="$W_TMP" "$W_TMP/a2" - w_try_cabextract --directory="$W_TMP" "$W_TMP/a3" - cp "$W_TMP"/F_CENTRAL_atl110_x64 "$W_SYSTEM64_DLLS"/atl110.dll - cp "$W_TMP"/F_CENTRAL_mfc110_x64 "$W_SYSTEM64_DLLS"/mfc110.dll - cp "$W_TMP"/F_CENTRAL_mfc110u_x64 "$W_SYSTEM64_DLLS"/mfc110u.dll - cp "$W_TMP"/F_CENTRAL_msvcp110_x64 "$W_SYSTEM64_DLLS"/msvcp110.dll - cp "$W_TMP"/F_CENTRAL_msvcr110_x64 "$W_SYSTEM64_DLLS"/msvcr110.dll - cp "$W_TMP"/F_CENTRAL_vcomp110_x64 "$W_SYSTEM64_DLLS"/vcomp110.dll - else - w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q - fi - ;; + win64) + # Also install the 64-bit version + # 2015/10/19: 681be3e5ba9fd3da02c09d7e565adfa078640ed66a0d58583efad2c1e3cc4064 + w_download https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe 681be3e5ba9fd3da02c09d7e565adfa078640ed66a0d58583efad2c1e3cc4064 + if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then + rm -f "$W_TMP"/* # Avoid permission error + w_try_cabextract --directory="$W_TMP" vcredist_x64.exe + w_try_cabextract --directory="$W_TMP" "$W_TMP/a2" + w_try_cabextract --directory="$W_TMP" "$W_TMP/a3" + cp "$W_TMP"/F_CENTRAL_atl110_x64 "$W_SYSTEM64_DLLS"/atl110.dll + cp "$W_TMP"/F_CENTRAL_mfc110_x64 "$W_SYSTEM64_DLLS"/mfc110.dll + cp "$W_TMP"/F_CENTRAL_mfc110u_x64 "$W_SYSTEM64_DLLS"/mfc110u.dll + cp "$W_TMP"/F_CENTRAL_msvcp110_x64 "$W_SYSTEM64_DLLS"/msvcp110.dll + cp "$W_TMP"/F_CENTRAL_msvcr110_x64 "$W_SYSTEM64_DLLS"/msvcr110.dll + cp "$W_TMP"/F_CENTRAL_vcomp110_x64 "$W_SYSTEM64_DLLS"/vcomp110.dll + else + w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q + fi + ;; esac } @@ -9352,24 +9477,24 @@ load_vcrun2013() w_try "$WINE" vcredist_x86.exe $W_UNATTENDED_SLASH_Q case "$W_ARCH" in - win64) - # Also install the 64-bit version - # 2015/10/19: e554425243e3e8ca1cd5fe550db41e6fa58a007c74fad400274b128452f38fb8 - w_download https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe e554425243e3e8ca1cd5fe550db41e6fa58a007c74fad400274b128452f38fb8 - if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then - rm -f "$W_TMP"/* # Avoid permission error - w_try_cabextract --directory="$W_TMP" vcredist_x64.exe - w_try_cabextract --directory="$W_TMP" "$W_TMP/a2" - w_try_cabextract --directory="$W_TMP" "$W_TMP/a3" - cp "$W_TMP"/F_CENTRAL_mfc120_x64 "$W_SYSTEM64_DLLS"/mfc120.dll - cp "$W_TMP"/F_CENTRAL_mfc120u_x64 "$W_SYSTEM64_DLLS"/mfc120u.dll - cp "$W_TMP"/F_CENTRAL_msvcp120_x64 "$W_SYSTEM64_DLLS"/msvcp120.dll - cp "$W_TMP"/F_CENTRAL_msvcr120_x64 "$W_SYSTEM64_DLLS"/msvcr120.dll - cp "$W_TMP"/F_CENTRAL_vcomp120_x64 "$W_SYSTEM64_DLLS"/vcomp120.dll - else - w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q - fi - ;; + win64) + # Also install the 64-bit version + # 2015/10/19: e554425243e3e8ca1cd5fe550db41e6fa58a007c74fad400274b128452f38fb8 + w_download https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe e554425243e3e8ca1cd5fe550db41e6fa58a007c74fad400274b128452f38fb8 + if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then + rm -f "$W_TMP"/* # Avoid permission error + w_try_cabextract --directory="$W_TMP" vcredist_x64.exe + w_try_cabextract --directory="$W_TMP" "$W_TMP/a2" + w_try_cabextract --directory="$W_TMP" "$W_TMP/a3" + cp "$W_TMP"/F_CENTRAL_mfc120_x64 "$W_SYSTEM64_DLLS"/mfc120.dll + cp "$W_TMP"/F_CENTRAL_mfc120u_x64 "$W_SYSTEM64_DLLS"/mfc120u.dll + cp "$W_TMP"/F_CENTRAL_msvcp120_x64 "$W_SYSTEM64_DLLS"/msvcp120.dll + cp "$W_TMP"/F_CENTRAL_msvcr120_x64 "$W_SYSTEM64_DLLS"/msvcr120.dll + cp "$W_TMP"/F_CENTRAL_vcomp120_x64 "$W_SYSTEM64_DLLS"/vcomp120.dll + else + w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q + fi + ;; esac } @@ -9401,37 +9526,37 @@ load_vcrun2015() w_try "$WINE" vc_redist.x86.exe $W_UNATTENDED_SLASH_Q case "$W_ARCH" in - win64) - # Also install the 64-bit version - # 2015/10/12: 5eea714e1f22f1875c1cb7b1738b0c0b1f02aec5ecb95f0fdb1c5171c6cd93a3 - w_download https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe 5eea714e1f22f1875c1cb7b1738b0c0b1f02aec5ecb95f0fdb1c5171c6cd93a3 - if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then - rm -f "$W_TMP"/* # Avoid permission error - w_try_cabextract --directory="$W_TMP" vc_redist.x64.exe - w_try_cabextract --directory="$W_TMP" "$W_TMP/a10" - w_try_cabextract --directory="$W_TMP" "$W_TMP/a11" - cp "$W_TMP"/concrt140.dll "$W_SYSTEM64_DLLS"/concrt140.dll - cp "$W_TMP"/mfc140.dll "$W_SYSTEM64_DLLS"/mfc140.dll - cp "$W_TMP"/mfc140u.dll "$W_SYSTEM64_DLLS"/mfc140u.dll - cp "$W_TMP"/mfcm140.dll "$W_SYSTEM64_DLLS"/mfcm140.dll - cp "$W_TMP"/mfcm140u.dll "$W_SYSTEM64_DLLS"/mfcm140u.dll - cp "$W_TMP"/msvcp140.dll "$W_SYSTEM64_DLLS"/msvcp140.dll - cp "$W_TMP"/vcamp140.dll "$W_SYSTEM64_DLLS"/vcamp140.dll - cp "$W_TMP"/vccorlib140.dll "$W_SYSTEM64_DLLS"/vccorlib140.dll - cp "$W_TMP"/vcomp140.dll "$W_SYSTEM64_DLLS"/vcomp140.dll - cp "$W_TMP"/vcruntime140.dll "$W_SYSTEM64_DLLS"/vcruntime140.dll + win64) + # Also install the 64-bit version + # 2015/10/12: 5eea714e1f22f1875c1cb7b1738b0c0b1f02aec5ecb95f0fdb1c5171c6cd93a3 + w_download https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe 5eea714e1f22f1875c1cb7b1738b0c0b1f02aec5ecb95f0fdb1c5171c6cd93a3 + if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then + rm -f "$W_TMP"/* # Avoid permission error + w_try_cabextract --directory="$W_TMP" vc_redist.x64.exe + w_try_cabextract --directory="$W_TMP" "$W_TMP/a10" + w_try_cabextract --directory="$W_TMP" "$W_TMP/a11" + cp "$W_TMP"/concrt140.dll "$W_SYSTEM64_DLLS"/concrt140.dll + cp "$W_TMP"/mfc140.dll "$W_SYSTEM64_DLLS"/mfc140.dll + cp "$W_TMP"/mfc140u.dll "$W_SYSTEM64_DLLS"/mfc140u.dll + cp "$W_TMP"/mfcm140.dll "$W_SYSTEM64_DLLS"/mfcm140.dll + cp "$W_TMP"/mfcm140u.dll "$W_SYSTEM64_DLLS"/mfcm140u.dll + cp "$W_TMP"/msvcp140.dll "$W_SYSTEM64_DLLS"/msvcp140.dll + cp "$W_TMP"/vcamp140.dll "$W_SYSTEM64_DLLS"/vcamp140.dll + cp "$W_TMP"/vccorlib140.dll "$W_SYSTEM64_DLLS"/vccorlib140.dll + cp "$W_TMP"/vcomp140.dll "$W_SYSTEM64_DLLS"/vcomp140.dll + cp "$W_TMP"/vcruntime140.dll "$W_SYSTEM64_DLLS"/vcruntime140.dll - cp "$W_TMP"/api_ms_win_crt_conio_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-conio-l1-1-0.dll - cp "$W_TMP"/api_ms_win_crt_heap_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-heap-l1-1-0.dll - cp "$W_TMP"/api_ms_win_crt_locale_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-locale-l1-1-0.dll - cp "$W_TMP"/api_ms_win_crt_math_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-math-l1-1-0.dll - cp "$W_TMP"/api_ms_win_crt_runtime_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-runtime-l1-1-0.dll - cp "$W_TMP"/api_ms_win_crt_stdio_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-stdio-l1-1-0.dll - cp "$W_TMP"/ucrtbase.dll "$W_SYSTEM64_DLLS"/ucrtbase.dll - else - w_try "$WINE" vc_redist.x64.exe $W_UNATTENDED_SLASH_Q - fi - ;; + cp "$W_TMP"/api_ms_win_crt_conio_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-conio-l1-1-0.dll + cp "$W_TMP"/api_ms_win_crt_heap_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-heap-l1-1-0.dll + cp "$W_TMP"/api_ms_win_crt_locale_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-locale-l1-1-0.dll + cp "$W_TMP"/api_ms_win_crt_math_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-math-l1-1-0.dll + cp "$W_TMP"/api_ms_win_crt_runtime_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-runtime-l1-1-0.dll + cp "$W_TMP"/api_ms_win_crt_stdio_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-stdio-l1-1-0.dll + cp "$W_TMP"/ucrtbase.dll "$W_SYSTEM64_DLLS"/ucrtbase.dll + else + w_try "$WINE" vc_redist.x64.exe $W_UNATTENDED_SLASH_Q + fi + ;; esac } @@ -9448,10 +9573,7 @@ w_metadata vjrun20 dlls \ load_vjrun20() { - if [ $W_ARCH = win64 ]; then - w_warn "vjrun20 depends on dotnet20, which doesn't work on 64-bit Wine yet. Skipping." - return - fi + w_package_unsupported_win64 w_call dotnet20 @@ -9461,6 +9583,30 @@ load_vjrun20() w_try "$WINE" vjredist.exe ${W_OPT_UNATTENDED:+ /q /C:"install $W_UNATTENDED_SLASH_QNT"} } +#---------------------------------------------------------------- + +w_metadata webio dlls \ + title="MS Windows Web I/O" \ + publisher="Microsoft" \ + year="2011" \ + media="download" \ + file1="../win7sp1/windows6.1-KB976932-X86.exe" \ + installed_file1="$W_SYSTEM32_DLLS_WIN/webio.dll" + +load_webio() +{ + helper_win7sp1 x86_microsoft-windows-webio_31bf3856ad364e35_6.1.7601.17514_none_5ef1a4093cf55387/webio.dll + w_try cp "$W_TMP/x86_microsoft-windows-webio_31bf3856ad364e35_6.1.7601.17514_none_5ef1a4093cf55387/webio.dll" "$W_SYSTEM32_DLLS/webio.dll" + + if [ "$W_ARCH" = "win64" ]; then + helper_win7sp1_x64 amd64_microsoft-windows-webio_31bf3856ad364e35_6.1.7601.17514_none_bb103f8cf552c4bd/webio.dll + w_try cp "$W_TMP/amd64_microsoft-windows-webio_31bf3856ad364e35_6.1.7601.17514_none_bb103f8cf552c4bd/webio.dll" "$W_SYSTEM64_DLLS/webio.dll" + fi + + w_override_dlls native,builtin webio +} + + #---------------------------------------------------------------- w_metadata windowscodecs dlls \ @@ -9496,12 +9642,6 @@ load_windowscodecs() # AF says in AppDB entry for .NET 3.0 that windowscodecs has to be native only w_override_dlls native windowscodecs windowscodecsext - if test -x /usr/bin/taskset && w_workaround_wine_bug 32859 "Working around possibly broken libX11"; then - TASKSET="taskset -c 0" - else - TASKSET="" - fi - w_set_winver winxp # Always run the WIC installer in passive mode. @@ -9509,7 +9649,11 @@ load_windowscodecs() # https://bugs.winehq.org/show_bug.cgi?id=23232 w_try_cd "$W_CACHE/$W_PACKAGE" - w_try $TASKSET "$WINE" "$EXE" /passive + if w_workaround_wine_bug 32859 "Working around possibly broken libX11"; then + w_try $W_TASKSET "$WINE" "$EXE" /passive + else + w_try "$WINE" "$EXE" /passive + fi } #---------------------------------------------------------------- @@ -9517,21 +9661,19 @@ load_windowscodecs() w_metadata winhttp dlls \ title="MS Windows HTTP Services" \ publisher="Microsoft" \ - year="2011" \ + year="2005" \ media="download" \ - file1="../win7sp1/windows6.1-KB976932-X86.exe" \ + file1="../win2ksp4/W2KSP4_EN.EXE" \ installed_file1="$W_SYSTEM32_DLLS_WIN/winhttp.dll" load_winhttp() { - helper_win7sp1 x86_microsoft.windows.winhttp_31bf3856ad364e35_5.1.7601.17514_none_5ea69615819a23e4/winhttp.dll - w_try cp "$W_TMP/x86_microsoft.windows.winhttp_31bf3856ad364e35_5.1.7601.17514_none_5ea69615819a23e4/winhttp.dll" "$W_SYSTEM32_DLLS/winhttp.dll" - - if [ "$W_ARCH" = "win64" ]; then - helper_win7sp1_x64 amd64_microsoft.windows.winhttp_31bf3856ad364e35_5.1.7601.17514_none_bac5319939f7951a/winhttp.dll - w_try cp "$W_TMP/amd64_microsoft.windows.winhttp_31bf3856ad364e35_5.1.7601.17514_none_bac5319939f7951a/winhttp.dll" "$W_SYSTEM64_DLLS/winhttp.dll" - fi + # 2017/10/12: Can't use win7's version, as that need webio.dll, which wants ntdll.EtwEventActivityIdControl. + # Should get that into wine{,-stable} so we can use win7 version in the long run + # See https://github.com/Winetricks/winetricks/issues/831 + helper_win2ksp4 i386/new/winhttp.dl_ + w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/new/winhttp.dl_ w_override_dlls native,builtin winhttp } @@ -10151,6 +10293,28 @@ load_fakejapanese_ipamona() #---------------------------------------------------------------- +w_metadata fakejapanese_vlgothic fonts \ + title="Creates aliases for Japanese Meiryo fonts using VLGothic fonts" \ + publisher="Project Vine / Daisuke Suzuki" \ + year="2014" + +load_fakejapanese_vlgothic() +{ + w_call vlgothic + + # Aliases to set: + # Meiryo UI --> VL Gothic + # Meiryo (メイリオ) --> VL Gothic + + jpname_meiryo="$(echo "メイリオ" | iconv -f utf8 -t cp932)" + + w_register_font_replacement "Meiryo UI" "VL Gothic" + w_register_font_replacement "Meiryo" "VL Gothic" + w_register_font_replacement "$jpname_meiryo" "VL Gothic" +} + +#---------------------------------------------------------------- + w_metadata fakekorean fonts \ title="Creates aliases for Korean fonts using Baekmuk fonts" \ publisher="Wooderart Inc. / kldp.net" \ @@ -10232,26 +10396,17 @@ w_metadata liberation fonts \ publisher="Red Hat" \ year="2008" \ media="download" \ - file1="liberation-fonts-1.04.tar.gz" \ + file1="liberation-fonts-ttf-1.07.4.tar.gz" \ installed_file1="$W_FONTSDIR_WIN/LiberationMono-BoldItalic.ttf" load_liberation() { - # https://www.redhat.com/en/about/blog/liberation-fonts - case $(uname -s) in - SunOS|Solaris) - echo "If you get 'ERROR: Certificate verification error for fedorahosted.org: unable to get local issuer certificate':" - echo "Then you need to add Verisign root certificates to your local keystore." - echo "OpenSolaris users, see: https://www.linuxtopia.org/online_books/opensolaris_2008/SYSADV1/html/swmgrpatchtasks-14.html" - echo "Or edit winetricks's download function, and add '--no-check-certificate' to the command." - ;; - esac - - w_download http://pkgs.fedoraproject.org/repo/pkgs/liberation-fonts/liberation-fonts-1.04.tar.gz/4846797ef0fc70b0cbaede2514677c58/liberation-fonts-1.04.tar.gz 0e0d0957c85b758561a3d4aef4ebcd2c39959e5328429d96ae106249d83531a1 + # https://pagure.io/liberation-fonts + w_download https://releases.pagure.org/liberation-fonts/liberation-fonts-ttf-1.07.4.tar.gz 61a7e2b6742a43c73e8762cdfeaf6dfcf9abdd2cfa0b099a9854d69bc4cfee5c w_try_cd "$W_TMP" # FIXME: w_try doesn't work here, presumably because of the pipe? gunzip -dc "$W_CACHE/$W_PACKAGE/$file1" | tar -xf - - w_try mv liberation-fonts-1.04/*.ttf "$W_FONTSDIR_UNIX" + w_try mv liberation-fonts-ttf-1.07.4/*.ttf "$W_FONTSDIR_UNIX" w_register_font LiberationMono-BoldItalic.ttf "LiberationMono-BoldItalic" w_register_font LiberationMono-Bold.ttf "LiberationMono-Bold" @@ -10389,6 +10544,32 @@ load_uff() #---------------------------------------------------------------- +w_metadata vlgothic fonts \ + title="VLGothic Japanese fonts" \ + publisher="Project Vine / Daisuke Suzuki" \ + year="2014" \ + media="download" \ + file1="VLGothic-20141206.tar.xz" \ + installed_file1="$W_FONTSDIR_WIN/VL-Gothic-Regular.ttf" \ + homepage="https://ja.osdn.net/projects/vlgothic" + +load_vlgothic() +{ + # $homepage is already assigned in w_do_call(), and works as expected: + # shellcheck disable=SC2154 + w_download "$homepage/downloads/62375/$file1" 982040db2f9cb73d7c6ab7d9d163f2ed46d1180f330c9ba2fae303649bf8102d + + w_try_cd "$W_TMP" + + unxz -dc "$W_CACHE/$W_PACKAGE/$file1" | tar -xf - + w_try mv ./VLGothic/*.ttf "$W_FONTSDIR_UNIX" + + w_register_font VL-Gothic-Regular.ttf "VL Gothic" + w_register_font VL-PGothic-Regular.ttf "VL PGothic" +} + +#---------------------------------------------------------------- + w_metadata wenquanyi fonts \ title="WenQuanYi CJK font" \ publisher="wenq.org" \ @@ -10446,8 +10627,8 @@ load_allfonts() do cmd=$(basename "$file" .vars) case $cmd in - allfonts|cjkfonts) ;; - *) w_call "$cmd";; + allfonts|cjkfonts) ;; + *) w_call "$cmd";; esac done } @@ -10955,23 +11136,23 @@ load_ie6() # IE6 exits with 194 to signal a reboot status=$? case $status in - 0|194) ;; - *) w_die ie6 installation failed + 0|194) ;; + *) w_die ie6 installation failed esac # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed # FIXME: whittle down this list w_try_cd "$W_SYSTEM32_DLLS" for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \ - dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll imgutil.dll \ - inetcomm.dll inetcpl.cpl inseng.dll isetup.dll jscript.dll laprxy.dll \ - mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \ - msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ - ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ - rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ - shdocvw.dll shell32.dll vbscript.dll webcheck.dll \ - wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ - plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx + dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll imgutil.dll \ + inetcomm.dll inetcpl.cpl inseng.dll isetup.dll jscript.dll laprxy.dll \ + mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \ + msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ + ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ + rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ + shdocvw.dll shell32.dll vbscript.dll webcheck.dll \ + wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ + plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx do "$WINE" regsvr32 /i $i > /dev/null 2>&1 done @@ -10995,6 +11176,8 @@ w_metadata ie7 dlls \ load_ie7() { + w_package_unsupported_win64 + # Unregister Wine IE if grep -q -i "wine placeholder" "$W_PROGRAMS_X86_UNIX/Internet Explorer/iexplore.exe"; then w_override_dlls builtin iexplore.exe @@ -11048,10 +11231,10 @@ load_ie7() # IE7 exits with 194 to signal a reboot status=$? case $status in - 0) ;; - 105) echo "exit status $status - normal, user selected 'restart now'" ;; - 194) echo "exit status $status - normal, user selected 'restart later'" ;; - *) w_die "exit status $status - $W_PACKAGE installation failed" ;; + 0) ;; + 105) echo "exit status $status - normal, user selected 'restart now'" ;; + 194) echo "exit status $status - normal, user selected 'restart later'" ;; + *) w_die "exit status $status - $W_PACKAGE installation failed" ;; esac if test -w /; then @@ -11063,28 +11246,28 @@ load_ie7() # FIXME: whittle down this list w_try_cd "$W_SYSTEM32_DLLS" for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \ - dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \ - imgutil.dll inetcomm.dll inseng.dll isetup.dll jscript.dll laprxy.dll \ - mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \ - msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ - ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ - rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ - shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \ - wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ - plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx + dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \ + imgutil.dll inetcomm.dll inseng.dll isetup.dll jscript.dll laprxy.dll \ + mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \ + msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ + ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ + rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ + shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \ + wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ + plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx do "$WINE" regsvr32 /i $i > /dev/null 2>&1 done # Seeing is believing case $WINETRICKS_GUI in - none) - w_warn "To start ie7, use the command \"$WINE\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'" - ;; - *) - w_warn "Starting ie7. To start it later, use the command \"$WINE\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'" - "$WINE" "${W_PROGRAMS_WIN}\\Internet Explorer\\iexplore" https://www.microsoft.com/windows/internet-explorer/ie7/ > /dev/null 2>&1 & - ;; + none) + w_warn "To start ie7, use the command \"$WINE\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'" + ;; + *) + w_warn "Starting ie7. To start it later, use the command \"$WINE\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'" + "$WINE" "${W_PROGRAMS_WIN}\\Internet Explorer\\iexplore" https://www.microsoft.com/windows/internet-explorer/ie7/ > /dev/null 2>&1 & + ;; esac } @@ -11163,15 +11346,15 @@ load_ie8() # FIXME: whittle down this list w_try_cd "$W_SYSTEM32_DLLS" for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \ - dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \ - imgutil.dll inetcomm.dll isetup.dll jscript.dll laprxy.dll \ - mlang.dll msctf.dll mshtml.dll mshtmled.dll msi.dll msimtf.dll msident.dll \ - msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ - ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ - rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ - shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \ - wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ - plugin.ocx proctexe.ocx tdc.ocx uxtheme.dll webcheck.dll wshom.ocx + dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \ + imgutil.dll inetcomm.dll isetup.dll jscript.dll laprxy.dll \ + mlang.dll msctf.dll mshtml.dll mshtmled.dll msi.dll msimtf.dll msident.dll \ + msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ + ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ + rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ + shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \ + wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ + plugin.ocx proctexe.ocx tdc.ocx uxtheme.dll webcheck.dll wshom.ocx do "$WINE" regsvr32 /i $i > /dev/null 2>&1 done @@ -11189,13 +11372,13 @@ _EOF_ # Seeing is believing case $WINETRICKS_GUI in - none) - w_warn "To start ie8, use the command \"$WINE\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'" - ;; - *) - w_warn "Starting ie8. To start it later, use the command \"$WINE\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'" - "$WINE" "${W_PROGRAMS_WIN}\\Internet Explorer\\iexplore" https://www.microsoft.com/windows/internet-explorer > /dev/null 2>&1 & - ;; + none) + w_warn "To start ie8, use the command \"$WINE\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'" + ;; + *) + w_warn "Starting ie8. To start it later, use the command \"$WINE\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'" + "$WINE" "${W_PROGRAMS_WIN}\\Internet Explorer\\iexplore" https://www.microsoft.com/windows/internet-explorer > /dev/null 2>&1 & + ;; esac w_unset_winver @@ -11453,15 +11636,15 @@ __EOF__ status=$? case $status in - 0|43) ;; - 78) - w_die "Installing $W_PACKAGE failed, product key $W_KEY \ -might be wrong. Try again without -q, or put correct key in \ -$W_CACHE/$W_PACKAGE/key.txt and rerun." - ;; - *) - w_die "Installing $W_PACKAGE failed." - ;; + 0|43) ;; + 78) + w_die "Installing $W_PACKAGE failed, product key $W_KEY \ + might be wrong. Try again without -q, or put correct key in \ + $W_CACHE/$W_PACKAGE/key.txt and rerun." + ;; + *) + w_die "Installing $W_PACKAGE failed." + ;; esac else @@ -11731,7 +11914,7 @@ load_safari() fi w_try_cd "$W_CACHE/$W_PACKAGE" - w_try "$WINE" SafariSetup.exe $W_UNATTENDED_SLASH_QN + w_try "$WINE_MULTI" SafariSetup.exe $W_UNATTENDED_SLASH_QN } #---------------------------------------------------------------- @@ -12057,8 +12240,8 @@ load_vc2010express() # Originally at: https://download.microsoft.com/download/1/E/5/1E5F1C0A-0D5B-426A-A603-1798B951DDAE/VS2010Express1.iso # Mirror list at: http://www.filewatcher.com/_/?q=VS2010Express1.iso # Formerly at: ftp://www.daba.lv/pub/Programmeeshana/VisualStudio/VS2010Express1.iso a9d5dcdf55e539a06547a8ebbc63d55dc167113e09ee9e42096ab9098313039b - w_download https://web.archive.org/web/20140227220734/http://download.microsoft.com/download/1/E/5/1E5F1C0A-0D5B-426A-A603-1798B951DDAE/VS2010Express1.iso a9d5dcdf55e539a06547a8ebbc63d55dc167113e09ee9e42096ab9098313039b - + w_download https://web.archive.org/web/20140227220734/download.microsoft.com/download/1/E/5/1E5F1C0A-0D5B-426A-A603-1798B951DDAE/VS2010Express1.iso a9d5dcdf55e539a06547a8ebbc63d55dc167113e09ee9e42096ab9098313039b + # Unpack ISO w_try_7z "$W_TMP" "$W_CACHE"/vc2010express/VS2010Express1.iso w_try_cd "$W_TMP"/VCExpress @@ -12705,7 +12888,7 @@ load_aoe3_demo() SetTitleMatchMode, 2 WinKill,Empires " - # or should we just do $WINESERVER -k, like fable_tlc does? + # or should we just do w_wineserver -k, like fable_tlc does? # shellcheck disable=SC2046 kill $(pgrep -f IDriver) fi @@ -12760,7 +12943,7 @@ load_acreedbro() # shellcheck disable=SC2009 if ps augxw | grep -i exe | grep -E 'winemenubuilder.exe|setup.exe|PnkBstrA.exe | grep -v grep'; then w_warn "Killing processes so patcher does not complain about game still running" - $WINESERVER -k + w_wineserver -k sleep 10 fi @@ -13255,7 +13438,7 @@ w_metadata cim_demo games \ load_cim_demo() { # 29 Mar 2011 cf02066f496637c24f95cf0c4ddfae376951330802500fb11bd74cc6c8872995, Inno Setup installer - #w_download http://www.pcgamestore.com/games/cities-in-motion-nbsp/trial/cim-demo-1-0-8.exe cf02066f496637c24f95cf0c4ddfae376951330802500fb11bd74cc6c8872995 + #w_download https://www.pcgamestore.com/games/cities-in-motion-nbsp/trial/cim-demo-1-0-8.exe cf02066f496637c24f95cf0c4ddfae376951330802500fb11bd74cc6c8872995 w_download_manual https://www.fileplanet.com/218762/210000/fileinfo/Cities-in-Motion-Demo cim-demo-1-0-8.exe cf02066f496637c24f95cf0c4ddfae376951330802500fb11bd74cc6c8872995 w_try_cd "$W_CACHE/$W_PACKAGE" w_try "$WINE" cim-demo-1-0-8.exe ${W_OPT_UNATTENDED:+ /sp- /silent /norestart} @@ -15072,7 +15255,7 @@ w_metadata hphbp_demo games \ load_hphbp_demo() { case "$LANG" in - ""|"C") w_die "Harry Potter will not install in the POSIX locale; please do 'export LANG=en_US.UTF-8' or something like that" ;; + ""|"C") w_die "Harry Potter will not install in the POSIX locale; please do 'export LANG=en_US.UTF-8' or something like that" ;; esac w_download http://largedownloads.ea.com/pub/demos/HarryPotter/Release_HBP_demo_PC_DD_DEMO_Final_348428.exe eca6c5eb49dc2f778175a36e07b0b1d3f33db75fdb5fda8bfefd2c1648fbbd53 @@ -15261,12 +15444,12 @@ w_metadata lhp_demo games \ load_lhp_demo() { case "$LANG" in - *UTF-8*|*utf8*) ;; - *) - w_warn "This installer fails in non-utf-8 locales. Doing 'export LANG=en_US.UTF-8'." - LANG=en_US.UTF-8 - export LANG - ;; + *UTF-8*|*utf8*) ;; + *) + w_warn "This installer fails in non-utf-8 locales. Doing 'export LANG=en_US.UTF-8' is a workaround." + LANG=en_US.UTF-8 + export LANG + ;; esac w_download_manual "https://www.fileplanet.com/213663/210000/fileinfo/LEGO-Harry-Potter:-Years-1-4-Demo" 01d8e88511d71f5dd1492034ea4b00eacdbbf891ef23cffa31413d232eee3647 @@ -17721,13 +17904,13 @@ winetricks_set_wined3d_var() # see wined3d_dll_init() in dlls/wined3d/wined3d_main.c # and DllMain() in dlls/ddraw/main.c case $2 in - disable*) arg=disabled;; - enable*) arg=enabled;; - hard*) arg=hardware;; - repack) arg=repack;; - backbuffer|fbo|gdi|none|opengl|readdraw|readtex|texdraw|textex|auto) arg=$2;; - [0-9]*) arg=$2;; - *) w_die "illegal value $2 for $1";; + disable*) arg=disabled;; + enable*) arg=enabled;; + hard*) arg=hardware;; + repack) arg=repack;; + backbuffer|fbo|gdi|none|opengl|readdraw|readtex|texdraw|textex|auto) arg=$2;; + [0-9]*) arg=$2;; + *) w_die "illegal value $2 for $1";; esac echo "Setting Direct3D/$1 to $arg" @@ -17926,9 +18109,9 @@ load_mwo() # Confusing because dinput uses 'disable', but d3d uses 'disabled' # see alloc_device() in dlls/dinput/mouse.c case "$1" in - enable*) arg=enabled;; - disable*) arg=disable;; - force) arg=force;; + enable*) arg=enabled;; + disable*) arg=disable;; + force) arg=force;; *) w_die "illegal value $1 for MouseWarpOverride";; esac @@ -17979,8 +18162,8 @@ w_metadata grabfullscreen=n settings \ load_grabfullscreen() { case "$1" in - y|n) arg=$1;; - *) w_die "illegal value $1 for GrabFullscreen";; + y|n) arg=$1;; + *) w_die "illegal value $1 for GrabFullscreen";; esac echo "Setting GrabFullscreen to $arg" @@ -18004,8 +18187,8 @@ w_metadata windowmanagerdecorated=n settings \ load_windowmanagerdecorated() { case "$1" in - y|n) arg=$1;; - *) w_die "illegal value $1 for Decorated";; + y|n) arg=$1;; + *) w_die "illegal value $1 for Decorated";; esac echo "Setting Decorated to $arg" @@ -18029,8 +18212,8 @@ w_metadata windowmanagermanaged=n settings \ load_windowmanagermanaged() { case "$1" in - y|n) arg=$1;; - *) w_die "illegal value $1 for Managed";; + y|n) arg=$1;; + *) w_die "illegal value $1 for Managed";; esac echo "Setting Managed to $arg" @@ -18059,8 +18242,8 @@ w_metadata alldlls=builtin settings \ load_alldlls() { case "$1" in - default) w_override_no_dlls ;; - builtin) w_override_all_dlls ;; + default) w_override_no_dlls ;; + builtin) w_override_all_dlls ;; esac } @@ -18080,11 +18263,11 @@ w_metadata fontsmooth=gray settings \ load_fontsmooth() { case "$1" in - disable) FontSmoothing=0; FontSmoothingOrientation=1; FontSmoothingType=0;; - gray|grey) FontSmoothing=2; FontSmoothingOrientation=1; FontSmoothingType=1;; - bgr) FontSmoothing=2; FontSmoothingOrientation=0; FontSmoothingType=2;; - rgb) FontSmoothing=2; FontSmoothingOrientation=1; FontSmoothingType=2;; - *) w_die "unknown font smoothing type $1";; + disable) FontSmoothing=0; FontSmoothingOrientation=1; FontSmoothingType=0;; + gray|grey) FontSmoothing=2; FontSmoothingOrientation=1; FontSmoothingType=1;; + bgr) FontSmoothing=2; FontSmoothingOrientation=0; FontSmoothingType=2;; + rgb) FontSmoothing=2; FontSmoothingOrientation=1; FontSmoothingType=2;; + *) w_die "unknown font smoothing type $1";; esac echo "Setting font smoothing to $1" @@ -18374,7 +18557,7 @@ load_vd() { size="$1" case $size in - off|disabled) + off|disabled) cat > "$W_TMP"/vd.reg <<_EOF_ REGEDIT4 @@ -18385,7 +18568,7 @@ REGEDIT4 _EOF_ ;; - [1-9]*x[1-9]*) + [1-9]*x[1-9]*) cat > "$W_TMP"/vd.reg <<_EOF_ REGEDIT4 @@ -18396,8 +18579,8 @@ REGEDIT4 _EOF_ ;; - *) - w_die "you want a virtual desktop of $size? I don't understand." + *) + w_die "you want a virtual desktop of $size? I don't understand." ;; esac w_try_regedit "$W_TMP_WIN"/vd.reg @@ -18424,7 +18607,7 @@ load_videomemorysize() echo "Setting video memory size to $size" case $size in - default) + default) cat > "$W_TMP"/set-video.reg <<_EOF_ REGEDIT4 @@ -18434,7 +18617,7 @@ REGEDIT4 _EOF_ ;; - *) + *) cat > "$W_TMP"/set-video.reg <<_EOF_ REGEDIT4 @@ -18657,42 +18840,48 @@ winetricks_stats_init() if test ! "$WINETRICKS_STATS_REPORT"; then # No opt-in status found. If GUI active, ask user whether they would like to opt in. case $WINETRICKS_GUI in - zenity) - case $LANG in - de*) - title="Einmalige Frage zur Hilfe an der Winetricks Entwicklung" - question="Möchten Sie die Winetricks Entwicklung unterstützen indem Sie Winetricks Statistiken übermitteln lassen? Sie können die Übermittlung jederzeit mit 'winetricks --optout' ausschalten" - thanks="Danke! Sie bekommen diese Frage nicht mehr gestellt. Sie können die Übermittlung jederzeit mit 'winetricks --optout' wieder ausschalten" - declined="OK, Winetricks wird *keine* Statistiken übermitteln. Sie bekommen diese Frage nicht mehr gestellt." + zenity) + case $LANG in + de*) + title="Einmalige Frage zur Hilfe an der Winetricks Entwicklung" + question="Möchten Sie die Winetricks Entwicklung unterstützen indem Sie Winetricks Statistiken übermitteln lassen? Sie können die Übermittlung jederzeit mit 'winetricks --optout' ausschalten" + thanks="Danke! Sie bekommen diese Frage nicht mehr gestellt. Sie können die Übermittlung jederzeit mit 'winetricks --optout' wieder ausschalten" + declined="OK, Winetricks wird *keine* Statistiken übermitteln. Sie bekommen diese Frage nicht mehr gestellt." + ;; + pl*) + title="Jednorazowe pytanie dotyczące pomocy w rozwoju Winetricks" + question="Czy chcesz pomóc w rozwoju Winetricks pozwalając na wysyłanie statystyk przez program? Możesz wyłączyć tą opcję w każdej chwili z użyciem komendy 'winetricks --optout'." + thanks="Dziękujemy! Nie otrzymasz już tego pytania. Pamiętaj, ze możesz wyłączyć tą opcję komendą 'winetricks --optout'" + declined="OK, Winetricks *nie* będzie wysyłać statystyk. Nie otrzymasz już tego pytania." + ;; + ru*) + title="Помощь в разработке Winetricks" + question="Вы хотите помочь разработке winetricks, отправляя статистику? Вы можете отключить отправку статистики в любое время с помощью команды 'winetricks --optout'" + thanks="Спасибо! Этот вопрос больше не появится. Помните: вы можете отключить отправку статистики в любое время с помощью команды 'winetricks --optout'" + declined="OK, winetricks НЕ будет отправлять статистику. Этот вопрос больше не появится." + ;; + uk*) + title="Допомога в розробці Winetricks" + question="Ви хочете допомогти в розробці Winetricks дозволивши звітувати статистику?\nВи можете в будь-який час вимкнути цю опцію за допомогою команди 'winetricks --optout'" + thanks="Дякуємо! Ви більше не отримуватиме це питання знову. Пам'ятайте, що ви можете будь-коли вимкнути звітність за допомогою команди 'winetricks --optout'" + declined="Надсилання звітності Winetricks вимкнено. Ви більше не отримуватиме це питання знову." + ;; + *) + title="One-time question about helping Winetricks development" + question="Would you like to help winetricks development by letting winetricks report statistics? You can turn reporting off at any time with the command 'winetricks --optout'" + thanks="Thanks! You won't be asked this question again. Remember, you can turn reporting off at any time with the command 'winetricks --optout'" + declined="OK, winetricks will *not* report statistics. You won't be asked this question again." + ;; + esac + if $WINETRICKS_GUI --question --text "$question" --title "$title"; then + $WINETRICKS_GUI --info --text "$thanks" + WINETRICKS_STATS_REPORT=1 + else + $WINETRICKS_GUI --info --text "$declined" + WINETRICKS_STATS_REPORT=0 + fi + echo $WINETRICKS_STATS_REPORT > "$W_CACHE"/track_usage ;; - pl*) - title="Jednorazowe pytanie dotyczące pomocy w rozwoju Winetricks" - question="Czy chcesz pomóc w rozwoju Winetricks pozwalając na wysyłanie statystyk przez program? Możesz wyłączyć tą opcję w każdej chwili z użyciem komendy 'winetricks --optout'." - thanks="Dziękujemy! Nie otrzymasz już tego pytania. Pamiętaj, ze możesz wyłączyć tą opcję komendą 'winetricks --optout'" - declined="OK, Winetricks *nie* będzie wysyłać statystyk. Nie otrzymasz już tego pytania." - ;; - uk*) - title="Допомога в розробці Winetricks" - question="Ви хочете допомогти в розробці Winetricks дозволивши звітувати статистику?\nВи можете в будь-який час вимкнути цю опцію за допомогою команди 'winetricks --optout'" - thanks="Дякуємо! Ви більше не отримуватиме це питання знову. Пам'ятайте, що ви можете будь-коли вимкнути звітність за допомогою команди 'winetricks --optout'" - declined="Надсилання звітності Winetricks вимкнено. Ви більше не отримуватиме це питання знову." - ;; - *) - title="One-time question about helping Winetricks development" - question="Would you like to help winetricks development by letting winetricks report statistics? You can turn reporting off at any time with the command 'winetricks --optout'" - thanks="Thanks! You won't be asked this question again. Remember, you can turn reporting off at any time with the command 'winetricks --optout'" - declined="OK, winetricks will *not* report statistics. You won't be asked this question again." - ;; - esac - if $WINETRICKS_GUI --question --text "$question" --title "$title"; then - $WINETRICKS_GUI --info --text "$thanks" - WINETRICKS_STATS_REPORT=1 - else - $WINETRICKS_GUI --info --text "$declined" - WINETRICKS_STATS_REPORT=0 - fi - echo $WINETRICKS_STATS_REPORT > "$W_CACHE"/track_usage - ;; esac fi winetricks_stats_save @@ -18702,11 +18891,10 @@ winetricks_stats_init() winetricks_os_description() { ( - case "$W_PLATFORM" in - windows_cmd) - echo windows ;; - *) echo "$WINETRICKS_WINE_VERSION" ;; - esac + case "$W_PLATFORM" in + windows_cmd) echo "windows" ;; + *) echo "$WINETRICKS_WINE_VERSION" ;; + esac ) | tr '\012' ' ' } @@ -18716,9 +18904,10 @@ winetricks_stats_report() # If user has opted in to usage tracking, report what he used (if anything) case "$WINETRICKS_STATS_REPORT" in - 1) ;; - *) return;; + 1) ;; + *) return;; esac + test -f "$WINETRICKS_WORKDIR"/breadcrumbs || return WINETRICKS_STATS_BREADCRUMBS=$(tr '\012' ' ' < "$WINETRICKS_WORKDIR"/breadcrumbs) @@ -18761,9 +18950,10 @@ winetricks_stats_log_command() # and for the user's own reference later, when figuring out what he did case "$W_PLATFORM" in - windows_cmd) _W_LOGDIR="$W_WINDIR_UNIX"/Temp ;; - *) _W_LOGDIR="$WINEPREFIX" ;; + windows_cmd) _W_LOGDIR="$W_WINDIR_UNIX"/Temp ;; + *) _W_LOGDIR="$WINEPREFIX" ;; esac + mkdir -p "$_W_LOGDIR" echo "$*" >> "$_W_LOGDIR"/winetricks.log unset _W_LOGDIR @@ -18776,23 +18966,23 @@ winetricks_stats_log_command() winetricks_shell() { ( - w_try_cd "$W_DRIVE_C" - export WINE + w_try_cd "$W_DRIVE_C" + export WINE - case $WINETRICKS_GUI in - none) - $SHELL - ;; - *) - for term in gnome-terminal konsole Terminal xterm - do - if test "$(which $term 2>/dev/null)"; then - $term - break - fi - done - ;; - esac + case $WINETRICKS_GUI in + none) + $SHELL + ;; + *) + for term in gnome-terminal konsole Terminal xterm + do + if test "$(which $term 2>/dev/null)"; then + $term + break + fi + done + ;; + esac ) } @@ -18800,112 +18990,111 @@ winetricks_shell() execute_command() { case "$1" in - *=*) arg=$(echo "$1" | sed 's/.*=//'); cmd=$(echo "$1" | sed 's/=.*//');; - *) cmd="$1"; arg="" ;; + *=*) arg=$(echo "$1" | sed 's/.*=//'); cmd=$(echo "$1" | sed 's/=.*//');; + *) cmd="$1"; arg="" ;; esac case "$1" in + # FIXME: avoid duplicated code + apps|benchmarks|dlls|fonts|games|prefix|settings) + WINETRICKS_CURMENU="$1" + ;; - # FIXME: avoid duplicated code - apps|benchmarks|dlls|fonts|games|prefix|settings) - WINETRICKS_CURMENU="$1" - ;; + # Late options + -*) + if ! winetricks_handle_option "$1"; then + winetricks_usage + exit 1 + fi + ;; - # Late options - -*) - if ! winetricks_handle_option "$1"; then - winetricks_usage - exit 1 - fi - ;; + # Hard-coded verbs + main) WINETRICKS_CURMENU=main ;; + help) w_open_webpage https://github.com/Winetricks/winetricks/wiki ;; + list) winetricks_list_all ;; + list-cached) winetricks_list_cached ;; + list-download) winetricks_list_download ;; + list-manual-download) winetricks_list_manual_download ;; + list-installed) winetricks_list_installed ;; + list-all) + old_menu="$WINETRICKS_CURMENU" + for WINETRICKS_CURMENU in apps benchmarks dlls fonts games prefix settings + do + echo "===== $WINETRICKS_CURMENU =====" + winetricks_list_all + done + WINETRICKS_CURMENU="$old_menu" + ;; + unattended) winetricks_set_unattended 1 ;; + attended) winetricks_set_unattended 0 ;; + showbroken) W_OPT_SHOWBROKEN=1 ;; + hidebroken) W_OPT_SHOWBROKEN=0 ;; + prefix=*) winetricks_set_wineprefix "$arg" ;; + annihilate) winetricks_annihilate_wineprefix ;; + folder) w_open_folder "$WINEPREFIX" ;; + winecfg) "$WINE" winecfg ;; + regedit) "$WINE" regedit ;; + taskmgr) "$WINE" taskmgr & ;; + uninstaller) "$WINE" uninstaller ;; + shell) winetricks_shell ;; - # Hard-coded verbs - main) WINETRICKS_CURMENU=main ;; - help) w_open_webpage https://github.com/Winetricks/winetricks/wiki ;; - list) winetricks_list_all ;; - list-cached) winetricks_list_cached ;; - list-download) winetricks_list_download ;; - list-manual-download) winetricks_list_manual_download ;; - list-installed) winetricks_list_installed ;; - list-all) - old_menu="$WINETRICKS_CURMENU" - for WINETRICKS_CURMENU in apps benchmarks dlls fonts games prefix settings - do - echo "===== $WINETRICKS_CURMENU =====" - winetricks_list_all - done - WINETRICKS_CURMENU="$old_menu" - ;; - unattended) winetricks_set_unattended 1 ;; - attended) winetricks_set_unattended 0 ;; - showbroken) W_OPT_SHOWBROKEN=1 ;; - hidebroken) W_OPT_SHOWBROKEN=0 ;; - prefix=*) winetricks_set_wineprefix "$arg" ;; - annihilate) winetricks_annihilate_wineprefix ;; - folder) w_open_folder "$WINEPREFIX" ;; - winecfg) "$WINE" winecfg ;; - regedit) "$WINE" regedit ;; - taskmgr) "$WINE" taskmgr & ;; - uninstaller) "$WINE" uninstaller ;; - shell) winetricks_shell ;; + # These have to come before *=disabled to avoid looking like DLLs + fontsmooth=disable*) w_call fontsmooth=disable ;; + glsl=disable*) w_call glsl=disabled ;; + multisampling=disable*) w_call multisampling=disabled ;; + mwo=disable*) w_call mwo=disable ;; # FIXME: relax matching so we can handle these spelling differences in verb instead of here + rtlm=disable*) w_call rtlm=disabled ;; + sound=disable*) w_call sound=disabled ;; + ao=disable*) w_call ao=disabled ;; + strictdrawordering=disable*) w_call strictdrawordering=disabled ;; - # These have to come before *=disabled to avoid looking like DLLs - fontsmooth=disable*) w_call fontsmooth=disable ;; - glsl=disable*) w_call glsl=disabled ;; - multisampling=disable*) w_call multisampling=disabled ;; - mwo=disable*) w_call mwo=disable ;; # FIXME: relax matching so we can handle these spelling differences in verb instead of here - rtlm=disable*) w_call rtlm=disabled ;; - sound=disable*) w_call sound=disabled ;; - ao=disable*) w_call ao=disabled ;; - strictdrawordering=disable*) w_call strictdrawordering=disabled ;; + # Use winecfg if you want a GUI for plain old DLL overrides + alldlls=*) w_call "$1" ;; + *=native) w_do_call native "$cmd";; + *=builtin) w_do_call builtin "$cmd";; + *=default) w_do_call default "$cmd";; + *=disabled) w_do_call disabled "$cmd";; + vd=*) w_do_call "$cmd";; - # Use winecfg if you want a GUI for plain old DLL overrides - alldlls=*) w_call "$1" ;; - *=native) w_do_call native "$cmd";; - *=builtin) w_do_call builtin "$cmd";; - *=default) w_do_call default "$cmd";; - *=disabled) w_do_call disabled "$cmd";; - vd=*) w_do_call "$cmd";; + # Hacks for backwards compatibility + # 2017/03/22: add deprecation notices + cc580) w_warn "Calling cc580 is deprecated, please use comctl32 instead" ; w_call comctl32 ;; + comdlg32.ocx) w_warn "Calling comdlg32.ocx is deprecated, please use comdlg32ocx instead" ; w_call comdlg32ocx ;; + dotnet1) w_warn "Calling dotnet1 is deprecated, please use dotnet11 instead" ; w_call dotnet11 ;; + dotnet2) w_warn "Calling dotnet2 is deprecated, please use dotnet20 instead" ; w_call dotnet20 ;; + flash11) w_warn "Calling flash11 is deprecated, please use flash instead" ; w_call flash ;; + # art2kmin also comes with fm20.dll + fm20) w_warn "Calling fm20 is deprecated, please use controlpad instead" ; w_call controlpad ;; + fontsmooth-bgr) w_warn "Calling fontsmooth-bgr is deprecated, please use fontsmooth=bgr instead" ; w_call fontsmooth=bgr ;; + fontsmooth-disable) w_warn "Calling fontsmooth-disable is deprecated, please use fontsmooth=disable instead" ; w_call fontsmooth=disable ;; + fontsmooth-gray) w_warn "Calling fontsmooth-gray is deprecated, please use fontsmooth=gray instead" ; w_call fontsmooth=gray ;; + fontsmooth-rgb) w_warn "Calling fontsmooth-rgb is deprecated, please use fontsmooth=rgb instead" ; w_call fontsmooth=rgb ;; + glsl-disable) w_warn "Calling glsl-disable is deprecated, please use glsl=disabled instead" ; w_call glsl=disabled ;; + glsl-enable) w_warn "Calling glsl-enable is deprecated, please use glsl=enabled instead" ; w_call glsl=enabled ;; + ie6_full) w_warn "Calling ie6_full is deprecated, please use ie6 instead" ; w_call ie6 ;; + # FIXME: use wsh57 instead? + jscript) w_warn "Calling jscript is deprecated, please use wsh56js instead" ; w_call wsh56js ;; + npm-repack) w_warn "Calling npm-repack is deprecated, please use npm=repack instead" ; w_call npm=repack ;; + oss) w_warn "Calling oss is deprecated, please use sound=oss instead" ; w_call sound=oss ;; + python) w_warn "Calling python is deprecated, please use python26 instead" ; w_call python26 ;; + vbrun60) w_warn "Calling vbrun60 is deprecated, please use vb6run instead" ; w_call vb6run ;; + vcrun2005sp1) w_warn "Calling vcrun2005sp1 is deprecated, please use vcrun2005 instead" ; w_call vcrun2005 ;; + vcrun2008sp1) w_warn "Calling vcrun2008sp1 is deprecated, please use vcrun2008 instead" ; w_call vcrun2008 ;; + wsh56|wsh56jb|wsh56vb) w_warn "Calling wsh56 is deprecated, please use wsh57 instead" ; w_call wsh57 ;; + # See https://github.com/Winetricks/winetricks/issues/747 + xact_jun2010) w_warn "Calling xact_jun2010 is deprecated, please use xact instead" ; w_call xact ;; + xlive) w_warn "Calling xlive is deprecated, please use gfw instead" ; w_call gfw ;; - # Hacks for backwards compatibility - # 2017/03/22: add deprecation notices - cc580) w_warn "Calling cc580 is deprecated, please use comctl32 instead" ; w_call comctl32 ;; - comdlg32.ocx) w_warn "Calling comdlg32.ocx is deprecated, please use comdlg32ocx instead" ; w_call comdlg32ocx ;; - dotnet1) w_warn "Calling dotnet1 is deprecated, please use dotnet11 instead" ; w_call dotnet11 ;; - dotnet2) w_warn "Calling dotnet2 is deprecated, please use dotnet20 instead" ; w_call dotnet20 ;; - flash11) w_warn "Calling flash11 is deprecated, please use flash instead" ; w_call flash ;; - # art2kmin also comes with fm20.dll - fm20) w_warn "Calling fm20 is deprecated, please use controlpad instead" ; w_call controlpad ;; - fontsmooth-bgr) w_warn "Calling fontsmooth-bgr is deprecated, please use fontsmooth=bgr instead" ; w_call fontsmooth=bgr ;; - fontsmooth-disable) w_warn "Calling fontsmooth-disable is deprecated, please use fontsmooth=disable instead" ; w_call fontsmooth=disable ;; - fontsmooth-gray) w_warn "Calling fontsmooth-gray is deprecated, please use fontsmooth=gray instead" ; w_call fontsmooth=gray ;; - fontsmooth-rgb) w_warn "Calling fontsmooth-rgb is deprecated, please use fontsmooth=rgb instead" ; w_call fontsmooth=rgb ;; - glsl-disable) w_warn "Calling glsl-disable is deprecated, please use glsl=disabled instead" ; w_call glsl=disabled ;; - glsl-enable) w_warn "Calling glsl-enable is deprecated, please use glsl=enabled instead" ; w_call glsl=enabled ;; - ie6_full) w_warn "Calling ie6_full is deprecated, please use ie6 instead" ; w_call ie6 ;; - # FIXME: use wsh57 instead? - jscript) w_warn "Calling jscript is deprecated, please use wsh56js instead" ; w_call wsh56js ;; - npm-repack) w_warn "Calling npm-repack is deprecated, please use npm=repack instead" ; w_call npm=repack ;; - oss) w_warn "Calling oss is deprecated, please use sound=oss instead" ; w_call sound=oss ;; - python) w_warn "Calling python is deprecated, please use python26 instead" ; w_call python26 ;; - vbrun60) w_warn "Calling vbrun60 is deprecated, please use vb6run instead" ; w_call vb6run ;; - vcrun2005sp1) w_warn "Calling vcrun2005sp1 is deprecated, please use vcrun2005 instead" ; w_call vcrun2005 ;; - vcrun2008sp1) w_warn "Calling vcrun2008sp1 is deprecated, please use vcrun2008 instead" ; w_call vcrun2008 ;; - wsh56|wsh56jb|wsh56vb) w_warn "Calling wsh56 is deprecated, please use wsh57 instead" ; w_call wsh57 ;; - # See https://github.com/Winetricks/winetricks/issues/747 - xact_jun2010) w_warn "Calling xact_jun2010 is deprecated, please use xact instead" ; w_call xact ;; - xlive) w_warn "Calling xlive is deprecated, please use gfw instead" ; w_call gfw ;; - - # Normal verbs, with metadata and load_ functions - *) - if winetricks_metadata_exists "$1"; then - w_call "$1" - else - echo "Unknown arg $1" - winetricks_usage - exit 1 - fi - ;; + # Normal verbs, with metadata and load_ functions + *) + if winetricks_metadata_exists "$1"; then + w_call "$1" + else + echo "Unknown arg $1" + winetricks_usage + exit 1 + fi + ;; esac } @@ -18922,106 +19111,106 @@ then fi case "$1" in - die) w_die "we who are about to die salute you." ;; - volnameof=*) - # Debug code. Remove later? - # Since Linux's volname command can't handle DVDs, winetricks has its own, - # implemented using dd, old gum, and some string I had laying around. - # You can try it like this: - # winetricks volnameof=/dev/sr0 - # or - # winetricks volnameof=foo.iso - # This will read the volname from the given image and put it to stdout. - winetricks_volname "${1#volnameof=}" - ;; - "") - if test x"$DISPLAY" = x""; then - echo "DISPLAY not set, not defaulting to gui" - winetricks_usage - exit 0 - fi - # GUI case - # No non-option arguments given, so read them from GUI, and loop until user quits - winetricks_detect_gui - winetricks_detect_sudo - while true - do - case $WINETRICKS_CURMENU in - main) verbs=$(winetricks_mainmenu) ;; - prefix) - verbs=$(winetricks_prefixmenu); - # Cheezy hack: choosing 'attended' or 'unattended' leaves you in same menu - case "$verbs" in - attended) winetricks_set_unattended 0 ; continue;; - unattended) winetricks_set_unattended 1 ; continue;; - esac - ;; - settings) verbs=$(winetricks_settings_menu) ;; - *) verbs="$(winetricks_showmenu)" ;; - esac - - if test "$verbs" = ""; then - # "user didn't pick anything, back up a level in the menu" - case "${WINETRICKS_CURMENU}-${WINETRICKS_OPT_SHAREDPREFIX}" in - apps-0|benchmarks-0|games-0|main-*) WINETRICKS_CURMENU=prefix ;; - prefix-*) break ;; - *) WINETRICKS_CURMENU=main ;; - esac - elif echo "$WINETRICKS_CATEGORIES" | grep -w "$verbs" > /dev/null; then - WINETRICKS_CURMENU=$verbs - else - winetricks_stats_init - # Otherwise user picked one or more real verbs. - case "$verbs" in - prefix=*) - # prefix menu is special, it only returns one verb, and the - # verb can contain spaces - execute_command "$verbs" - # after picking a prefix, want to land in main. - WINETRICKS_CURMENU=main ;; - *) - for verb in $verbs - do - execute_command "$verb" - done - case "${WINETRICKS_CURMENU}-${WINETRICKS_OPT_SHAREDPREFIX}" in - prefix-*|apps-0|benchmarks-0|games-0) - # After installing isolated app, return to prefix picker - WINETRICKS_CURMENU=prefix - ;; - *) - # Otherwise go to main menu. - WINETRICKS_CURMENU=main - ;; - esac - ;; - esac + die) w_die "we who are about to die salute you." ;; + volnameof=*) + # Debug code. Remove later? + # Since Linux's volname command can't handle DVDs, winetricks has its own, + # implemented using dd, old gum, and some string I had laying around. + # You can try it like this: + # winetricks volnameof=/dev/sr0 + # or + # winetricks volnameof=foo.iso + # This will read the volname from the given image and put it to stdout. + winetricks_volname "${1#volnameof=}" + ;; + "") + if test x"$DISPLAY" = x""; then + echo "DISPLAY not set, not defaulting to gui" + winetricks_usage + exit 0 fi - done - ;; - *) - winetricks_stats_init - # Command-line case - winetricks_detect_sudo - # User gave command-line arguments, so just run those verbs and exit - for verb - do - case $verb in - *.verb) - # Load the verb file - # shellcheck disable=SC1090 - case $verb in - */*) . "$verb" ;; - *) . ./"$verb" ;; + # GUI case + # No non-option arguments given, so read them from GUI, and loop until user quits + winetricks_detect_gui + winetricks_detect_sudo + while true + do + case $WINETRICKS_CURMENU in + main) verbs=$(winetricks_mainmenu) ;; + prefix) + verbs=$(winetricks_prefixmenu); + # Cheezy hack: choosing 'attended' or 'unattended' leaves you in same menu + case "$verbs" in + attended) winetricks_set_unattended 0 ; continue;; + unattended) winetricks_set_unattended 1 ; continue;; + esac + ;; + settings) verbs=$(winetricks_settings_menu) ;; + *) verbs="$(winetricks_showmenu)" ;; esac - # And forget that the verb comes from a file - verb="$(echo "$verb" | sed 's,.*/,,;s,.verb,,')" - ;; - esac - execute_command "$verb" - done - ;; + if test "$verbs" = ""; then + # "user didn't pick anything, back up a level in the menu" + case "${WINETRICKS_CURMENU}-${WINETRICKS_OPT_SHAREDPREFIX}" in + apps-0|benchmarks-0|games-0|main-*) WINETRICKS_CURMENU=prefix ;; + prefix-*) break ;; + *) WINETRICKS_CURMENU=main ;; + esac + elif echo "$WINETRICKS_CATEGORIES" | grep -w "$verbs" > /dev/null; then + WINETRICKS_CURMENU=$verbs + else + winetricks_stats_init + # Otherwise user picked one or more real verbs. + case "$verbs" in + prefix=*) + # prefix menu is special, it only returns one verb, and the + # verb can contain spaces + execute_command "$verbs" + # after picking a prefix, want to land in main. + WINETRICKS_CURMENU=main ;; + *) + for verb in $verbs + do + execute_command "$verb" + done + + case "${WINETRICKS_CURMENU}-${WINETRICKS_OPT_SHAREDPREFIX}" in + prefix-*|apps-0|benchmarks-0|games-0) + # After installing isolated app, return to prefix picker + WINETRICKS_CURMENU=prefix + ;; + *) + # Otherwise go to main menu. + WINETRICKS_CURMENU=main + ;; + esac + ;; + esac + fi + done + ;; + *) + winetricks_stats_init + # Command-line case + winetricks_detect_sudo + # User gave command-line arguments, so just run those verbs and exit + for verb; do + case $verb in + *.verb) + # Load the verb file + # shellcheck disable=SC1090 + case $verb in + */*) . "$verb" ;; + *) . ./"$verb" ;; + esac + + # And forget that the verb comes from a file + verb="$(echo "$verb" | sed 's,.*/,,;s,.verb,,')" + ;; + esac + execute_command "$verb" + done + ;; esac winetricks_stats_report