Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old September 15, 2011, 21:02   #11
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 808
nppangband is on a distinguished road
Yes,just like MinGW, Cygwin creates its own windows binary. They just take a slightly different approach (from wikipedia):

Quote:
MinGW forked from version 1.3.3 of Cygwin.[5] Although both Cygwin and MinGW can be used to port Unix software to Windows, they have different approaches:[15] Cygwin aims to provide a complete POSIX layer that provides emulations of several system calls and libraries that exist on Linux, Unix, and the BSD variants. The POSIX layer runs on top of Windows, sacrificing performance where necessary for compatibility. Accordingly, this approach requires Win32 programs written with Cygwin to run on top of a copylefted compatibility library that must be distributed with the program, along with the program's source code. MinGW aims to provide native functionality and performance via direct Windows API calls. Unlike Cygwin, MinGW does not require a compatibility layer DLL and thus programs do not need to be distributed with source code.

Because MinGW is dependent upon Win32 API calls, it cannot provide a full POSIX API; it is unable to compile some Unix applications that can be compiled with Cygwin. Specifically, this applies to applications that require POSIX functionality like fork(), mmap() or ioctl()[15] and those that expect to be run in a POSIX environment. Applications written using a cross-platform library that has itself been ported to MinGW, such as SDL, wxWidgets, Qt, or GTK+ will usually compile as easily in MinGW as they would in Cygwin.

The combination of MinGW and MSYS provides a small, self-contained environment that can be loaded onto removable media without leaving entries in the Registry or files on the computer. By providing more functionality, Cygwin becomes more complicated to install and maintain.

It is also possible to cross-compile Windows applications with MinGW-GCC under POSIX systems. This means that developers do not need a Windows installation with MSYS to compile software that will run on Windows without Cygwin.

If you do get it working, can you please let me know which command you used or of any modifications to the makefile you use?
nppangband is offline   Reply With Quote
Old September 15, 2011, 23:10   #12
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 4,983
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Thanks - very interesting. I must admit that cygwin is extremely slow (4 mins for a full distclean / configure / make, so about 5x longer than linux), so I'm interested in trying MinGW. But I will persist with cygwin to see if I can build the Windows and/or SDL versions.

I'm not back at work until Monday though ...
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old September 16, 2011, 05:50   #13
Timo Pietilš
Prophet
 
Join Date: Apr 2007
Location: Half way to grave
Posts: 3,247
Timo Pietilš is on a distinguished road
Quote:
Originally Posted by nppangband View Post
Yes,just like MinGW, Cygwin creates its own windows binary. They just take a slightly different approach (from wikipedia):
If I understood that correctly they are talking there about environment what you use to port programs, not the programs build there. You can run for example xemacs under Cygwin in windows, but that doesn't mean that program build under cygwin needs any extra layers.

Cygwin-build windows binary of Angband doesn't include anything extra, it is pure native windows code.

Compiling in general isn't depended of environment, c is environment independent programming language and it is same in every environment, you could build up windows binary in Commodore64 if you had an compiler there that could do the job.
Timo Pietilš is offline   Reply With Quote
Old September 19, 2011, 13:17   #14
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 4,983
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Doh. No wonder it built something that didn't work - I was cross-compiling for Win32 and trying to run it on a Win64 machine. The correct build command for mingw-in-cygwin on Win64 is

MINGW=yes make -f Makefile.win CROSS=x86_64-w64-mingw32-

Yes, that is a 32 at the end. Don't ask me why.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old May 30, 2012, 18:07   #15
david3x3x3
Scout
 
Join Date: Jun 2009
Posts: 28
david3x3x3 is on a distinguished road
If you want to use Cygwin with the configure script instead of the Makefile.win, you can run this command:

Code:
./configure --enable-win --with-no-install --host=i686-pc-mingw32
This requires that you have the mingw-gcc-core package installed.

I prefer Cygwin to Mingw/Msys because it seems a lot faster and there is lots of prepackaged software available through a single installer. Just download setup.exe, click the mingw and git packages and you're ready to go. Also the Android compile tools that I use to build Angband depend on Cygwin.
david3x3x3 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which main-xxx's and makefiles can I test with Cygwin or MinGW? nppangband Development 2 August 23, 2010 09:43
cygwin 1.7 compile error david3x3x3 Development 0 September 13, 2009 00:03


All times are GMT +1. The time now is 02:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.