- October 12, 2024, 05:52
- Welcome, Guest
Show Posts
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1]
1
DiabloRL / Howto Play DiabloRL with sounds on Linux
« on: July 06, 2013, 05:39 »
Hi,
As said in this topic : http://forum.chaosforge.org/index.php/topic,6528.0.html
I made a script to install DiabloRL from sources on Linux, with some small patches to support sounds from DIABDAT.MPQ.
Tested with rev 770 of fpcvalkyrie and 1178 of diablorl on xubuntu 13.04 64 bits.
Paste this code into diablorl-setup.sh with your favorite text editor and run
bash diablorl-setup.sh your_install_path your_path_to_DIABDAT.MPQ
As said in this topic : http://forum.chaosforge.org/index.php/topic,6528.0.html
I made a script to install DiabloRL from sources on Linux, with some small patches to support sounds from DIABDAT.MPQ.
Tested with rev 770 of fpcvalkyrie and 1178 of diablorl on xubuntu 13.04 64 bits.
Code: [Select]
#!/bin/bash
# diablorl (http://diablo.chaosforge.org/) linux setup from sources with
# DIABDAT.MPQ sound support
#
# http://forum.chaosforge.org/index.php/topic,6528
# tested with ubuntu 13.04 64bits
# Please install the following packages before
#
# build-essential fpc libsdl1.2-dev libsdl1.2-dbg lua 5.1 liblua5.1-0-dev
# subversion p7zip-full wget sed
#
# ubuntu:
# sudo apt-get install -y build-essential fpc libsdl1.2-dev libsdl1.2-dbg lua 5.1 liblua5.1-0-dev subversion p7zip-full wget sed
DRL_DIR=$1
MPQ_PATH=$2
if [ $# -ne 2 ]; then
echo $0 DRL_INSTALL_DIR PATH_TO_DIABDAT.MPQ
exit 1
fi
if [ ! -f "${MPQ_PATH}" ]; then
echo "MPQ not found : $2"
exit 2
fi
cd $(dirname "${MPQ_PATH}")
MPQ_PATH="$PWD/$(basename "${MPQ_PATH}")"
cd - &>/dev/null
mkdir -p "${DRL_DIR}" || exit 3
cd "${DRL_DIR}" || exit 4
DRL_DIR="$PWD"
# downloads (tested with rev 770 of fpcvalkyrie and 1178 of diablorl)
svn checkout -r 770 http://svn.code.sf.net/p/fpcvalkyrie/code/trunk fpcvalkyrie
svn checkout -r 1178 http://svn.code.sf.net/p/diablorl/code/trunk diablorl
wget http://www.zezula.net/download/stormlib.zip
7z x stormlib.zip
# Build StormLib
cd "${DRL_DIR}"/StormLib
make -f Makefile.linux
cp libStorm.so "${DRL_DIR}"/diablorl/bin/lib
cd "${DRL_DIR}"/diablorl/bin/lib
ln -s libStorm.so StormLib.so
# patch fpcvalkyrie
cd "${DRL_DIR}"/fpcvalkyrie/src
sed -i~ -e 's/\(^[[:space:]]*\)\(FPrev.FNext := FNext;\)/\1if FPrev <> nil then \2/' \
-e 's/\(^[[:space:]]*\)\(FNext.FPrev := FPrev;\)/\1if FNext <> nil then \2/' vnode.pas
# patch diablorl
cd "${DRL_DIR}"/diablorl/src
sed -i~ -e 's/\(raise EStreamError.CreateFmt.*;\)/{\1}/' rlui.pas
# compile
cd "${DRL_DIR}"/diablorl/src
FPCDIR=/usr/lib/fpc/2.6.0/ fpcmake
make COMPILER_UNITDIR=../../fpcvalkyrie/libs/ FPCOPT="-k-lm" DEBUG=1
# config and run
cd "${DRL_DIR}"/diablorl/bin
./mpq
cp -vf "${MPQ_PATH}" DIABDAT.MPQ
sed -i~ -e 's/sound = "NONE"/sound = "SDL"/' \
-e 's/mpq = ""/mpq = "DIABDAT.MPQ"/' config.lua
# create a runner script
cat <<EOF > /tmp/diablorl
#!/bin/sh
cd "${DRL_DIR}/diablorl/bin"
export LD_LIBRARY_PATH="${DRL_DIR}/diablorl/bin/lib"
./rl
EOF
sudo mv /tmp/diablorl /usr/local/bin/diablorl
sudo chmod 755 /usr/local/bin/diablorl
echo Run and Have Fun with: /usr/local/bin/diablorl
Paste this code into diablorl-setup.sh with your favorite text editor and run
bash diablorl-setup.sh your_install_path your_path_to_DIABDAT.MPQ
3
DiabloRL / Re: Can't enable sound on Mac OS X 10.8
« on: July 05, 2013, 16:01 »
Hi,
I managed to play sound on ubuntu 13.04 64bits:
I managed to play sound on ubuntu 13.04 64bits:
Code: [Select]
# required packages
sudo apt-get -y install build-essential fpc libsdl1.2-dev libsdl1.2-dbg lua5.1 liblua5.1-0-dev subversion p7zip-full wget sed
DRL_DIR=/tmp/diablorl-build
MPQ_PATH=/PATH/TO/DIABDAT.MPQ # replace by the actual path to DIABDAT.MPQ from Diablo CD
# create absolute path
cd $(dirname "${MPQ_PATH}")
MPQ_PATH="$PWD/$(basename "${MPQ_PATH}")"
cd - &>/dev/null
mkdir -p "${DRL_DIR}"
cd "${DRL_DIR}"
DRL_DIR="$PWD"
# downloads (tested with rev 770 from fpcvalkyrie and 1178 of diablorl)
svn checkout -r 770 http://svn.code.sf.net/p/fpcvalkyrie/code/trunk fpcvalkyrie
svn checkout -r 1178 http://svn.code.sf.net/p/diablorl/code/trunk diablorl
wget http://www.zezula.net/download/stormlib.zip
7z x stormlib.zip
# Build StormLib
cd "${DRL_DIR}"/StormLib
make -f Makefile.linux
cp libStorm.so "${DRL_DIR}"/diablorl/bin/lib
cd "${DRL_DIR}"/diablorl/bin/lib
ln -s libStorm.so StormLib.so
# patch fpcvalkyrie
cd "${DRL_DIR}"/fpcvalkyrie/src
sed -i~ -e 's/\(^[[:space:]]*\)\(FPrev.FNext := FNext;\)/\1if FPrev <> nil then \2/' \
-e 's/\(^[[:space:]]*\)\(FNext.FPrev := FPrev;\)/\1if FNext <> nil then \2/' vnode.pas
# patch diablorl
cd "${DRL_DIR}"/diablorl/src
sed -i~ -e 's/\(raise EStreamError.CreateFmt.*;\)/{\1}/' rlui.pas
# compile
cd "${DRL_DIR}"/diablorl/src
FPCDIR=/usr/lib/fpc/2.6.0/ fpcmake
make COMPILER_UNITDIR=../../fpcvalkyrie/libs/ FPCOPT="-k-lm" DEBUG=1
# config and run
cd "${DRL_DIR}"/diablorl/bin
./mpq
cp -vf "${MPQ_PATH}" .
sed -i~ -e 's/sound = "NONE"/sound = "SDL"/' \
-e 's/mpq = ""/mpq = "DIABDAT.MPQ"/' config.lua
# Create a runner
cat <<EOF > /tmp/diablorl
#!/bin/sh
cd "${DRL_DIR}/diablorl/bin"
export LD_LIBRARY_PATH="${DRL_DIR}/diablorl/bin/lib"
./rl
EOF
sudo mv /tmp/diablorl /usr/local/bin/diablorl
sudo chmod 755 /usr/local/bin/diablorl
# Run and Have Fun with
diablorl
Pages: [1]