Difference between revisions of "Compiling for Windows on Linux"

From The Powder Toy
Jump to: navigation, search
m (1 revision)
(talk)
Line 3: Line 3:
 
'''BEFORE WE START, PLEASE MAKE SURE YOU CAN COMPILE FOR LINUX FIRST!'''
 
'''BEFORE WE START, PLEASE MAKE SURE YOU CAN COMPILE FOR LINUX FIRST!'''
  
=====  Packages  =====
+
====  Packages  ====
 
Search for the following in your package manager:
 
Search for the following in your package manager:
 
''mingw32  mingw32-binutils  mingw32-runtime''
 
''mingw32  mingw32-binutils  mingw32-runtime''
Line 24: Line 24:
 
<code>su -c 'pacman -S mingw32-{gcc,binutils,runtime}</code>
 
<code>su -c 'pacman -S mingw32-{gcc,binutils,runtime}</code>
  
=====  Things you need to Download  =====
+
====  Things you need to Download  ====
 
Yes, you need to download some bits.
 
Yes, you need to download some bits.
  
Line 33: Line 33:
 
  * [[http:''sourceforge.net/projects/mingw/files/UserContributed/regex/mingw-regex-2.5.1/mingw-libgnurx-2.5.1-dev.tar.gz/download| mingw32-libgnurx-2.5.1-dev.tar]] from [[http:''sourceforge.net/projects/mingw/files/UserContributed/regex/mingw-regex-2.5.1/| MinGW on SourceForge]]
 
  * [[http:''sourceforge.net/projects/mingw/files/UserContributed/regex/mingw-regex-2.5.1/mingw-libgnurx-2.5.1-dev.tar.gz/download| mingw32-libgnurx-2.5.1-dev.tar]] from [[http:''sourceforge.net/projects/mingw/files/UserContributed/regex/mingw-regex-2.5.1/| MinGW on SourceForge]]
  
=====  Extraction  =====
+
====  Extraction  ====
 
'''THE EXTRACTION PROCESS CAN ONLY BE DONE AS ROOT USER. USE AN ALTERNATE WORKSPACE AND CLOSE ALL WINDOWS WHEN FINISHED.'''
 
'''THE EXTRACTION PROCESS CAN ONLY BE DONE AS ROOT USER. USE AN ALTERNATE WORKSPACE AND CLOSE ALL WINDOWS WHEN FINISHED.'''
  
Line 46: Line 46:
 
Everything I'm telling you to extract is a folder and any overwrites or merges should be permitted.
 
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  ======
+
=====  SDL-devel-1.2.14-mingw32.tar.gz  =====
 
Extract the bin, include and libs folders
 
Extract the bin, include and libs folders
  
======  bzip2-1.0.5-2-mingw32-dev.tar.gz  ======
+
=====  bzip2-1.0.5-2-mingw32-dev.tar.gz  =====
 
Extract the entire archive.
 
Extract the entire archive.
  
======  mingw32-libgnurx-2.5.1-dev.tar  ======
+
=====  mingw32-libgnurx-2.5.1-dev.tar  =====
 
Extract the entire archive.
 
Extract the entire archive.
  
=====  DLLs  =====
+
====  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.
 
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.
  
Line 64: Line 64:
 
  * [[http://tinyurl.com/grxdll]] - libgnurx-0.dll
 
  * [[http://tinyurl.com/grxdll]] - libgnurx-0.dll
  
=====  Compile  =====
+
====  Compile  ====
 
Some Makefile changes may be needed.
 
Some Makefile changes may be needed.
  

Revision as of 19:47, 28 September 2011

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

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}

Things you need to Download

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

Extraction

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

Extract the bin, include and libs folders

bzip2-1.0.5-2-mingw32-dev.tar.gz

Extract the entire archive.

mingw32-libgnurx-2.5.1-dev.tar

Extract the entire archive.

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

Compile

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