Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old May 27, 2011, 05:56   #1
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 43
Posts: 1,517
d_m is on a distinguished road
Windows PNG support in staging

Hi everybody,

Thanks to Blue Baron's work, PNG support has been added to the staging repo. I hope to get it into master (and into a nighly build) in the next few days. This will allow tile authors to just use PNGs, and not have to mess with mask files for bitmaps.

This is still something of a work in progress, and while I expect that the nightly builds should be playable, my changes may cause problems for people who are building Angband from source for Windows. If you do this (or are interested) keep reading for a more in-depth explanation of what's going on.

Since most devs (and the autobuilder) build with Mingw, we need to have a solution which works with Mingw. Unfortunately, I wasn't able to find a version of the DirectX headers/libraries that Mingw could use. So I went with libpng (which depends on zlib) which are both GPL-2 compatible. But since building/crossbuilding them for Windows is hard, I took the easy way out and copied in headers, libraries and DLLs, which I found prebuilt on the gnuwin32 site.

I wasn't able to get Angband to statically link against the libraries, which is why I have to include (and ship) the DLLs. I realize this is a bit junky but it seems to work.

I would *love* to get libpng/zlib building (and crossbuilding) from source, or at least, linking against the libraries statically. But I lack the knowledge about Windows development to get that working at the moment, and I know that MSVC++ uses a completely different build infrastructure.

TL;DR -- It's junky, but I think it works. Feedback and patches happily accepted!
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old May 27, 2011, 16:02   #2
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 46
Posts: 367
Donated: $120
konijn_ is on a distinguished road
I am trying to be positive here, but did you just say that now the only way to develop on Windows is mingw ? Which, by the way does not have a decent debugger ( gdb is not a decent debugger ).

Still, png for the win, but ouch for poor windows folks like me.

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old May 27, 2011, 17:52   #3
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,110
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by konijn_ View Post
gdb is not a decent debugger
Flames off, please. Quite a lot of people find gdb an excellent debugger. I don't develop on Windows though - perhaps it is somehow gimped on that OS.

As d_m said in another thread, we have only one Windows developer on the team, and he uses mingw. To improve support for Windows development, we need more Windows developers to contribute.
Magnate is offline   Reply With Quote
Old May 27, 2011, 18:03   #4
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Would you like makefiles exported from MSVC++ 6.0? would the information in there help with statically compiling libpng/zlib?

Also wikepedia and the mingw website imply mingw can use .lib libraries in addition to .a libraries. If so, you are welcome to the static libraries that I built for myself from libpng 1.5.2 (and zlib 1.2.4).
Blue Baron is offline   Reply With Quote
Old May 27, 2011, 18:56   #5
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 46
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by Blue Baron View Post
Would you like makefiles exported from MSVC++ 6.0? would the information in there help with statically compiling libpng/zlib?

Also wikepedia and the mingw website imply mingw can use .lib libraries in addition to .a libraries. If so, you are welcome to the static libraries that I built for myself from libpng 1.5.2 (and zlib 1.2.4).
Thanks. In fact I only got to download MSVC++ 2010..
And I think I have this guy's issue :
http://stackoverflow.com/questions/5...xternal-symbol

I have no idea on how to fix that ;\

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old May 27, 2011, 19:54   #6
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Quote:
Originally Posted by konijn_ View Post
Thanks. In fact I only got to download MSVC++ 2010..
And I think I have this guy's issue :
http://stackoverflow.com/questions/5...xternal-symbol

I have no idea on how to fix that ;\

T.
so you are getting unresolved external symbol errors? with what library or file?
Blue Baron is offline   Reply With Quote
Old May 28, 2011, 15:52   #7
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 43
Posts: 1,517
d_m is on a distinguished road
Quote:
Originally Posted by Blue Baron View Post
Would you like makefiles exported from MSVC++ 6.0? would the information in there help with statically compiling libpng/zlib?

Also wikepedia and the mingw website imply mingw can use .lib libraries in addition to .a libraries. If so, you are welcome to the static libraries that I built for myself from libpng 1.5.2 (and zlib 1.2.4).
I wasn't able to get Mingw to build against the .lib files--I would prefer to use those if Mingw and MSVC++ can both use them. Do you have links and/or instructions? I tried to get the .lib files found via CFLAGS/LDFLAGS without much luck, but I will try again. The current DLL situation isn't ideal.

Please email me about the static libraries: d_m * plastic-idolatry * com

Any help you can give me would be greatly appreciated!

@konijn -- I'm just muddling through here. Any patches or simple instructions which will keep Cygwin and/or MSVC++ supported are welcome.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old May 29, 2011, 00:59   #8
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Quote:
Originally Posted by d_m View Post
I wasn't able to get Mingw to build against the .lib files--I would prefer to use those if Mingw and MSVC++ can both use them. Do you have links and/or instructions? I tried to get the .lib files found via CFLAGS/LDFLAGS without much luck, but I will try again. The current DLL situation isn't ideal.
I read it at in the FAQ on the mingw website at http://mingw.org/wiki/Specify_the_li..._linker_to_use
Blue Baron is offline   Reply With Quote
Old June 1, 2011, 01:41   #9
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 46
Posts: 367
Donated: $120
konijn_ is on a distinguished road
[QUOTE=d_m;53468
@konijn -- I'm just muddling through here. Any patches or simple instructions which will keep Cygwin and/or MSVC++ supported are welcome.[/QUOTE]

Well, at least you know how to muddle, I have no idea about Windows/Cygwin development. I know how to change logic and type make -Fmakefile.win :\

Dont worry about it, I will code on my Mac and that's the end of it.

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old June 1, 2011, 04:51   #10
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 43
Posts: 1,517
d_m is on a distinguished road
Quote:
Originally Posted by konijn_ View Post
Well, at least you know how to muddle, I have no idea about Windows/Cygwin development. I know how to change logic and type make -Fmakefile.win :\

Dont worry about it, I will code on my Mac and that's the end of it.

T.
So, I have updated staging to use .lib files instead of .a files. Blue Baron pointed out that they do work with Mingw (although you have to say -llibpng instead of -lpng like with .a files).

I hope this makes it possible to develop with MSVC++ (and maybe Cygwin) again? Feedback appreciated.
__________________
linux->xterm->screen->pmacs
d_m 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
2 options for Windows PNG support Blue Baron Development 36 June 1, 2011 00:14
256 color support in r1862; uniques discussion to follow d_m Vanilla 3 December 22, 2009 11:28
Why no tile support in x11 port? bdo Vanilla 2 February 2, 2009 23:42
Request for enhancement (Large monitor support) K.I.L.E.R Vanilla 13 March 31, 2008 08:08
bigscreen support dionysian Variants 4 December 11, 2007 06:59


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


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.