- Updated to 2.0-rc2 development snapshot

- Bug fixes only, we are in code freeze.
- updated winetricks

OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=389
This commit is contained in:
2016-12-17 04:26:51 +00:00
committed by Git OBS Bridge
parent 7bc6b83f3d
commit c917a7ce86
7 changed files with 102 additions and 64 deletions

View File

@@ -157,6 +157,7 @@ WINETRICKS_VERSION=20161107
XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
W_COUNTRY=""
W_PREFIXES_ROOT="${WINE_PREFIXES:-$XDG_DATA_HOME/wineprefixes}"
# For temp files before $WINEPREFIX is available:
@@ -820,6 +821,8 @@ w_download_to()
esac
# FIXME: move these variables and common download options to a global place that can be shared as
# downloaders may be used outside of w_download_to() (e.g., winetricks_stats_report() and winetricks_dl_url_to_stdout())
# Common values for aria2c/curl/wget
# Connection timeout time (in seconds):
WINETRICKS_DOWNLOADER_TIMEOUT=${WINETRICKS_DOWNLOADER_TIMEOUT:-15}
@@ -831,6 +834,8 @@ w_download_to()
tries=0
while test $tries -lt 2
do
# Warn on a second try
test "$tries" -eq 1 && winetricks_dl_warning
tries=$((tries + 1))
if test -s "$_W_cache/$_W_file"
@@ -2598,6 +2603,7 @@ w_append_path()
_W_NEW_PATH="$(printf %s "$1" | sed 's,\\\\,\\\\\\\\,g')"
_W_WIN_PATH="$(w_expand_env PATH | sed 's,\\\\,\\\\\\\\,g')"
# FIXME: OS X? https://github.com/Winetricks/winetricks/issues/697
sed 's/$/\r/' > "$W_TMP"/path.reg <<_EOF_
REGEDIT4
@@ -2612,6 +2618,64 @@ _EOF_
#---- Private Functions ----
winetricks_dl_url_to_stdout()
{
# FIXME: get common downloader variables supported
# FIXME: --torify support as well
if [ "${WINETRICKS_DOWNLOADER}" = "wget" ] ; then
w_try wget -q -O - "$1"
elif [ "${WINETRICKS_DOWNLOADER}" = "curl" ] ; then
w_try curl -s "$1"
elif [ "${WINETRICKS_DOWNLOADER}" = "aria2c" ] ; then
# aria2c doesn't have support downloading to stdout:
# https://github.com/aria2/aria2/issues/190
# So instead, download to a temporary directory and cat the file:
stdout_tmpfile="${W_TMP_EARLY}/stdout.tmp"
if [ -e "${stdout_tmpfile}" ] ; then
w_try rm "${stdout_tmpfile}"
fi
aria2c \
--continue \
--daemon=false \
--dir="${W_TMP_EARLY}" \
--enable-rpc=false \
--input-file='' \
--max-connection-per-server=5 \
--out="stdout.tmp" \
--save-session='' \
--stream-piece-selector=geom \
"$1" > /dev/null
w_try cat "${stdout_tmpfile}"
w_try rm "${stdout_tmpfile}"
else
w_die "Please install aria2c, curl, or wget"
fi
}
winetricks_dl_warning() {
case $LANG in
ru*) _W_countrymsg="Скрипт определил, что ваш IP адрес принадлежит России. Если во время загрузки файлов вы увидите ошибки несоответствия сертификата, перезапустите скрипт с опцией '--torify' или скачайте файлы вручную, например, используя VPN." ;;
*) _W_countrymsg="Your IP address has been determined to belong to Russia. If you encounter a certificate error while downloading, please relaunch with the '--torify' option, or download files manually, for instance using VPN." ;;
esac
# Lookup own country via IP address only once (i.e. don't run this function for every download invocation)
if [ -z "$W_COUNTRY" ] ; then
W_COUNTRY="$(winetricks_dl_url_to_stdout "http://ipinfo.io/$(winetricks_dl_url_to_stdout "http://ipinfo.io/ip")" | awk -F '"' '/country/{print $4}')"
export W_COUNTRY
if [ -z "$W_COUNTRY" ] ; then
export W_COUNTRY="unknown"
fi
fi
# TODO: Resolve a full country name via https://github.com/umpirsky/country-list/tree/master/data
case "$W_COUNTRY" in
"RU") w_warn "$_W_countrymsg" ;;
*) : ;;
esac
}
winetricks_get_sha1sum_prog() {
# Mac folks tend to not have sha1sum, but we can make do with openssl
if [ -x "$(which sha1sum 2>/dev/null)" ]
@@ -2647,18 +2711,12 @@ winetricks_latest_version_check()
return
fi
latest_file="${W_TMP_EARLY}/LATEST"
latest_version="$(winetricks_dl_url_to_stdout https://raw.githubusercontent.com/Winetricks/winetricks/master/files/LATEST)"
# Obviously, always redownload:
if [ -e "$latest_file" ] ; then
w_try rm "${latest_file}"
fi
# Also check that $latest_version is an actual number in case github is down
if [ ! -z "${latest_version}" ] && [ ! "$WINETRICKS_VERSION" = "${latest_version}" ] && \
echo "${latest_version}" | grep -E "[0-9]{8}" ; then
w_download_to ${W_TMP_EARLY} https://raw.githubusercontent.com/Winetricks/winetricks/master/files/LATEST
latest_version="$(cat "${latest_file}")"
if [ ! "$WINETRICKS_VERSION" = "${latest_version}" ] ; then
if [ -f "${WINETRICKS_CONFIG}/enable-auto-update" ] ; then
w_info "You are running winetricks-${WINETRICKS_VERSION}."
w_info "New upstream release winetricks-${latest_version} is available."
@@ -6970,14 +7028,19 @@ load_dirac()
if ( w_opt_unattended > 0 ) {
ControlClick, Button2
WinWait, Dirac, License
Sleep 1000
ControlClick, Button2
WinWait, Dirac, Location
Sleep 1000
ControlClick, Button2
WinWait, Dirac, Components
Sleep 1000
ControlClick, Button2
WinWait, Dirac, environment
Sleep 1000
ControlCLick, Button1
WinWait, Dirac, installed
Sleep 1000
ControlClick, Button2
}
WinWaitClose
@@ -14946,39 +15009,6 @@ load_gta_vc()
#----------------------------------------------------------------
w_metadata guildwars games \
title="Guild Wars" \
publisher="NCsoft" \
year="2005" \
media="download" \
file1="GwSetup.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Guild Wars/Gw.exe" \
homepage="http://www.guildwars.com"
load_guildwars()
{
w_download "http://guildwars.com/download/" a7c4c8cb3b8cbee20707dcf8176d3da6a1686c05 GwSetup.exe
w_try_cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
Run, GwSetup.exe
WinWait, ahk_class ArenaNet_Dialog_Class
if ( w_opt_unattended > 0 ) {
; Wait for network connection to finish. This might need to be longer. Can we detect this better?
Sleep 6000
; For some reason, the OK doesn't take for me unless I activate the window first
WinActivate
Send {Enter}
; Installation takes a long time... and then starts the game, which we don't want.
}
WinWait, ahk_class ArenaNet_Dx_Window_Class
Sleep 4000
WinClose, ahk_class ArenaNet_Dx_Window_Class
"
}
#----------------------------------------------------------------
w_metadata hegemonygold_demo games \
title="Hegemony Gold" \
publisher="Longbow Games" \
@@ -19212,6 +19242,7 @@ winetricks_stats_report()
report="$(echo "$report" | sed 's/ /%20/g')"
# Just do a HEAD request with the raw command line.
# Yes, this can be fooled by caches. That's ok.
# FIXME: get common downloader variables supported
if [ -x "$(which wget 2>/dev/null)" ]
then
wget --spider "http://kegel.com/data/winetricks-usage?$report" > /dev/null 2>&1 || true