Friday, February 13, 2009

How to build Gnash on Windows (Part I) UPDATE Oct 29, 2009


You have stumbled to this blog/guide so I assume the you know what Gnash is.

As I write this article, there's only Gnash 0.8.2 for Windows yet that version is months old from the latest build, which is 0.8.4.

With MinGW already installed on my Windows box, I wanted to build the latest version of Gnash.

I tried to look for some other guide on the net but there seem to be none or I'm just too lame to find one. So this will be my small documentation on building Gnash on Windows.

Part I
0. Updating MinGW
Gnash requires GNU Autoconf 2.61. And GStreamer requires Autopoint 0.17.

UPDATE: MinGW port of Autoconf 2.63 has been officially released, not sure if it works with Gnash, though.

1. Getting the source code
You can get the source from the official releases or from its Bazaar repository by typing:
bzr branch http://bzr.savannah.gnu.org/r/gnash/trunk

2. Downloading the dependencies

* Source to dependency files has been proven to be compatible to Gnash 0.8.4

3. Downloading NSPR

Gnash is using NSAPI that's why we need to build NSPR, and compiling NSPR requires NSINSTALL, yet there's no NSINSTALL from the MinGW. We have to get it from Mozilla Build. But it's 39MB and all we need is the nsinstall.exe. If I know how to compile nsinstall from source then I will let you know, but I don't. Now if you trust me, I am offering the same nsinstall.exe (14 KB) from Mozilla Build.

Extract nsinstall either from Mozilla Build (or from the link I gave you) to your MSYS bin directory. Then extract NSPR to MSYS home directory if you haven't already.

You are now ready to compile NSPR. Just type the following on MSYS console:
cd nspr*/m*/n*
configure
make
There'll be a dist directory which will contain three other directories (bin, include, and lib). Move all the content to root directory of MSYS (c:\msys\1.0\{here}).

If you are not having luck compiling NSPR, you might want to download a precompiled NSPR from my stash.

That's it for Part I, I'll have yet to know just how to prepare this dependencies in Part II.

5 comments:

Huang said...

Great article!!!

Expecting the part II.

Anonymous said...

I'd appreciate it if this guide was completed too. Thanks.

育丞 said...

Thanks for your guide, but could you tell me the next step what could I do?
Thanks for your help!

Creek23 said...

I'm currently continuing my adventure with this (and I did so for how many times last year).

Good news is, I am finally gonna be able to build Gnash 0.8.7.

Bad news is, I did not log all the stuff I did back then.

If ever I got successful, all I could do is upload my MinGW/MSYS toolchain and hopefully, you guys will be able to compile it yourselves too.

Wish me luck. ;)

Creek23 said...

@Huang, @Aonymous, @育丞

I am writing a part-2-like how-to for this blogpost. It is currently drafted at:

http://wiki.gnashdev.org/Building_on_Windows

But right now, all I am having problem of is /libbase/GnashImageJpeg.cpp with jpeglib.h

If you could please try to follow the instructions on wiki and check if you could get it to compile. Thank you.