diff --git a/development/compiling/compiling_for_windows.rst b/development/compiling/compiling_for_windows.rst index cf219e533..d00e6c5de 100644 --- a/development/compiling/compiling_for_windows.rst +++ b/development/compiling/compiling_for_windows.rst @@ -345,36 +345,57 @@ architectures (Win32/x64). They are equivalent. Cross-compiling for Windows from other operating systems --------------- -If you are a Linux or Mac user, you need to install mingw32 and -mingw-w64. Under Ubuntu or Debian, just run the following commands: +If you are a Linux or Mac user, you need to install `MinGW-w64 `_, +which typically comes in 32-bit and 64-bit variants. The package names +may differ based on your distro, here are some known ones: + ++---------------+--------------------------------------------------------+ +| **Arch** | :: | +| | | +| | pacman -S scons mingw-w64-gcc | ++---------------+--------------------------------------------------------+ +| **Debian** / | :: | +| **Ubuntu** | | +| | apt-get install scons mingw-w64 | ++---------------+--------------------------------------------------------+ +| **Fedora** | :: | +| | | +| | dnf install scons mingw32-gcc-c++ mingw64-gcc-c++ | ++---------------+--------------------------------------------------------+ +| **macOS** | :: | +| | | +| | brew install scons mingw-w64 | ++---------------+--------------------------------------------------------+ +| **Mageia** | :: | +| | | +| | urpmi scons mingw32-gcc-c++ mingw64-gcc-c++ | ++---------------+--------------------------------------------------------+ + +Before allowing you to attempt the compilation, SCons will check for +the following binaries in your ``$PATH``: :: - apt-get install mingw32 mingw-w64 - -If you are using another distro, SCons will check for the following -binaries: - -:: - - i586-mingw32msvc-gcc i686-w64-mingw32-gcc + x86_64-w64-mingw32-gcc -If the binaries are named or located somewhere else, export the -following env variables: +If the binaries are not located in the ``$PATH`` (e.g. ``/usr/bin``), +you can define the following environment variables to give a hint to +the buildsystem: :: - export MINGW32_PREFIX="/path/to/i586-mingw32msvc-" - export MINGW64_PREFIX="/path/to/i686-w64-mingw32-" + export MINGW32_PREFIX="/path/to/i686-w64-mingw32-" + export MINGW64_PREFIX="/path/to/x86_64-w64-mingw32-" To make sure you are doing things correctly, executing the following in -the shell should result in a working compiler: +the shell should result in a working compiler (the version output may +differ based on your system): :: - user@host:~$ ${MINGW32_PREFIX}gcc - gcc: fatal error: no input files + user@host:~$ ${MINGW32_PREFIX}gcc --version + i686-w64-mingw32-gcc (GCC) 6.1.0 20160427 (Mageia MinGW 6.1.0-1.mga6) Creating Windows export templates --------------------------------- diff --git a/development/compiling/compiling_for_x11.rst b/development/compiling/compiling_for_x11.rst index 9c835ea50..f43d501e3 100644 --- a/development/compiling/compiling_for_x11.rst +++ b/development/compiling/compiling_for_x11.rst @@ -37,6 +37,12 @@ Distro-specific oneliners | | | | | pacman -S scons libxcursor libxinerama libxrandr mesa glu alsa-lib pulseaudio freetype2 | +---------------+------------------------------------------------------------------------------------------------------------+ +| **Debian** / | :: | +| **Ubuntu** | | +| | sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev \ | +| | libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libfreetype6-dev libssl-dev libudev-dev \ | +| | libxrandr-dev | ++---------------+------------------------------------------------------------------------------------------------------------+ | **Fedora** | :: | | | | | | sudo dnf install scons pkgconfig libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel \ | @@ -69,11 +75,10 @@ Distro-specific oneliners | | Mesa-libGL-devel alsa-devel libpulse-devel freetype-devel openssl-devel libudev-devel \ | | | libGLU1 | +---------------+------------------------------------------------------------------------------------------------------------+ -| **Ubuntu** | :: | +| **Solus** | :: | | | | -| | sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev \ | -| | libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libfreetype6-dev libssl-dev libudev-dev \ | -| | libxrandr-dev | +| | sudo eopkg install -c system.devel scons libxcursor-devel libxinerama-devel libxrandr-devel \ | +| | mesalib-devel libglu alsa-lib pulseaudio freetype2-devel | +---------------+------------------------------------------------------------------------------------------------------------+ Compiling