Skip to content

Instantly share code, notes, and snippets.

@Xrayez

Xrayez/mingw-mxe-godot.sh

Last active Sep 27, 2020
Embed
What would you like to do?
Build the latest MinGW toolchain in order to cross-compile Godot to Windows from Linux
#!/bin/bash
#
# Build the latest MinGW toolchain in order to cross-compile Godot to Windows
#
# WARNING: this is just a list of steps and not an actual script,
# some steps could work though...
#
# Download MXE
git clone https://github.com/mxe/mxe.git && cd mxe
# MXE Requirements
sudo apt-get --yes --force-yes install \
autoconf \
automake \
autopoint \
bash \
bison \
bzip2 \
flex \
g++ \
g++-multilib \
gettext \
git \
gperf \
intltool \
libc6-dev-i386 \
libgdk-pixbuf2.0-dev \
libltdl-dev \
libssl-dev \
libtool-bin \
libxml-parser-perl \
make \
openssl \
p7zip-full \
patch \
perl \
pkg-config \
python \
ruby \
scons \
sed \
unzip \
wget \
xz-utils
# Build gcc for 64/32 bits
make update-package-gcc
make gcc pkgconf MXE_TARGETS='x86_64-w64-mingw32.static.posix i686-w64-mingw32.static.posix'
# Let Scons know about it
export MINGW32_PREFIX="mxe/usr/bin/i686-w64-mingw32.static.posix-"
export MINGW64_PREFIX="mxe/usr/bin/x86_64-w64-mingw32.static.posix-"
# You may also need to add the toolchain to PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.