Difference between revisions of "Compiling for Windows on Linux"
(talk) |
m (1 revision) |
(No difference)
|
Revision as of 19:24, 28 September 2011
Cross Compilation </h3>
This is for Linux users to cross-compile to Windows 32-bit.
BEFORE WE START, PLEASE MAKE SURE YOU CAN COMPILE FOR LINUX FIRST!
Packages </h5>
Search for the following in your package manager:
mingw32 mingw32-binutils mingw32-runtime
Ubuntu Users:
Copy and paste this into your address bar (FireFox):
apt:mingw32,mingw32-binutils,mingw32-runtime
If it doesn't work, use the following in a terminal:
sudo apt-get install mingw32 mingw32-binutils mingw32-runtime
Debian Users
In a terminal:\\
su -c "apt-get install mingw32 mingw32-binutils mingw32-runtime"
Arch Users
In your Terminal:
su -c 'pacman -S mingw32-{gcc,binutils,runtime}
<h4> Things you need to Download </h5>
Yes, you need to download some bits.
* SDL-devel-1.2.14-mingw32.tar.gz from http:''www.libsdl.org/
* bzip2-1.0.5-2-mingw32-dev.tar.lzma from MinGW on SourceForge.
* mingw32-libgnurx-2.5.1-dev.tar from MinGW on SourceForge
<h4> Extraction </h5>
THE EXTRACTION PROCESS CAN ONLY BE DONE AS ROOT USER. USE AN ALTERNATE WORKSPACE AND CLOSE ALL WINDOWS WHEN FINISHED.
GNOME:
sudo nautilus
-OR-
su -c "nautilus"
\\
XFCE use Thunar instead of Nautilus\\
KDE use Konqueror
The target folder for all extractions is /usr/i586-mingw32msvc (Arch use /usr/i486-mingw32)\\
Everything I'm telling you to extract is a folder and any overwrites or merges should be permitted.
SDL-devel-1.2.14-mingw32.tar.gz </h6>
Extract the bin, include and libs folders
<h5> bzip2-1.0.5-2-mingw32-dev.tar.gz </h6>
Extract the entire archive.
<h5> mingw32-libgnurx-2.5.1-dev.tar </h6>
Extract the entire archive.
<h4> DLLs
sudo apt-get install mingw32 mingw32-binutils mingw32-runtime
Debian Users
In a terminal:\\
su -c "apt-get install mingw32 mingw32-binutils mingw32-runtime"
Arch Users
In your Terminal:
su -c 'pacman -S mingw32-{gcc,binutils,runtime}
<h4> Things you need to Download </h5>
Yes, you need to download some bits.
* SDL-devel-1.2.14-mingw32.tar.gz from http:''www.libsdl.org/
* bzip2-1.0.5-2-mingw32-dev.tar.lzma from MinGW on SourceForge.
* mingw32-libgnurx-2.5.1-dev.tar from MinGW on SourceForge
<h4> Extraction </h5>
THE EXTRACTION PROCESS CAN ONLY BE DONE AS ROOT USER. USE AN ALTERNATE WORKSPACE AND CLOSE ALL WINDOWS WHEN FINISHED.
GNOME:
sudo nautilus
-OR-
su -c "nautilus"
\\
XFCE use Thunar instead of Nautilus\\
KDE use Konqueror
The target folder for all extractions is /usr/i586-mingw32msvc (Arch use /usr/i486-mingw32)\\
Everything I'm telling you to extract is a folder and any overwrites or merges should be permitted.
SDL-devel-1.2.14-mingw32.tar.gz </h6> Extract the bin, include and libs folders <h5> bzip2-1.0.5-2-mingw32-dev.tar.gz </h6> Extract the entire archive. <h5> mingw32-libgnurx-2.5.1-dev.tar </h6> Extract the entire archive. <h4> DLLs
These DLLs will need to be distributed with your builds so they work. Or if your lazy you can just post the URLs and tell everyone else to download them.
* [[1]] - SDL.dll
* [[2]] - libbz2-2.dll
* [[3]] - libgnurx-0.dll
<h4> Compile </h5> Some Makefile changes may be needed.
Arch users need to set the following in the Makefile:
WIN_COMPILER := i486-mingw32-gcc
WIN_RES := i486-mingw32-windres
Change all instances of -llibregex to -llibgnurx
Save, Exit, cd to your powder toy directory and run:\\
$make powder-sse.exe powder-sse2.exe powder-sse3.exe