blob: 700b160bdb1f95386e5a5c40173043e817a28e2b [file] [log] [blame]
Christian Eglif70f4e02011-01-03 15:09:06 +00001This HACKING file describes the development environment. -*- org -*-
Christian Egli5510e4a2009-11-05 09:55:30 +00002
Christian Egli311d52b2013-01-11 16:19:23 +00003 Copyright (C) 2008, 2009, 2011 ViewPlus Technologies, Inc. and Abilitiessoft, Inc.
Christian Egli818e58b2015-06-05 14:27:06 +02004 Copyright (C) 2012, 2013, 2014,2015 Swiss Library for the Blind, Visually Impaired and Print Disabled
Christian Egli311d52b2013-01-11 16:19:23 +00005
Christian Egli5510e4a2009-11-05 09:55:30 +00006 Copying and distribution of this file, with or without modification,
7 are permitted in any medium without royalty provided the copyright
Christian Egli741b0072014-09-18 11:08:45 +02008 notice and this notice are preserved. This file is offered as-is,
9 without any warranty.
Christian Eglieddc4662009-03-09 13:27:20 +000010
11This file attempts to describe the maintainer-specific notes to follow
12when hacking liblouis.
13
Christian Eglif9496272017-04-18 17:00:39 +020014* Table of Contents :TOC:
Christian Eglie580c8e2018-03-05 14:42:33 +010015- [[#developing][Developing]]
16 - [[#where-to-get-it][Where to get it]]
17 - [[#build-requirements][Build requirements]]
18 - [[#gnulib][Gnulib]]
19 - [[#how-to-build][How to build]]
20 - [[#install-with-homebrew][Install with Homebrew]]
21 - [[#docker][Docker]]
22 - [[#how-to-run-tests][How to run tests]]
23 - [[#how-to-debug][How to debug]]
24 - [[#how-to-find-memory-leaks][How to find memory leaks]]
Christian Eglief45f5a2019-08-15 14:49:10 +020025 - [[#static-analysis][Static analysis]]
Christian Eglie580c8e2018-03-05 14:42:33 +010026 - [[#how-to-analyze-performance][How to analyze performance]]
27 - [[#how-to-build-for-windows][How to build for Windows]]
28- [[#release-procedure][Release Procedure]]
29 - [[#update-the-news-entry][Update the NEWS entry]]
30 - [[#set-the-version-number][Set the version number]]
31 - [[#commit-and-tag][Commit and tag]]
32 - [[#make-the-release][Make the release]]
33 - [[#upload][Upload]]
34 - [[#online-documentation][Online documentation]]
35 - [[#web-site-maintenance][Web site maintenance]]
36 - [[#announce][Announce]]
Christian Eglif9496272017-04-18 17:00:39 +020037
Christian Egli5510e4a2009-11-05 09:55:30 +000038* Developing
39** Where to get it
Christian Egli71647d62014-05-20 09:20:28 +020040The development sources are available through git at github.com:
Christian Egli5510e4a2009-11-05 09:55:30 +000041
Christian Egli71647d62014-05-20 09:20:28 +020042 https://github.com/liblouis/liblouis
Christian Egli5510e4a2009-11-05 09:55:30 +000043
44** Build requirements
Christian Egli818e58b2015-06-05 14:27:06 +020045To build Automake, Autoconf, and Libtool are used. If you are getting
46the sources from git (or change configure.ac), you'll need to have
47these tools installed to (re)build. Optionally (if you want to
Christian Egli63ab27f2017-04-21 10:57:13 +020048generate man pages) you'll also need ~help2man~. All of these programs
Christian Egli5510e4a2009-11-05 09:55:30 +000049are available from ftp://ftp.gnu.org/gnu.
50
Christian Eglia02c1362017-03-06 10:38:45 +010051If you want to run the YAML based test suite you will have to install
52~libyaml~.
53
Bert Frees34df6a62015-04-10 16:10:21 +020054On Mac OS, the programs can be optained with Homebrew (http://brew.sh):
Bert Freesd41c9ac2015-03-25 14:42:43 +010055
Christian Egli63ab27f2017-04-21 10:57:13 +020056#+BEGIN_SRC shell
57$ brew install automake libtool pkg-config texinfo
58#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +020059
60Note that if you are using Homebrew to install liblouis (see below),
61the build dependencies are installed automatically.
Bert Freesd41c9ac2015-03-25 14:42:43 +010062
Christian Egli5510e4a2009-11-05 09:55:30 +000063** Gnulib
Christian Egli818e58b2015-06-05 14:27:06 +020064Gnulib (http://www.gnu.org/software/gnulib) is used to provide
65portable basic functionality to programs and libraries. We use two
66instances of gnulib, one to provide portable functions such as
67~malloc~, ~strndup~, etc to the library and another one to provide
68portable functionality such as ~getopt~, ~progname~ or
69~version-etc~ to the tools.
Christian Egli5510e4a2009-11-05 09:55:30 +000070
Christian Egli818e58b2015-06-05 14:27:06 +020071The first time invocation to import gnulib for the library was
72
Christian Egli63ab27f2017-04-21 10:57:13 +020073#+BEGIN_SRC shell
74$ gnulib-tool --add-import --lib=libgnu --source-base=gnulib \
Christian Egli818e58b2015-06-05 14:27:06 +020075 --m4-base=gnulib/m4 --aux-dir=build-aux --libtool \
76 --macro-prefix=gl --no-vc-files \
77 malloc-gnu realloc-gnu strndup
Christian Egli63ab27f2017-04-21 10:57:13 +020078#+END_SRC
Christian Egli818e58b2015-06-05 14:27:06 +020079
80and for the tools
81
Christian Egli63ab27f2017-04-21 10:57:13 +020082#+BEGIN_SRC shell
83$ gnulib-tool --add-import --lib=libgnutools --source-base=tools/gnulib \
Christian Egli818e58b2015-06-05 14:27:06 +020084 --m4-base=tools/gnulib/m4 --aux-dir=build-aux --libtool \
85 --macro-prefix=gl_tools --no-vc-files \
86 getopt-gnu malloc-gnu progname version-etc
Christian Egli63ab27f2017-04-21 10:57:13 +020087#+END_SRC
Christian Egli818e58b2015-06-05 14:27:06 +020088
Christian Egli5510e4a2009-11-05 09:55:30 +000089More modules might have been added since. The currently-used gnulib
90modules and other gnulib information are recorded in
Christian Egli818e58b2015-06-05 14:27:06 +020091~gnulib/m4/gnulib-cache.m4~ and ~tools/gnulib/m4/gnulib-cache.m4~.
92
93If you want to update from the current gnulib, install gnulib, and
94then run the following commands in the top-level directory.
95
Christian Egli63ab27f2017-04-21 10:57:13 +020096#+BEGIN_SRC shell
97$ gnulib-tool --add-import --lib=libgnu --source-base=gnulib \
Christian Egli818e58b2015-06-05 14:27:06 +020098 --m4-base=gnulib/m4 --aux-dir=build-aux --libtool \
99 --macro-prefix=gl --no-vc-files
Christian Egli63ab27f2017-04-21 10:57:13 +0200100$ gnulib-tool --add-import --lib=libgnutools --source-base=tools/gnulib \
Christian Egli818e58b2015-06-05 14:27:06 +0200101 --m4-base=tools/gnulib/m4 --aux-dir=build-aux --libtool \
102 --macro-prefix=gl_tools --no-vc-files
Christian Egli63ab27f2017-04-21 10:57:13 +0200103#+END_SRC
Christian Egli5510e4a2009-11-05 09:55:30 +0000104
105** How to build
Christian Egli71647d62014-05-20 09:20:28 +0200106After getting the sources from git, with
Christian Egli81b04812009-11-05 11:07:17 +0000107
Christian Egli63ab27f2017-04-21 10:57:13 +0200108#+BEGIN_SRC shell
109$ git clone https://github.com/liblouis/liblouis.git
110#+END_SRC
Christian Egli81b04812009-11-05 11:07:17 +0000111
112and installing the tools above, change to the liblouis directory and
113and bootstrap the project with the following command
114
Christian Egli63ab27f2017-04-21 10:57:13 +0200115#+BEGIN_SRC shell
116$ ./autogen.sh
117#+END_SRC
Christian Egli81b04812009-11-05 11:07:17 +0000118
119to do a fresh build. Then run configure as usual:
120
Christian Egli63ab27f2017-04-21 10:57:13 +0200121#+BEGIN_SRC shell
122$ ./configure
123#+END_SRC
Christian Egli81b04812009-11-05 11:07:17 +0000124
125You have the choice to compile liblouis for either 16- or 32-bit
126Unicode. By default it is compiled for the former. To get 32-bit
Christian Egli63ab27f2017-04-21 10:57:13 +0200127Unicode run configure with ~--enable-ucs4~.
Christian Egli81b04812009-11-05 11:07:17 +0000128
Christian Egli63ab27f2017-04-21 10:57:13 +0200129After running configure run ~make~ and then ~make install~. You must
Christian Egli81b04812009-11-05 11:07:17 +0000130have root privileges for the installation step.
Christian Egli5510e4a2009-11-05 09:55:30 +0000131
Bert Frees34df6a62015-04-10 16:10:21 +0200132** Install with Homebrew
133Homebrew (http://brew.sh) is a package manager for Mac OS X that
134installs software from source. There is nothing special about the
135installation process in the sense that under the hood it happens
136exactly as described above, with the only difference that Homebrew
137automates it completely.
138
139First, use the ~brew tap~ command to add the repository that includes
140the liblouis formula:
141
Christian Egli63ab27f2017-04-21 10:57:13 +0200142#+BEGIN_SRC shell
143$ brew tap liblouis/liblouis
144#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200145
146Now you are ready to install liblouis:
147
Christian Egli63ab27f2017-04-21 10:57:13 +0200148#+BEGIN_SRC shell
149$ brew install liblouis
150#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200151
Bert Freesd41c9ac2015-03-25 14:42:43 +0100152** Docker
Bert Frees34df6a62015-04-10 16:10:21 +0200153Docker (https://www.docker.com) can be useful both for creating a
154development environment for liblouis, and for shipping the
155application.
Bert Freesd41c9ac2015-03-25 14:42:43 +0100156
Bert Frees34df6a62015-04-10 16:10:21 +0200157Setting up a developer environment can take long and can be
158problematic especially for Windows. Thanks to Docker we can set up the
159environment for you, we can easily distribute it as an image, which
160can be run by anybody and will behave exactly the same for everybody.
Bert Freesd41c9ac2015-03-25 14:42:43 +0100161
Bert Frees34df6a62015-04-10 16:10:21 +0200162Docker images of liblouis are being built automatically each time
163something changes in the code (see https://registry.hub.docker.com/repos/liblouis).
164In order to use them, first get Docker at
165http://docs.docker.com/introduction/get-docker. Download the latest
166liblouis image with:
Bert Freesd41c9ac2015-03-25 14:42:43 +0100167
Christian Egli63ab27f2017-04-21 10:57:13 +0200168#+BEGIN_SRC shell
169$ docker pull liblouis/liblouis
170#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200171
172Then, enter the development environment by running the image in a
173Docker container:
174
Christian Egli63ab27f2017-04-21 10:57:13 +0200175#+BEGIN_SRC shell
176$ docker run -it liblouis/liblouis bash
177#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200178
179Local files and directories can be "mounted" inside the container, in
180order to make it easier to edit files and to persist changes across
181runs. For example, to use local table files:
182
Christian Egli63ab27f2017-04-21 10:57:13 +0200183#+BEGIN_SRC shell
184$ docker run -it -v $(pwd)/tables:/tmp/liblouis/tables liblouis/liblouis bash
185#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200186
187See the Docker documentation for more info.
188
189The same Docker image can be used as a development environment and as
190the application itself. For example, to run the lou_translate tool
191from inside a Docker container:
192
Christian Egli63ab27f2017-04-21 10:57:13 +0200193#+BEGIN_SRC shell
194$ docker run -it liblouis/liblouis lou_translate en-us-g1.ctb
195#+END_SRC
Bert Freesd41c9ac2015-03-25 14:42:43 +0100196
Bert Frees34df6a62015-04-10 16:10:21 +0200197To rebuild the image yourself, run the following command in the root
198directory of the liblouis source:
Bert Freesd41c9ac2015-03-25 14:42:43 +0100199
Christian Egli63ab27f2017-04-21 10:57:13 +0200200#+BEGIN_SRC shell
201$ docker build -t liblouis/liblouis .
202#+END_SRC
Bert Freesd41c9ac2015-03-25 14:42:43 +0100203
Christian Egli63ab27f2017-04-21 10:57:13 +0200204A ~.dockerignore~ file is required if you want to compile the source
205both on te host and in the Docker container. The ~.dockerignore~ file
206can be updated from ~.gitignore~ with:
Bert Frees12e99042015-11-15 12:23:40 +0100207
Christian Egli63ab27f2017-04-21 10:57:13 +0200208#+BEGIN_SRC shell
209$ make .dockerignore
210#+END_SRC
Bert Frees12e99042015-11-15 12:23:40 +0100211
Bert Freesd41c9ac2015-03-25 14:42:43 +0100212** How to run tests
Bert Frees34df6a62015-04-10 16:10:21 +0200213Tests are run with
Bert Freesd41c9ac2015-03-25 14:42:43 +0100214
Christian Egli63ab27f2017-04-21 10:57:13 +0200215#+BEGIN_SRC shell
216$ make check
217#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200218
Christian Eglif70f4e02011-01-03 15:09:06 +0000219** How to debug
Christian Egli45b3d322013-01-17 09:51:56 +0000220First you have to build liblouis with debugging info enabled.
221
Christian Egli63ab27f2017-04-21 10:57:13 +0200222#+BEGIN_SRC shell
223$ ./configure CFLAGS='-g -O0 -Wall -Wextra'
224$ make
225#+END_SRC
Christian Egli45b3d322013-01-17 09:51:56 +0000226
Christian Eglif70f4e02011-01-03 15:09:06 +0000227Starting the programs under the tools directory within gdb is a little
228tricky as they are linked with libtool. See the info page of libtool
Christian Egli63ab27f2017-04-21 10:57:13 +0200229for more information. To start ~lou_checktable~ for table
230~wiskunde.ctb~ for example you'd have to issue the following commands:
Christian Eglif70f4e02011-01-03 15:09:06 +0000231
Christian Egli63ab27f2017-04-21 10:57:13 +0200232#+BEGIN_SRC shell
233$ libtool --mode=execute gdb ./tools/lou_checktable
234(gdb) run tables/wiskunde.ctb
235#+END_SRC
Christian Eglif70f4e02011-01-03 15:09:06 +0000236
Christian Eglic77a5892012-05-11 12:11:26 +0000237** How to find memory leaks
238Valgrind is a tool that can be used to find memory errors. It is
239recommended that you compile liblouis without any optimizations and
240with all warnings enabled before running it through Valgrind:
241
Christian Egli63ab27f2017-04-21 10:57:13 +0200242#+BEGIN_SRC shell
243$ ./configure CFLAGS='-g -O0 -Wall'
244$ make
245#+END_SRC
Christian Eglic77a5892012-05-11 12:11:26 +0000246
247Then use Valgrind to analyze liblouis. For example you can run
Christian Egli63ab27f2017-04-21 10:57:13 +0200248~lou_translate~ trough Valgrind:
Christian Eglic77a5892012-05-11 12:11:26 +0000249
Christian Egli63ab27f2017-04-21 10:57:13 +0200250#+BEGIN_SRC shell
251$ libtool --mode=execute valgrind -v --tool=memcheck \
252 --leak-check=full --leak-resolution=high --log-file=valgrind.log \
253 ./tools/lou_translate en-us-g2.ctb
254#+END_SRC
Christian Eglic77a5892012-05-11 12:11:26 +0000255
256Type a few words at the prompt, check translation and terminate
Christian Egli63ab27f2017-04-21 10:57:13 +0200257~lou_translate~. Now open the file ~valgrind.log~ and see if there are
258any memory leaks reported.
Christian Eglic77a5892012-05-11 12:11:26 +0000259
260You can also just run lou_checktable for example:
261
Christian Egli63ab27f2017-04-21 10:57:13 +0200262#+BEGIN_SRC shell
263$ libtool --mode=execute valgrind -v --tool=memcheck \
264 --leak-check=full --leak-resolution=high --log-file=valgrind.log \
265 ./tools/lou_checktable tables/nl-BE-g0.utb
266#+END_SRC
Christian Eglic77a5892012-05-11 12:11:26 +0000267
268Again open valgrind.log to see if any memory leaks were reported.
269
Christian Egliae435322012-05-14 10:00:36 +0000270For the full experience run lou_allround under Valgrind:
271
Christian Egli63ab27f2017-04-21 10:57:13 +0200272#+BEGIN_SRC shell
273$ libtool --mode=execute valgrind -v --tool=memcheck \
274 --leak-check=full --show-reachable=yes \
275 --leak-resolution=high --track-origins=yes \
276 --log-file=valgrind.log ./tools/lou_allround
277#+END_SRC
Christian Egliae435322012-05-14 10:00:36 +0000278
Christian Egli777a8172017-05-10 14:10:12 +0200279*** AddressSanitizer
280[[https://github.com/google/sanitizers/wiki/AddressSanitizer][AdressSanitizer]] is a memory error detector for C/C++. It is part of
281both LLVM and gcc. To check liblouis build it as follows:
282
283#+BEGIN_SRC shell
284$ ./autogen.sh
285$ ./configure CFLAGS='-fsanitize=address -O1 -fno-omit-frame-pointer -g'
286$ make
287$ ./tools/lou_translate tables/en-ueb-g2.ctb
288#+END_SRC
289
290Run a few translations, end the program and marvel at the output
291AddressSanitizer. At the time of this writing it complained pretty
292hard:
293
294#+BEGIN_EXAMPLE
295SUMMARY: AddressSanitizer: 12384 byte(s) leaked in 12 allocation(s).
296#+END_EXAMPLE
297
Christian Egli29de9382017-04-21 10:38:56 +0200298*** Electric Fence
299Electric Fence is a tool that helps detect memory access that overruns
Christian Egli63ab27f2017-04-21 10:57:13 +0200300the boundaries of a ~malloc()~ memory allocation, and access to memory
301that has been released with ~free()~.
Christian Egli29de9382017-04-21 10:38:56 +0200302
303Under Debian the usage is fairly straightforward:
304
305#+BEGIN_SRC shell
306$ sudo apt install sudo apt install electric-fence
307#+END_SRC
308
Christian Egli3b900dc2017-04-21 11:11:55 +0200309Then compile [[#how-to-debug][as above]] and invoke the debugger [[#how-to-debug][as above]]. Inside ~gdb~
Christian Egli63ab27f2017-04-21 10:57:13 +0200310set up ~LOUIS_TABLEPATH~ and ~LD_PRELOAD~ as follows:
Christian Egli29de9382017-04-21 10:38:56 +0200311
Christian Egli63ab27f2017-04-21 10:57:13 +0200312#+BEGIN_SRC shell
313$ libtool --mode=execute gdb ./tools/lou_allround
314(gdb) set environment LOUIS_TABLEPATH ./tables,./tests/tables,./tests/tables/moreTables,./tests/tablesWithMetadata,./tests/tables/emphclass
315(gdb) set environment LD_PRELOAD /usr/lib/libefence.so.0.0
316(gdb) run
Christian Egli29de9382017-04-21 10:38:56 +0200317#+END_SRC
318
319If there are problems with memory access the program will run into a
320segmentation fault which you can consequently analyze in the debugger.
321
Christian Eglief45f5a2019-08-15 14:49:10 +0200322** Static analysis
323[[http://clang-analyzer.llvm.org/scan-build.html][scan-build]] is a command line utility to run a static analyzer over the
324codebase. It helps to find problems such as memory leaks, dereference
325of null pointer, etc.
326
327#+BEGIN_SRC shell
328$ make maintainer-clean
329$ ./autogen.sh
330$ scan-build ./configure
331$ scan-build make
332...
333scan-build: 101 bugs found.
334scan-build: Run 'scan-view /tmp/scan-build-2019-08-15-141827-5185-1' to examine bug reports.
335#+END_SRC
336
337then look at the generated reports and fix (or report) the issues.
338
Christian Egli6eb63342013-06-03 10:03:54 +0000339** How to analyze performance
340Gprof helps you analyze the performance of programs. You have to
341compile liblouis as follows:
342
Christian Egli63ab27f2017-04-21 10:57:13 +0200343#+BEGIN_SRC shell
344$ ./configure --disable-shared
345$ make clean all CFLAGS='-g -O0 -pg' LDFLAGS='-all-static'
346#+END_SRC
Christian Egli6eb63342013-06-03 10:03:54 +0000347
348Then translate some stuff with a large table:
349
Christian Egli63ab27f2017-04-21 10:57:13 +0200350#+BEGIN_SRC shell
351$ ./tools/lou_translate tests/tables/large.ctb
352#+END_SRC
Christian Egli6eb63342013-06-03 10:03:54 +0000353
354Finally look at the call profile:
355
Christian Egli63ab27f2017-04-21 10:57:13 +0200356#+BEGIN_SRC shell
357$ libtool --mode=execute gprof ./tools/lou_translate gmon.out
358#+END_SRC
Christian Egli6eb63342013-06-03 10:03:54 +0000359
Bert Freesd51268a2015-11-15 17:23:45 +0100360** How to build for Windows
Christian Egli63ab27f2017-04-21 10:57:13 +0200361See the ~README.windows~ file and the windows subdirectory.
Christian Egli75cd5692012-05-16 08:00:37 +0000362
Bert Frees34df6a62015-04-10 16:10:21 +0200363*** How to cross-compile for Windows
364To compile for win32, use the MinGW win32 cross-compiler as shown
365below. Use the prefix option to install the binaries to a temporary
Christian Egli63ab27f2017-04-21 10:57:13 +0200366place where you can create a zip file. The ~LDFLAGS='-all-static'~
Christian Egli854386d2016-06-01 16:47:42 +0200367ensures that libgcc is linked in statically. Otherwise the users need
Christian Egli63ab27f2017-04-21 10:57:13 +0200368to have ~libgcc_s_sjlj-1.dll~.
Christian Egli75cd5692012-05-16 08:00:37 +0000369
Christian Eglid5bea6c2016-06-03 08:38:52 +0200370Some users want the dlls unversioned. To achieve that add
Christian Egli63ab27f2017-04-21 10:57:13 +0200371~-avoid-version~ to ~LDFLAGS~.
Christian Eglid5bea6c2016-06-03 08:38:52 +0200372
Christian Egli63ab27f2017-04-21 10:57:13 +0200373#+BEGIN_SRC shell
374$ ./configure --build=i686-pc-linux-gnu --host=i686-w64-mingw32 --prefix=/tmp/liblouis-mingw32
375$ make LDFLAGS='-avoid-version -Xcompiler -static-libgcc'
376$ make install
377$ zip -r liblouis-mingw32msvc.zip /tmp/liblouis-mingw32
378#+END_SRC
Christian Egli75cd5692012-05-16 08:00:37 +0000379
Bert Frees34df6a62015-04-10 16:10:21 +0200380To compile for win64, use the MinGW-w64 cross-compiler:
381
Christian Egli63ab27f2017-04-21 10:57:13 +0200382#+BEGIN_SRC shell
383$ ./configure --build=i686-pc-linux-gnu --host=x86_64-w64-mingw32 --prefix=/tmp/liblouis-w64-mingw32
384$ make LDFLAGS='-avoid-version -Xcompiler -static-libgcc'
385$ make install
386$ zip -r liblouis-w64-mingw32.zip /tmp/liblouis-w64-mingw32
387#+END_SRC
Bert Frees34df6a62015-04-10 16:10:21 +0200388
Bert Freesd51268a2015-11-15 17:23:45 +0100389Two makefile rules have been provided to do this automatically for you. Docker will be used if the
Christian Egli63ab27f2017-04-21 10:57:13 +0200390right cross-compiler is not installed. To compile for win32 using the MinGW cross-compiler, run ~make
391distwin32~. This will produce a ZIP file called ~liblouis-<version>-win32.zip~. To compile for win64
392using the MinGW-w64 cross-compiler, run ~make distwin64~. This will produce a ZIP file called
393~liblouis-<version>-win64.zip~.
Bert Freesd51268a2015-11-15 17:23:45 +0100394
Bert Frees34df6a62015-04-10 16:10:21 +0200395*** TODO How to build for Windows using Cygwin
396(possibly use a Vagrantfile as demonstration + explain that Cygwin
397binaries can not be used outside the Cygwin environment)
398
399*** TODO How to build for Windows using MinGW
400(possibly use a Vagrant file as demonstration)
401
Christian Eglieddc4662009-03-09 13:27:20 +0000402* Release Procedure
403These steps describe what a maintainer does to make a release; they
404are not needed for ordinary patch submission.
405
Christian Egli2d889a82015-12-07 08:56:55 +0100406** Update the NEWS entry
Christian Egli9e7db122017-05-18 14:30:48 +0200407If any new tables were added, renamed or removed please note them with
408their file name in the NEWS entry. This is usefull for projects like
409NVDA.
Christian Egli2d889a82015-12-07 08:56:55 +0100410
Christian Eglieddc4662009-03-09 13:27:20 +0000411** Set the version number
Christian Egli63ab27f2017-04-21 10:57:13 +0200412Update the version number in ~NEWS~ (with version, date, and release
Christian Eglid38f44a2019-06-03 15:55:53 +0200413type), ~configure.ac~ and ~windows/include/config.h~.
Christian Eglieddc4662009-03-09 13:27:20 +0000414
Christian Egli63ab27f2017-04-21 10:57:13 +0200415Don't forget to update the libtool versioning info in ~configure.ac~,
Christian Eglie580c8e2018-03-05 14:42:33 +0100416i.e. ~LIBLOUIS_REVISION~ and possibly ~LIBLOUIS_CURRENT~ and
417~LIBLOUIS_AGE~. Check the [[https://www.gnu.org/software/libtool/manual/html_node/Interfaces.html#Interfaces][libtool documentation on versioning]] for an
418explanation of these values.
Christian Eglid1f57182011-05-18 07:16:46 +0000419
Christian Eglieddc4662009-03-09 13:27:20 +0000420** Commit and tag
421Commit the changes and tag this version
422
Christian Egli63ab27f2017-04-21 10:57:13 +0200423#+BEGIN_SRC shell
424$ git tag -s v2.6.0 -m "Release 2.6.0"
425$ git push origin v2.6.0
426#+END_SRC
Christian Eglieddc4662009-03-09 13:27:20 +0000427
428If you know the exact version number that needs to be tagged use
429
Christian Egli63ab27f2017-04-21 10:57:13 +0200430#+BEGIN_SRC shell
431$ git tag -s v2.6.0 -m "Release 2.6.0" <commit>
432$ git push origin v2.6.0
433#+END_SRC
Christian Eglieddc4662009-03-09 13:27:20 +0000434
435** Make the release
436Check out a clean copy in a different directory, like /tmp. Run
437autogen.sh and configure with no special prefixes. Run make distcheck.
438This will make sure that all needed files are present, and do a
439general sanity check. Run make dist. This will produce a tarball.
440
Christian Egli63ab27f2017-04-21 10:57:13 +0200441#+BEGIN_SRC shell
442$ ./autogen.sh && ./configure && make && make distcheck && make dist
443#+END_SRC
Christian Eglieddc4662009-03-09 13:27:20 +0000444
445** Upload
Christian Egli88bfad92015-06-01 11:16:46 +0200446Add the tarball to the github liblouis releases page, i.e. add it
447under https://github.com/liblouis/liblouis/releases with the specific
448release and add a link to it in $WEBSITE/downloads/index.md. See below
449for instructions on how to update the web site.
Christian Eglieddc4662009-03-09 13:27:20 +0000450
Christian Egli2ed702e2009-03-12 13:06:39 +0000451** Online documentation
Christian Egli71647d62014-05-20 09:20:28 +0200452The online documentation is part of the liblouis web site. To add it to the
453site simply copy doc/liblouis.html to $WEBSITE/documentation/liblouis.html.
454Make sure you add the proper YAML front matter. Again see below for
455instructions on how to update the web site.
Christian Egli2ed702e2009-03-12 13:06:39 +0000456
Christian Egli71647d62014-05-20 09:20:28 +0200457** Web site maintenance
458The liblouis web site at liblouis.org is maintained with the help of
Christian Egli63ab27f2017-04-21 10:57:13 +0200459[[https://pages.github.com/][github pages]]. To edit the site just check out the repo at
460https://github.com/liblouis/liblouis.github.io. You'll need to know a
461few things about [[http://jekyllrb.com/][Jekyll]] and markdown, the markup that is used to edit
462the content. In order to update the site simply edit, commit and push.
Christian Egli2ed702e2009-03-12 13:06:39 +0000463
Christian Egli00087342017-03-07 16:13:16 +0100464For the new release update the project web site.
465
466- Add a post containing the current NEWS to the _posts directory and
467- add the download artifacts to the download page
Christian Egli2ed702e2009-03-12 13:06:39 +0000468
Christian Egli25419732011-05-09 07:38:14 +0000469** Announce
470Send an announcement to the liblouis list
Christian Egli63ab27f2017-04-21 10:57:13 +0200471~liblouis-liblouisxml@freelists.org~. See ~ANNOUNCEMENT~ for an
472example.
Christian Egli25419732011-05-09 07:38:14 +0000473