[main]Notes on TeXmacs

Build TeXmacs using CMake and MXE on WSL for Windows

There are three major steps to build TeXmacs on WSL:

Step 1. Install Ubuntu 18.04 on Windows 10

Ubuntu 18.04 is available in the Windows Store. Just click to install it. For the first time, you will be prompted to provide a username and a password for the installed Ubuntu 18.04 on Windows. The following steps should be executed in the newly-installed Ubuntu 18.04.

Step 2. Install MXE

Download the source code of MXE to $HOME/github/mxe/mxe

mkdir -p $HOME/github/mxe/mxe
cd $HOME/github/mxe/mxe
git init
git remote add origin https://github.com/mxe/mxe.git
git fetch origin
git checkout master

Install dependencies for MXE

sudo apt update

sudo apt-get install autoconf automake autopoint bash \
 bison bzip2 flex g++ g++-multilib gettext git gperf \
 intltool libgdk-pixbuf2.0-dev libltdl-dev libssl-dev \
 libtool-bin libxml-parser-perl lzip make openssl \
 p7zip-full patch perl python ruby sed unzip wget xz-utils

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2

sudo apt install libc6-dev-i386-cross

Build qtbase and guile using MXE

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
make qtbase guile dlfcn-win32 # use -jN (-j8/-j12) to speed up

Step 3: Build GNU TeXmacs

export PATH=$PATH:$HOME/github/mxe/mxe/usr/bin

# Download the source code
mkdir -p $HOME/github/texmacs/texmacs
cd $HOME/github/texmacs/texmacs
git init
git remote add origin https://github.com/texmacs/texmacs.git
git fetch origin
git checkout master

# Build
mkdir build && cd build/
i686-w64-mingw32.static-cmake .. \
make -j8 && make install -j8

# Move the built result to the Documents folder
cp -r $HOME/github/mxe/mxe/usr/i686-w64-mingw32.static/share/guile/1.8/ice-9/ $HOME/win/progs/
mv $HOME/win /mnt/c/Users/xxxx/Documents/texmacs_build_‘date +%Y%m%d%H‘

# please replace xxxx with your Windows user name

To launch the built TeXmacs, just click the bin/texmacs.exe.

NOTICE: This is a build guide but not a package guide, the binary dependencies (wget.exe/gs.exe/...) of a TeXmacs Windows installation are not automatically prepared in the bin/ for GNU TeXmacs v2.1.