git: 3603c997dc20 - main - games/linux-nwnclient: update, add movie playback via mpv
Date: Wed, 25 Mar 2026 14:43:35 UTC
The branch main has been updated by tz:
URL: https://cgit.FreeBSD.org/ports/commit/?id=3603c997dc20aec53b372619c74416f4d80d7700
commit 3603c997dc20aec53b372619c74416f4d80d7700
Author: Torsten Zuehlsdorff <tz@FreeBSD.org>
AuthorDate: 2026-03-23 21:20:29 +0000
Commit: Torsten Zuehlsdorff <tz@FreeBSD.org>
CommitDate: 2026-03-25 14:43:01 +0000
games/linux-nwnclient: update, add movie playback via mpv
Add nwmovies support using mpv, fix xrandr issues, update for
linux_base-rl9. WWW updated to nwn.fandom.com.
PR: 252747
Submitted by: scf@FreeBSD.org
---
games/linux-nwnclient/Makefile | 77 +++++++++--------
games/linux-nwnclient/distinfo | 16 ++--
games/linux-nwnclient/files/nwmovies.pl | 73 ----------------
games/linux-nwnclient/files/nwmovies.sh.in | 16 ++++
games/linux-nwnclient/files/nwn.in | 128 +++++++++++++++++++++++++++++
games/linux-nwnclient/files/nwn.sh | 125 ----------------------------
games/linux-nwnclient/pkg-message | 28 ++++++-
games/linux-nwnclient/pkg-plist | 4 +-
8 files changed, 216 insertions(+), 251 deletions(-)
diff --git a/games/linux-nwnclient/Makefile b/games/linux-nwnclient/Makefile
index 27494cf48e09..64c83e854a5e 100644
--- a/games/linux-nwnclient/Makefile
+++ b/games/linux-nwnclient/Makefile
@@ -1,23 +1,19 @@
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
+ ${NWN_SITE_2}:ORIG,GOLD,HOTU
PKGNAMEPREFIX= linux-
-DISTFILES= ${CLIENT_FILES} \
- ${CLIENT_NWMOVIES}
+DISTFILES= ${CLIENT_FILES}
DIST_SUBDIR= ${PKGNAMEPREFIX}${PORTNAME}
+EXTRACT_ONLY= ${DISTFILE_NWMOVIES}
MAINTAINER= scf@FreeBSD.org
COMMENT= Neverwinter Nights Linux (x86) Client
-WWW= http://www.neverwinternights.info/
+WWW= https://nwn.fandom.com/wiki/Neverwinter_Nights
# Converted from RESTRICTED
LICENSE= nwnclient
@@ -25,29 +21,45 @@ LICENSE_NAME= nwnclient
LICENSE_TEXT= Distribution not allowed
LICENSE_PERMS= auto-accept
-RUN_DEPENDS= ${LOCALBASE}/share/nwndata/docs/readme.txt:games/nwndata
+# 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.
+NWNDATA_DEPENDS=${LOCALBASE}/share/nwndata/docs/readme.txt:games/nwndata
+FETCH_DEPENDS= ${NWNDATA_DEPENDS}
+BUILD_DEPENDS= ${NWNDATA_DEPENDS}
+RUN_DEPENDS= ${NWNDATA_DEPENDS}
NO_BUILD= yes
USES= linux
-USE_LINUX= dri sdl12 xorglibs
-NWNDATADIR= ${LOCALBASE}/share/nwndata
+USE_LINUX= dri sdl12-extralibs xorglibs
OPTIONS_DEFINE= NWMOVIES
-NWMOVIES_DESC= Support for movies using BinkPlayer (experimental!)
+
+NWMOVIES_DESC= In-game support for Bink format movies
+NWMOVIES_RUN_DEPENDS= mpv:multimedia/mpv
+USE_GITHUB= nodefault
+GH_ACCOUNT= nwnlinux:NWMOVIES
+GH_PROJECT= nwmovies:NWMOVIES
+GH_TAGNAME= v1.0:NWMOVIES
.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 \
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+= sdl12-extralibs
+NWMOVIESFILES= nwmovies/libdis/libdisasm.so \
+ nwmovies/nwmovies.so
+SUB_FILES+= nwmovies.sh
PLIST_SUB+= NWMOVIES=""
.else
PLIST_SUB+= NWMOVIES="@comment "
@@ -59,19 +71,12 @@ CLIENT_FILES= nwclient129.tar.gz:ORIG \
PLIST_SUB+= NWMOVIES="@comment " DIAMOND="@comment " ORIGINAL=""
.endif
-do-extract:
+post-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/*; \
@@ -79,19 +84,19 @@ do-extract:
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} ${WRKSRC_NWMOVIES}/${_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/
diff --git a/games/linux-nwnclient/distinfo b/games/linux-nwnclient/distinfo
index 2fedb591a5e0..d268722579d7 100644
--- a/games/linux-nwnclient/distinfo
+++ b/games/linux-nwnclient/distinfo
@@ -1,15 +1,9 @@
-TIMESTAMP = 1510192086
-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
-SIZE (linux-nwnclient/English_linuxclient169_xp2.tar.gz) = 506025948
-SHA256 (linux-nwnclient/nwclient129.tar.gz) = 3d75e07f4d44fde789481240d02c07a7a7e0599bc2300d8a73f98f4c752da80e
-SIZE (linux-nwnclient/nwclient129.tar.gz) = 5504342
+TIMESTAMP = 1738438641
SHA256 (linux-nwnclient/nwclientgold.tar.gz) = 6aea73cee2f6c9733ef4a121888cb3451d8a31b968a02e1ec897242df53395f3
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/English_linuxclient169_xp2.tar.gz) = 09715e2b95c025ef7f00d218deec1b1edce501530d8cba51d61097c69699763f
+SIZE (linux-nwnclient/English_linuxclient169_xp2.tar.gz) = 506025948
+SHA256 (linux-nwnclient/nwnlinux-nwmovies-v1.0_GH0.tar.gz) = 777aff49061ed2eab3975fe88834386b7540b2847aeca74b2e44c382b976994a
+SIZE (linux-nwnclient/nwnlinux-nwmovies-v1.0_GH0.tar.gz) = 261684
diff --git a/games/linux-nwnclient/files/nwmovies.pl b/games/linux-nwnclient/files/nwmovies.pl
deleted file mode 100644
index ead5a7c10107..000000000000
--- a/games/linux-nwnclient/files/nwmovies.pl
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-
-# 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}
diff --git a/games/linux-nwnclient/files/nwmovies.sh.in b/games/linux-nwnclient/files/nwmovies.sh.in
new file mode 100644
index 000000000000..f69b33a14e73
--- /dev/null
+++ b/games/linux-nwnclient/files/nwmovies.sh.in
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# Prevent saving core files.
+ulimit -c 0
+
+# Run FreeBSD movie player binary without Linux libraries.
+unset LD_PRELOAD
+unset LD_LIBRARY_PATH
+
+# 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}"
diff --git a/games/linux-nwnclient/files/nwn.in b/games/linux-nwnclient/files/nwn.in
new file mode 100644
index 000000000000..5e3ea01964e2
--- /dev/null
+++ b/games/linux-nwnclient/files/nwn.in
@@ -0,0 +1,128 @@
+#!/bin/sh
+
+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
+
+# 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 "${nwn_userdir}/${dir}" ] ||
+ mkdir "${nwn_userdir}/${dir}"
+ done
+ find . -type l | cut -c 3- | while read file ; do
+ [ -L "${nwn_userdir}/${file}" ] ||
+ cp -R "${file}" "${nwn_userdir}/${file}"
+ done
+ find . -type f | cut -c 3- | while read file ; do
+ [ -e "${nwn_userdir}/${file}" -o \
+ -e "$(tolower ${nwn_userdir}/${file})" ] ||
+ ln -s "${1}/${file}" "${nwn_userdir}/${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 ${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 "${nwn_userdir}"
+ mkdir -p ${lc_dirs}
+ lowerdir ${lc_dirs}
+}
+
+if [ ! -d "${nwn_userdir}" ] ; then
+ echo "Creating user directory"
+ mkdir "${nwn_userdir}"
+
+ # Copy the ini file so the user can tweak it
+ 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]' >"${nwn_userdir}/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 ${nwn_userdir} -type l -exec rm -- {} +
+
+ rebuilduserdir
+fi
+
+echo "Saved games will be stored in ${nwn_userdir}/saves/"
+
+cd "${nwn_userdir}"
+
+# Remove old movie log file.
+rm -f ${nwn_userdir}/nwmovies.log
+
+# SDL settings
+#
+# - SDL_VIDEO_X11_XRANDR: NWN shows a black screen when at the resolution of
+# the monitor if it uses xrandr. This is possibly only
+# present with multiple monitors under Zaphod mode.
+# Set SDL_VIDEO_X11_XRANDR=0 in the environment to work
+# around this.
+export SDL_MOUSE_RELATIVE=0
+export SDL_VIDEO_X11_DGAMOUSE=0
+export SDL_VIDEO_X11_XRANDR=${SDL_VIDEO_X11_XRANDR:-1}
+export SDL_AUDIODRIVER=${SDL_AUDIODRIVER:-"dsp"}
+
+# Library locations
+export LD_LIBRARY_PATH="${nwn_userdir}/lib:${nwn_userdir}/miles"
+
+# Prevent saving core files from NWN.
+ulimit -c 0
+
+echo "Starting Neverwinter Nights..."
+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 ${nwn_moviedir}/libdis/libdisasm.so \
+ ${nwn_userdir}/lib/libdisasm.so
+ fi
+
+ export LD_PRELOAD=${nwn_moviedir}/nwmovies.so:/compat/linux/lib/libz.so.1
+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${nwn_moviedir}"
+
+ # Support for newer nwmovies.so that can use an external application.
+ # 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 "${@}"
diff --git a/games/linux-nwnclient/files/nwn.sh b/games/linux-nwnclient/files/nwn.sh
deleted file mode 100644
index 81351502c564..000000000000
--- a/games/linux-nwnclient/files/nwn.sh
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/bin/sh
-
-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 "${@}"
diff --git a/games/linux-nwnclient/pkg-message b/games/linux-nwnclient/pkg-message
index b1b11e96c6d2..3e9892aa7455 100644
--- a/games/linux-nwnclient/pkg-message
+++ b/games/linux-nwnclient/pkg-message
@@ -3,21 +3,43 @@
message: <<EOM
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:
+start of the game: create a skip file (${HOME}/.nwn/nwmovies.skip) and
+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
fge_logo_black
NWNIntro
+Although there is mention of skipping movies by adding options to the
+${HOME}/.nwn/nwn.ini) file under [Display Options], these do not work.
+
There is a known issue due to the use of NWMovies. As written in
the NWMovies README file:
The main menu music does not work after starting NWN w/ NWMovies.
Entering the game, and backing out to the main menu, the music
works. Known issue, no known cause, nor resolution.
+
+NWN may show a black screen when at the resolution of the monitor if
+it uses xrandr. This is possibly only present with multiple monitors
+under Zaphod mode. Set SDL_VIDEO_X11_XRANDR=0 in the environment
+prior to running nwn to work around this.
+
+If the resolution is higher than what the actual monitor provides,
+SDL12COMPAT_MAX_VIDMODE can be set in the environment to fix it. For
+example, SDL12COMPAT_MAX_VIDMODE=1920x1080 for 1920x1080 maximum
+resolution.
+
+If the game window appears shifted upwards a few pixels, disabling
+decoration of the window should fix it. Also, to remove a possible
+flicker upon start, raise the layer for the window. For example with
+Fluxbox, add the following to ${HOME}/.fluxbox/apps:
+ [app] (class=nwmain)
+ [Deco] {NONE}
+ [Layer] {2}
+ [end]
EOM
}
]
diff --git a/games/linux-nwnclient/pkg-plist b/games/linux-nwnclient/pkg-plist
index c2064b9a1355..d419476c0014 100644
--- a/games/linux-nwnclient/pkg-plist
+++ b/games/linux-nwnclient/pkg-plist
@@ -57,9 +57,7 @@ bin/nwn
%%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