source: git/doc/HACKING.htm @ ecdfe80

line_contentsstereotravis-osx
Last change on this file since ecdfe80 was ecdfe80, checked in by Olly Betts <olly@…>, 3 years ago

docbook2man is in docbook-utils not docbook2x

  • Property mode set to 100644
File size: 5.2 KB
Line 
1<HTML><HEAD>
2<TITLE>Survex Hacker's Guide</TITLE>
3<STYLE type="text/css"><!--
4BODY, 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
14down while I remember.  With time it should evolve into a more
15coherent document.  If you have any questions which this should answer
16but 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"
21with 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
38conceivably be added in future, although the simple common cases are
39already covered).
40
41<H2>Developing on Unix Platforms</H2>
42
43<P>You'll need automake 1.5 or later (earlier versions don't support
44per-executable CFLAGS; 1.6 has been tested and works, but wasn't a
45very stable release - automake 1.6.1 is a better bet)
46and autoconf 2.50 or later (autoconf 2.52, 2.53 and 2.64 have all
47been used successfully).
48
49<P>For building the documentation you'll need sgmltools 2 or later,
50jadetex, docbook-utils, and w3m.
51
52<P>And for building unifont.pixelfont, you'll need unifont installed.
53
54<P>On Debian, you can install the required packages using:
55
56<pre>
57sudo apt-get install autoconf automake inkscape netpbm sgmltools-lite jadetex docbook-utils w3m unifont
58</pre>
59
60<H2>Building on Non-Unix Platforms</H2>
61
62<H3>Mingw (Microsoft Windows)</H3>
63
64<P>Currently I build this with a Linux hosted cross-compiler.  I use
65the packaged cross-compiler in the debian testing/unstable distribution:
66
67<pre>
68sudo apt-get install mingw-w64-i686-dev
69</pre>
70
71<p>
72I then install the various libraries by compiling from source.  For wxWidgets
733.0.1, I configure, build and install with:
74</p>
75
76<pre>
77./configure --prefix=/usr/i686-w64-mingw32 --host i686-w64-mingw32 --with-msw --with-opengl --enable-display --disable-threads --disable-shared host_alias=i686-w64-mingw32 --disable-tls
78make
79sudo make install
80</pre>
81
82<p>
83For PROJ 4.8.0:
84</p>
85
86<pre>
87mkdir BUILD
88cd BUILD
89../configure --prefix=/usr/i686-w64-mingw32 --host i686-w64-mingw32 --disable-shared host_alias=i686-w64-mingw32
90make
91sudo make install
92</pre>
93
94<p>
95For libav 10.3:
96</p>
97
98<pre>
99sudo apt-get install yasm
100mkdir BUILD
101cd BUILD
102../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
103make
104sudo make install
105</pre>
106
107<P>Building on Windows in a native mingw environment will probably
108require tinkering.  Best bet is probably to install bash and use the
109current configure script.  I'm happy to help if you want to try this,
110and I'll incorporate patches provided they're fairly clean.
111
112<H2>Microsoft Windows Installer Builder</H2>
113
114<P>We use <A HREF="http://www.jrsoftware.org/isinfo.php">InnoSetup</A> to
115build the MS Windows Installer.  Survex 1.2.23 was built using InnoSetup
1165.5.6 (non-Unicode version, which apparently produces smaller installer
117packages).
118
119<P>Here are some random notes:
120
121<H3>Packages Needed</H3>
122
123<P>On Debian, the commands to install wine vary depending on the architecture
124you're running - to check this use:
125
126<pre>
127dpkg-architecture -qDEB_HOST_GNU_CPU
128</pre>
129
130<H4>For i386</H4>
131
132<pre>
133sudo apt-get install wine wx3.0-i18n
134</pre>
135
136<H4>For x86_64</H4>
137
138<P>You'll need to enable multi-arch and install the i386 packages of wine:
139
140<pre>
141sudo dpkg --add-architecture i386
142sudo apt-get update
143sudo apt-get install wine wine-bin:i386 wx3.0-i18n
144</pre>
145
146<H4>Common</H4>
147
148<P>And then run:
149
150<pre>
151wine ~/Downloads/isetup-5.5.3.exe
152</pre>
153
154<H3>Translations</H3>
155
156<P>In addition to the translations included with InnoSetup as standard, we also
157add these, which you can find in the <code>lib</code> subdirectory of Survex's
158source tree:
159
160<UL>
161<li>ChineseSimplified.isl (Unofficial translation; for 5.5.3+)
162<li>ChineseTraditional.isl (Candidate official translation; for 5.5.3+)
163<li>EnglishBritish.isl (Unofficial translation; for 5.5.3+)
164<li>Indonesian.isl (Unofficial translation; for 5.5.3+)
165<li>Romanian.isl (Unofficial translation; for 5.5.3+)
166<li>Slovak.isl (Unofficial translation; for 5.5.3+)
167</UL>
168
169These are taken from the innosetup repo at
170https://github.com/jrsoftware/issrc.git
171(look in the <code>Files/Languages/Unofficial</code> subdirectory).
172
173<H3>survex.iss</H3>
174
175<P>This file is generated by configure (from the template survex.iss.in).
176We could instead have a static survex.iss which uses #include to pull in
177a file with the Survex version info in, but the current method works well
178enough so we'll stick with it for now (I suspect #include was introduced since
179we started using InnoSetup).
180
181</BODY></HTML>
Note: See TracBrowser for help on using the repository browser.