FreeBSD Bugzilla – Attachment 221638 Details for
Bug 252747
games/linux-nwnclient: Replace (fix) movie viewing and more
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to games/linux-nwnclient
games_linux-nwnclient.diff (text/plain), 21.55 KB, created by
Sean Farley
on 2021-01-16 18:20:59 UTC
(
hide
)
Description:
Patch to games/linux-nwnclient
Filename:
MIME Type:
Creator:
Sean Farley
Created:
2021-01-16 18:20:59 UTC
Size:
21.55 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 561604) >+++ Makefile (working copy) >@@ -3,16 +3,13 @@ > > PORTNAME= nwnclient > PORTVERSION= 1.69 >-PORTREVISION= 5 >+PORTREVISION= 6 > CATEGORIES= games linux >-NWN_SITE_1= http://na.llnet.bioware.cdn.ea.com/u/f/eagames/bioware/neverwinternights/updates/linux/ >-NWN_SITE_2= http://lvlt.bioware.cdn.ea.com/bioware/u/f/eagames/bioware/neverwinternights/updates/linux/ > MASTER_SITES= ${NWN_SITE_1}${PORTVERSION:S/.//}/:CLIENT \ > ${NWN_SITE_2}${PORTVERSION:S/.//}/:CLIENT \ > ${NWN_SITE_1}:ORIG,GOLD,HOTU \ > ${NWN_SITE_2}:ORIG,GOLD,HOTU \ >- https://github.com/nwnlinux/nwmovies/raw/master/:NWMOVIES \ >- http://www.radgametools.com/down/Bink/:BINK >+ https://github.com/nwnlinux/nwmovies/raw/master/:NWMOVIES > PKGNAMEPREFIX= linux- > DISTFILES= ${CLIENT_FILES} \ > ${CLIENT_NWMOVIES} >@@ -21,6 +18,11 @@ > MAINTAINER= scf@FreeBSD.org > COMMENT= Neverwinter Nights Linux (x86) Client > >+# NOTE: nwndata is not actually used to fetch anything. Since nwndata >+# determines the version of the client, force it to be installed prior to >+# poudriere performing its placement of DISTFILES into /portdistfiles. >+FETCH_DEPENDS= ${LOCALBASE}/share/nwndata/docs/readme.txt:games/nwndata >+BUILD_DEPENDS= ${LOCALBASE}/share/nwndata/docs/readme.txt:games/nwndata > RUN_DEPENDS= ${LOCALBASE}/share/nwndata/docs/readme.txt:games/nwndata > > NO_BUILD= yes >@@ -27,13 +29,20 @@ > RESTRICTED= Distribution not allowed > USES= linux > USE_LINUX= dri sdl12 xorglibs >-NWNDATADIR= ${LOCALBASE}/share/nwndata >+USE_LDCONFIG= yes > > OPTIONS_DEFINE= NWMOVIES >-NWMOVIES_DESC= Support for movies using BinkPlayer (experimental!) >+NWMOVIES_DESC= In-game support for Bink format movies > > .include <bsd.port.options.mk> > >+NWN_SITE_1= http://na.llnet.bioware.cdn.ea.com/u/f/eagames/bioware/neverwinternights/updates/linux/ >+NWN_SITE_2= http://lvlt.bioware.cdn.ea.com/bioware/u/f/eagames/bioware/neverwinternights/updates/linux/ >+ >+SUB_FILES= nwn >+SUB_LIST= LINUXBASE=${LINUXBASE} NWNCLIENTDIR=${DATADIR} \ >+ NWNDATADIR=${LOCALBASE}/share/nwndata >+ > # Client detection. Currently, detects only original and Diamond editions. > .if exists(${LOCALBASE}/share/nwndata/xp2.key) > CLIENT_FILES= nwclientgold.tar.gz:GOLD \ >@@ -40,11 +49,11 @@ > nwclienthotu.tar.gz:HOTU \ > English_linuxclient169_xp2.tar.gz:CLIENT > .if ${PORT_OPTIONS:MNWMOVIES} >-NWMOVIESFILE= nwmovies-v4-public.20090223.080954.tar.gz >-BINKPLAYERFILE= BinkLinuxPlayer.7z >-CLIENT_NWMOVIES=${NWMOVIESFILE}:NWMOVIES \ >- ${BINKPLAYERFILE}:BINK >-USE_LINUX+= sdlmixer >+NWMOVIESFILES= nwmovies/libdis/libdisasm.so \ >+ nwmovies/nwmovies.so >+CLIENT_NWMOVIES=${NWMOVIESFILES:S/$/:NWMOVIES/} >+RUN_DEPENDS+= mpv:multimedia/mpv >+SUB_FILES+= nwmovies.sh > PLIST_SUB+= NWMOVIES="" > .else > PLIST_SUB+= NWMOVIES="@comment " >@@ -58,17 +67,10 @@ > > do-extract: > ${MKDIR} ${WRKSRC} >-.for _distfile in ${CLIENT_FILES:C/:.*$//g} ${BINKPLAYERFILE} >+.for _distfile in ${CLIENT_FILES:C/:.*$//g} > (cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \ > ${_DISTDIR}/${_distfile} ${EXTRACT_AFTER_ARGS}) > .endfor >-.if defined(BINKPLAYERFILE) >- (cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \ >- ${_DISTDIR}/${NWMOVIESFILE} ${EXTRACT_AFTER_ARGS} \ >- nwmovies/binklib.so nwmovies/libdis/libdisasm.so \ >- nwmovies/nwmovies.so) >- (cd ${WRKSRC} && ${MV} BinkPlayer nwmovies) >-.endif > ${RM} ${WRKSRC}/lib/libSDL* ${WRKSRC}/fixinstall ${WRKSRC}/nwn > if [ -d ${WRKSRC}/SDL-1.2.5 ]; then \ > ${RM} ${WRKSRC}/SDL-1.2.5/*; \ >@@ -76,19 +78,19 @@ > fi > @${FIND} ${WRKSRC} -type f -name ".*" -delete > >-do-configure: >- ${SED} -e 's|%%NWNDATADIR%%|${NWNDATADIR}|' \ >- -e 's|%%NWNCLIENTDIR%%|${DATADIR}|' \ >- <${FILESDIR}/nwn.sh >${WRKDIR}/nwn >- > do-install: > ${MKDIR} ${STAGEDIR}${DATADIR} > (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}) > (cd ${STAGEDIR}${DATADIR} && ${CHMOD} 0755 dmclient nwmain nwserver) >-.if defined(BINKPLAYERFILE) >- (cd ${STAGEDIR}${DATADIR} && ${CHMOD} 0755 nwmovies/BinkPlayer) >- (cd ${STAGEDIR}${DATADIR}/nwmovies && ${LN} -s /compat/linux/usr/lib/libX11.so.6 libX11.so) >- ${INSTALL_SCRIPT} ${FILESDIR}/nwmovies.pl ${STAGEDIR}${DATADIR} >+.if !empty(PORT_OPTIONS:MNWMOVIES) >+ ${MKDIR} ${STAGEDIR}${DATADIR}/nwmovies/libdis >+.for _distfile in ${NWMOVIESFILES} >+ ${INSTALL_DATA} ${_DISTDIR}/${_distfile} \ >+ ${STAGEDIR}${DATADIR}/${_distfile} >+.endfor >+ (cd ${STAGEDIR}${DATADIR}/nwmovies && \ >+ ${LN} -s /compat/linux/usr/lib/libX11.so.6 libX11.so) >+ ${INSTALL_SCRIPT} ${WRKDIR}/nwmovies.sh ${STAGEDIR}${DATADIR} > .endif > ${INSTALL_SCRIPT} ${WRKDIR}/nwn ${STAGEDIR}${PREFIX}/bin/ > >Index: distinfo >=================================================================== >--- distinfo (revision 561604) >+++ distinfo (working copy) >@@ -1,4 +1,4 @@ >-TIMESTAMP = 1510192086 >+TIMESTAMP = 1610685800 > SHA256 (linux-nwnclient/English_linuxclient169_orig.tar.gz) = 50932f9647ea7968dbb8f7ab1fc6478035fff0826379a45762c1de8e46d1d2b0 > SIZE (linux-nwnclient/English_linuxclient169_orig.tar.gz) = 473297170 > SHA256 (linux-nwnclient/English_linuxclient169_xp2.tar.gz) = 09715e2b95c025ef7f00d218deec1b1edce501530d8cba51d61097c69699763f >@@ -9,7 +9,7 @@ > SIZE (linux-nwnclient/nwclientgold.tar.gz) = 7559227 > SHA256 (linux-nwnclient/nwclienthotu.tar.gz) = 0a4ace1aacd69fb166d09bd249ce5ae98dd28f580765f52e0147bb85f7dfcfd7 > SIZE (linux-nwnclient/nwclienthotu.tar.gz) = 39611339 >-SHA256 (linux-nwnclient/nwmovies-v4-public.20090223.080954.tar.gz) = 4ce60791183a0623d09b37c9f00ba42a2f7e7d953eba35b090a96cc891254f14 >-SIZE (linux-nwnclient/nwmovies-v4-public.20090223.080954.tar.gz) = 137697 >-SHA256 (linux-nwnclient/BinkLinuxPlayer.7z) = 055c9cc22acad954962159c1c5963772cb82a3c3b4a024659c20a027cbad24e1 >-SIZE (linux-nwnclient/BinkLinuxPlayer.7z) = 826686 >+SHA256 (linux-nwnclient/nwmovies/libdis/libdisasm.so) = aee223fd7a0a0bce9bf3bba462c926c5bd2d44d5ab8897821dc95f975dbce774 >+SIZE (linux-nwnclient/nwmovies/libdis/libdisasm.so) = 100560 >+SHA256 (linux-nwnclient/nwmovies/nwmovies.so) = 21b3afba081ce28b0c0cd7e7568cb053fd3cd752369cad7ef594c99e72a9c397 >+SIZE (linux-nwnclient/nwmovies/nwmovies.so) = 121744 >Index: files/nwmovies.pl >=================================================================== >--- files/nwmovies.pl (revision 561604) >+++ files/nwmovies.pl (nonexistent) >@@ -1,76 +0,0 @@ >-#!/bin/sh >-# >-# $FreeBSD$ >-# >- >-# There is a Perl script that accompanies the NWMovies distfile, however, it >-# would require Linux Perl to be installed when a simple shell script will >-# suffice. Since the name of the Perl script is hardcoded into the binary, this >-# file has a .pl extension even though it is Bourne shell. >- >-# Initialization. >-NWNUSERDIR="${HOME}/.nwn" >-NWNSKIPFILE=${NWNUSERDIR}/nwmovies.skip >-NWNMOVIEDIR=${NWNUSERDIR}/movies >-NWNMOVIES=${NWNUSERDIR}/nwmovies >-NWNINI=${NWNUSERDIR}/nwn.ini >- >-# Print arguments in lowercase >-tolower() { >- set -e >- echo "$@" | tr '[:upper:]' '[:lower:]' >-} >- >-# Determine case-insensitive movie name to play prior to setting LD_PRELOAD. >-reqmovie="$(tolower ${NWNMOVIEDIR}/${1}).bik" >-for m in ${NWNMOVIEDIR}/* >-do >- if [ ${reqmovie} = $(tolower ${m}) ] >- then >- movie="${m}" >- break >- fi >-done >-if [ -z "${movie}" ] >-then >- echo "${reqmovie} not found" >- exit 1 >-fi >- >-# Skip movies request by user. >-if [ -e ${NWNSKIPFILE} ] >-then >- reqmovie="$(tolower ${1})" >- for m in `cat ${NWNSKIPFILE}` >- do >- if [ ${reqmovie} = $(tolower ${m}) ] >- then >- echo "Skipping ${1} as requested" >- exit 0 >- fi >- done >-fi >- >-# Prevent core files from BinkPlayer. >-ulimit -c 0 >- >-# Configure movie display (default to 800x600 if not in .ini file). >-BINK_WIDTH=`grep -i width ${NWNINI} | cut -f 2 -d '='` 2> /dev/null >-export BINK_WIDTH=${BINK_WIDTH:-800} >-BINK_HEIGHT=`grep -i height ${NWNINI} | cut -f 2 -d '='` 2> /dev/null >-export BINK_HEIGHT=${BINK_HEIGHT:-600} >-export BINK_FULLSCREEN=1 >- >-# Silence warnings from SDL. >-export SDL_AUDIODRIVER=${SDL_AUDIODRIVER:-"dsp"} >- >-# Configure for needed libraries (some are only needed if running standalone). >-if [ ! -e ${NWNMOVIES}/libX11.so ] >-then >- ln -sf /compat/linux/usr/lib/libX11.so.6 ${NWNMOVIES}/libX11.so >-fi >-export LD_LIBRARY_PATH=${NWNUSERDIR}/nwmovies:${LD_LIBRARY_PATH} >-export LD_PRELOAD=./nwmovies/binklib.so >- >-# Play movie. >-./nwmovies/BinkPlayer ${movie} > >Property changes on: files/nwmovies.pl >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:keywords >## -1 +0,0 ## >-FreeBSD=%H >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/nwmovies.sh.in >=================================================================== >--- files/nwmovies.sh.in (revision 561604) >+++ files/nwmovies.sh.in (working copy) >@@ -3,74 +3,17 @@ > # $FreeBSD$ > # > >-# There is a Perl script that accompanies the NWMovies distfile, however, it >-# would require Linux Perl to be installed when a simple shell script will >-# suffice. Since the name of the Perl script is hardcoded into the binary, this >-# file has a .pl extension even though it is Bourne shell. >- >-# Initialization. >-NWNUSERDIR="${HOME}/.nwn" >-NWNSKIPFILE=${NWNUSERDIR}/nwmovies.skip >-NWNMOVIEDIR=${NWNUSERDIR}/movies >-NWNMOVIES=${NWNUSERDIR}/nwmovies >-NWNINI=${NWNUSERDIR}/nwn.ini >- >-# Print arguments in lowercase >-tolower() { >- set -e >- echo "$@" | tr '[:upper:]' '[:lower:]' >-} >- >-# Determine case-insensitive movie name to play prior to setting LD_PRELOAD. >-reqmovie="$(tolower ${NWNMOVIEDIR}/${1}).bik" >-for m in ${NWNMOVIEDIR}/* >-do >- if [ ${reqmovie} = $(tolower ${m}) ] >- then >- movie="${m}" >- break >- fi >-done >-if [ -z "${movie}" ] >-then >- echo "${reqmovie} not found" >- exit 1 >-fi >- >-# Skip movies request by user. >-if [ -e ${NWNSKIPFILE} ] >-then >- reqmovie="$(tolower ${1})" >- for m in `cat ${NWNSKIPFILE}` >- do >- if [ ${reqmovie} = $(tolower ${m}) ] >- then >- echo "Skipping ${1} as requested" >- exit 0 >- fi >- done >-fi >- >-# Prevent core files from BinkPlayer. >+# Prevent saving core files. > ulimit -c 0 > >-# Configure movie display (default to 800x600 if not in .ini file). >-BINK_WIDTH=`grep -i width ${NWNINI} | cut -f 2 -d '='` 2> /dev/null >-export BINK_WIDTH=${BINK_WIDTH:-800} >-BINK_HEIGHT=`grep -i height ${NWNINI} | cut -f 2 -d '='` 2> /dev/null >-export BINK_HEIGHT=${BINK_HEIGHT:-600} >-export BINK_FULLSCREEN=1 >+# Run FreeBSD movie player binary without Linux libraries. >+unset LD_PRELOAD >+unset LD_LIBRARY_PATH > >-# Silence warnings from SDL. >-export SDL_AUDIODRIVER=${SDL_AUDIODRIVER:-"dsp"} >- >-# Configure for needed libraries (some are only needed if running standalone). >-if [ ! -e ${NWNMOVIES}/libX11.so ] >-then >- ln -sf /compat/linux/usr/lib/libX11.so.6 ${NWNMOVIES}/libX11.so >-fi >-export LD_LIBRARY_PATH=${NWNUSERDIR}/nwmovies:${LD_LIBRARY_PATH} >-export LD_PRELOAD=./nwmovies/binklib.so >- >-# Play movie. >-./nwmovies/BinkPlayer ${movie} >+# Play movie using the installed mpv with default options but allow them to be >+# changed if needed. >+player=${NWN_PLAYER:-%%PREFIX%%/bin/mpv} >+player_opts=${NWN_PLAYER_OPTS:-"--ontop --fullscreen --keep-open=no \ >+ --no-terminal --no-config --no-input-cursor --hr-seek=yes \ >+ --no-border --no-osc --osd-level=0"} >+${player} ${player_opts} "${HOME}/.nwn/${1}" >Index: files/nwn.in >=================================================================== >--- files/nwn.in (revision 561604) >+++ files/nwn.in (working copy) >@@ -3,11 +3,11 @@ > # $FreeBSD$ > # > >-NWNDATADIR="%%NWNDATADIR%%" >-NWNCLIENTDIR="%%NWNCLIENTDIR%%" >-NWNUSERDIR="${HOME}/.nwn" >-NWNMOVIEDIR="${NWNUSERDIR}/nwmovies" >-LCDIRS="ambient data dmvault hak localvault music override portraits" >+nwn_datadir="%%NWNDATADIR%%" >+nwn_clientdir="%%NWNCLIENTDIR%%" >+nwn_userdir=${NWN_USERDIR:-"${HOME}/.nwn"} >+nwn_moviedir="${nwn_userdir}/nwmovies" >+lc_dirs="ambient data dmvault hak localvault music override portraits" > > set -e > >@@ -30,17 +30,17 @@ > set -e > cd "$1" > find . -type d | cut -c 3- | while read dir ; do >- [ -d "${NWNUSERDIR}/${dir}" ] || >- mkdir "${NWNUSERDIR}/${dir}" >+ [ -d "${nwn_userdir}/${dir}" ] || >+ mkdir "${nwn_userdir}/${dir}" > done > find . -type l | cut -c 3- | while read file ; do >- [ -L "${NWNUSERDIR}/${file}" ] || >- cp -R "${file}" "${NWNUSERDIR}/${file}" >+ [ -L "${nwn_userdir}/${file}" ] || >+ cp -R "${file}" "${nwn_userdir}/${file}" > done > find . -type f | cut -c 3- | while read file ; do >- [ -e "${NWNUSERDIR}/${file}" -o \ >- -e "$(tolower ${NWNUSERDIR}/${file})" ] || >- ln -s "${1}/${file}" "${NWNUSERDIR}/${file}" >+ [ -e "${nwn_userdir}/${file}" -o \ >+ -e "$(tolower ${nwn_userdir}/${file})" ] || >+ ln -s "${1}/${file}" "${nwn_userdir}/${file}" > done > } > >@@ -47,29 +47,29 @@ > # Create user directory. Will also update a user directory if anything is > # different due to running NWN with different versions of the game. > rebuilduserdir() { >- # Copy ${NWNCLIENTDIR} first since it may contain files which >- # override parts of ${NWNDATADIR} >- copydir "${NWNCLIENTDIR}" >- copydir "${NWNDATADIR}" >+ # Copy ${nwn_clientdir} first since it may contain files which >+ # override parts of ${nwn_datadir} >+ copydir "${nwn_clientdir}" >+ copydir "${nwn_datadir}" > > # Some files need to have their names converted to lowercase. Create > # the directories if missing due to differences between versions of NWN. >- cd "${NWNUSERDIR}" >- mkdir -p ${LCDIRS} >- lowerdir ${LCDIRS} >+ cd "${nwn_userdir}" >+ mkdir -p ${lc_dirs} >+ lowerdir ${lc_dirs} > } > >-if [ ! -d "${NWNUSERDIR}" ] ; then >+if [ ! -d "${nwn_userdir}" ] ; then > echo "Creating user directory" >- mkdir "${NWNUSERDIR}" >+ mkdir "${nwn_userdir}" > > # Copy the ini file so the user can tweak it >- cp "${NWNCLIENTDIR}/nwn.ini" "${NWNUSERDIR}" >+ cp "${nwn_clientdir}/nwn.ini" "${nwn_userdir}" > > # Create a non-empty CD key file to work around a bug in the > # client: it will ask for the key twice if the file is > # initally empty or missing >- echo '[CDKEY]' >"${NWNUSERDIR}/nwncdkey.ini" >+ echo '[CDKEY]' >"${nwn_userdir}/nwncdkey.ini" > > rebuilduserdir > >@@ -79,22 +79,18 @@ > else > # Remove dead links from different versions (e.g., original versus > # Diamond Edition) of NWN as they could confuse the game. >- find -L ${NWNUSERDIR} -type l -exec rm -- {} + >+ find -L ${nwn_userdir} -type l -exec rm -- {} + > > rebuilduserdir > fi > >-echo "Saved games will be stored in ${NWNUSERDIR}/saves/" >+echo "Saved games will be stored in ${nwn_userdir}/saves/" > >-cd "${NWNUSERDIR}" >+cd "${nwn_userdir}" > > # Remove old movie log file. >-rm -f ${NWNUSERDIR}/nwmovies.log >+rm -f ${nwn_userdir}/nwmovies.log > >-# Prevent flickering at beginning and ending of playing a movie. >-# NOTE: this breaks using an external player (i.e., ffplay, mpv). >-#export NWMOVIES_GRAB_HACK=1 >- > # SDL settings > export SDL_MOUSE_RELATIVE=0 > export SDL_VIDEO_X11_DGAMOUSE=0 >@@ -101,28 +97,28 @@ > export SDL_AUDIODRIVER=${SDL_AUDIODRIVER:-"dsp"} > > # Library locations >-export LD_LIBRARY_PATH="${NWNUSERDIR}/lib:${NWNUSERDIR}/miles" >+export LD_LIBRARY_PATH="${nwn_userdir}/lib:${nwn_userdir}/miles" > >-# Prevent core files from NWN. >+# Prevent saving core files from NWN. > ulimit -c 0 > > echo "Starting Neverwinter Nights..." >-if [ -e ${NWNMOVIEDIR}/nwmovies.so ] ; then >- if [ ! -e ${NWNUSERDIR}/lib/libdisasm.so ] >+if [ -e ${nwn_moviedir}/nwmovies.so ] ; then >+ if [ ! -e ${nwn_userdir}/lib/libdisasm.so ] > then >- # Needed for generation of nwmovies.ini. Linked here since the code >- # calls dlopen() from the user directory. >- ln -sf ${NWNMOVIEDIR}/libdis/libdisasm.so \ >- ${NWNUSERDIR}/lib/libdisasm.so >+ # Needed for generation of nwmovies.ini. Linked here since the >+ # code calls dlopen() from the user directory. >+ ln -sf ${nwn_moviedir}/libdis/libdisasm.so \ >+ ${nwn_userdir}/lib/libdisasm.so > fi > >- export LD_PRELOAD=${NWNMOVIEDIR}/nwmovies.so >- export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${NWNMOVIEDIR}" >+ export LD_PRELOAD=${nwn_moviedir}/nwmovies.so:%%LINUXBASE%%/lib/libz.so.1 >+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${nwn_moviedir}" > > # Support for newer nwmovies.so that can use an external application. >- # Does not work all that well at the moment. >- export NWMOVIES_PLAY_COMMAND="mpv --fullscreen --keep-open=no" \ >- "--no-config --no-input-cursor --no-osc --no-terminal" \ >- "--osd-level=0" >+ # It requires LD_PRELOAD to be removed else the player will fail when it >+ # attempts to preload any Linux libraries. To make it easier, use a >+ # script that removes it instead of changing the movie playing library. >+ export NWMOVIES_PLAY_COMMAND="${nwn_userdir}/nwmovies.sh" > fi > ./nwmain "${@}" >Index: files/nwn.sh >=================================================================== >--- files/nwn.sh (revision 561604) >+++ files/nwn.sh (nonexistent) >@@ -1,128 +0,0 @@ >-#!/bin/sh >-# >-# $FreeBSD$ >-# >- >-NWNDATADIR="%%NWNDATADIR%%" >-NWNCLIENTDIR="%%NWNCLIENTDIR%%" >-NWNUSERDIR="${HOME}/.nwn" >-NWNMOVIEDIR="${NWNUSERDIR}/nwmovies" >-LCDIRS="ambient data dmvault hak localvault music override portraits" >- >-set -e >- >-# Print arguments in lowercase >-tolower() { >- set -e >- echo "$@" | tr '[:upper:]' '[:lower:]' >-} >- >-# Rename all files in a directory to lowercase >-lowerdir() { >- set -e >- find "$@" -name '*[A-Z]*' | while read name ; do >- mv -v "${name}" "$(tolower ${name})" >- done >-} >- >-# Copy a directory structure and symlink its contents >-copydir() { >- set -e >- cd "$1" >- find . -type d | cut -c 3- | while read dir ; do >- [ -d "${NWNUSERDIR}/${dir}" ] || >- mkdir "${NWNUSERDIR}/${dir}" >- done >- find . -type l | cut -c 3- | while read file ; do >- [ -L "${NWNUSERDIR}/${file}" ] || >- cp -R "${file}" "${NWNUSERDIR}/${file}" >- done >- find . -type f | cut -c 3- | while read file ; do >- [ -e "${NWNUSERDIR}/${file}" -o \ >- -e "$(tolower ${NWNUSERDIR}/${file})" ] || >- ln -s "${1}/${file}" "${NWNUSERDIR}/${file}" >- done >-} >- >-# Create user directory. Will also update a user directory if anything is >-# different due to running NWN with different versions of the game. >-rebuilduserdir() { >- # Copy ${NWNCLIENTDIR} first since it may contain files which >- # override parts of ${NWNDATADIR} >- copydir "${NWNCLIENTDIR}" >- copydir "${NWNDATADIR}" >- >- # Some files need to have their names converted to lowercase. Create >- # the directories if missing due to differences between versions of NWN. >- cd "${NWNUSERDIR}" >- mkdir -p ${LCDIRS} >- lowerdir ${LCDIRS} >-} >- >-if [ ! -d "${NWNUSERDIR}" ] ; then >- echo "Creating user directory" >- mkdir "${NWNUSERDIR}" >- >- # Copy the ini file so the user can tweak it >- cp "${NWNCLIENTDIR}/nwn.ini" "${NWNUSERDIR}" >- >- # Create a non-empty CD key file to work around a bug in the >- # client: it will ask for the key twice if the file is >- # initally empty or missing >- echo '[CDKEY]' >"${NWNUSERDIR}/nwncdkey.ini" >- >- rebuilduserdir >- >- echo "Your Neverwinter Nights directory (~/.nwn) has now been" >- echo "created and populated. Press ENTER to start the game." >- read dummy >-else >- # Remove dead links from different versions (e.g., original versus >- # Diamond Edition) of NWN as they could confuse the game. >- find -L ${NWNUSERDIR} -type l -exec rm -- {} + >- >- rebuilduserdir >-fi >- >-echo "Saved games will be stored in ${NWNUSERDIR}/saves/" >- >-cd "${NWNUSERDIR}" >- >-# Remove old movie log file. >-rm -f ${NWNUSERDIR}/nwmovies.log >- >-# Prevent flickering at beginning and ending of playing a movie. >-# NOTE: this breaks using an external player (i.e., ffplay, mpv). >-#export NWMOVIES_GRAB_HACK=1 >- >-# SDL settings >-export SDL_MOUSE_RELATIVE=0 >-export SDL_VIDEO_X11_DGAMOUSE=0 >-export SDL_AUDIODRIVER=${SDL_AUDIODRIVER:-"dsp"} >- >-# Library locations >-export LD_LIBRARY_PATH="${NWNUSERDIR}/lib:${NWNUSERDIR}/miles" >- >-# Prevent core files from NWN. >-ulimit -c 0 >- >-echo "Starting Neverwinter Nights..." >-if [ -e ${NWNMOVIEDIR}/nwmovies.so ] ; then >- if [ ! -e ${NWNUSERDIR}/lib/libdisasm.so ] >- then >- # Needed for generation of nwmovies.ini. Linked here since the code >- # calls dlopen() from the user directory. >- ln -sf ${NWNMOVIEDIR}/libdis/libdisasm.so \ >- ${NWNUSERDIR}/lib/libdisasm.so >- fi >- >- export LD_PRELOAD=${NWNMOVIEDIR}/nwmovies.so >- export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${NWNMOVIEDIR}" >- >- # Support for newer nwmovies.so that can use an external application. >- # Does not work all that well at the moment. >- export NWMOVIES_PLAY_COMMAND="mpv --fullscreen --keep-open=no" \ >- "--no-config --no-input-cursor --no-osc --no-terminal" \ >- "--osd-level=0" >-fi >-./nwmain "${@}" > >Property changes on: files/nwn.sh >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:keywords >## -1 +0,0 ## >-FreeBSD=%H >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: pkg-message >=================================================================== >--- pkg-message (revision 561604) >+++ pkg-message (working copy) >@@ -4,8 +4,8 @@ > If the game is installed with movie support (NWMovies), there is a way > to skip various movies, especially the five introduction movies at the > start of the game: create a skip file ($HOME/.nwn/nwmovies.skip) and >-list the movies (case-insensitive) you wish to skip. The following >-are the introduction movies, at least in the Diamond edition: >+list the movies (case-insensitive, no extension) you wish to skip. The >+following are the introduction movies, at least in the Diamond edition: > AtariLogo > BiowareLogo > WotcLogo >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 561604) >+++ pkg-plist (working copy) >@@ -57,9 +57,7 @@ > %%DIAMOND%%%%DATADIR%%/nwm/XP2_Chapter2.nwm > %%DIAMOND%%%%DATADIR%%/nwm/XP2_Chapter3.nwm > %%DATADIR%%/nwmain >-%%NWMOVIES%%%%DATADIR%%/nwmovies.pl >-%%NWMOVIES%%%%DATADIR%%/nwmovies/BinkPlayer >-%%NWMOVIES%%%%DATADIR%%/nwmovies/binklib.so >+%%NWMOVIES%%%%DATADIR%%/nwmovies.sh > %%NWMOVIES%%%%DATADIR%%/nwmovies/libX11.so > %%NWMOVIES%%%%DATADIR%%/nwmovies/libdis/libdisasm.so > %%NWMOVIES%%%%DATADIR%%/nwmovies/nwmovies.so
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 252747
: 221638