Sign inSign up

shugaoye/arch-mingw

By shugaoye

•Updated almost 6 years ago

MingW Build Environment in Arch Linux container

Image
0

432

shugaoye/arch-mingw repository overview

⁠arch-mingw

Docker image for MinGW-w64 build environment based on Arch Linux⁠. The image provides simple cross-compilation environment for windows 32/64bit builds.

This script was inspired by maxrd2/arch-mingw⁠

⁠Building docker image manually

You can pull latest docker image with:

sudo docker pull shugaoye/arch-mingw

If you prefer to build it on your machine:

git clone https://github.com/shugaoye/docker-arch-mingw.git && cd docker-arch-mingw
sudo docker build -t shugaoye/arch-mingw -f Dockerfile .

⁠Usage

Start the docker container (replace some-local-path with dir to mount as docker home):

.run_image.sh

Compile your application:

git clone 'https://github.com/maxrd2/DivvyDroid.git'
mkdir DivvyDroid/build
sudo docker run -v DivvyDroid:/home/devel --rm -it shugaoye/docker-arch-mingw /bin/bash -c "\
	cd build && \
	i686-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. && \
	make -j\$(nproc) nsis \
	"
ls -l build # windows binaries

cmake, configure, etc commands should be prefixed by i686/x86_64 for 32/64bit builds e.g. i686-w64-mingw32-cmake, x86_64-w64-mingw32-configure

⁠Build a MINGW package

git clone https://github.com/msys2/MINGW-packages.git
cd MINGW-packages/mingw-w64-argon2/
makepkg-mingw

⁠Dependencies

Extra/missing dependencies can be installed from AUR⁠

pacaur -S mingw-w64-rapidjson

If mingw- version of the needed libarary is not available in AUR, you can add it yourself. The process is really straightforward. You would need to write a PKBUILD file⁠, which is as intuitive as it can get, see mingw-w64-rapidjson⁠, for example.

Tag summary

Content type

Image

Digest

Size

1.1 GB

Last updated

almost 6 years ago

docker pull shugaoye/arch-mingw