Installing Tip Toi Tool (tttool) on CentOS 7

Tip Toy is a pen like device made by Ravensburger which plays audio based on the area touched by the "pen" (link). It is a neat little gadget for children. The pen uses a proprietary format (gme file) for the logic. There is a tool called tttool which can convert the scripts and audio formats to and from the gme file. This allows you extract e-books and sounds from the accompanying books or even create your own books/scanable surfaces. Check out theĀ  tttool site for more ideas or the accompanying github page.

As the installation of tttool on CentOS 7 is not as straight forward (main reason is the outdated Haskell), you will find the instructions here on how to get your environment set up. Overall, it is pretty simple though.

# Step 1: Install Haskell
( mkdir -p ~/.ghcup/bin && curl > ~/.ghcup/bin/ghcup && chmod +x ~/.ghcup/bin/ghcup) && echo "Success"
echo 'export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH"' >> ~/.bashrc
export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH"
# Package prerequisites
yum -y install gcc gmp-devel zlib-devel
# install the last known "best" GHC version (can take some time)
#ghcup install
# install a specific GHC version as this is tested for this version
ghcup install 8.4.4
# set the currently "active" GHC version
ghcup set 8.4.4
# install cabal-install.
ghcup install-cabal
# update cabal-install
cabal update
# the next step can take very very long depending on your memory
cabal new-install cabal-install

#Now let's install the tttool
yum -y install git ncurses-devel
mkdir -p ~/git
cd ~/git
git clone tttool
cd tttool
cabal install --only-dependencies
cabal install --bindir=.