Hacking Survex

(That's hacking in the "tinkering with code" sense, not in the "breaking into other people's computer systems" sense).

This is currently a random collection of notes that need to be written down while I remember. With time it should evolve into a more coherent document. If you have any questions which this should answer but doesn't then ask me and I'll add them.

Network code debugging

You can pick which network simplifications are attempted using "-z" with an argument listing code letters. So:

And you can combine these in any combination:

"-z=lpd" is the default (in 0.99 at least - more transformations may conceivably be added in future, although the simple common cases are already covered).

Developing on Unix Platforms

You'll need automake 1.5 or later (earlier versions don't support per-executable CFLAGS; 1.6 has been tested and works, but wasn't a very stable release - automake 1.6.1 is a better bet) and autoconf 2.50 or later (autoconf 2.52 and 2.53 have both been used successfully).

For building the documentation you'll need sgmltools 2 or later, docbook-to-man, and w3m.

Building on Non-Unix Platforms

Mingw (Microsoft Windows)

Currently I build this with a Linux hosted cross-compiler. I use the packaged cross-compiler in the debian testing/unstable distribution. You can probably install these on other distributions using alien to convert them to RPMs or similar. Alternatively, before that I used to use pre-built binaries for gcc 2.95.2 obtained from:

http://www.libsdl.org/extras/win32/cross/

Building on Windows in a native mingw environment will probably require tinkering. Best bet is probably to install bash and use the current configure script. I'm happy to help if you want to try this, and I'll incorporate patches provided they're fairly clean.

Building on Windows with MSVC/BorlandC/Watcom/... is likely to be more work, but could be a worthwhile project. I'd suggest patching the perl script miniam.pl to generate a suitable makefile. Again, send patches if you get this to work.

Microsoft Windows Installer Builder

We use InnoSetup to build the MS Windows Installer. At the time of writing, I've just updated Survex 1.1.X to use InnoSetup version 5.1.5. Here are some random notes.

Translations

In addition to the translations included as standard, we also add:

survex.iss

This file is generated by configure (from the template survex.iss.in). We could instead have a static survex.iss which uses #include to pull in a file with the Survex version info in, but the current method works well enough so we'll stick with it for now (I suspect #include was introduced since we started using InnoSetup).