(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.
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).
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, 2.53, 2.64 and 2.71 have all been used successfully).
The wxWidgets library is used for aven's UI. Currently >= 3.0.0 is supported.
The PROJ library is used for coordinate conversions. Currently >= 6.2.0 is supported.
The Perl Locale::PO module is used for process message translation files.
For building the documentation you'll need docbook-utils (also known as docbook-tools) and w3m.
And for building unifont.pixelfont, you'll need unifont installed.
On Debian, you can install the required packages using:
sudo apt-get install autoconf automake liblocale-po-perl libproj-dev libwxgtk3.0-gtk3-dev inkscape netpbm docbook-utils w3m unifont
Currently I build this with a Linux hosted cross-compiler. I use the packaged cross-compiler in the debian testing/unstable distribution:
sudo apt-get install mingw-w64-i686-dev
I then install the various libraries by compiling from source. For wxWidgets I apply a patch to disable a pointless and annoying compiler ABI check (with this check aven stops working each time my cross compiler package is upgraded to a new GCC version; without it everything works fine).
Then I configure, build and install with:
./configure --prefix=/usr/i686-w64-mingw32 --host i686-w64-mingw32 --with-msw --with-opengl --without-libtiff --enable-display --disable-shared host_alias=i686-w64-mingw32 DOCBOOK_TO_MAN="xmlto man --skip-validation" make sudo make install
With wxWidgets 3.1.6, there's a linking problem with aven if libtiff isn't disabled, and Survex doesn't use it so it's simplest to just disable it:
/usr/bin/i686-w64-mingw32-ld: /usr/i686-w64-mingw32/lib/libwxtiff-3.1-i686-w64-mingw32.a(wxtiff_tif_dirinfo.o):tif_dirinfo.c:(.text+0x80d): undefined reference to `_TIFF_snprintf_f'
For sqlite (needed by PROJ):
wget https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz tar xvf sqlite-autoconf-3360000.tar.gz mkdir BUILD cd BUILD ../configure --prefix=/usr/i686-w64-mingw32 --host i686-w64-mingw32 --disable-shared --disable-fts4 --disable-fts5 --disable-json1 --disable-rtree host_alias=i686-w64-mingw32 make sudo make install
For PROJ 8.2.0 (TIFF apparently useful for some grids, but would also need libtiff):
mkdir BUILD cd BUILD ../configure --prefix=/usr/i686-w64-mingw32 --host i686-w64-mingw32 --disable-shared host_alias=i686-w64-mingw32 --without-curl --disable-tiff make sudo make install
For ffmpeg 4.4.1:
sudo apt-get install yasm mkdir BUILD cd BUILD ../configure --prefix=/usr/i686-w64-mingw32 --cross-prefix=i686-w64-mingw32- --enable-cross-compile --target-os=mingw32 --arch=i686 --disable-shared --disable-decoders --disable-demuxers --disable-programs --disable-network --disable-bsfs --disable-protocols --disable-devices make sudo make install
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.
We use InnoSetup to build the MS Windows Installer. Survex 1.4.2 was built using InnoSetup 6.2.0.
Here are some random notes:
On Debian unstable/testing:
sudo apt-get install wine wx3.0-i18n
And then run:
wine ~/Downloads/innosetup-6.2.0.exe
In addition to the translations included with InnoSetup as standard, we also
add these, which you can find in the lib
subdirectory of Survex's
source tree:
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).