It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
/!\: This thread is not kept up-to-date anymore, please go to the following one to get the latest links and instructions, or for any kind of feedback on the scripts:
[./play.it] Install The Temple of Elemental Evil on Linux

-----

Hi!

This guide will help you to build packages for your distribution from the GOG Windows installer.

The scripts used in this guide make use of unzip, wine (>= 1.5.9) and icotool.

1. Making packages

This first script will create a folder named "toee-data" containing all data needed to run The Temple of Elemental Evil. You'll have to change the value of TOEE_SETUP to the path to GOG installer :

export TOEE_SETUP="/path/to/setup_toee_*.exe"
export WINEARCH=wine32
export WINEDEBUG=-all
mkdir $HOME/toee-data
cd $HOME/toee-data
mkdir install-prefix
export WINEPREFIX=$HOME/toee-data/install-prefix
wineboot --init
mkdir -p usr/local/games
cd install-prefix/dosdevices
rm *
ln -s ../drive_c c\:
ln -s ../../usr/local/games d\:
cd d\:
cp "$TOEE_SETUP" .
wine "$(basename "$TOEE_SETUP")"
cd toee
icotool -x - ToEE.ico
mkdir -p ../../share/icons/hicolor/32x32/apps
mv *32x32x8.png ../../share/icons/hicolor/32x32/apps/toee.png
rm *.png
cd $HOME/toee-data
rm -Rf "usr/local/games/$(basename "$TOEE_SETUP")" install-prefix $HOME/.local/share/applications/wine/Programs/GOG.com/Temple\ of\ Elemental\ Evil/
find $HOME/.local/share/applications/ -depth -type d -empty -delete
In the installer, click "Options" and untick anything but "Temple of Elemental Evil" and EULA and set the path to "D:\toee".

/!\ Don't launch the game at the end of the installation. Click "Exit". /!\

This second script will create the launchers allowing you to play TOEE on Linux :

mkdir -p $HOME/toee/usr/local/bin
cd $HOME/toee/usr/local/bin
echo "
#!/bin/sh
export WINEDEBUG=-all
export WINEPREFIX=\$HOME/.toee/.wine-prefix
mkdir -p \$HOME/.toee/.wine-prefix
export WINEARCH=win32
wineboot --init
cd \$HOME/.toee/.wine-prefix/dosdevices/
rm *
ln -s ../drive_c c\:
mkdir \$HOME/.toee/.wine-prefix/dosdevices/d\:
ln -s \$HOME/.toee \$HOME/.toee/.wine-prefix/dosdevices/d\:/toee
cd \$HOME/.toee/
ln -s /usr/local/games/toee/* .
rm *.cfg modules
cp /usr/local/games/toee/*.cfg .
mkdir modules
ln -s /usr/local/games/toee/modules/ToEE.dat modules" > toee-init
echo "
#!/bin/sh
export WINEDEBUG=-all
export WINEPREFIX=\$HOME/.toee/.wine-prefix
export NATIVE_RES=\$(xrandr | grep '*' | tr -s ' ' | cut -d' ' -f2)
if ! [ -d ~/.toee ]; then
sh /usr/local/bin/toee-init
fi
cd \$HOME/.toee/.wine-prefix/dosdevices/d\:/toee
wine ToEE.exe
xrandr -s \$NATIVE_RES" > toee
chmod a+x *
cd ..
mkdir -p share/applications
echo "[Desktop Entry]
Type=Application
Version=1.0
Name=The Temple of Elemental Evil
Icon=toee
Exec=toee
Categories=Application;Game;" > share/applications/toee.desktop
2. Building the packages

As for now there are scripts only for .deb packages (Debian, Ubuntu, Linux Mint...).
More may come later as I learn how to do it (or sooner if you know how to package in other formats and post the method here).

.deb packages

These scripts use fakeroot.

mkdir DEBIAN
echo "Package: toee-data
Version: 1
Section: non-free
Priority: extra
Architecture: all
Depends:
Installed-Size: 1312344
Maintainer: local build
Description: The Temple of Elemental Evil - data" > DEBIAN/control
cd $HOME
fakeroot dpkg-deb --build toee-data
rm -Rf toee-data/
This first build might take some time, the package is around 1.2G.

cd $HOME/toee
mkdir DEBIAN
echo "Package: toee
Version: 1
Section: contrib
Priority: extra
Architecture: all
Depends: toee-data, wine | wine-unstable | wine:i386 | wine-unstable:i386
Installed-Size: 36
Maintainer: local build
Description: The Temple of Elemental Evil - binaries" > DEBIAN/control
cd $HOME
fakeroot dpkg-deb --build toee
rm -Rf toee/
You can install the resulting packages by launching (as root) :

dpkg -i toee-data.deb
dpkg -i toee.deb
apt-get install -f
Enjoy!

-----

You can't add any mod to the game installed via this guide yet. I'm going to work into this and update the guide soon.

-----

Please tell me if something doesn't work on your distribution.

-----

Here you go for more supported games!
Post edited August 18, 2018 by vv221