Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old June 29, 2011, 23:04   #31
Azerath
Rookie
 
Join Date: Jun 2011
Posts: 21
Azerath is on a distinguished road
If you are trying to run Angband 3.2.0 from VS2010, just unzip downloaded sources and place attached files (sln + vcxproj* into src folder).

The only problematic things are:
- size_t in game-cmd.c as mentioned today in the other thread
- utils.c and player/utils.c produces same obj by default, so rename player utils to player_utils.c and it should work!
- mouse moving is not working due to bug with switched coordinates

Debugging works like a charm :-) Tested on 32/64 bit Win7 with VS2010 Ultimate/Express.

Regards
Attached Files
File Type: zip Angband.vc10.zip (3.8 KB, 141 views)
Azerath is offline   Reply With Quote
Old June 29, 2011, 23:47   #32
jens
Swordsman
 
Join Date: Apr 2011
Location: Göteborg, Sweden
Posts: 348
jens is on a distinguished road
Nice work! Now if someone would just do this for Eclipse as well ;-)
jens is offline   Reply With Quote
Old June 29, 2011, 23:53   #33
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 37
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Azerath View Post
If you are trying to run Angband 3.2.0 from VS2010, just unzip downloaded sources and place attached files (sln + vcxproj* into src folder).

The only problematic things are:
- size_t in game-cmd.c as mentioned today in the other thread
- utils.c and player/utils.c produces same obj by default, so rename player utils to player_utils.c and it should work!
- mouse moving is not working due to bug with switched coordinates

Debugging works like a charm :-) Tested on 32/64 bit Win7 with VS2010 Ultimate/Express.

Regards
Hi Azerath,

I hope to fix the size_t issue and maybe also rename player/utils.c to something else. Magnate has already fixed the mouse issue.

Would that mean that Angband would actually work "out of the box" in Visual Studio/VC++??

I am so used to taking flak for having things not work for MSVC that I am actually getting really excited about this

Thanks,

-- Erik
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old June 30, 2011, 08:35   #34
ChodTheWacko
Adept
 
Join Date: Jul 2007
Posts: 155
ChodTheWacko is on a distinguished road
Hello Everyone,

I just pulled down the latest version from git.

Compiling on windows was fairly easy with cygwin:
1) set MINGW=yes
2) I modified Makefile.win to make it debuggable:
changed '-O2' to -g
removed the '-s' which strips the libraries
removed -static otherwise it moaned about gcc_s library. (maybe I don't have it installed right)

3) had to modify z-file a bit.

and that's basically it. make -f Makefile.win and I have a playable game.

However, the entire reason I did this exercise was because I wanted to generate stats, and that doesn't work. Any advice on this?

- Frank
ChodTheWacko is offline   Reply With Quote
Old June 30, 2011, 09:02   #35
Azerath
Rookie
 
Join Date: Jun 2011
Posts: 21
Azerath is on a distinguished road
Hi,

Using attached VS project files should work. It reports a lot of warnings, but can be ignored, I hope so...

It is sufficient to use only vcxproj only.

Of course for people familiar with CygSomething, it would be a lot of easier use this tool than download and install VS, but as I have it already, then working and debugging is a lot of easier.

Regards
Azerath is offline   Reply With Quote
Old June 30, 2011, 19:58   #36
ChodTheWacko
Adept
 
Join Date: Jul 2007
Posts: 155
ChodTheWacko is on a distinguished road
Quote:
Originally Posted by Azerath View Post
Hi,
It is sufficient to use only vcxproj only.
Just for clarification before I go downloading all that:
You can run the angband with -mstats option to get the object dumps, right?

Although, Looking through the code, it looks it does direct inserts into sqlite?
If so I might have to just hack it to dump it direct to a CSV file.

- Frank
ChodTheWacko is offline   Reply With Quote
Old June 30, 2011, 21:57   #37
Azerath
Rookie
 
Join Date: Jun 2011
Posts: 21
Azerath is on a distinguished road
Hmm... I'm not familiar with mstats option. Are you referring to creation of lib subfolders and its content? If so, then this VS project will only compile sources and lib folder I just copy from release.

I've created VS just to more easily debug app on my machine, than substitute building...

On the other hand hacking preparation of lib content shouldn't tak too much time...

Regards,
Azerath is offline   Reply With Quote
Old June 30, 2011, 22:30   #38
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,054
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
Quote:
Originally Posted by ChodTheWacko View Post
Just for clarification before I go downloading all that:
You can run the angband with -mstats option to get the object dumps, right?

Although, Looking through the code, it looks it does direct inserts into sqlite?
If so I might have to just hack it to dump it direct to a CSV file.

- Frank
Hi Frank,

You have to configure the code to build the stats module - I don't know how you do that on platforms that don't use configure, but it's to do with #defining ENABLE_STATS in the right header files.

Also, apparently Windows doesn't support any of the -m options, so I'm not sure you could invoke the stats module even if you built it.

Finally, yes it does dump an sqlite db, so you would need to hack it to output CSV. Pls be warned that there's a LOT of data - about 1.2GB if it's uncompressed.
__________________
"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 June 30, 2011, 22:45   #39
myshkin
Angband Devteam member
 
Join Date: Apr 2007
Posts: 334
myshkin is on a distinguished road
Quote:
Originally Posted by Magnate View Post
Hi Frank,

You have to configure the code to build the stats module - I don't know how you do that on platforms that don't use configure, but it's to do with #defining ENABLE_STATS in the right header files.

Also, apparently Windows doesn't support any of the -m options, so I'm not sure you could invoke the stats module even if you built it.
The Windows, OS X, and NDS ports do not use the display module notion. For now, the easiest way to get stats working on Windows is likely to compile in an environment that supports configure...I haven't tested it, but I would guess that Cygwin with sqlite3 installed would do, with some small tweaks perhaps. The more elegant thing to do is to add a command-line option or a menu item to start the stats code; compare with the USE_SAVER sections of main-win.c for screensaver control. I aim to move most of main-stats.c into various files in the stats/ subdirectory, at which point it should be somewhat easier to call the stats engine from other parts of the code. (Other to-dos here: document the ugly struct access expressions better, merge with fizzix's code in wiz-stats.c, add support for different diving algorithms, and add support for merging databases. All are likely going to wait until after the 3.3 release.)

Quote:
Originally Posted by Magnate View Post
Finally, yes it does dump an sqlite db, so you would need to hack it to output CSV. Pls be warned that there's a LOT of data - about 1.2GB if it's uncompressed.
Frank, is there a particular reason you want to use CSV? What tool do you plan to use to manipulate the data? The database is fairly relational.
myshkin is offline   Reply With Quote
Old June 30, 2011, 23:29   #40
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 7,875
Derakon is on a distinguished road
I'd guess he's planning to import it into Excel or some other spreadsheet program.
Derakon is online now   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
Compiling Angband on MS-DOS Zababa Development 8 May 27, 2011 17:36
Compiling Angband 3.0.9 w/ xcode on OSX Iemortal Vanilla 8 April 16, 2011 16:41
Compiling Z+Angband under Windows Altefcat Variants 8 December 11, 2008 09:44
compiling vanilla angband on msvc++ 9 express hugh Vanilla 6 March 17, 2008 15:49
Trouble compiling angband 3.0.9 on linux RastaRuedi Vanilla 2 August 1, 2007 17:28


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


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