source: git/doc/HACKING.htm @ 3b69f29

debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
Last change on this file since 3b69f29 was 1ed5c4e, checked in by Olly Betts <olly@…>, 4 years ago

doc/HACKING.htm: Update Debian packages to install

  • Property mode set to 100644
File size: 5.8 KB
RevLine 
[e7839be]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
[b63c928d]43<P>You'll need automake 1.5 or later (earlier versions don't support
[27b8b59]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)
[1ed5c4e]46and autoconf 2.50 or later (autoconf 2.52, 2.53, 2.64 and 2.71 have all
[9bf7aa33]47been used successfully).
[c372fc9]48
[1ed5c4e]49<p>The wxWidgets library is used for aven's UI.  Currently >= 3.0.0 is
50supported.
51
52<p>The PROJ library is used for coordinate conversions.  Currently >= 8.2.0 is
53supported.
54
55<P>The Perl Locale::PO module is used for process message translation files.
56
[d5ef6ad]57<P>For building the documentation you'll need docbook-utils (also
58known as docbook-tools) and w3m.
[e7839be]59
[29e5a96]60<P>And for building unifont.pixelfont, you'll need unifont installed.
61
62<P>On Debian, you can install the required packages using:
63
64<pre>
[1ed5c4e]65sudo apt-get install autoconf automake liblocale-po-perl libproj-dev libwxgtk3.0-gtk3-dev inkscape netpbm docbook-utils w3m unifont
[29e5a96]66</pre>
[6127c82]67
[e7839be]68<H2>Building on Non-Unix Platforms</H2>
69
[c372fc9]70<H3>Mingw (Microsoft Windows)</H3>
[e7839be]71
72<P>Currently I build this with a Linux hosted cross-compiler.  I use
[adceff5]73the packaged cross-compiler in the debian testing/unstable distribution:
74
[bd285e5a]75<pre>
76sudo apt-get install mingw-w64-i686-dev
77</pre>
[e7839be]78
[d6a770d]79<p>
80I then install the various libraries by compiling from source.  For wxWidgets
[38bc415]813.0.5, I apply a
82<a href="https://survex.com/software/wxWidgets-3.0.5.patch">patch</a> to
83fix a compiler error and disable a pointless and annoying compiler ABI check
84(with this check aven stops working each time my cross compiler package is
85upgraded to a new GCC version; without it everything works fine).
[853438c]86</p>
87
88<p>
89Then I configure, build and install with:
[bd285e5a]90</p>
91
92<pre>
[853438c]93./configure --prefix=/usr/i686-w64-mingw32 --host i686-w64-mingw32 --with-msw --with-opengl --enable-display --disable-shared host_alias=i686-w64-mingw32
[bd285e5a]94make
95sudo make install
96</pre>
97
98<p>
99For PROJ 4.8.0:
[d6a770d]100</p>
101
[bd285e5a]102<pre>
103mkdir BUILD
104cd BUILD
105../configure --prefix=/usr/i686-w64-mingw32 --host i686-w64-mingw32 --disable-shared host_alias=i686-w64-mingw32
106make
107sudo make install
108</pre>
109
110<p>
111For libav 10.3:
112</p>
113
114<pre>
115sudo apt-get install yasm
116mkdir BUILD
117cd BUILD
[86801ff]118../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
[bd285e5a]119make
120sudo make install
121</pre>
[d6a770d]122
[e7839be]123<P>Building on Windows in a native mingw environment will probably
124require tinkering.  Best bet is probably to install bash and use the
125current configure script.  I'm happy to help if you want to try this,
126and I'll incorporate patches provided they're fairly clean.
127
[9fe7af4f]128<H2>Microsoft Windows Installer Builder</H2>
129
130<P>We use <A HREF="http://www.jrsoftware.org/isinfo.php">InnoSetup</A> to
[53b6a5a]131build the MS Windows Installer.  Survex 1.2.23 was built using InnoSetup
1325.5.6 (non-Unicode version, which apparently produces smaller installer
133packages).
[ebcdad9]134
135<P>Here are some random notes:
[9fe7af4f]136
[85f3565]137<H3>Packages Needed</H3>
138
[adceff5]139<P>On Debian, the commands to install wine vary depending on the architecture
140you're running - to check this use:
141
142<pre>
143dpkg-architecture -qDEB_HOST_GNU_CPU
144</pre>
145
146<H4>For i386</H4>
147
148<pre>
[8aebb0a]149sudo apt-get install wine wx3.0-i18n
[adceff5]150</pre>
151
152<H4>For x86_64</H4>
153
154<P>You'll need to enable multi-arch and install the i386 packages of wine:
155
156<pre>
157sudo dpkg --add-architecture i386
158sudo apt-get update
[8aebb0a]159sudo apt-get install wine wine-bin:i386 wx3.0-i18n
[adceff5]160</pre>
161
162<H4>Common</H4>
163
164<P>And then run:
[85f3565]165
[adceff5]166<pre>
167wine ~/Downloads/isetup-5.5.3.exe
168</pre>
[85f3565]169
[9fe7af4f]170<H3>Translations</H3>
171
[ebcdad9]172<P>In addition to the translations included with InnoSetup as standard, we also
[8b3362b]173add these, which you can find in the <code>lib</code> subdirectory of Survex's
[e367554]174source tree:
[9fe7af4f]175
176<UL>
[adceff5]177<li>ChineseSimplified.isl (Unofficial translation; for 5.5.3+)
[352ad2a]178<li>ChineseTraditional.isl (Candidate official translation; for 5.5.3+)
179<li>EnglishBritish.isl (Unofficial translation; for 5.5.3+)
[adceff5]180<li>Indonesian.isl (Unofficial translation; for 5.5.3+)
181<li>Romanian.isl (Unofficial translation; for 5.5.3+)
182<li>Slovak.isl (Unofficial translation; for 5.5.3+)
[9fe7af4f]183</UL>
184
[317c11b]185These are taken from the innosetup repo at
186https://github.com/jrsoftware/issrc.git
187(look in the <code>Files/Languages/Unofficial</code> subdirectory).
188
[9fe7af4f]189<H3>survex.iss</H3>
190
191<P>This file is generated by configure (from the template survex.iss.in).
192We could instead have a static survex.iss which uses #include to pull in
193a file with the Survex version info in, but the current method works well
194enough so we'll stick with it for now (I suspect #include was introduced since
195we started using InnoSetup).
196
[e7839be]197</BODY></HTML>
Note: See TracBrowser for help on using the repository browser.