Post by ruien on May 7, 2018 3:01:14 GMT
The official source code is here: sourceforge.net/p/magicseteditor/code/HEAD/tree/
I was able to get this to compile by fixing a couple of bugs in the source and Makefile (both are documented in the procedure below).
In case it is useful for someone else, here are the steps I took:
It's also worth mentioning that you put fonts in ~/.fonts and extract a data zip file into $HOME/usr/mse/share/data.
My system also doesn't seem to display fonts with spaces by name in style definitions, so I went through and replaced "Beleren Bold" with "Beleren" like this:
I was able to get this to compile by fixing a couple of bugs in the source and Makefile (both are documented in the procedure below).
In case it is useful for someone else, here are the steps I took:
mkdir -p $HOME/src $HOME/usr
#--- Dependency: Boost 1.56 ---
cd $HOME/src
wget -O boost_1_56_0.tar.bz2 'https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.bz2/download'
tar -xf boost_1_56_0.tar.bz2
cd boost_1_56_0
./bootstrap.sh
./b2 --prefix=$HOME/usr/boost156
./b2 --prefix=$HOME/usr/boost156 install
#--- Dependency: wxWidgets 2.8.12 ---
cd $HOME/src
wget 'https://github.com/wxWidgets/wxWidgets/releases/download/v2.8.12/wxWidgets-2.8.12.tar.gz'
tar -xf wxWidgets-2.8.12.tar.gz
cd wxWidgets-2.8.12
./configure --prefix=$HOME/usr/wx28 --enable-unicode --enable-monolithic
make
make install
#--- Dependency: Hunspell 1.3.4 ---
cd $HOME/src
git clone 'https://github.com/hunspell/hunspell.git'
cd hunspell
git checkout v1.3.4
./configure --prefix=$HOME/usr/hunspell --with-gnu-ld
make
make install
ln -s libhunspell-1.3.so $HOME/usr/hunspell/lib/libhunspell.so
#--- MSE ---
cd $HOME/src
svn checkout 'https://svn.code.sf.net/p/magicseteditor/code/trunk' magicseteditor-code
cd magicseteditor-code
### FIX BUGS IN SOURCE ###
sed -i 's/push_back(value ? value->clone() : value);/this->push_back(value ? value->clone() : value);/' ./src/util/index_map.hpp
sed -i '/^magicseteditor_LDADD = / s/$/ -lboost_system/' ./Makefile
export CPLUS_INCLUDE_PATH=$HOME/usr/hunspell/include
export LIBRARY_PATH=$HOME/usr/hunspell/lib
./configure --prefix=$HOME/usr/mse --with-boost=$HOME/usr/boost156 --with-wxdir=$HOME/usr/wx28/bin
make
make install
mkdir -p $HOME/usr/mse/share/magicseteditor/resource
cp -r ./data $HOME/usr/mse/share/
cp -r ./src/resource/*/* $HOME/usr/mse/share/magicseteditor/resource/
cp -r ./src/resource/*/other/* $HOME/usr/mse/share/magicseteditor/resource/
#--- MSE Start Script ---
cat << "EOF" > $HOME/usr/mse/bin/start_mse.bash
#!/bin/bash
MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export LD_LIBRARY_PATH="$HOME/usr/boost156/lib:$HOME/usr/wx28/lib:$HOME/usr/hunspell/lib"
exec "$HOME/usr/mse/bin/magicseteditor" ${1+"$@"}
EOF
chmod 755 $HOME/usr/mse/bin/start_mse.bash
#--- Run it ---
$HOME/usr/mse/bin/start_mse.bash
It's also worth mentioning that you put fonts in ~/.fonts and extract a data zip file into $HOME/usr/mse/share/data.
My system also doesn't seem to display fonts with spaces by name in style definitions, so I went through and replaced "Beleren Bold" with "Beleren" like this:
cd $HOME/usr/mse/share
tar -cJf data_backup.tar.xz data # make a backup
cd data
grep -rlZF 'name: Beleren Bold' . | xargs -0 sed -i 's/name: Beleren Bold/name: Beleren/g'