Many of our developers don't run Windows and don't want to. And that's understandable - as a development platform it can be challenging, especially for people working on traditional Unix type projects. But Postgres is widely deployed on Windows, and in some pretty big deployments too (for example, HP's). And it's sufficiently different that it's easy to break things. One of the things that Linux and OSX users can do is to cross-compile for Windows. Of course, you can't run it without running Windows, but just getting over the build hurdle is a start. And it's incredibly easy to do. Just grab the linux cross compiler from Sourceforge. For example, to build 32-bit WIndows binaries on my x86-64 bit Linux machine, I would grab mingw-w32-bin_x86_64-linux_20120327.tar.bz2.
Just unpack it, add the binaries to your path and you're away:
You can actually zip up and run the resulting postgres on Windows, but there is something not yet right . The libpq appears to have a problem, and there are odd things that happen with contrib too. I'm going to follow those up, and also look at building with third party libraries like zlib, openssl and libxml2. I'll blog about those when I have more news.
Just unpack it, add the binaries to your path and you're away:
[andrew@emma ~]$ sudo mkdir /usr/local/mingw [andrew@emma ~]$ sudo tar -j -C /usr/local/mingw -xf mingw-w32-bin_x86_64-linux_20120327.tar.bz2 [andrew@emma ~]$ mkdir nxcomp [andrew@emma ~]$ cd nxcomp [andrew@emma nxcomp]$ export PATH=/usr/local/mingw/bin:$PATH [andrew@emma nxcomp]$ /path/to/postgresql.source/configure --without-zlib --host=i686-w64-mingw32 --prefix=`pwd`/postgres [andrew@emma nxcomp]$ make [andrew@emma nxcomp]$ make install
You can actually zip up and run the resulting postgres on Windows, but there is something not yet right . The libpq appears to have a problem, and there are odd things that happen with contrib too. I'm going to follow those up, and also look at building with third party libraries like zlib, openssl and libxml2. I'll blog about those when I have more news.