![]() |
#1 |
Angband Devteam member
|
Does anyone use cygwin?
I'm trying to get my head around developing on Windows. I've installed cygwin, which allows me (if I patch src/Makefile to pick up /usr/include/ncurses properly) to build ... the unix versions (gcu, x11, potentially SDL and GTK). It seems perverse to install cygwin and then cross-compile the Windows version ... does anyone actually do this? If so, 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 |
![]() |
![]() |
![]() |
#2 | |
Prophet
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
#3 |
NPPAngband Maintainer
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
![]() |
I use cygwin to compile the windows build for NPP and Angband (but the current Angband won't compile with cygwin).
As for the why, I have heard that mingw is better but I couldn't get it installed properly, and I thought the instructions and documentation was garbage. I installed cygwin and had it working with eclipse as my editor in about 5 minutes, so I just stuck with it. (Note: I have no experience programming outside of the Angband source code, and I only know enough c programming to make the changes I want to.) Before that, I used LCC-WIN to compile. Also, I have to use the windows interface for github because I can't figure out how to get it to work from a prompt. (and I can hear you all laughing at me, stop it! ![]() |
![]() |
![]() |
![]() |
#4 |
Angband Devteam member
|
Thanks both for the replies. I think it's worth adding a cygwin section to the compiling.txt doc that d_m has added to the repo. Especially if building the Windows binary is as easy as Timo says (I haven't got that far yet - I can play in gcu mode).
@Jeff: I would point you at the git user manual, but it's hosted at kernel.org which is down at the moment (massive hacking scandal). tbh the only commands I ever use are git checkout git fetch git merge git rebase git push git log git diff git status git commit git reset There are loads of others, but those cover about 99% of usage (plus git clone, git branch and git remote to set things up).
__________________
"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 Last edited by Magnate; September 15, 2011 at 15:56. |
![]() |
![]() |
![]() |
#5 | |
Angband Devteam member
|
Quote:
To build Windows, I've tried two things: Code:
$ make -f Makefile.win gcc -DWINDOWS -static -Iwin/include -Lwin/lib -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=c99 -Wdeclaration-after-statement -O2 -I. -mno-cygwin -c -o attack.o attack.c gcc: The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler. make: *** [attack.o] Error 1 Code:
$ MINGW=yes make -f Makefile.win CROSS=i686-mingw32msvc- i686-mingw32msvc-gcc -DWINDOWS -static -Iwin/include -Lwin/lib -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=c99 -Wdeclaration-after-statement -O2 -I. -DCROSS_COMPILE -D_stdcall= -c -o attack.o attack.c make: i686-mingw32msvc-gcc: Command not found make: *** [attack.o] Error 127 EDIT: Solved! cygwin uses slightly different syntax for mingw, it's: MINGW=yes make -f Makefile.win CROSS=i686-pc-mingw32- ... but it doesn't work. It builds an angband.exe that's only 1.07MB which, when I double-click it, says "The application failed to initialize properly (0xc0000022). Click on OK to terminate the application." Ho hum. Back to the drawing board.
__________________
"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 Last edited by Magnate; September 15, 2011 at 14:22. |
|
![]() |
![]() |
![]() |
#6 |
NPPAngband Maintainer
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
![]() |
A couple months ago the standard makefile.win workedt worked just fine (the last time I did a patch for Vanilla). It was only when I did the Angel-to-Ainu patch that I couldn't compile. So if there have been any changes to the makefile.win in the last couple months, that is what is probably preventing cygwin from compiling.
|
![]() |
![]() |
![]() |
#7 | |
Angband Devteam member
|
Quote:
__________________
"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 |
|
![]() |
![]() |
![]() |
#8 | |
Prophet
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
![]() |
Quote:
gcc: The -mno-cygwin flag has been removed; If I needed to install mingw in cygwin I would not be using cygwin. I would use mingw directly in windows. |
|
![]() |
![]() |
![]() |
#9 | |
Angband Devteam member
|
Quote:
I thought, since cygwin is effectively a unix environment inside Windows, that you'd have to cross-compile using mingw32. It hadn't occurred to me that cygwin could build Windows binaries without it. Doh.
__________________
"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 |
|
![]() |
![]() |
![]() |
#10 | |
Prophet
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
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 |