[Haskell-cafe] Re: Windows details

Andrew Coppin andrewcoppin at btinternet.com
Thu Sep 11 15:24:24 EDT 2008


Jeff Zaroyko wrote:
> In theory, you should be able to use mingw's windres tool to produce an object
> file from the resource definition which you'd link with the rest of your program.
>
> http://www.mingw.org/MinGWiki/index.php/MS resource compiler
>   

Yes, there's a cryptic comment burried away in the GHC manual that says 
GHC itself already uses windres to embed the manifest file into the 
compiled binary file. (And sure enough, if you crawl through with a hex 
editor you'll find the raw XML in there.) There's an option to tell GHC 
to not do this - however, I don't see any option anywhere to tell it to 
embed a *different* resource file instead. And frankly, the linker 
command looks frightening. (For starters, it's 6 pages long. I'm not 
kidding!)

XN Resource Editor makes adding an icon child's play. (Interestingly, 
this also becomes the default window icon without any further action, 
which is nice.) However, either XN nor Resource Hack are able to embedd 
correct version info. And both of them crash quite a lot. (Even more 
interestingly, XN seems to make GHC-compiled binary files dramatically 
*smaller*... huh??)



More information about the Haskell-Cafe mailing list