[PC-BSD Commits] r13495 - in pbi/modules/emulators/wine64: . resources/bin scripts

svn at pcbsd.org svn at pcbsd.org
Mon Oct 24 11:47:30 PDT 2011


Author: kris
Date: 2011-10-24 11:47:29 -0700 (Mon, 24 Oct 2011)
New Revision: 13495

Added:
   pbi/modules/emulators/wine64/resources/bin/wine64-nvidiasetup
Modified:
   pbi/modules/emulators/wine64/external-links
   pbi/modules/emulators/wine64/scripts/post-install.sh
Log:

Further improve wine64, user is now able to re-run "wine64-nvidiasetup" if
they change driver versions on the amd64 host




Modified: pbi/modules/emulators/wine64/external-links
===================================================================
--- pbi/modules/emulators/wine64/external-links	2011-10-24 15:41:16 UTC (rev 13494)
+++ pbi/modules/emulators/wine64/external-links	2011-10-24 18:47:29 UTC (rev 13495)
@@ -9,3 +9,4 @@
 #bin/appfoo             bin/appfoo              binary,nocrash
 #bin/appfoo2            bin/appfoo-test         binary
 bin/msiexec.sh          bin/msiexec.sh          binary,nocrash
+bin/wine64-nvidiasetup  bin/wine64-nvidiasetup  binary,nocrash


Property changes on: pbi/modules/emulators/wine64/resources/bin/wine64-nvidiasetup
___________________________________________________________________
Added: svn:executable
   + *

Modified: pbi/modules/emulators/wine64/scripts/post-install.sh
===================================================================
--- pbi/modules/emulators/wine64/scripts/post-install.sh	2011-10-24 15:41:16 UTC (rev 13494)
+++ pbi/modules/emulators/wine64/scripts/post-install.sh	2011-10-24 18:47:29 UTC (rev 13495)
@@ -1,145 +1,5 @@
 #!/bin/sh
-# Copyright 2010 David Naylor <naylor.b.david at gmail.com>. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-#   1. Redistributions of source code must retain the above copyright notice,
-#      this list of conditions and the following disclaimer.
-#
-#   2. Redistributions in binary form must reproduce the above copyright notice,
-#      this list of conditions and the following disclaimer in the documentation
-#      and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY David Naylor ``AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL David Naylor OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# The views and conclusions contained in the software and documentation are
-# those of the authors and should not be interpreted as representing official
-# policies, either expressed or implied, of David Naylor.
-
-# Version 1.0 - 2010/05/28
-#  - initial release
-# Version 1.1 - 2010/10/04
-#  - add support for 256 driver series
-#  - use passive connections for FTP
-#  - allow resuming of downloads if they were interrupted
-#  - add license and copyright notice
-# Version 1.2 - 2010/10/17
-#  - try to save the NVIDIA tarball under $PORTSDIR/distfiles
-#  - obay $PREFIX
-#  - extract files directly to destination (avoids using /tmp)
-# Version 1.3 - 2010/11/02
-#  - add support for future driver series
-# Version 1.4 - 2011/05/23
-#  - add support for legacy drivers
-# Version 1.5 - 2011/10/19
-#  - Modify to work with pbi of wine64
-
-set -e
-
-PORTSDIR=${PORTSDIR:-/usr/ports}
 PREFIX=/usr/pbi/wine64-i386
 
-if [ -d $PORTSDIR/distfiles ]
-then
-  cd $PORTSDIR/distfiles
-  NO_REMOVE_NVIDIA="yes"
-else
-  cd /tmp/
-fi
-
-terminate() {
-
-  echo "!!! $2 !!!"
-  echo "Terminating..."
-  exit $1
-
-}
-
-# See if we have any proxy support setup
-PBI_ETCCONF="/usr/local/etc/pbi.conf"
-PCBSD_ETCCONF="/usr/local/etc/pcbsd.conf"
-if [ -z "$PBI_PROXYURL" -a -e "${PBI_ETCCONF}" ] ; then
-	PBI_PROXYURL="`cat ${PBI_ETCCONF} | grep 'PBI_PROXYURL: ' | sed 's|PBI_PROXYURL: ||g'`"
-	PBI_PROXYPORT="`cat ${PBI_ETCCONF} | grep 'PBI_PROXYPORT: ' | sed 's|PBI_PROXYPORT: ||g'`"
-	PBI_PROXYTYPE="`cat ${PBI_ETCCONF} | grep 'PBI_PROXYTYPE: ' | sed 's|PBI_PROXYTYPE: ||g'`"
-	PBI_PROXYUSER="`cat ${PBI_ETCCONF} | grep 'PBI_PROXYUSER: ' | sed 's|PBI_PROXYUSER: ||g'`"
-	PBI_PROXYPASS="`cat ${PBI_ETCCONF} | grep 'PBI_PROXYPASS: ' | sed 's|PBI_PROXYPASS: ||g'`"
-fi
-
-# If empty proxy config, check if configured for master pcbsd.conf file
-if [ -z "$PBI_PROXYURL" -a -e "${PCBSD_ETCCONF}" ] ; then
-	PBI_PROXYURL="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYURL: ' | sed 's|PCBSD_PROXYURL: ||g'`"
-	PBI_PROXYPORT="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYPORT: ' | sed 's|PCBSD_PROXYPORT: ||g'`"
-	PBI_PROXYTYPE="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYTYPE: ' | sed 's|PCBSD_PROXYTYPE: ||g'`"
-	PBI_PROXYUSER="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYUSER: ' | sed 's|PCBSD_PROXYUSER: ||g'`"
-	PBI_PROXYPASS="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_PROXYPASS: ' | sed 's|PCBSD_PROXYPASS: ||g'`"
-fi
-
-
-# Create the PROXY variables based upon proxy information supplied
-if [ ! -z "$PBI_PROXYURL" ] ; then
-	if [ ! -z "$PBI_PROXYPORT" ] ; then
-		HTTP_PROXY="${PBI_PROXYURL}:${PBI_PROXYPORT}"
-		export HTTP_PROXY
-	else
-		HTTP_PROXY="${PBI_PROXYURL}"
-		export HTTP_PROXY
-	fi
-	if [ ! -z "$PBI_PROXYUSER" ] ; then
-		if [ ! -z "$PBI_PROXYPASS" ] ; then
-			HTTP_PROXY_AUTH="basic:*:${PBI_PROXYUSER}:${PBI_PROXYPASS}"
-			export HTTP_PROXY_AUTH
-		fi
-	fi
-fi
-
-echo "===> Patching wine64 to work with x11/nvidia-driver:"
-
-NV=`pkg_info -E nvidia-driver-'*' | cut -f 3 -d -` \
-  || terminate 0 "No nvidia-driver installed, using default Xorg GL..."
-echo "=> Detected nvidia-driver: ${NV}"
-
-NVIDIA=${NV}
-NV=`echo ${NV} | cut -f 1 -d _ | cut -f 1 -d ,`
-
-if [ ! -f NVIDIA-FreeBSD-x86-${NV}.tar.gz ]
-then
-  echo "=> Downloading NVIDIA-FreeBSD-x86-${NV}.tar.gz from ftp://download.nvidia.com..."
-  fetch -pRr ftp://download.nvidia.com/XFree86/FreeBSD-x86/${NV}/NVIDIA-FreeBSD-x86-${NV}.tar.gz \
-    || terminate 2 "Failed to download NVIDIA-FreeBSD-x86-${NV}.tar.gz"
-fi
-
-echo "=> Extracting NVIDIA-FreeBSD-x86-${NV}.tar.gz to $PREFIX/lib..."
-EXTRACT_LIST="libGL.so.1"
-case $NV in
-  195*|173*|96*|71*)
-    EXTRACT_LIST="$EXTRACT_LIST libGLcore.so.1 libnvidia-tls.so.1"
-    ;;
-  *)
-    EXTRACT_LIST="$EXTRACT_LIST libnvidia-glcore.so.1 libnvidia-tls.so.1"
-    ;;
-esac
-
-EXTRACT_ARGS="--strip-components 2 -C $PREFIX/lib"
-for i in $EXTRACT_LIST
-do
-  EXTRACT_ARGS="$EXTRACT_ARGS --include NVIDIA-FreeBSD-x86-${NV}/obj/$i"
-done
-tar $EXTRACT_ARGS -xvf NVIDIA-FreeBSD-x86-${NV}.tar.gz \
-  || terminate 3 "Failed to extract NVIDIA-FreeBSD-x86-${NV}.tar.gz"
-
-echo "=> Cleaning up..."
-[ -n "$NO_REMOVE_NVIDIA" ] || rm -vf NVIDIA-FreeBSD-x86-${NV}.tar.gz \
-  || terminate 6 "Failed to remove files"
-
-echo "===> wine64 successfully patched for nvidia-driver-${NVIDIA}"
+# Run the nvidia setup / detection script
+sh ${PREFIX}/bin/wine64-nvidiasetup



More information about the Commits mailing list