Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F18824788
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
46 KB
Subscribers
None
View Options
diff --git a/configure.ac b/configure.ac
index 3b81cb8b..cc6ea39f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,590 +1,591 @@
# configure.ac for GPG4Win
# Copyright (C) 2005, 2006, 2007, 2008, 2010, 2023 g10 Code GmbH
#
# This file is part of GPG4Win
#
# GPG4Win 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 2 of the License, or
# (at your option) any later version.
#
# GPG4Win 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, see <http://www.gnu.org/licenses/>.
# (Process this file with autoconf to produce a configure script.)
AC_PREREQ(2.59)
min_automake_version="1.9.3"
# To build a release you need to create a tag with the version number
# (git tag -s gpg4win-2.x.y) and run "./autogen.sh --force". Please
# bump the version number immediately after the release and do another
# commit and push so that the git magic is able to work.
# BUILDTYPE can be used to build the VSD or GPD versions. Note that
# IS_VSD_BUILD is set along with IS_GPD_BUILD.
m4_define([mym4_package],[gpg4win])
m4_define([mym4_isvsd],[no])
m4_define([mym4_isgpd],[no])
m4_define([mym4_isv3build], m4_if(m4_esyscmd([ls packages/gnupg-2.*.tar.* | \
head -1 | cut -d. -f2 | \
tr -d '\n']),
[2], [yes], [no]))
m4_define([mym4_buildtype],
m4_chomp_all(m4_esyscmd([(cat packages/BUILDTYPE 2>/dev/null\
|| echo default)])))
m4_if(mym4_buildtype,[vsd],[m4_define([mym4_isvsd],[yes])
m4_define([mym4_isv3build],[yes]]))
# If we are using GnuPG 2.2.x or building GnuPG VSD then
# use a different version number. This allows configurations
# where the buildtype is still VSD but the version used
# for GnuPG might differ e.g 2.5 or 2.6
m4_if(mym4_isv3build,yes,
[m4_define([mym4_major],[3])
m4_define([mym4_minor],[2])
m4_define([mym4_micro],[3])],
[m4_define([mym4_major],[5])
m4_define([mym4_minor],[0])
m4_define([mym4_micro],[0])])
# We need to set isgpd only after having set the version number.
m4_if(mym4_buildtype,[gpd],[m4_define([mym4_isvsd],[yes])
m4_define([mym4_isgpd],[yes])])
# Below is m4 magic to extract and compute the git revision number,
# the decimalized short revision number, a beta version string and a
# flag indicating a development version (mym4_isbeta). Note that the
# m4 processing is done by autoconf and not during the configure run.
m4_define([mym4_verslist], m4_split(m4_esyscmd([./autogen.sh --find-version] \
mym4_package mym4_major mym4_minor mym4_micro),[:]))
m4_define([mym4_isbeta], m4_argn(2, mym4_verslist))
m4_define([mym4_ingit], m4_argn(3, mym4_verslist))
m4_define([mym4_version], m4_argn(4, mym4_verslist))
m4_define([mym4_betastr], m4_argn(6, mym4_verslist))
m4_define([mym4_revision], m4_argn(7, mym4_verslist))
m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist))
AC_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org])
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
GIT_REVISION=mym4_revision
GIT_REVISION_DEC=mym4_revision_dec
GIT_BETASTRING=mym4_betastr
IS_BETA_BUILD=mym4_isbeta
IS_VSD_BUILD=mym4_isvsd
IS_GPD_BUILD=mym4_isgpd
# Variables for the version info
PRODUCT_NAME=m4_if(mym4_isvsd, [yes], ["GnuPG VS-Desktop"],
m4_if(mym4_isgpd, [yes], ["GnuPG Desktop"], ["Gpg4win"]))
COMPANY_NAME=m4_if(mym4_buildtype, [default],
["Gpg4win Community"], ["g10 Code GmbH"])
# Early sanity checks and dirs
AC_CONFIG_SRCDIR(src/nsis/config.nsi.in)
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([tar-ustar])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AC_CONFIG_HEADERS([config.h])
# Language support
AM_PO_SUBDIRS
AC_SUBST(PRODUCT_NAME)
AC_SUBST(COMPANY_NAME)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(GIT_BETASTRING)
AC_SUBST(IS_BETA_BUILD)
AC_SUBST(IS_VSD_BUILD)
AC_SUBST(IS_GPD_BUILD)
# Generate extended version information. Note, that for NSIS use we
# must not translate the dots to commas in the BUILD_FILEVERSION.
BUILD_TIMESTAMP=`date --iso-8601=minutes`
BUILD_ISODATE=`date --iso-8601`
changequote(,)dnl
BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./'`
changequote([,])dnl
BUILD_FILEVERSION="${BUILD_FILEVERSION}${GIT_REVISION_DEC}"
BUILD_FILEVERSION_TR=`echo "${BUILD_FILEVERSION}" | tr . ,`
BUILD_BETANUM=`echo "${GIT_BETASTRING}" | sed 's/-beta//'`
AC_SUBST(BUILD_BETANUM)
AC_SUBST(BUILD_TIMESTAMP)
AC_SUBST(BUILD_ISODATE)
AC_SUBST(BUILD_FILEVERSION)
AC_SUBST(BUILD_FILEVERSION_TR)
# The final release is copied to an archive server. The default
# location may be changed by setting the RELEASEHOST envvar.
if test -z "$RELEASEHOST" ; then
RELEASEHOST="vigenere:tarballs/gpg4win"
if test "${IS_BETA_BUILD}" = yes ; then
RELEASEHOST="${RELEASEHOST}/Beta"
fi
fi
AC_SUBST(RELEASEHOST)
# Substitutions to set generated files in a Emacs buffer to read-only.
AC_SUBST(emacs_local_vars_begin, ['Local Variables:'])
AC_SUBST(emacs_local_vars_read_only, ['buffer-read-only: t'])
AC_SUBST(emacs_local_vars_end, ['End:'])
GPG4WIN_BUILD_RELEASE(gpg4win, no)
GPG4WIN_BUILD_RELEASE(appimage, no)
# Additionaly enable building gpgex for another host
AC_ARG_WITH([additional-gpgex-host],
AS_HELP_STRING([--with-additional-gpgex-host=HOST],
[Additionaly build gpgex for this host]),
[if test "$withval" = yes; then
AC_MSG_FAILURE(
[--with-additional-gpgex-host was given,
but no host specified])
else
gpgex_host=$withval
fi
],
gpgex_host=no)
if test "$gpgex_host" != no; then
GPGEX_ADD_HOST="$gpgex_host"
fi
AC_SUBST(GPGEX_ADD_HOST)
AC_ARG_ENABLE(fast-makensis,
AS_HELP_STRING([--enable-fast-makensis],
[Use a less efficient compressor to speed up building]),
use_fast_makensis=$enableval,
use_fast_makensis=no)
if test "$use_fast_makensis" = yes; then
EXTRA_MAKENSIS_FLAGS="${EXTRA_MAKENSIS_FLAGS} -DDISABLE_LZMA=1"
fi
AC_SUBST(EXTRA_MAKENSIS_FLAGS)
# Use ninja instead of make for cmake projects
AC_ARG_ENABLE(ninja,
AS_HELP_STRING([--enable-ninja],
[Use ninja instead of make]),
use_ninja=$enableval,
use_ninja=no)
#
# Set variables for use by automake makefiles.
#
AM_CONDITIONAL(BUILD_GPG4WIN, test "$build_gpg4win" = "yes")
AM_CONDITIONAL(BUILD_APPIMAGE, test "$build_appimage" = "yes")
+AM_CONDITIONAL(BUILD_W64_COND, test "$BUILD_W64" = "yes")
+
# Required tools.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB
AC_CHECK_TOOL(AR, ar, :)
AC_CHECK_TOOLS(STRIP, strip)
AC_CHECK_TOOLS(DLLTOOL, dlltool)
AC_CHECK_PROGS(MAKE, make)
AC_CHECK_PROGS(UNZIP, unzip)
AC_CHECK_PROGS(TAR, tar)
AC_CHECK_PROGS(MKDIR, mkdir)
AC_CHECK_PROGS(CP, cp)
AC_CHECK_PROGS(RM, rm)
AC_CHECK_PROGS(STOW, stow)
AC_CHECK_PROGS(MAKENSIS, makensis)
AC_CHECK_PROGS(ZCAT, zcat)
AC_CHECK_PROGS(TEXI2DVI, texi2dvi)
AC_CHECK_PROGS(DVIPDF, dvipdf)
AC_CHECK_PROGS(CONVERT, convert)
AC_CHECK_PROGS(SHA1SUM, sha1sum)
AC_CHECK_PROGS(MSGFMT, msgfmt)
AC_CHECK_PROGS(MSGFMT, msgmerge)
AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog,
[build-aux/gitlog-to-changelog])
AC_CHECK_PROGS(BUILD_CC, gcc cc)
AC_CHECK_PROGS(CMAKE, cmake3 cmake)
AC_CHECK_PROGS(RSYNC, rsync)
if test "${use_ninja}" = "yes"; then
AC_CHECK_PROGS(NINJA, ninja)
MAKETOOL=${NINJA}
CMAKE_GENERATOR_FLAGS="-G Ninja -DCMAKE_GENERATOR=Ninja"
AC_MSG_NOTICE([Using ${NINJA} in cmake projects])
else
MAKETOOL=${MAKE}
fi
AC_SUBST(CMAKE_GENERATOR_FLAGS)
AC_SUBST(MAKETOOL)
AC_PROG_INSTALL
if test -n "$GPGEX_ADD_HOST"; then
AC_CHECK_TOOLS(STRIP_EX, ${GPGEX_ADD_HOST}-strip)
fi
if test -z "$GPG4WIN_PARALLEL"; then
JOBS=$(nproc 2>/dev/null || echo 1)
GPG4WIN_PARALLEL=-j$JOBS
AC_MSG_NOTICE([Using autodetected $JOBS make jobs. You can override this by setting GPG4WIN_PARALLEL.])
fi
AC_SUBST(GPG4WIN_PARALLEL)
required_tools="MAKE TAR MKDIR CP RM ZCAT SHA1SUM MSGFMT BUILD_CC CMAKE"
if test "$build_gpg4win" = yes ; then
required_tools="$required_tools DLLTOOL UNZIP STOW MAKENSIS TEXI2DVI DVIPDF CONVERT"
fi
if test "$build_appimage" = yes ; then
required_tools="$required_tools RSYNC"
fi
missing_tools=
for i in $required_tools; do
eval tmp='$'$i
if test -z "$tmp"; then
missing_tools="$missing_tools `echo $i | tr 'A-Z' 'a-z'`"
fi
done
if test "$build_gpg4win" = yes ; then
case "${host}" in
x86_64*-mingw32*)
BUILD_W64=yes
# Since we use 32 makensis we need to compile our plugin
# for NSIS also for 32bit so we hardcode this here.
# Otherwise for 64 bit builds --with-additional-gpgex-host
# is then 32 bit to take care of that.
AC_CHECK_PROGS(W32CC32, i686-w64-mingw32-gcc)
GPG4WIN_RUNTIME_LIBRARY(libgcc_s_seh-1)
- VERSION=${VERSION}-x64
;;
*)
W32CC32=${CC}
BUILD_W64=no
;;
esac
AC_SUBST(BUILD_W64)
GPG4WIN_RUNTIME_LIBRARY(libstdc++-6, REQUIRED)
GPG4WIN_RUNTIME_LIBRARY(libwinpthread-1, REQUIRED)
GPG4WIN_RUNTIME_LIBRARY_EX(libwinpthread-1)
# One of these is required
GPG4WIN_RUNTIME_LIBRARY(libgcc_s_dw2-1)
GPG4WIN_RUNTIME_LIBRARY(libgcc_s_sjlj-1)
if [ ! test -s "src/libgcc_s_dw2-1.dll-x" -o -s "src/libgcc_s_sjlj-1.dll-x" \
-o -s "src/libgcc_s_seh-1.dll-x" ]; then
AC_MSG_ERROR(No exception library found. Please check what your system
uses and see above message about either dw2- sjlj- or seh-
dlls.)
fi
fi
AC_CHECK_PROGS(WGET, wget)
# Packages for Gpg4Win.
if test "$build_gpg4win" = yes ; then
gpg4win_dup_sources=""
GPG4WIN_SPKG([zlib])
GPG4WIN_BPKG_GTK([pkgconfig])
GPG4WIN_SPKG([bzip2])
GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
GPG4WIN_SPKG([libassuan], [libgpg-error])
GPG4WIN_SPKG([scute], [libgpg-error libassuan])
GPG4WIN_SPKG([pinentry], [qtbase libassuan libiconv])
GPG4WIN_SPKG([gpgme], [libgpg-error libassuan qtbase])
GPG4WIN_SPKG([gpgol], [gpgme libassuan])
GPG4WIN_SPKG([gpgex], [libassuan])
GPG4WIN_SPKG([paperkey])
GPG4WIN_SPKG([libiconv])
GPG4WIN_SPKG([gettext], [libiconv])
GPG4WIN_SPKG([libpng], [zlib])
GPG4WIN_SPKG([jpeg])
GPG4WIN_SPKG([qrencode], [libpng libiconv])
# Packages needed for gpgex
GPG4WIN_SPKGEX([libgpg-error])
GPG4WIN_SPKGEX([libassuan], [libgpg-error])
GPG4WIN_SPKGEX([gpgex], [libassuan])
GPG4WIN_SPKGEX([gpgme], [libgpg-error libassuan])
GPG4WIN_SPKGEX([gpgol], [gpgme])
# The GnuPG Package.
GPG4WIN_BPKG_BINSRC([gnupg-w32])
GPG4WIN_BPKG_MSISRC([gnupg-msi])
# Tools required for cross compiling
GPG4WIN_NATIVEPKG([qtbase])
GPG4WIN_NATIVEPKG([extra-cmake-modules])
GPG4WIN_NATIVEPKG([breeze-icons], [qtbase extra-cmake-modules])
GPG4WIN_NATIVEPKG([qttools], [qtbase])
GPG4WIN_NATIVEPKG([kconfig], [qtbase qttools extra-cmake-modules])
# Qt related stuff.
GPG4WIN_KDEPKG([zstd])
GPG4WIN_KDEPKG([qtbase], [jpeg zlib zstd libpng freetype pcre2])
GPG4WIN_KDEPKG([qttools], [qtbase])
GPG4WIN_KDEPKG([qttranslations], [qtsvg qttools])
GPG4WIN_KDEPKG([qtsvg], [qtbase])
GPG4WIN_KDEPKG([qthttpserver], [qtbase])
GPG4WIN_KDEPKG([qtwebsockets], [qtbase])
GPG4WIN_KDEPKG([qtkeychain], [qtbase])
GPG4WIN_KDEPKG([tiff])
GPG4WIN_KDEPKG([pcre2])
GPG4WIN_KDEPKG([breeze], [qtbase kcoreaddons kconfig kconfigwidgets kguiaddons kiconthemes kwindowsystem])
# GPG4WIN_KDEPKG([snoretoast])
GPG4WIN_KDEPKG([openjpeg], [tiff jpeg])
GPG4WIN_KDEPKG([breeze-icons], [extra-cmake-modules qtbase])
GPG4WIN_KDEPKG([kleopatra], [kstatusnotifieritem mimetreeparser kio gnupg-w32 breeze-icons kxmlgui libkleo kitemmodels qttranslations ktextwidgets])
GPG4WIN_KDEPKG([extra-cmake-modules])
GPG4WIN_KDEPKG([kconfig], [qtbase qttools extra-cmake-modules])
GPG4WIN_KDEPKG([ki18n], [qtbase gettext qttools extra-cmake-modules])
GPG4WIN_KDEPKG([kwidgetsaddons], [kconfig qttools qtbase])
GPG4WIN_KDEPKG([kcompletion], [kwidgetsaddons])
GPG4WIN_KDEPKG([kwindowsystem], [qtbase qttools])
GPG4WIN_KDEPKG([kcoreaddons], [qtbase qttools])
GPG4WIN_KDEPKG([kcodecs], [qtbase qttools])
GPG4WIN_KDEPKG([kguiaddons], [qtbase qttools])
GPG4WIN_KDEPKG([kmime], [kcodecs ki18n])
GPG4WIN_KDEPKG([kmbox], [kmime])
GPG4WIN_KDEPKG([kconfigwidgets], [kwidgetsaddons kguiaddons ki18n kcodecs kconfig kcolorscheme])
GPG4WIN_KDEPKG([kitemviews], [qtbase qttools])
GPG4WIN_KDEPKG([kitemmodels], [qtbase qttools])
GPG4WIN_KDEPKG([karchive], [qtbase qttools extra-cmake-modules])
GPG4WIN_KDEPKG([kcrash], [kwindowsystem kcoreaddons])
GPG4WIN_KDEPKG([solid], [qttools qtbase extra-cmake-modules])
GPG4WIN_KDEPKG([kjobwidgets], [kwidgetsaddons kcoreaddons qtbase extra-cmake-modules])
GPG4WIN_KDEPKG([kservice], [kconfig kcoreaddons ki18n])
GPG4WIN_KDEPKG([kbookmarks], [kconfig kxmlgui kcoreaddons kconfigwidgets kwidgetsaddons kcodecs])
GPG4WIN_KDEPKG([kio], [kcrash kjobwidgets solid kservice kbookmarks kwidgetsaddons kxmlgui kwindowsystem karchive kconfig kcoreaddons ki18n])
GPG4WIN_KDEPKG([kiconthemes], [qtsvg kconfigwidgets karchive])
GPG4WIN_KDEPKG([kxmlgui], [kiconthemes kconfigwidgets kitemviews ktextwidgets breeze])
GPG4WIN_KDEPKG([libkleo], [kmime kconfigwidgets kwindowsystem kcompletion gpgme])
GPG4WIN_KDEPKG([gpg4win-tools], [libkleo gpgme])
GPG4WIN_KDEPKG([threadweaver], [qtbase extra-cmake-modules])
GPG4WIN_KDEPKG([kcolorscheme], [kconfig kguiaddons ki18n])
GPG4WIN_KDEPKG([freetype], [zlib bzip2])
GPG4WIN_KDEPKG([sonnet], [qtbase qttools])
GPG4WIN_KDEPKG([ktextwidgets], [sonnet kcompletion kconfig kconfigwidgets ki18n kwidgetsaddons])
GPG4WIN_KDEPKG([poppler], [libpng openjpeg tiff gpgme kio qtbase freetype])
GPG4WIN_KDEPKG([kparts], [kio kservice kxmlgui kconfigwidgets kwidgetsaddons ktextwidgets])
GPG4WIN_KDEPKG([okular], [kparts gpgme kio poppler threadweaver qtsvg])
GPG4WIN_KDEPKG([libical])
GPG4WIN_KDEPKG([kcalendarcore], [qtbase libical extra-cmake-modules])
GPG4WIN_KDEPKG([mimetreeparser], [libkleo kwidgetsaddons ki18n kmbox kmime kcodecs kcalendarcore])
GPG4WIN_KDEPKG([prison], [qtbase extra-cmake-modules qrencode])
GPG4WIN_KDEPKG([kstatusnotifieritem], [kwindowsystem qtbase extra-cmake-modules])
GPG4WIN_KDEPKG([gpgpass], [kio prison kconfigwidgets kiconthemes ki18n gpgme])
GPG4WIN_KDEPKG([libkdepim], [kcompletion ki18n kwidgetsaddons])
GPG4WIN_KDEPKG([syntax-highlighting], [extra-cmake-modules qtbase qttools qttranslations])
GPG4WIN_KDEPKG([ktextaddons], [qtkeychain syntax-highlighting kio ki18n kcoreaddons kconfigwidgets sonnet karchive])
GPG4WIN_KDEPKG([kpimtextedit], [sonnet kconfig kxmlgui kwidgetsaddons kcoreaddons kio ki18n kiconthemes ktextaddons syntax-highlighting])
GPG4WIN_KDEPKG([kcontacts], [kcoreaddons qtbase ki18n kconfig kcodecs])
GPG4WIN_KDEPKG([gpgoljs],[qtwebsockets kcontacts qthttpserver mimetreeparser libkleo libkdepim kpimtextedit])
GPG4WIN_FINALIZE
fi
# Packages for the AppImage
if test "$build_appimage" = yes ; then
appimage_dup_sources=""
APPIMAGE_SPKG([freetype])
APPIMAGE_SPKG([sqlite])
APPIMAGE_SPKG([jpeg])
APPIMAGE_SPKG([qrencode])
APPIMAGE_SPKG([xcb-util-cursor])
APPIMAGE_SPKG([libgpg-error])
APPIMAGE_SPKG([libassuan], [libgpg-error])
APPIMAGE_SPKG([npth])
APPIMAGE_SPKG([libgcrypt], [libgpg-error])
APPIMAGE_SPKG([libksba], [libgpg-error])
APPIMAGE_SPKG([ntbtls], [libgcrypt libksba])
APPIMAGE_SPKG([gnupg], [libgpg-error libassuan npth libgcrypt libksba sqlite ntbtls])
APPIMAGE_SPKG([pinentry], [qtbase])
# Note that GPGME needs Qt
APPIMAGE_SPKG([gpgme], [libgpg-error libassuan qtbase])
APPIMAGE_SPKG([paperkey])
# Qt related stuff.
# (dependency on gnupg is only to make sure gnupg is build first so
# that we don't need to wait for the long running Qt builds)
APPIMAGE_KDEPKG([zstd])
APPIMAGE_KDEPKG([pcre2])
APPIMAGE_KDEPKG([qtbase], [jpeg zstd freetype pcre2 gnupg xcb-util-cursor])
APPIMAGE_KDEPKG([qttools], [qtbase])
APPIMAGE_KDEPKG([qttranslations], [qtsvg qttools])
APPIMAGE_KDEPKG([qtsvg], [qtbase])
APPIMAGE_KDEPKG([qtwayland], [qtbase])
APPIMAGE_KDEPKG([wayland-protocols], [qtwayland])
APPIMAGE_KDEPKG([plasma-wayland-protocols], [wayland-protocols])
# KDE Frameworks Tier 1
APPIMAGE_KDEPKG([extra-cmake-modules], [qttools])
APPIMAGE_KDEPKG([breeze-icons], [extra-cmake-modules qtbase])
APPIMAGE_KDEPKG([karchive], [qtbase qttools extra-cmake-modules])
APPIMAGE_KDEPKG([kauth], [qtbase qttools extra-cmake-modules])
APPIMAGE_KDEPKG([kcodecs], [qtbase qttools extra-cmake-modules])
APPIMAGE_KDEPKG([kcolorscheme], [kconfig kguiaddons ki18n])
APPIMAGE_KDEPKG([kconfig], [qtbase qttools extra-cmake-modules])
APPIMAGE_KDEPKG([kcoreaddons], [qtbase qttools extra-cmake-modules])
APPIMAGE_KDEPKG([kdbusaddons], [qtbase qttools extra-cmake-modules])
APPIMAGE_KDEPKG([kguiaddons], [qtbase qttools extra-cmake-modules])
APPIMAGE_KDEPKG([ki18n], [qtbase qttools extra-cmake-modules])
APPIMAGE_KDEPKG([kitemmodels], [qtbase qttools extra-cmake-modules])
APPIMAGE_KDEPKG([kitemviews], [qtbase qttools extra-cmake-modules])
APPIMAGE_KDEPKG([kwindowsystem], [qtbase qtwayland extra-cmake-modules wayland-protocols plasma-wayland-protocols])
APPIMAGE_KDEPKG([solid], [qtbase extra-cmake-modules])
APPIMAGE_KDEPKG([sonnet], [qtbase extra-cmake-modules])
APPIMAGE_KDEPKG([threadweaver], [qtbase extra-cmake-modules])
# KDE Frameworks Tier 2
APPIMAGE_KDEPKG([kcompletion], [kwidgetsaddons])
APPIMAGE_KDEPKG([kcrash], [kwindowsystem kcoreaddons])
APPIMAGE_KDEPKG([kjobwidgets], [kwidgetsaddons kcoreaddons qtbase extra-cmake-modules])
APPIMAGE_KDEPKG([kstatusnotifieritem], [kwindowsystem qtbase extra-cmake-modules])
APPIMAGE_KDEPKG([kwidgetsaddons], [kconfig qttools qtbase])
# KDE Frameworks Tier 3
APPIMAGE_KDEPKG([kconfigwidgets], [kwidgetsaddons kguiaddons ki18n kcodecs kconfig])
APPIMAGE_KDEPKG([kiconthemes], [qtsvg kconfigwidgets karchive])
APPIMAGE_KDEPKG([ktextwidgets], [sonnet kcompletion kconfig kconfigwidgets ki18n kwidgetsaddons])
APPIMAGE_KDEPKG([kxmlgui], [kiconthemes kconfigwidgets kitemviews ktextwidgets])
APPIMAGE_KDEPKG([kbookmarks], [kconfig kxmlgui kcoreaddons kconfigwidgets kwidgetsaddons kcodecs])
APPIMAGE_KDEPKG([kservice], [kconfig kcoreaddons ki18n])
APPIMAGE_KDEPKG([kio], [kcrash kjobwidgets solid kservice kbookmarks kwidgetsaddons kxmlgui kwindowsystem karchive kconfig kcoreaddons ki18n kauth])
APPIMAGE_KDEPKG([kparts], [kio kservice kxmlgui kconfigwidgets kwidgetsaddons ktextwidgets])
# KDE PIM
APPIMAGE_KDEPKG([libical])
APPIMAGE_KDEPKG([kcalendarcore], [qtbase libical extra-cmake-modules])
APPIMAGE_KDEPKG([mimetreeparser], [libkleo kwidgetsaddons ki18n kmime kcodecs kcalendarcore kmbox])
APPIMAGE_KDEPKG([kmime], [kcodecs ki18n])
APPIMAGE_KDEPKG([kmbox], [kmime])
APPIMAGE_KDEPKG([libkleo], [kmime kconfigwidgets kwindowsystem kcompletion gpgme])
APPIMAGE_KDEPKG([kleopatra], [mimetreeparser gnupg gpgme breeze-icons kio kxmlgui libkleo kitemmodels qttranslations kdbusaddons kstatusnotifieritem])
# Okular/Poppler
APPIMAGE_KDEPKG([poppler], [gpgme kio qtbase freetype])
APPIMAGE_KDEPKG([okular], [kparts gpgme kio poppler threadweaver qtsvg])
# Gpgpass
APPIMAGE_KDEPKG([prison], [qtbase extra-cmake-modules qrencode])
APPIMAGE_KDEPKG([gpgpass], [prison kconfigwidgets kiconthemes ki18n gpgme])
APPIMAGE_FINALIZE
fi
# Throw an error if required tools are missing
if test -n "$missing_tools"; then
for i in $missing_tools; do
AC_MSG_NOTICE([$i is missing])
done
AC_MSG_ERROR([[
***
*** Required tools not found. Please consult the above messages
*** and install them before running configure again.
***]])
fi
# Throw an error if any duplicate source packages have been found
if test -n "$gpg4win_dup_sources"; then
tmp=
for i in $gpg4win_dup_sources; do
tmp="$tmp
$i"
done
tmp2="
You might remove them with:"
for i in $gpg4win_rm_candidates; do
if ! grep -q $(basename $i) packages/packages.common packages/packages.3 packages/packages.4; then
tmp2="$tmp2
rm $i"
fi
done
AC_MSG_ERROR([Packages with more that one source version:$tmp$tmp2])
fi
if test -n "$appimage_dup_sources"; then
tmp=
for i in $appimage_dup_sources; do
tmp="$tmp
$i"
done
tmp2="
You might remove them with:"
for i in $appimage_rm_candidates; do
if ! grep -q $(basename $i) packages/packages.common packages/packages.3 packages/packages.4; then
tmp2="$tmp2
rm $i"
fi
done
AC_MSG_ERROR([Packages with more that one source version:$tmp$tmp2])
fi
# Finalize.
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(packages/Makefile src/Makefile po/Makefile.in)
AC_CONFIG_FILES(po/build-cc)
AC_CONFIG_FILES(src/nsis/config.nsi src/gpg4win.mk)
AC_CONFIG_FILES(doc/Makefile)
AC_CONFIG_FILES(doc/logo/Makefile)
AC_CONFIG_FILES(src/toolchain.cmake)
AC_CONFIG_FILES(src/toolchain-native.cmake)
AC_CONFIG_FILES(src/appimage/Makefile src/appimage/appimage.mk)
AC_CONFIG_FILES(src/appimage/rsync-filters/Makefile)
AC_CONFIG_FILES(src/nsis/Makefile)
AC_CONFIG_FILES(src/versioninfo.rc.in)
AC_CONFIG_FILES(src/gpg4win.w32-manifest.in)
AC_CONFIG_FILES(src/gccwrap.sh)
AC_OUTPUT_COMMANDS([chmod +x src/gccwrap.sh])
AC_OUTPUT
# Throw a warning if optional tools are missing
if test -n "$missing_opt_tools"; then
AC_MSG_WARN([[
***
*** Some tools not found. They may or may not be needed depending on
*** the packages you want to include. For example GLIB and GTK+
*** require certain tools; you may need to install a recent version of
*** GLIB and GTK+ on the build machine to allow for cross-compiling.
***]])
for i in $missing_opt_tools; do
AC_MSG_NOTICE([$i is missing])
done
fi
echo -n "
$PACKAGE_NAME-$PACKAGE_VERSION prepared for make
Revision: ${GIT_REVISION} (${GIT_REVISION_DEC})
Main platform: $host
Additional platform: ${GPGEX_ADD_HOST}
Distribution: ${PRODUCT_NAME} (mym4_buildtype)
"
if test -n "$JOBS"; then
echo " make jobs: ${JOBS}"
else
echo ""
fi
diff --git a/src/Makefile.am b/src/Makefile.am
index 11161365..99a5cb28 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,602 +1,605 @@
# Makefile.am - Installer for GnuPG 4 Windows Makefile.
# Copyright (C) 2005, 2006, 2007, 2008, 2009 g10 Code GmbH
#
# This file is part of Gpg4win.
#
# Gpg4win 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 2 of the License, or
# (at your option) any later version.
#
# Gpg4win 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, see <http://www.gnu.org/licenses/>.
EXTRA_DIST = config.site \
findicons.sh \
exdll.h exdll.c \
g4wihelp.c desktopshellrun.cpp \
slideshow.cpp gpgwrap.c gccwrap.sh.in \
versioninfo.rc.in.in gpg4win.w32-manifest.in.in \
gpg-enable-keyboxd.bat gpg-disable-keyboxd.bat \
sha1sum.c \
potomo \
index.theme \
slideshow/slides.dat \
slideshow/slide1-gpgol.png \
slideshow/slide2-gpgex.png \
slideshow/slide3-kleopatra.png \
slideshow/slide4-summary.png \
icons/file-ext.ico \
icons/mail-ext.ico \
icons/shield.ico \
kdeglobals qtlogging.ini \
make-msi.pl make-msi.guids \
build-gpg4win.sh \
qt.conf \
WixUI_Gpg4win.wxs included-icons.txt \
zlib.pc
if BUILD_APPIMAGE
appimage = appimage
else
appimage =
endif
+if BUILD_W64_COND
+w64_suffix="-x64"
+endif
SUBDIRS = ${appimage} nsis
# These paths must be absolute, as we switch directories pretty often.
root := $(shell pwd)/playground
stampdir := $(shell pwd)/stamps
gpg4win_howto_smime_ll = en de
HOWTO_files = $(addsuffix .txt, \
$(addprefix HOWTO-SMIME.,$(gpg4win_howto_smime_ll)))
foosum_exe = sha1sum.exe md5sum.exe sha256sum.exe
# Need to clean the dll because we bypassed automake.
CLEANFILES = g4wihelp.dll desktopshellrun.o versioninfo.txt \
$(HOWTO_files) NEWS.tmp COMPONENTS-list.tmp \
license.blurb cdversioninfo.tmp slideshow.o \
$(foosum_exe) gpgwrap.exe
# Supported source packages. (see also ../appimage/Makefile.am)
gpg4win_spkgs = glib libffi gdk-pixbuf gtk+ \
libgpg-error gpgme gpgol gpgex libpng \
gpa opencdk jpeg \
pinentry libassuan ntbtls pcre \
paperkey regex libiconv gettext scute qrencode
# Source packages following the KDE pattern
gpg4win_kdepkgs = qtbase qttools qtsvg qttranslations qthttpserver \
kconfig kwidgetsaddons ki18n extra-cmake-modules \
kcompletion kwindowsystem kcoreaddons libkleo kcodecs \
kmime kconfigwidgets kxmlgui kguiaddons kitemviews \
kiconthemes kleopatra breeze-icons kitemmodels karchive \
gpg4win-tools kcrash kio kbookmarks kservice solid \
kjobwidgets poppler okular freetype threadweaver \
kparts tiff openjpeg sonnet ktextwidgets mimetreeparser \
libical kcalendarcore kmbox pcre2 prison gpgpass \
knotifications kcolorscheme zstd kstatusnotifieritem \
gpgoljs libkdepim syntax-highlighting ktextaddons \
kpimtextedit qtkeychain kcontacts qtwebsockets \
breeze
# Supported source packages to build in an additional architecture
gpg4win_expkgs = libgpg-error libassuan libiconv gettext gpgex gpgol \
gpgme
# The packages that should also be compiled natively
gpg4win_nativepkgs = qtbase breeze-icons kconfig extra-cmake-modules \
qttools
# Some variables
WINE = wine
WINHOST = win10
WINLIGHT = c:/wix/light.exe
# Extra options to configure for individual packages.
# We can use $(idir) here for the installation prefix.
gpg4win_pkg_libiconv_ex_configure = \
--enable-shared=no --enable-static=yes
gpg4win_pkg_gettext_configure = \
--with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
CPPFLAGS=-I$(idir)/include CFLAGS=-O2 LDFLAGS=-L$(idir)/lib
gpg4win_pkg_scute_configure = \
LDFLAGS=-lws2_32
gpg4win_pkg_gettext_ex_configure = \
--with-lib-prefix=$(ex_idir) --with-libiconv-prefix=$(ex_idir) \
CPPFLAGS=-I$(ex_idir)/include CFLAGS=-O2 LDFLAGS=-L$(ex_idir)/lib
# We only need gettext-runtime and there is sadly no top level
# configure option for this
gpg4win_pkg_gettext_make_dir = gettext-runtime
gpg4win_pkg_gettext_make_dir_inst = gettext-runtime
gpg4win_pkg_gettext_ex_make_dir = gettext-runtime
gpg4win_pkg_gettext_ex_make_dir_inst = gettext-runtime
# CMakeList.txt does not live in the top level
gpg4win_pkg_zstd_conf_subdir = /build/cmake
gpg4win_pkg_zstd_configure = -DZSTD_BUILD_PROGRAMS=OFF
# Paperkey comes with a man pages which we have to convert.
define gpg4win_pkg_paperkey_post_install
(for i in paperkey ; \
do man -Tlatin1 -l $$$${pkgidir}/share/man/man1/$$$${i}.1 | \
sed `printf "s/_\b//g;s/\b.//g"` | \
sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man1/$$$${i}.man ; \
done)
endef
# Build the reference manual.
define gpg4win_pkg_gpgol_post_install
( cd $$$${pkgbdir}/doc; make pdf )
endef
gpg4win_pkg_libgpg_error_configure = --enable-static
gpg4win_pkg_libgpg_error_ex_configure = --enable-static
gpg4win_pkg_libgpg_error_extracflags = -D_WIN32_WINNT=0x0600
gpg4win_pkg_libgpg_error_ex_extracflags = -D_WIN32_WINNT=0x0600
# We convert the PO files to UTF-8. FIXME: This should be done in
# libgpg-error proper.
define gpg4win_pkg_libgpg_error_post_install
(for i in `$(tsdir)/src/potomo --get-linguas $$$${pkgsdir}/po` ; do \
rm $$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES/libgpg-error.mo \
2>/dev/null|| true; \
$(tsdir)/src/potomo $$$${pkgsdir}/po/$$$${i}.po \
$$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES/libgpg-error.mo; \
done)
endef
gpg4win_pkg_libassuan_configure = --enable-static
gpg4win_pkg_libassuan_ex_configure = --enable-static
gpg4win_pkg_libpng_configure = HAVE_SOLARIS_LD_FALSE=yes CPPFLAGS=\"-I$(idir)/include -DPNG_BUILD_DLL\" LDFLAGS=\"-L$(idir)/lib\" LIBPNG_DEFINES=\"-DPNG_BUILD_DLL\"
gpg4win_pkg_pinentry_configure = \
--enable-pinentry-qt \
--disable-pinentry-fltk \
--disable-pinentry-curses \
--disable-fallback-curses
gpg4win_pkg_gpgme_configure = \
--enable-static \
--enable-languages=qt,cpp \
--disable-gpg-test \
--disable-gpgsm-test
gpg4win_pkg_gpgme_ex_configure = \
--enable-static \
--enable-languages=cpp \
--disable-gpg-test \
--disable-gpgsm-test
gpg4win_pkg_openjpeg_configure = -DBUILD_CODEC=OFF
gpg4win_pkg_paperkey_configure = --silent
gpg4win_pkg_sonnet_configure = -DSONNET_USE_QML=OFF
gpg4win_pkg_ki18n_configure = -DBUILD_WITH_QML=OFF
gpg4win_pkg_kconfig_configure = -DKCONFIG_USE_DBUS=OFF -DKCONFIG_USE_QML=OFF
gpg4win_pkg_kconfig_native_configure = -DKCONFIG_USE_DBUS=OFF \
-DKCONFIG_USE_QML=OFF \
-DKCONFIG_USE_GUI=OFF
gpg4win_pkg_pcre2_configure = -DPCRE2_BUILD_PCRE2_8=OFF -DPCRE2_BUILD_PCRE2_16=ON \
-DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF
gpg4win_pkg_karchive_configure = -DWITH_LIBZSTD=ON -DWITH_LIBLZMA=OFF
gpg4win_pkg_kcoreaddons_configure = -DKCOREADDONS_USE_QML=OFF
gpg4win_pkg_kwindowsystem_configure = -DKWINDOWSYSTEM_QML=OFF
gpg4win_pkg_ktextwidgets_configure = -DWITH_TEXT_TO_SPEECH=OFF
gpg4win_pkg_qtkeychain_configure = -DBUILD_WITH_QT6=ON
gpg4win_pkg_ktextaddons_configure = -DFORCE_DISABLE_MULTIMEDIA=ON
gpg4win_pkg_kcalendarcore_configure = -DUSE_QML=OFF
# Create a minmal build on the build system of the
# same version before cross compiling.
gpg4win_pkg_qtbase_native_configure = \
-DQT_BUILD_EXAMPLES=OFF \
-DQT_BUILD_TESTS=OFF \
-DBUILD_WITH_PCH=OFF \
-DFEATURE_assistant=ON \
-DFEATURE_linguist=ON \
-DFEATURE_eventfd=OFF \
-DFEATURE_harfbuzz=OFF \
-DFEATURE_icu=OFF \
-DFEATURE_zstd=OFF \
-DFEATURE_glib=OFF \
-DFEATURE_dynamicgl=OFF \
-DFEATURE_egl=OFF \
-DFEATURE_opengl_desktop=OFF \
-DFEATURE_opengl_dynamic=OFF \
-DFEATURE_opengles2=OFF \
-DINPUT_opengl=no \
-DFEATURE_openssl=OFF \
-DFEATURE_zstd=OFF \
-DFEATURE_sql_mysql=OFF \
-DFEATURE_sql_db2=OFF \
-DFEATURE_sql_psql=OFF \
-DFEATURE_sql_oci=OFF \
-DFEATURE_sql_odbc=OFF \
-DFEATURE_sql_sqlite=OFF \
-DFEATURE_sql_ibase=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON
define gpg4win_pkg_qtbase_native_post_install
(cd $$$${pkgidir}/bin; \
cp qtpaths qtpaths_real; \
unlink qtpaths; \
echo "#!/bin/sh" > qtpaths; \
echo "$$$${pkgidir}/bin/qtpaths_real \"\$$$$@\" | sed 's@/pkgs.*@/@'" >> qtpaths; \
chmod u+x qtpaths; \
cp qtpaths qtpaths6; \
)
endef
gpg4win_pkg_qtbase_configure = \
-DQT_HOST_PATH=$(native_idir) \
-DQt6HostInfo_DIR=$(native_idir)/lib/cmake/Qt6HostInfo \
-DQT_QMAKE_DEVICE_OPTIONS='CROSS_COMPILE=$(host)- \
-DQT_QMAKE_TARGET_MKSPEC=win32-g++ \
-DQT_BUILD_EXAMPLES=OFF \
-DQT_BUILD_TESTS=OFF \
-DBUILD_WITH_PCH=OFF \
-DFEATURE_accessibility=ON \
-DFEATURE_dbus=OFF \
-DFEATURE_fontconfig=OFF \
-DFEATURE_glib=OFF \
-DFEATURE_opengl_dynamic=ON \
-DFEATURE_openssl=OFF \
-DFEATURE_pkg_config=ON \
-DFEATURE_sql_mysql=OFF \
-DFEATURE_sql_odbc=OFF \
-DFEATURE_sql_psql=OFF \
-DFEATURE_system_zlib=ON \
-DFEATURE_system_zstd=ON \
-DFEATURE_system_pcre=ON \
-DFEATURE_system_freetype=ON \
-DFEATURE_system_harfbuzz=OFF \
-DFEATURE_schannel=ON \
-DFEATURE_use_gold_linker_alias=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON
# copy moc and rcc from the tools into the target tree
# so that pkg-config can find them.
define gpg4win_pkg_qtbase_post_install
(cp $(native_idir)/libexec/moc $$$${pkgidir}/bin; \
cp $(native_idir)/libexec/rcc $$$${pkgidir}/bin; \
)
endef
define gpg4win_pkg_okular_post_install
( rm $$$${pkgidir}/share/icons/hicolor/icon-theme.cache; )
endef
gpg4win_pkg_kleopatra_configure = \
-DFORCE_DISABLE_KCMUTILS=ON \
-DDISABLE_KWATCHGNUPG=ON \
-DRELEASE_SERVICE_VERSION=Gpg4win-$(VERSION) \
-DKLEOPATRA_DISTRIBUTION_TEXT="$(DISTRIBUTION_TEXT)"
gpg4win_pkg_kxmlgui_configure = \
-DFORCE_DISABLE_KGLOBALACCEL=ON \
-DFORCE_DISABLE_DBUS=ON \
-DXMLGUI_COMPILER_VERSION="$(CC)" \
-DXMLGUI_DISTRIBUTION_TEXT="$(DISTRIBUTION_TEXT)"
gpg4win_pkg_kio_configure = \
-DFORCE_DISABLE_DBUS=ON \
-DFORCE_DISABLE_KCRASH=ON
gpg4win_pkg_knotifications_configure = \
-DFORCE_DISABLE_CANBERRA=ON
gpg4win_pkg_breeze_icons_native_configure = \
-DWITH_ICON_GENERATION=OFF \
-DSKIP_INSTALL_ICONS=ON
define gpg4win_pkg_breeze_icons_native_post_install
( mkdir -p $$$${pkgidir}/bin/ && cp $$$${pkgbdir}/bin/* $$$${pkgidir}/bin )
endef
#gpg4win_pkg_breeze_icons_configure = \
# -DBINARY_ICONS_RESOURCE=ON \
# -DICON_SUBSET_INCLUDE_FILE=$(abs_srcdir)/included-icons.txt
gpg4win_pkg_breeze_configure = \
-DBUILD_QT6=ON \
-DBUILD_QT5=OFF \
-DWITH_DECORATIONS=OFF
gpg4win_pkg_kbookmarks_configure = \
-DANDROID=ON
gpg4win_pkg_kservice_configure = \
-DANDROID=ON
gpg4win_pkg_kjobwidgets_configure = \
-DANDROID=ON
gpg4win_pkg_kiconthemes_configure = \
-DKICONTHEMES_USE_QTQUICK=OFF
gpg4win_pkg_okular_configure = \
-DFORCE_NOT_REQUIRED_DEPENDENCIES="KF6Purpose\;Qt6TextToSpeech\;LibZip\;KF6DocTools\;Phonon4Qt6\;TIFF\;JPEG\;LibSpectre\;KExiv2Qt6\;CHM\;DjVuLibre\;EPub\;QMobipocket\;Discount\;Qt6Qml\;Qt6DBus"
gpg4win_pkg_libical_configure = \
-DICAL_GLIB=false \
-DENABLE_GTK_DOC=false
gpg4win_pkg_prison_configure = \
-DWITH_QUICK=OFF \
-DWITH_MULTIMEDIA=OFF
gpg4win_pkg_poppler_configure = \
-DENABLE_NSS3=OFF \
-DENABLE_GLIB=OFF \
-DENABLE_GOBJECT_INTROSPECTION=OFF \
-DENABLE_QT5=OFF \
-DENABLE_LCMS=OFF \
-DENABLE_LIBCURL=OFF
gpg4win_pkg_kcontacts_configure = \
-DKCONTACTS_USE_QML=OFF
gpg4win_pkg_libkdepim_configure = \
-DFORCE_NOT_REQUIRED_DEPENDENCIES="Qt6DBus"
# Supported make-only source packages.
gpg4win_mpkgs = bzip2 zlib
# Extra options for the make invocations for individual packages.
# make_flags is used for building, make_args_inst is used for installing.
gpg4win_pkg_bzip2_make_args = \
CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
gpg4win_pkg_bzip2_make_args_inst = \
PREFIX=$$$${pkgidir} CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
gpg4win_pkg_zlib_make_args = \
-fwin32/Makefile.gcc PREFIX=$(host)- IMPLIB=libz.dll.a
gpg4win_pkg_zlib_make_args_inst = -fwin32/Makefile.gcc install \
BINARY_PATH=$$$${pkgidir}/bin INCLUDE_PATH=$$$${pkgidir}/include \
LIBRARY_PATH=$$$${pkgidir}/lib SHARED_MODE=1 IMPLIB=libz.dll.a
# Zlib needs some special magic to generate a libtool file.
# We also install the pc file here.
define gpg4win_pkg_zlib_post_install
(mkdir $$$${pkgidir}/lib/pkgconfig || true; \
cp $(abs_srcdir)/zlib.pc $$$${pkgidir}/lib/pkgconfig/; \
cd $$$${pkgidir}; \
echo "# Generated by libtool" > lib/libz.la \
echo "dlname='../bin/zlib1.dll'" >> lib/libz.la; \
echo "library_names='libz.dll.a'" >> lib/libz.la; \
echo "old_library='libz.a'" >> lib/libz.la; \
echo "dependency_libs=''" >> lib/libz.la; \
echo "current=1" >> lib/libz.la; \
echo "age=2" >> lib/libz.la; \
echo "revision=5" >> lib/libz.la; \
echo "installed=yes" >> lib/libz.la; \
echo "shouldnotlink=no" >> lib/libz.la; \
echo "dlopen=''" >> lib/libz.la; \
echo "dlpreopen=''" >> lib/libz.la; \
echo "libdir=\"$$$${pkgidir}/lib\"" >> lib/libz.la)
endef
# Supported binary packages.
gpg4win_bpkgs = pkgconfig gnupg-w32
# Default to same version.
VSD_VERSION=$(VERSION)
# Include installer targets for customized packages
-include gnupg-vsd/custom.mk
$(stampdir)/stamp-msi-base: icons/shield.ico Makefile.am \
$(top_srcdir)/doc/logo/gpg4win-msi*.bmp \
$(top_srcdir)/po/gpg4win-de.wxl \
$(top_srcdir)/po/gpg4win-en.wxl
ssh $(WINHOST) "mkdir AppData\\Local\\Temp\\gpg4win-$(VERSION)" || true
scp $(top_srcdir)/packages/gnupg-msi-$(gpg4win_pkg_gnupg_msi_version)-bin.wixlib \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION);
scp $(top_srcdir)/src/icons/shield.ico $(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)
scp $(top_srcdir)/doc/logo/gpg4win-msi-header_install-493x58.bmp \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)/header.bmp
scp $(top_srcdir)/doc/logo/gpg4win-msi-wizard_install-493x312.bmp \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)/dialog.bmp
scp $(top_srcdir)/doc/logo/gpg4win-msi-wizard_install-493x312.bmp \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)/dialog.bmp
scp $(top_srcdir)/doc/logo/gpg4win-msi-wizard_install-info-32x32.bmp \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)/info.bmp
scp $(top_srcdir)/doc/logo/gpg4win-msi-wizard_install-exclamation-32x32.bmp \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)/exclamation.bmp
scp $(top_srcdir)/po/gpg4win-en.wxl $(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)
scp $(top_srcdir)/po/gpg4win-de.wxl $(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)
scp WixUI_Gpg4win.wxs $(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)
touch $(stampdir)/stamp-msi-base
# Now do the bunch of the work. This is a bunch of dirty magic to
# integrate our special makefile into automake, while not actually
# including it (make should include it). This is in turn necessary
# because automake can't deal with the elegant magic in the actual
# Makefile.
define INCLUDE_BY_MAKE
include $(1)
endef
if BUILD_GPG4WIN
$(eval $(call INCLUDE_BY_MAKE,gpg4win.mk))
gpg4win_clean = clean-gpg4win
endif
clean-local: $(gpg4win_clean)
common_nsi = nsis/inst-sections.nsi nsis/installer.nsi \
nsis/installer-finish.nsi nsis/gpg4win.nsi \
$(addsuffix .nsi,$(addprefix nsis/inst-,$(gpg4win_build_list))) \
$(addsuffix .nsi,$(addprefix nsis/uninst-,$(gpg4win_build_list)))
# Sign additional files as per signing setup
# Exit in case of error because that usually means that AUTHENTICODE_FILES
# are not up to date.
$(stampdir)/stamp-additional-signedfiles: $(stampdir)/stamp-binaries \
$(foosum_exe)
(set -e;\
$(eval $(call READ_AUTOGEN_template,AUTHENTICODE_KEY)) \
cd "$(idir)"; \
for f in $(AUTHENTICODE_FILES); do \
if [ ! -f "$$f" ]; then \
echo "ERROR: file '$$f' not available for signing"; \
exit 1; \
fi;\
done; \
for f in $(AUTHENTICODE_FILES); do \
if [ ! -s "$$f" ]; then \
echo "Codesign: Skipping over empty file '$$f'"; \
continue; \
fi; \
if [ -n "$(AUTHENTICODE_KEY)" ] && [ "$(AUTHENTICODE_KEY)" != "none" ]; then \
$(call AUTHENTICODE_sign,"$$f","$$f"); \
fi; \
done \
)
touch $(stampdir)/stamp-additional-signedfiles
# Prepare the versioninfo file. The pipeline extracts the last
# occurrence of a package with the same name, sorts the entries and
# writes the file with DOS line endings. This helps to avoid
# duplicate entries in case one package has been rebuild (which is
# common when developing a new version).
versioninfo.txt:
$(SHA1SUM) $(pkg_files) </dev/null > versioninfo.tmp
set -e; \
( while read a b; do echo "$$a $$(basename $$b)"; \
done < versioninfo.tmp \
| sort -k2 -sf | tac | uniq -f1 ; \
echo '=========== SHA-1 checksum ============= == package ==' \
) | tac | awk '{printf "%s\r\n", $$0}' > versioninfo.txt
-rm versioninfo.tmp
NEWS.tmp : $(top_srcdir)/NEWS
awk '/^#/ {next} /^\(de\)/ {skip=1;next} /^[^[:space:]]/ {skip=0} \
!skip { sub(/^\(en\)/," *"); print }' \
<$(top_srcdir)/NEWS >NEWS.tmp
NEWS.de : $(top_srcdir)/NEWS
awk '/^#/ {next} /^\(en\)/ {skip=1;next} /^[^[:space:]]/ {skip=0} \
!skip { sub(/^\(de\)/,"-"); print }' \
<$(top_srcdir)/NEWS >NEWS.de; \
sed -i 's/^ / /' NEWS.de
NEWS.en : $(top_srcdir)/NEWS
awk '/^#/ {next} /^\(de\)/ {skip=1;next} /^[^[:space:]]/ {skip=0} \
!skip { sub(/^\(en\)/,"-"); print }' \
<$(top_srcdir)/NEWS >NEWS.en; \
sed -i 's/^ / /' NEWS.en
COMPONENTS-list.tmp : $(top_srcdir)/NEWS
awk '/^~~~~~~~~~~~/ { ok++; next} ok==1 {print " "$$0}' \
< $(top_srcdir)/NEWS > COMPONENTS-list.tmp
# For some nut-crazy reason someone thought it would be a great idea
# if makensis changed to the directory of the source file at startup.
# So we have to pull a couple of strings to correct this.
-installers/gpg4win-$(VERSION).exe: $(common_nsi) $(stampdir)/stamp-final \
+installers/gpg4win-$(VERSION)$(W64SUFFIX).exe: $(common_nsi) $(stampdir)/stamp-final \
g4wihelp.dll gpgwrap.exe \
$(foosum_exe) \
$(HOWTO_files) \
license.blurb versioninfo.txt
$(MAKENSIS) -V3 -DBUILD_W64=$(BUILD_W64) -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
-DSRCDIR=$(srcdir) $(EXTRA_MAKENSIS_FLAGS) $(srcdir)/nsis/gpg4win.nsi && \
- mv gpg4win-$(VERSION).exe installers/gpg4win-$(VERSION).exe
+ mv gpg4win-$(VERSION).exe installers/gpg4win-$(VERSION)$(W64SUFFIX).exe
$(stampdir)/stamp-dist-self: versioninfo.txt
(set -e; cd ..; make dist-xz)
touch $(stampdir)/stamp-dist-self
license.blurb: $(top_srcdir)/doc/license-page $(top_srcdir)/doc/GPLv3
cat $(top_srcdir)/doc/license-page $(top_srcdir)/doc/GPLv3 >$@
g4wihelp.dll: slideshow.cpp desktopshellrun.cpp g4wihelp.c exdll.h
$(W32CC32) -DUNICODE -static-libgcc -I. -O2 -c \
-o exdll.o $(srcdir)/exdll.c
$(W32CC32) -DUNICODE -static-libgcc -I. -O2 -c \
-o desktopshellrun.o $(srcdir)/desktopshellrun.cpp
$(W32CC32) -DUNICODE -static-libgcc -I. -O2 -c \
-o slideshow.o $(srcdir)/slideshow.cpp
$(W32CC32) -DUNICODE -DENABLE_SLIDE_SHOW -static-libgcc -I. -shared -O2 \
-o g4wihelp.dll $(srcdir)/g4wihelp.c \
desktopshellrun.o slideshow.o exdll.o \
-lwinmm -lgdi32 -luserenv -lshell32 \
-lole32 -loleaut32 -lshlwapi -lmsimg32
$(STRIP) g4wihelp.dll
gpgwrap.exe: gpgwrap.c
$(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -Wl,-subsystem,windows -o $@ $^
$(STRIP) $@
sha1sum.exe: sha1sum.c
$(CC) -O2 -o $@ $^
$(STRIP) $@
md5sum.exe: sha1sum.c
$(CC) -DBUILD_MD5SUM -O2 -o $@ $^
$(STRIP) $@
sha256sum.exe: sha1sum.c
$(CC) -DBUILD_SHA256SUM -O2 -o $@ $^
$(STRIP) $@
if BUILD_GPG4WIN
-all_full = installers/gpg4win-$(VERSION).exe
+all_full = installers/gpg4win-$(VERSION)$(W64SUFFIX).exe
endif
all-local: $(all_full)
if BUILD_GPG4WIN
@echo "###################################################"
@echo " Gpg4win $(VERSION) successfully build!"
@echo " Installers can be found under src/installers"
@echo "###################################################"
endif
clean-local:
- -rm -f installers/gpg4win-$(VERSION).exe \
+ -rm -f installers/gpg4win-$(VERSION)$(W64SUFFIX).exe \
installers/GnuPG-VS-Desktop-$(VERSION).msi \
installers/GnuPG-Desktop-$(VERSION).msi
distclean-local:
rm -f *.dll-x*
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Dec 23, 1:23 PM (48 m, 22 s)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c7/f1/e5e121253daf16b7bde0f6378f1e
Attached To
rW Gpg4win
Event Timeline
Log In to Comment