You are here: Home » Reply

Reply To: HOWTO: Win32 Compilation

#5643

rpedde
Participant

@charly86 wrote:

Hi Ron,

I missed something in source code. Could you explain us how do you do to compile win32 target. Do you compile under Linux or directly on Windows ?

If so what compilator are you using. I’ll try do configure compilation files for with Visual Studio 6.

Thank’s

I use VS 2003. Generally, to build the whole thing, including the installation package, this is what you need:

1. Visual Studio. You can compile the server with express, but not the tray applet (although you could use the existing tray applet with a custom binary of firefly, unless you were actively developing on the tray applet).

2. Nullsoft’s NSIS (Only for installer)

3. The nsSCM service control plugin (Only for installer)

4. Microsoft’s Windows Media Format SDK 9.5

5. Tortoise SVN (You should be building from svn, plus, some header files and assemblies are version-stamped using a tool from TortoiseSVN).

6. Headers and link-libraries for:

– avcodec/avformat/avutil (ffmpeg)
– gnu_regex
– libFLAC
– pthreads for win32
– sqlite3
– sqlite2
– zlib
– libid3tag
– libogg/libvorbis

Seems like the ones I had to compile myself were ffmpeg, flac, ogg, vorbis, and zlib.

Wherever you put these, the headers and libs need to be added to your VS includes and libs.

In my setup, I have a directory structure like this:

c:workingprojectswin32
c:workingprojectswin32lib
c:workingprojectswin32include
c:workingprojectswin32redist
c:workingprojectswin32dll
c:workingprojectsmt-daapd

The redist has the redist msvc dlls that the tray icon requires, while the dll has the dlls that are required for the package (gnu_regex, libflac, etc)

You are, of course, welcome to arrange stuff however you want, but the build scripts for the package expects a layout like this.

To make things easier, if you don’t want to build the binaries for all the other assorted stuff, I have a zip of whole win32 directory (as above) that I’m currently using for builds at http://www.fireflymediaserver.org/win32.zip.

To get the svn stuff, use tortoise to do a checkout of https://svn.sourceforge.net/svnroot/mt-daapd/trunk into a directory called “mt-daapd” that is a peer to the win32 directory as illustrated above.

There is a vs 2003 .sln file in mt-daapd/win32. You’ll need to run mt-daapd/win32/versionize.bat to create the stamped/versionized assemblies. Then compile and go crazy.

I’ll take patches that are to current svn, aren’t hugely intrusive (unless hugely functional) and are enableable/disableable through a config value.

I’m going to sticky this, any comments or questions about building for win32, post ’em here.

— Ron