Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 4, 2012, 15:38   #1
Therem Harth
Knight
 
Join Date: Jan 2008
Posts: 748
Therem Harth is on a distinguished road
Making things work on Windows

I normally use some kind of GNU/Linux because it works better for me than anything else. However, I do have Windows 7 installed on one of my computers, and among other things, I'd like to use it for some variant development.

The problem is, nothing wants to compile!
- I have trouble getting CMake (both Windows and Cygwin versions) to notice the presence of GCC
- For compiling the GTK2 interface, CMake doesn't detect GTK2 even if the libraries are installed and in my PATH

Furthermore the whole business is just overcomplicated. On Linux I can do everything from one terminal: git pull, cmake, make, and I'm done. On Windows I either have to fire up a (bloated, confusing) IDE, or I've got two or three different types of terminals... Or I can add everything to my PATH and risk incompatibilities.

Is there a One IDE to Rule Them All that would make my life easier? How do you guys handle this? How does anyone compile stuff on Windows that needs CMake?
Therem Harth is offline   Reply With Quote
Old February 4, 2012, 15:55   #2
AnonymousHero
Knight
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 578
AnonymousHero is on a distinguished road
Which GCC are you using?
AnonymousHero is offline   Reply With Quote
Old February 4, 2012, 16:15   #3
ghengiz
Adept
 
ghengiz's Avatar
 
Join Date: Nov 2011
Location: Roaming in Terry Pratchett's Discworld
Posts: 178
ghengiz is on a distinguished road
Quote:
Originally Posted by Therem Harth View Post
The problem is, nothing wants to compile!
- I have trouble getting CMake (both Windows and Cygwin versions) to notice the presence of GCC
- For compiling the GTK2 interface, CMake doesn't detect GTK2 even if the libraries are installed and in my PATH

Furthermore the whole business is just overcomplicated. On Linux I can do everything from one terminal: git pull, cmake, make, and I'm done. On Windows I either have to fire up a (bloated, confusing) IDE, or I've got two or three different types of terminals... Or I can add everything to my PATH and risk incompatibilities.
first, are you sure gcc is in your path? try to launch it from a terminal.

second, the order in the env variables could be important, because, as you know, programs and libraries are searched in the order given there, and the first version found is used. probably in the readme's there is some indication...

third, you don't really need to set paths in stone, it is enough to write a batch file, so the default values are not touched. In it, put just the exports for the new values of path and any other env variable of interest. You can then experiment freely, without harm your system, simply launching the said batch file. If things go really bad, you can simply restart, and here you are, a clean system again!

things being overcomplicated is the price to be paid to work in windows

edit: the IDE you are looking for, you already know. It's linux

Last edited by ghengiz; February 4, 2012 at 16:26.
ghengiz is offline   Reply With Quote
Old February 4, 2012, 16:36   #4
Therem Harth
Knight
 
Join Date: Jan 2008
Posts: 748
Therem Harth is on a distinguished road
Quote:
Originally Posted by AnonymousHero View Post
Which GCC are you using?
Umm... The one used to compile msysgit, which is probably pretty recent (4.x).
Therem Harth is offline   Reply With Quote
Old February 4, 2012, 17:01   #5
AnonymousHero
Knight
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 578
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Therem Harth View Post
Umm... The one used to compile msysgit, which is probably pretty recent (4.x).
I ask because (AFAIK) there are two different GCC compilers on Windows, namely the Cygwin GCC and the MinGW GCC. Since you mentioned msys/msysgit, I take it that it's MinGW GCC you're using...?

EDIT: But as ghengiz mentioned, you probably just don't have GCC on your path. I believe you can also specify the full path by using a switch to the CMake invocation.

Also, according to my ToME 2.x "fork" README.txt, it should be possible to compile using:

Code:
       $ cmake -G "MinGW Makefiles"
       $ mingw32-make
AnonymousHero is offline   Reply With Quote
Old February 4, 2012, 17:13   #6
Therem Harth
Knight
 
Join Date: Jan 2008
Posts: 748
Therem Harth is on a distinguished road
Yeah, it's MinGW.

I tried the following BTW:

- Add MinGW to PATH
- Run CMake to generate a makefile
- Open an msysgit terminal (i.e. git bash), cd to the relevant directory, and run make

... make just prints

Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
and kills bash, exiting to the normal Windows command shell. Running it again continues to print that message, and do nothing else.

(I've also tried Cygwin and its version of MinGW, for cross-compiling to a native Windows application. In that case Cygwin's CMake can't find Cygwin's MinGW, or even Cygwin's normal GCC.)
Therem Harth is offline   Reply With Quote
Old February 4, 2012, 17:14   #7
Therem Harth
Knight
 
Join Date: Jan 2008
Posts: 748
Therem Harth is on a distinguished road
OMG I'm an idiot. It was mingw32-make, like you said. *facepalm*

Thank you very, very much.

Edit: BTW is there any way to give the CMake GUI a (permanent) fix on the MinGW executables without adding them to the PATH?

Last edited by Therem Harth; February 4, 2012 at 17:25.
Therem Harth is offline   Reply With Quote
Old February 4, 2012, 18:00   #8
AnonymousHero
Knight
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 578
AnonymousHero is on a distinguished road
EDIT: Nvm. I see you already figured it out.

No idea about the CMake GUI, though. I'm way too comfortable in Linux-land to ever use Windows .
AnonymousHero is offline   Reply With Quote
Old February 4, 2012, 18:52   #9
Therem Harth
Knight
 
Join Date: Jan 2008
Posts: 748
Therem Harth is on a distinguished road
I would avoid Windows, but I'm trying to learn more about Windows Vista/7 administration and internals for various (mostly job-related) reasons. In the process I figured I would see if I could do something about the bugs that haunt T2 on Windows.

(Also been thinking about using the GTK2 interface as the main cross-platform one. OTOH GTK2 is going to be entirely obsolete soon. Hurray.)

Edit: BTW I am pretty happy with Win7 (aside from the absurd bloat). That said, any OS that does not have chroot (or reasonable equivalent) built in really does not deserve to be used on ~90% of desktops.

Last edited by Therem Harth; February 4, 2012 at 22:04.
Therem Harth is offline   Reply With Quote
Old February 4, 2012, 23:04   #10
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 813
nppangband is on a distinguished road
Quote:
Originally Posted by Therem Harth View Post
Yeah, it's MinGW.

I tried the following BTW:

- Add MinGW to PATH
- Run CMake to generate a makefile
- Open an msysgit terminal (i.e. git bash), cd to the relevant directory, and run make

... make just prints
There already a windows makefile in the source (makefile.win), so you shouldn't have to make one. So step 2 above (CMAKE) is unnecessary.

Once you have minGW installed and added to PATH, all you should have to do is open a terminal, navigate to the *Angband/src sub directory, and enter: "make -f makefile.win MINGW=YES".
__________________
NPPAngband current home page: http://forum.nppangband.org/
Source code repository:
https://github.com/nppangband/NPPAngband
nppangband 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
New rings and things? Iapetus Development 24 August 31, 2011 23:43
Acid does not melt things! ekolis Vanilla 9 January 24, 2011 17:19
Getting Sangband to work on Windows NotMorgoth Variants 4 August 22, 2009 03:56
Two things I think are bugs in 3.1.2... Sergio Vanilla 12 August 11, 2009 06:42
3.1.0: Chests, am I seeing things? NeoWizard Vanilla 12 January 20, 2009 05:39


All times are GMT +1. The time now is 15:00.


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