[HOWTO] Build and run tomenet windows client on manjaro linux
Posted: Thu Jul 07, 2022 5:39 pm
Hello, I've struggled for a few days to crosscompile tomenet client for windows on mnjaro linux. So I wrote down the instructions, maybe it will help somebody.
Edit: Tomenet needs SDL2 and SDL2_mixer now. I've updated the instructions. See viewtopic.php?p=7458#p7458.
Warning: Following instructions are valid only for tomenet version using SDL v1 (before 11.jul.2022 +- a day)
Build and run tomenet windows client on manjaro linux
=====================================================
Edit: Tomenet needs SDL2 and SDL2_mixer now. I've updated the instructions. See viewtopic.php?p=7458#p7458.
Warning: Following instructions are valid only for tomenet version using SDL v1 (before 11.jul.2022 +- a day)
Build and run tomenet windows client on manjaro linux
=====================================================
- Run tomenet under wine.
- Install wine, wine-mono, lib32-libpulse packages, e.g. using pacman.
Code: Select all
sudo pacman -Syu wine wine-mono lib32-libpulse
- Download tomenet windows installer (e.g. to ~/Downloads) from https://tomenet.eu/downloads.php using browser (or some other method).
- Install tomenet using wine.
Code: Select all
wine ~/Downloads/TomeNET-480-complete-install.exe
- You should be able to run tomenet using wine, e.g. using command.
Code: Select all
env WINEPREFIX="/home/jezek/.wine" wine C:\\\\users\\\\Public\\\\Desktop\\\\TomeNET.lnk
- Install wine, wine-mono, lib32-libpulse packages, e.g. using pacman.
- Crossbuild tomenet using mingw-w64
- Install dependencies needed for crossbuilding tomenet.
- Install packages essential for compiling and crosscompiling using pacman.
It will ask you what package from base-devel to install, feel free to select all.
Code: Select all
sudo pacman -Syu base-devel mingw-w64-gcc
- Install libraries from AUR using pamac.
This will take some time.
Code: Select all
sudo pamac build mingw-w64-libgnurx mingw-w64-sdl mingw-w64-libmikmod mingw-w64-libvorbis mingw-w64-smpeg mingw-w64-flac
For explanation, the package mingw-w64-libgnurx is for using regexp, mingw-w64-sdl is for SDL and all other are dependencies for building mingw-w64-sdl_mixer. - Clone and build mingw-w64-sdl_mixer.
The mingw-w64-sdl_mixer package was not found in AUR database, we have to install it manually. Fortunately there was an existing github repository. The required dependencies were installed in 2.a.2.
Code: Select all
cd /tmp git clone https://github.com/atomlong/mingw-w64-sdl_mixer.git cd ./mingw-w64-sdl_mixer makepkg -si
- Install packages essential for compiling and crosscompiling using pacman.
- Clone tomenet, build tomenet client executable and run it.
- Clone tomenet from https://github.com/TomenetGame/tomenet into our directory of choise (in this case ~/projects).
Code: Select all
mkdir -p ~/projects cd ~/projects git clone https://github.com/TomenetGame/tomenet.git
- Build tomenet.exe
Code: Select all
cd ~/projects/tomenet/src make -f makefile.mingw tomenet.exe
- Copy built tomenet.exe to wine and run
Code: Select all
cp tomenet.exe ~/.wine/drive_c/Program\ Files\ \(x86\)/TomeNET/TomeNET.exe env WINEPREFIX="/home/jezek/.wine" wine C:\\\\users\\\\Public\\\\Desktop\\\\TomeNET.lnk
- Clone tomenet from https://github.com/TomenetGame/tomenet into our directory of choise (in this case ~/projects).
- Install dependencies needed for crossbuilding tomenet.