[e7839be] | 1 | <HTML><HEAD> |
---|
| 2 | <TITLE>Survex Hacker's Guide</TITLE> |
---|
| 3 | <STYLE type="text/css"><!-- |
---|
| 4 | BODY, TD, CENTER, UL, OL {font-family: sans-serif;} |
---|
| 5 | --> |
---|
| 6 | </STYLE> |
---|
| 7 | </HEAD><BODY BGCOLOR=white TEXT=black> |
---|
| 8 | <H1>Hacking Survex</H1> |
---|
| 9 | |
---|
| 10 | <p>(That's hacking in the "tinkering with code" sense, not in the |
---|
| 11 | "breaking into other people's computer systems" sense). |
---|
| 12 | |
---|
| 13 | <p>This is currently a random collection of notes that need to be written |
---|
| 14 | down while I remember. With time it should evolve into a more |
---|
| 15 | coherent document. If you have any questions which this should answer |
---|
| 16 | but doesn't then ask me and I'll add them. |
---|
| 17 | |
---|
| 18 | <H2>Network code debugging</H2> |
---|
| 19 | |
---|
| 20 | <P>You can pick which network simplifications are attempted using "-z" |
---|
| 21 | with an argument listing code letters. So: |
---|
| 22 | |
---|
| 23 | <ul> |
---|
| 24 | <li>-z= no special simplifications (articulation still performed) |
---|
| 25 | <li>-z=l remove "lollipops" |
---|
| 26 | <li>-z=p remove parallel legs |
---|
| 27 | <li>-z=d convert deltas to stars |
---|
| 28 | </ul> |
---|
| 29 | |
---|
| 30 | <P>And you can combine these in any combination: |
---|
| 31 | |
---|
| 32 | <ul> |
---|
| 33 | <li>-z=lp remove "lollipops" and parallel legs |
---|
| 34 | <li>-z=lpd remove "lollipops" and parallel legs; convert deltas to stars |
---|
| 35 | </ul> |
---|
| 36 | |
---|
| 37 | <P>"-z=lpd" is the default (in 0.99 at least - more transformations may |
---|
| 38 | conceivably be added in future, although the simple common cases are |
---|
| 39 | already covered). |
---|
| 40 | |
---|
| 41 | <H2>Developing on Unix Platforms</H2> |
---|
| 42 | |
---|
[b63c928d] | 43 | <P>You'll need automake 1.5 or later (earlier versions don't support |
---|
[27b8b59] | 44 | per-executable CFLAGS; 1.6 has been tested and works, but wasn't a |
---|
| 45 | very stable release - automake 1.6.1 is a better bet) |
---|
| 46 | and autoconf 2.50 or later (autoconf 2.52 and 2.53 have |
---|
| 47 | both been used successfully). |
---|
[c372fc9] | 48 | |
---|
| 49 | <P>For building the documentation you'll need sgmltools 2 or later, |
---|
[c746b4d] | 50 | docbook-to-man, and w3m. |
---|
[e7839be] | 51 | |
---|
| 52 | <H2>Building on Non-Unix Platforms</H2> |
---|
| 53 | |
---|
[c372fc9] | 54 | <H3>Mingw (Microsoft Windows)</H3> |
---|
[e7839be] | 55 | |
---|
| 56 | <P>Currently I build this with a Linux hosted cross-compiler. I use |
---|
| 57 | the packaged cross-compiler in the debian testing/unstable distribution. |
---|
| 58 | You can probably install these on other distributions using alien to |
---|
| 59 | convert them to RPMs or similar. Alternatively, before that |
---|
| 60 | I used to use pre-built binaries for gcc 2.95.2 obtained from: |
---|
| 61 | |
---|
[27b8b59] | 62 | <P><A HREF="http://www.libsdl.org/extras/win32/cross/" |
---|
| 63 | >http://www.libsdl.org/extras/win32/cross/</A> |
---|
[e7839be] | 64 | |
---|
| 65 | <P>Building on Windows in a native mingw environment will probably |
---|
| 66 | require tinkering. Best bet is probably to install bash and use the |
---|
| 67 | current configure script. I'm happy to help if you want to try this, |
---|
| 68 | and I'll incorporate patches provided they're fairly clean. |
---|
| 69 | |
---|
| 70 | <P>Building on Windows with MSVC/BorlandC/Watcom/... is likely to be more |
---|
| 71 | work, but could be a worthwhile project. I'd suggest patching the |
---|
| 72 | perl script miniam.pl to generate a suitable makefile. Again, send |
---|
| 73 | patches if you get this to work. |
---|
| 74 | |
---|
[9fe7af4f] | 75 | <H2>Microsoft Windows Installer Builder</H2> |
---|
| 76 | |
---|
| 77 | <P>We use <A HREF="http://www.jrsoftware.org/isinfo.php">InnoSetup</A> to |
---|
| 78 | build the MS Windows Installer. At the time of writing, I've just updated |
---|
| 79 | Survex 1.1.X to use InnoSetup version 5.1.5. Here are some random notes. |
---|
| 80 | |
---|
| 81 | <H3>Translations</H3> |
---|
| 82 | |
---|
| 83 | <P>In addition to the translations included as standard, we also add: |
---|
| 84 | |
---|
| 85 | <UL> |
---|
| 86 | <LI>UK English (unofficial, done by Olly) |
---|
| 87 | <LI>Slovak-6-5.1.0.isl (official, but not in 5.1.5) |
---|
| 88 | <LI>Slovak-6-5.1.0.isl (official, but not in 5.1.5) |
---|
| 89 | <LI>SpanishStd-2-5.1.0.isl (unofficial, asked Josep to check it over) |
---|
| 90 | <LI>Romanian-5-5.1.0.isl (unofficial, asked Cristian to check it over) |
---|
| 91 | </UL> |
---|
| 92 | |
---|
| 93 | <H3>survex.iss</H3> |
---|
| 94 | |
---|
| 95 | <P>This file is generated by configure (from the template survex.iss.in). |
---|
| 96 | We could instead have a static survex.iss which uses #include to pull in |
---|
| 97 | a file with the Survex version info in, but the current method works well |
---|
| 98 | enough so we'll stick with it for now (I suspect #include was introduced since |
---|
| 99 | we started using InnoSetup). |
---|
| 100 | |
---|
[e7839be] | 101 | </BODY></HTML> |
---|