Skip to content

torte71/claws-win32-installer

Repository files navigation

This is the GUI Installer Builder for Claws Mail W32.

Instructions:
=============

1. Download the source and binary packages that are required to build
   the installer:

   $ cd packages
   $ sh download.sh
   [...]
   $ cd ..

2. Configure the source tree for cross compilation, for either
   32-bit or 64-bit release:

   $ ./autogen.sh

   $ ./autogen.sh --build-w32
	 or
   $ ./autogen.sh --build-w64

3. Build the installer:

   $ make

The installer will be made available in two files:

src/claws-mail-X.Y.Z-R.exe
src/claws-mail-src-X.Y.Z-R.exe

To collect files with debug symbols:

$ find src/playground/install/pkgs/ -name '*.debug' | grep /bin/ | xargs zip -j debug-files.zip


Basic requirements
==================

A decent POSIX system is required for building this software as well
as GNU make.  We are using Debian GNU/Linux 10 (Buster), any other
POSIX system should work as well but you may run into problems due to
different toolchain versions.

To finish the build, following packages need to be installed on a
Debian Buster system.

Note - at the time of writing, the meson package in Debian Buster
(currently 0.49.1) is too old to build pixman, but a sufficiently
recent version can be installed from buster-backports (currently 0.52.1).

automake
autoconf
mingw-w64
nsis
stow
unzip
texinfo
imagemagick
docbook-utils
libglib2.0-dev
libgdk-pixbuf2.0-dev
ghostscript
git
binutils
make
cmake
bison
flex
gperf
intltool
gcc
g++
libtool
libgettextpo-dev
meson
pkg-config-mingw-w64-x86-64
gobject-introspection

Building in a Docker container
==============================

A good way to create an isolated environment for the build is to
use a Docker container. An image built from following Dockerfile
is sufficient:

--------8<---------8<---------8<--------
FROM debian:buster
RUN apt-get update && apt-get -y install automake autoconf mingw-w64 nsis stow unzip texinfo imagemagick docbook-utils libglib2.0-dev libgdk-pixbuf2.0-dev ghostscript git binutils make cmake bison flex gperf intltool gcc g++ libtool libgettextpo-dev meson pkg-config-mingw-w64-x86-64 gobject-introspection && apt-get clean
--------8<---------8<---------8<--------

To build the image locally (run in the directory with Dockerfile
with above content:
# docker image build -t claws-win32-builder:0.1 .

To launch a container based on the image, with the claws-win32-installer
cloned repository mounted inside it:
# docker run -ti --name mybuilder \
  -v /path/to/claws-win32-installer:/build \
	claws-win32-builder:0.1

In the shell inside the running container, switch to /build directory
and build the Claws Mail package according to the instructions above
in this README files.

Adding new packages to the installer:
=====================================

This requires editing a couple of files.

1. Add package to toplevel configure.ac, stating its dependencies.

2. Add download information to packages/packages.current.

3. Add variables cm_pkg_<package>_configure, cm_pkg_<package_make_args
   to src/Makefile.am. Also add the package to cm_spkgs in same file.

4. Specify what files from the built package should be included in
   the installation (and uninstallation) in src/sections-(un)installer.nsi.

5. If the package ships pkg-config (*.pc) support files, you need add
   post install instructions to Makefile.am.  Note that *.pc files may
   be in the "runtime" directory ${pkgidir} if the package is built
   within Claws Mail (or peculiarly shipped), or in the development
   package ${pkgidir_dev}.

Then run the usual "./autogen.sh" to create the actual configure file
and run configure as described above.

If the package is using cmake, set pkg_cm_<package>_cmake to "yes",
and optionally set pkg_cm_<package>_cmake_args. Libical is an example
to follow.


SASL and unofficial patches
===========================

In order for libsasl2 to find its plugins (which we install into
$INSTDIR\lib\sasl2), I've had to add a new API function to libetpan,
mailsasl_set_plugin_path(), which in turn calls sasl_set_path().

We call this new function from Claws Mail's main() during initialization.

This is done via patches held in this repository, since this stuff can
not go upstream - or at least the Claws Mail patch shouldn't, until
libetpan provides some way to set the SASL plugin path. I'll consider
submitting the libetpan patch upstream later.


Copyright
=========

The entire Claws Mail package is

  Copyright (C) 1999-2017 Hiroyuki Yamamoto <[email protected]> and the
	Claws Mail Team

  Claws Mail is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.

  Claws Mail is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  02110-1301, USA


This file
=========

This README file is based on README file from GPG4Win installer package:

Copyright 2005, 2006, 2008 g10 Code GmbH

This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
modifications, as long as this notice is preserved.

This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.