Other Roguelikes > DiabloRL

Can't enable sound on Mac OS X 10.8

<< < (2/2)


--- Quote from: siwucha on May 29, 2013, 09:40 ---So it might link to those libraries. I don't know enough about the cmake system to give you a definitive answer on possible dependencies. There might be licencing issues as well.

--- End quote ---

I don't have access to a Linux box ATM, but IIRC you can tell what the dependencies of a lib are from the command line. Lets see... Here it is.


I managed to play sound on ubuntu 13.04 64bits:

--- Code: ---# 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

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}"

# 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
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
cd "${DRL_DIR}/diablorl/bin"
export LD_LIBRARY_PATH="${DRL_DIR}/diablorl/bin/lib"
sudo mv /tmp/diablorl /usr/local/bin/diablorl
sudo chmod 755 /usr/local/bin/diablorl

# Run and Have Fun with

--- End code ---

Here a setup script I made :



[0] Message Index

[*] Previous page

Go to full version