Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F31845915
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
176 KB
Subscribers
None
View Options
diff --git a/autogen.rc b/autogen.rc
index c6061810..8e6f9a1a 100644
--- a/autogen.rc
+++ b/autogen.rc
@@ -1,25 +1,25 @@
# autogen.sh configuration for gpg4win -*- sh -*-
display_name="Gpg4win"
patches_to="https://bugs.gnupg.org"
case "$myhost:$myhostsub" in
w32:64)
- extraoptions=
+ extraoptions="--with-additional-gpgex-host=i686-w64-mingw32"
;;
w32:)
- extraoptions=
+ extraoptions="--with-additional-gpgex-host=x86_64-w64-mingw32"
;;
esac
case "$myhost" in
w32)
- configure_opts="--enable-gpg4win --with-additional-gpgex-host=x86_64-w64-mingw32"
+ configure_opts="--enable-gpg4win"
;;
esac
extra_automake_flags="-Wno-portability"
final_info="For building a Gpg4win installer:\
\"./autogen.sh --build-w32 && make\".
For building an AppImage: check the README."
diff --git a/configure.ac b/configure.ac
index a7d84a4c..01dccc42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,571 +1,589 @@
# 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],[4])
m4_define([mym4_minor],[4])
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")
# 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)
- # This is only required if you also use the pthread flavor for x64
- GPG4WIN_RUNTIME_LIBRARY_X64(libwinpthread-1)
+ 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" ]; then
AC_MSG_ERROR(No exception library found. Please check what your system
uses and see above message about either dw2 or sjlj
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], [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})
- 32bit platform: $host
- 64bit platform: ${GPGEX_ADD_HOST}
+ 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/m4/gpg4win.m4 b/m4/gpg4win.m4
index 28d8c28c..2cd57b47 100644
--- a/m4/gpg4win.m4
+++ b/m4/gpg4win.m4
@@ -1,981 +1,981 @@
dnl gpg4win.m4 - macros to configure gpg4win.
dnl Copyright (C) 2005, 2009 g10 Code GmbH
dnl
dnl This file is part of GPG4Win.
dnl
dnl GPG4Win is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl GPG4Win is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
dnl MA 02110-1301, USA
# GPG4WIN_DEFINE SYMBOL
# A poor man's version of AC_DEFINE_UNQUOTED for NSIS.
AC_DEFUN([GPG4WIN_DEFINE],
[
eval $1=\"\!define $1 1\"
AC_SUBST($1)
])
# GPG4WIN_BASH
# Gpg4Win needs bash. This macro checks for it.
AC_DEFUN([GPG4WIN_BASH],
[
AC_MSG_CHECKING([for Bash])
_bash=$BASH_VERSION
if test -z "$_bash"; then
_bash=no
fi
AC_MSG_RESULT($_bash)
if test $_bash = no; then
AC_MSG_ERROR("this configure script requires Bash")
fi
])
# GPG4WIN_PACKAGES
# Determines the path to the source and binary packages.
# Default is the "packages" directory in the source directory.
# The path is stored in the shell variable gpg4win_packages.
AC_DEFUN([GPG4WIN_PACKAGES],
[
AC_MSG_CHECKING(for packages directory)
_gpg4win_packages_default=packages
AC_ARG_WITH([packages],
AS_HELP_STRING([--with-packages=DIR],
[source and binary packages [[packages]]]),
gpg4win_packages=$withval)
AS_IF([test -z $gpg4win_packages],
[gpg4win_packages=$_gpg4win_packages_default])
AS_IF([test `echo $gpg4win_packages | head -c 1` != /],
[gpg4win_packages=`pwd`/$gpg4win_packages])
AC_SUBST(gpg4win_packages)
AC_MSG_RESULT($gpg4win_packages)
# Set auto-detection. FIXME: This should accept a comma-separated
# list of packages that will be autodetected.
_gpg4win_auto_detection=yes
AC_ARG_ENABLE([packages],
AS_HELP_STRING([--enable-packages], [enable auto-detection [[yes]]]),
_gpg4win_auto_detection=$enableval)
])
# Should be called early.
AC_DEFUN([GPG4WIN_INIT],
[
# We call this here so its options appear before the per-package options.
AC_REQUIRE([GPG4WIN_PACKAGES])
])
# GPG4WIN_FIND([FILE],[PATTERN],[ZIP|TAR],[DIR],[IF-FOUND],[IF-NOT-FOUND])
# Search for package file FILE in DIR. If DIR is empty, yes or maybe,
# look in default directory. If DIR is not maybe, abort if not found.
# The package file name is provided in gpg4win_val and the version in
# gpg4win_version.
AC_DEFUN([GPG4WIN_FIND],
[
AC_REQUIRE([GPG4WIN_BASH])
AC_REQUIRE([GPG4WIN_PACKAGES])
gpg4win_val=
gpg4win_version=
AC_MSG_CHECKING(for package $1)
_gpg4win_critical=no
_gpg4win_file=
_gpg4win_dir=$4
# If --enable-pkg-foo was specified, make success critical.
AS_IF([test x$_gpg4win_dir != xmaybe], [_gpg4win_critical=yes])
# Only check if critical or auto detection is requested.
AS_IF([test $_gpg4win_auto_detection = yes -o $_gpg4win_critical = yes],
[AS_IF([test -z "$_gpg4win_dir" -o "$_gpg4win_dir" = yes -o "$_gpg4win_dir" = maybe],
[_gpg4win_dir=$gpg4win_packages])
# Install pattern.
AS_IF([test -z "$2"], [_gpg4win_pat='$1-\([[0-9]].*\)'],
[_gpg4win_pat="$2"])
# Frob pattern. Regex party!
[_gpg4win_glob=`echo "$_gpg4win_pat" | sed -e 's/\\\\(\(.*\)\\\\)/\1/'`]
[_gpg4win_glob=`echo "$_gpg4win_glob" | sed -e 's/\\.\\*/*/'`]
# Make non-matching globs expand to nothing.
shopt -s nullglob
_gpg4win_format=both
AS_IF([test ! -z "$3"], _gpg4win_format="$3")
AS_IF([test $_gpg4win_format != zip],
[_gpg4win_file="$_gpg4win_file "`echo ${_gpg4win_dir}/${_gpg4win_glob}.tar.xz`])
AS_IF([test $_gpg4win_format != zip],
[_gpg4win_file="$_gpg4win_file "`echo ${_gpg4win_dir}/${_gpg4win_glob}.tar.bz2`])
AS_IF([test $_gpg4win_format != zip],
[_gpg4win_file="$_gpg4win_file "`echo ${_gpg4win_dir}/${_gpg4win_glob}.tbz2`])
AS_IF([test $_gpg4win_format != zip],
[_gpg4win_file="$_gpg4win_file "`echo ${_gpg4win_dir}/${_gpg4win_glob}.tbz`])
AS_IF([test $_gpg4win_format != zip],
[_gpg4win_file="$_gpg4win_file "`echo ${_gpg4win_dir}/${_gpg4win_glob}.tar.gz`])
AS_IF([test $_gpg4win_format != zip],
[_gpg4win_file="$_gpg4win_file "`echo ${_gpg4win_dir}/${_gpg4win_glob}.tgz`])
AS_IF([test $_gpg4win_format != tar],
[_gpg4win_file="$_gpg4win_file "`echo ${_gpg4win_dir}/${_gpg4win_glob}.zip`])
AS_IF([test $_gpg4win_format != tar -a $_gpg4win_format != zip],
[_gpg4win_file="$_gpg4win_file "`echo ${_gpg4win_dir}/${_gpg4win_glob}.exe`])
AS_IF([test $_gpg4win_format != tar -a $_gpg4win_format != zip],
[_gpg4win_file="$_gpg4win_file "`echo ${_gpg4win_dir}/${_gpg4win_glob}.wixlib`])
shopt -u nullglob])
# remove leading and trailing whitespace
[_gpg4win_file=`echo $_gpg4win_file`]
AS_IF([test -z "$_gpg4win_file"],
AC_MSG_RESULT(no),
AS_IF([test `echo $_gpg4win_file | head -c 1` != /],
[_gpg4win_file=`pwd`/$_gpg4win_file])
AC_MSG_RESULT($_gpg4win_file))
AS_IF([test -z "$_gpg4win_file" -a $_gpg4win_critical = yes],
AC_MSG_ERROR(could not find sources for $1 in $_gpg4win_dir))
# Test for duplicate.
_gpg4win_found=
for _gpg4win_f in $_gpg4win_file; do
AS_IF([test "$_gpg4win_found" = yes],
[AC_MSG_WARN(found more than one sources for $1 in $_gpg4win_dir)
gpg4win_dup_sources="$gpg4win_dup_sources $1";
gpg4win_rm_candidates="$gpg4win_rm_candidates $_gpg4win_file"])
_gpg4win_found=yes
done
_gpg4win_suffix_pat='\.\(tar.xz\|tar.bz2\|tbz2\|tbz\|tar.gz\|tgz\|zip\|exe\|wixlib\)'
AS_IF([test ! -z "$_gpg4win_file"],
[gpg4win_val="$_gpg4win_file"
[gpg4win_version=`echo "$gpg4win_val" | sed -e "s,^.*/${_gpg4win_pat}${_gpg4win_suffix_pat}$,\1,"`]
[$5]],
[$6])
])
AC_DEFUN([GPG4WIN_CHECK_NATIVEDEPS],
[
AC_REQUIRE([GPG4WIN_CHECK_EXDEPS])
AC_MSG_CHECKING([additional tools build list])
gpg4win_build_native_list=`echo $_gpg4win_native_deps | tsort`
# Remove newlines.
gpg4win_build_native_list=`echo $gpg4win_build_native_list`
AC_MSG_RESULT($gpg4win_build_native_list)
AC_SUBST(gpg4win_build_native_list)
# Check each dependency.
_gpg4win_not_found=
_gpg4win_d=
_gpg4win_p=
for _gpg4win_p in $_gpg4win_native_deps; do
AS_IF([test -z $_gpg4win_d], [_gpg4win_d=$_gpg4win_p],
[
_gpg4win_found=
for _gpg4win_i in $_gpg4win_pkgs; do
AS_IF([test $_gpg4win_d = $_gpg4win_i],
_gpg4win_found=yes
break)
done
AS_IF([test -z $_gpg4win_found],
AC_MSG_WARN(could not find native variant of package $_gpg4win_d required by package $_gpg4win_p)
_gpg4win_not_found=yes)
_gpg4win_d=
])
done
AS_IF([test ! -z "$_gpg4win_not_found"],
AC_MSG_ERROR([could not find some required packages]))
])
AC_DEFUN([GPG4WIN_CHECK_EXDEPS],
[
AC_REQUIRE([GPG4WIN_CHECK_DEPS])
AC_MSG_CHECKING([additional host build list])
gpg4win_build_ex_list=`echo $_gpg4win_ex_deps | tsort`
# Remove newlines.
gpg4win_build_ex_list=`echo $gpg4win_build_ex_list`
AC_MSG_RESULT($gpg4win_build_ex_list)
AC_SUBST(gpg4win_build_ex_list)
# Check each dependency.
_gpg4win_not_found=
_gpg4win_d=
_gpg4win_p=
for _gpg4win_p in $_gpg4win_ex_deps; do
AS_IF([test -z $_gpg4win_d], [_gpg4win_d=$_gpg4win_p],
[
_gpg4win_found=
for _gpg4win_i in $_gpg4win_pkgs; do
AS_IF([test $_gpg4win_d = $_gpg4win_i],
_gpg4win_found=yes
break)
done
AS_IF([test -z $_gpg4win_found],
AC_MSG_WARN(could not find ex variant of package $_gpg4win_d required by package $_gpg4win_p)
_gpg4win_not_found=yes)
_gpg4win_d=
])
done
AS_IF([test ! -z "$_gpg4win_not_found"],
AC_MSG_ERROR([could not find some required packages]))
])
AC_DEFUN([GPG4WIN_CHECK_DEPS],
[
AC_MSG_CHECKING(build list)
gpg4win_build_list=`echo $_gpg4win_deps | tsort`
# Remove newlines.
gpg4win_build_list=`echo $gpg4win_build_list`
AC_MSG_RESULT($gpg4win_build_list)
AC_SUBST(gpg4win_build_list)
# Check each dependency.
_gpg4win_not_found=
_gpg4win_d=
_gpg4win_p=
for _gpg4win_p in $_gpg4win_deps; do
AS_IF([test -z $_gpg4win_d], [_gpg4win_d=$_gpg4win_p],
[
_gpg4win_found=
for _gpg4win_i in $_gpg4win_pkgs; do
AS_IF([test $_gpg4win_d = $_gpg4win_i],
_gpg4win_found=yes
break)
done
AS_IF([test -z $_gpg4win_found],
AC_MSG_WARN(could not find package $_gpg4win_d required by package $_gpg4win_p)
_gpg4win_not_found=yes)
_gpg4win_d=
])
done
AS_IF([test ! -z "$_gpg4win_not_found"],
AC_MSG_ERROR([could not find some required packages]))
])
AC_DEFUN([GPG4WIN_FINALIZE],
[
AC_REQUIRE([GPG4WIN_CHECK_NATIVEDEPS])
_gpg4win_debug=no
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [enable debugging [[no]]]),
_gpg4win_debug=$enableval)
AS_IF([test "${_gpg4win_debug}" != no],
GPG4WIN_DEFINE(GPG4WIN_DEBUG))
])
# GPG4WIN_SPKG([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up the source package PKG.
# It is provided in gpg4win_val.
AC_DEFUN([GPG4WIN_SPKG],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_spkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[GPG4WIN_FIND($1,,, $_gpg4win_pkg,
_gpg4win_spkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
# At this point, _gpg4win_spkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_spkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
# gpg4win_pkg_PKGNAME_deps=DEPS
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
AS_IF([test "$_gpg4win_spkg" != no],
_gpg4win_pkgs="$_gpg4win_pkgs $1"
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
AS_IF([test ! -z "$2"],
for _gpg4win_i in $2; do
_gpg4win_deps="$_gpg4win_deps $_gpg4win_i $1"
done)
[$3],
[$4])
])
# GPG4WIN_SPKGEX([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up the source package PKG to be additionally built
# for the host provided as additional-gpgex-host
AC_DEFUN([GPG4WIN_SPKGEX],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_spkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[GPG4WIN_FIND($1,,, $_gpg4win_pkg,
_gpg4win_spkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
# At this point, _gpg4win_spkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_spkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
AS_IF([test ! -z "$GPGEX_ADD_HOST"],
# gpg4win_pkg_PKGNAME_deps=DEPS
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_ex_deps="$2"
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_ex_deps)
gpg4win_ex_pkgs="$gpg4win_ex_pkgs $1"
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__])_EX)
# Record dependencies. Also enter every package as node.
_gpg4win_ex_deps="$_gpg4win_ex_deps $1 $1"
AS_IF([test ! -z "$2"],
for _gpg4win_i in $2; do
_gpg4win_ex_deps="$_gpg4win_ex_deps $_gpg4win_i $1"
done)
)
])
# GPG4WIN_KDEPKG([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up the source package PKG to be additionally built
# for the host provided as additional-gpgex-host
AC_DEFUN([GPG4WIN_KDEPKG],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_kdepkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[GPG4WIN_FIND($1,,, $_gpg4win_pkg,
_gpg4win_kdepkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
# gpg4win_pkg_PKGNAME=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_kdepkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
# gpg4win_pkg_PKGNAME_deps=DEPS
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
AS_IF([test "$_gpg4win_kdepkg" != no],
_gpg4win_pkgs="$_gpg4win_pkgs $1"
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
AS_IF([test ! -z "$2"],
for _gpg4win_i in $2; do
_gpg4win_deps="$_gpg4win_deps $_gpg4win_i $1"
done)
[$3],
[$4])
])
# GPG4WIN_NATIVEPKG([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up the source package PKG to be additionally built
# natively to provide additional tools on the build system.
AC_DEFUN([GPG4WIN_NATIVEPKG],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_spkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[GPG4WIN_FIND($1,,, $_gpg4win_pkg,
_gpg4win_spkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
# At this point, _gpg4win_spkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_spkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
# gpg4win_pkg_PKGNAME_deps=DEPS
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_native_deps="$2"
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_native_deps)
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__])_NATIVE)
gpg4win_native_pkgs="$gpg4win_native_pkgs $1"
# Record dependencies. Also enter every package as node.
_gpg4win_native_deps="$_gpg4win_native_deps $1 $1"
AS_IF([test ! -z "$2"],
for _gpg4win_i in $2; do
_gpg4win_native_deps="$_gpg4win_native_deps $_gpg4win_i $1"
done)
])
# GPG4WIN_BPKG_GNUWIN32([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up the gnuwin32 package PKG.
# It is provided in gpg4win_val.
AC_DEFUN([GPG4WIN_BPKG_GNUWIN32],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_bpkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[GPG4WIN_FIND($1-bin, [$1-\(.*\)-bin],,
$_gpg4win_pkg,
_gpg4win_bpkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
# At this point, _gpg4win_bpkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
# gpg4win_pkg_PKGNAME_deps=DEPS
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
AS_IF([test "$_gpg4win_bpkg" != "no" ],
GPG4WIN_FIND($1-lib, [$1-\(.*\)-lib],,
$_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find development package for package $1))
# gpg4win_pkg_PKGNAME_dev=FILENAME_OF_BINARY_DEVEL
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_dev=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_dev)
GPG4WIN_FIND($1-src, [$1-\(.*\)-src],,
$_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src)
# FIXME: Add a version consistency check here. All three packages
# must match!
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
_gpg4win_pkgs="$_gpg4win_pkgs $1"
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
AS_IF([test ! -z "$2"],
for _gpg4win_i in $2; do
_gpg4win_deps="$_gpg4win_deps $_gpg4win_i $1"
done)
[$3],
[$4])
])
# GPG4WIN_BPKG_GNUWIN32_LIB([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up the gnuwin32 package PKG. This is a static only library version.
# It is provided in gpg4win_val.
AC_DEFUN([GPG4WIN_BPKG_GNUWIN32_LIB],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_bpkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[GPG4WIN_FIND($1-lib, [$1-\(.*\)-lib],,
$_gpg4win_pkg,
_gpg4win_bpkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
# At this point, _gpg4win_bpkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
AS_IF([test "$_gpg4win_bpkg" != no],
GPG4WIN_FIND($1-src, [$1-\(.*\)-src],,
$_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src)
# FIXME: Add a version consistency check here. All two packages
# must match!
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
_gpg4win_pkgs="$_gpg4win_pkgs $1"
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
AS_IF([test ! -z "$2"],
for _gpg4win_i in $2; do
_gpg4win_deps="$_gpg4win_deps $_gpg4win_i $1"
done)
[$3],
[$4])
])
# GPG4WIN_BPKG_GTK([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up the Gtk binary package PKG.
# It is provided in gpg4win_val.
AC_DEFUN([GPG4WIN_BPKG_GTK],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_bpkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[GPG4WIN_FIND($1,,zip, $_gpg4win_pkg,
_gpg4win_bpkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
# At this point, _gpg4win_bpkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
# gpg4win_pkg_PKGNAME_deps=DEPS
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
AS_IF([test "$_gpg4win_bpkg" != no],
[GPG4WIN_FIND($1,,tar, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))]
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src)
# FIXME: Add a version consistency check here. All three packages
# must match!
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
_gpg4win_pkgs="$_gpg4win_pkgs $1"
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
AS_IF([test ! -z "$2"],
for _gpg4win_i in $2; do
_gpg4win_deps="$_gpg4win_deps $_gpg4win_i $1"
done)
[$3],
[$4])
])
# GPG4WIN_BPKG_GTK_DEV([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up the Gtk library package PKG.
# It is provided in gpg4win_val.
AC_DEFUN([GPG4WIN_BPKG_GTK_DEV],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_bpkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[GPG4WIN_FIND($1,,zip, $_gpg4win_pkg,
_gpg4win_bpkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
# At this point, _gpg4win_bpkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
# gpg4win_pkg_PKGNAME_deps=DEPS
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
AS_IF([test "$_gpg4win_bpkg" != no],
[GPG4WIN_FIND($1-dev,,, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find development package for package $1))]
# gpg4win_pkg_PKGNAME_dev=FILENAME_OF_BINARY_DEVEL
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_dev=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_dev)
[GPG4WIN_FIND($1,,tar, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))]
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src)
# FIXME: Add a version consistency check here. All three packages
# must match!
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
_gpg4win_pkgs="$_gpg4win_pkgs $1"
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
AS_IF([test ! -z "$2"],
for _gpg4win_i in $2; do
_gpg4win_deps="$_gpg4win_deps $_gpg4win_i $1"
done)
[$3],
[$4])
])
# GPG4WIN_BPKG_GNU([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up the source package PKG.
# It is provided in gpg4win_val.
AC_DEFUN([GPG4WIN_BPKG_GNU],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_bpkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[
# For some shameful reason, the gettext package is actually called
# gettext-runtime!
AS_IF([test $1 = gettext],
[GPG4WIN_FIND($1-runtime,,zip, $_gpg4win_pkg,
_gpg4win_bpkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)],
[GPG4WIN_FIND($1,,zip, $_gpg4win_pkg,
_gpg4win_bpkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
])
# At this point, _gpg4win_bpkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
# gpg4win_pkg_PKGNAME_deps=DEPS
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
AS_IF([test "$_gpg4win_bpkg" != no],
[GPG4WIN_FIND($1,,tar, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))]
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src)
# FIXME: Add a version consistency check here. All two packages
# must match!
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
_gpg4win_pkgs="$_gpg4win_pkgs $1"
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
AS_IF([test ! -z "$2"],
for _gpg4win_i in $2; do
_gpg4win_deps="$_gpg4win_deps $_gpg4win_i $1"
done)
[$3],
[$4])
])
# GPG4WIN_BPKG_MSISRC([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up package PKG which is expected to be delivered as two ZIP files
# with a "-(src|source)" and a "-(bin|noinstaller)" suffix.
AC_DEFUN([GPG4WIN_BPKG_MSISRC],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_bpkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[GPG4WIN_FIND($1-bin, [$1-\(.*\)-bin],,
$_gpg4win_pkg,
_gpg4win_bpkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
AS_IF([test "$_gpg4win_pkg" != no -a "$_gpg4win_bpkg" = no],
[GPG4WIN_FIND($1-noinstaller, [$1-\(.*\)-noinstaller],,
$_gpg4win_pkg,
_gpg4win_bpkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
# At this point, _gpg4win_bpkg is no, or the actual package binary file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_version)
# gpg4win_pkg_PKGNAME_deps=DEPS
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
AS_IF([test "$_gpg4win_bpkg" != no],
tmp_binsrc=yes
GPG4WIN_FIND($1-src, [$1-\(.*\)-src],,
$_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val, tmp_binsrc=no)
if test $tmp_binsrc = no ; then
GPG4WIN_FIND($1-source, [$1-\(.*\)-source],,
$_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))
fi
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_src=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_src)
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
)
])
# GPG4WIN_BPKG_BINSRC([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
# Set up package PKG which is expected to be delivered as two ZIP files
# with a "-(src|source)" and a "-(bin|noinstaller)" suffix.
AC_DEFUN([GPG4WIN_BPKG_BINSRC],
[
AC_REQUIRE([GPG4WIN_INIT])
_gpg4win_pkg=maybe
AC_ARG_ENABLE([pkg-$1],
AS_HELP_STRING([--enable-pkg-$1[=DIR]],
[include package $1]),
_gpg4win_pkg=$enableval)
_gpg4win_bpkg=no
_gpg4win_version=
AS_IF([test "$_gpg4win_pkg" != no],
[GPG4WIN_FIND($1-bin, [$1-\(.*\)-bin],,
$_gpg4win_pkg,
_gpg4win_bpkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
AS_IF([test "$_gpg4win_pkg" != no -a "$_gpg4win_bpkg" = no],
[GPG4WIN_FIND($1-noinstaller, [$1-\(.*\)-noinstaller],,
$_gpg4win_pkg,
_gpg4win_bpkg=$gpg4win_val
_gpg4win_version=$gpg4win_version)])
# At this point, _gpg4win_bpkg is no, or the actual package binary file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__]))
# gpg4win_pkg_PKGNAME_version=VERSION
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_version=$_gpg4win_version
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_version)
# gpg4win_pkg_PKGNAME_deps=DEPS
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
AS_IF([test "$_gpg4win_bpkg" != no],
tmp_binsrc=yes
GPG4WIN_FIND($1-src, [$1-\(.*\)-src],,
$_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val, tmp_binsrc=no)
if test $tmp_binsrc = no ; then
GPG4WIN_FIND($1-source, [$1-\(.*\)-source],,
$_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))
fi
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_src=$_gpg4win_bpkg
AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_src)
# FIXME: Add a version consistency check here. Both packages
# must match!
GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
_gpg4win_pkgs="$_gpg4win_pkgs []m4_translit([$1],[A-Z],[a-z])"
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps []m4_translit([$1],[A-Z],[a-z]) []m4_translit([$1],[A-Z],[a-z])"
AS_IF([test ! -z "$2"],
for _gpg4win_i in $2; do
_gpg4win_deps="$_gpg4win_deps $_gpg4win_i []m4_translit([$1],[A-Z],[a-z])"
done)
[$3],
[$4])
])
# Add a runtime library argument 1 should be the dll
# name without the .dll suffix
AC_DEFUN([GPG4WIN_RUNTIME_LIBRARY],
[
dll_path="no"
AC_ARG_WITH([$1],
AS_HELP_STRING([--with-$1-dll[=FILE]],
[include FILE as runtime dependency for the installer.]),
[dll_path=$withval])
if test "$dll_path" = "no"; then
changequote(,)
gcc_major_minor=$($CC --version \
| awk 'NR==1 {split($NF,a,"."); print a[1] "." a[2]}')
gcc_major_minor_alt=$($CC --version | cut -d " " -f 3 \
| awk 'NR==1 {split($NF,a,"."); print a[1] "." a[2]}')
gcc_major=$($CC -dumpversion)
changequote([,])
guesses="/usr/lib/gcc/$host/$gcc_major_minor/$1.dll
/usr/lib/gcc/$host/${gcc_major}/$1.dll
/usr/$host/bin/$1.dll
/usr/$host/lib/$1.dll
/usr/lib/gcc/$host/${gcc_major_minor}-posix/$1.dll
/usr/lib/gcc/$host/${gcc_major_minor_alt}-posix/$1.dll
/usr/lib/gcc/$host/${gcc_major_minor_alt}/$1.dll
/usr/$host/sys-root/mingw/bin/$1.dll"
for file in $guesses; do
if test -r "$file"; then
dll_path="$file"
break
fi
done
fi
if test "$2" = "REQUIRED" -a "$dll_path" = "no"; then
AC_MSG_ERROR(can not find the runtime library $1.dll in the default locations.
Use the --with-$1-dll option to set the path directly.
)
elif test "$dll_path" = no; then
AC_MSG_NOTICE(Using packaging dummy for $1.dll)
touch src/$1.dll-x
else
AC_MSG_NOTICE(Using $dll_path to provide $1.dll)
$CP "$dll_path" src/$1.dll-x
$STRIP src/$1.dll-x
fi
])
-AC_DEFUN([GPG4WIN_RUNTIME_LIBRARY_X64],
+AC_DEFUN([GPG4WIN_RUNTIME_LIBRARY_EX],
[
dll_path="no"
AC_ARG_WITH([$1],
- AS_HELP_STRING([--with-x64-$1-dll[=FILE]],
+ AS_HELP_STRING([--with-ex-$1-dll[=FILE]],
[include FILE as runtime dependency for the installer.]),
[dll_path=$withval])
if test "$dll_path" = "no"; then
changequote(,)
gcc_major_minor=$($CC --version \
| awk 'NR==1 {split($NF,a,"."); print a[1] "." a[2]}')
gcc_major_minor_alt=$($CC --version | cut -d " " -f 3 \
| awk 'NR==1 {split($NF,a,"."); print a[1] "." a[2]}')
changequote([,])
guesses="/usr/lib/gcc/$gpgex_host/$gcc_major_minor/$1.dll
/usr/$gpgex_host/bin/$1.dll
/usr/$gpgex_host/lib/$1.dll
/usr/lib/gcc/$gpgex_host/${gcc_major_minor}-posix/$1.dll
/usr/lib/gcc/$gpgex_host/${gcc_major_minor_alt}-posix/$1.dll
/usr/lib/gcc/$gpgex_host/${gcc_major_minor_alt}/$1.dll
/usr/$gpgex_host/sys-root/mingw/bin/$1.dll
/usr/lib/gcc/$gpgex_host/10-posix/$1.dll"
for file in $guesses; do
if test -r "$file"; then
dll_path="$file"
break
fi
done
fi
if test "$2" = "REQUIRED" -a "$dll_path" = "no"; then
- AC_MSG_ERROR(can not find the x64 runtime library $1.dll in the default locations.
- Use the --with-x64-$1-dll option to set the path directly.
+ AC_MSG_ERROR(can not find the ex runtime library $1.dll in the default locations.
+ Use the --with-ex-$1-dll option to set the path directly.
)
elif test "$dll_path" = no; then
- AC_MSG_NOTICE(Using packaging dummy for $1.dll for x64)
- touch src/$1.dll-x64
+ AC_MSG_NOTICE(Using packaging dummy for $1.dll for $gpgex_host)
+ touch src/$1.dll-ex
else
- AC_MSG_NOTICE(Using $dll_path to provide $1.dll for x64)
- $CP "$dll_path" src/$1.dll-x64
- $STRIP_EX src/$1.dll-x64
+ AC_MSG_NOTICE(Using $dll_path to provide $1.dll for $gpgex_host)
+ $CP "$dll_path" src/$1.dll-ex
+ $STRIP_EX src/$1.dll-ex
fi
])
diff --git a/src/Makefile.am b/src/Makefile.am
index efa9cfb3..64751a94 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,602 +1,602 @@
# 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
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="i686-w64-mingw32-gcc" \
+ -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 \
$(abs_top_srcdir)/build-aux/authenticode-sign.sh --stamp "$$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 \
g4wihelp.dll gpgwrap.exe \
$(foosum_exe) \
$(HOWTO_files) \
license.blurb versioninfo.txt
- $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
+ $(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
$(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
- $(CC) -DUNICODE -static-libgcc -I. -O2 -c \
+ $(W32CC32) -DUNICODE -static-libgcc -I. -O2 -c \
-o exdll.o $(srcdir)/exdll.c
- $(CC) -DUNICODE -static-libgcc -I. -O2 -c \
+ $(W32CC32) -DUNICODE -static-libgcc -I. -O2 -c \
-o desktopshellrun.o $(srcdir)/desktopshellrun.cpp
- $(CC) -DUNICODE -static-libgcc -I. -O2 -c \
+ $(W32CC32) -DUNICODE -static-libgcc -I. -O2 -c \
-o slideshow.o $(srcdir)/slideshow.cpp
- $(CC) -DUNICODE -DENABLE_SLIDE_SHOW -static-libgcc -I. -shared -O2 \
+ $(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
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 \
installers/GnuPG-VS-Desktop-$(VERSION).msi \
installers/GnuPG-Desktop-$(VERSION).msi
distclean-local:
rm -f *.dll-x*
diff --git a/src/gccwrap.sh.in b/src/gccwrap.sh.in
index 7f7bf7bf..97c68727 100644
--- a/src/gccwrap.sh.in
+++ b/src/gccwrap.sh.in
@@ -1,212 +1,216 @@
#!/bin/bash
# Wrapper around gcc / g++ to link in Windows property resources.
# Copyright (C) 2024 g10 Code GmbH
#
# Software engineering by Andre Heinecke <aheineceke@gnupg.org>
#
# This file is part of GnuPG.
#
# GnuPG 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.
#
# GnuPG 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 <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0+
g4win_dir="@abs_top_srcdir@"
# A list of binaries that have version info properties but which
# the script might not catch, e.g. because the link command is in
# a file.
BINS_WITH_VERSIONINFO="kleopatra.exe"
# Check early if the arguments contain exe or dll to indicate
# linkage and then additionally check for conftest, which
# is used as the filename in autotools configure checks. And
# cmTC_ which is shorthand for CMake Test Compile.
#
# In such chases leave the wrapper early to avoid overhead.
if ! echo "$@" | grep -qE '\.exe|\.dll' || echo "$@" | grep -qE 'conftest|cmTC_'; then
/usr/bin/`basename $0` "$@"
exit $?
fi
for bin in $BINS_WITH_VERSIONINFO; do
if echo "$@" | grep -q $bin; then
/usr/bin/`basename $0` "$@"
exit $?
fi
done
# Function to check if a string exists in an array
contains() {
local n=$#
local value=${!n}
for ((i=1; i < $#; i++)) {
if [ "${!i}" == "${value}" ]; then
return 0
fi
}
return 1
}
# Prepare the resource files by setting package specific
# variables and copy the files into the build tree.
prepare_resources() {
prefix=$g4win_dir/src/playground/build
current_dir=$(pwd)
# Remove everything before the known prefix
build_dir=${current_dir#*$prefix/}
# PKGVERSION needs the a,b,c,d 4 part style */
if [[ $build_dir =~ -beta ]]; then
build_dir=$(echo $build_dir | sed 's/-beta/./')
vers_suffix=""
else
vers_suffix=",0"
fi
# Normalize dirname
build_dir=$(echo $build_dir | sed 's/-ex-build//')
build_dir=$(echo $build_dir | sed 's/-build//')
if [[ $build_dir =~ ^([^/]+)-([^/]+) ]]; then
pkgname=${BASH_REMATCH[1]}
pkgversion=${BASH_REMATCH[2]}
else
echo "The current directory does not match the expected structure."
exit 1
fi
# Check if the package version matches a snapshot pattern
if [[ $pkgversion =~ ^[0-9]{12}$ ]]; then
# If so we use this as version, since otherwise we get
# a syntax eror if the 12 digits are treated as the major
# version number.
pkgversion=$(echo "$pkgversion" | sed 's/\(....\)/\1,/g' | sed 's/,$//')
fi
# Ensure that the FILEVERSION matches the 0,1,2,3 pattern
pkgversion=$(echo "${pkgversion}${vers_suffix}" | tr . ,)
# Count the number of commas
comma_count=$(echo "$pkgversion" | awk -F',' '{print NF-1}')
while [ $comma_count -lt 3 ]; do
pkgversion="${pkgversion},0"
comma_count=$((comma_count + 1))
done
# The resource needs comma seperation and the manifest
# a dotted version.
pkgversion_period=$(echo "${pkgversion}" | tr , .)
if [[ ! "$1" =~ \.dll$ ]]; then
filetype="0x02L \/* VFT_DLL *\/"
else
filetype="0x01L \/* VFT_EXE *\/"
fi
if [ "@IS_BETA_BUILD@" == "yes" ]; then
# getting a bit fancy..
# VS_FF_PRERELEASE (2= the file is a development version
# only and not commercially available)
fileflags="0x02L \/* VS_FF_PRERELEASE *\/"
else
fileflags="0x0L"
fi
+ cc_version=$(/usr/bin/`basename $0` --version | head -1)
+
+
cat $g4win_dir/src/versioninfo.rc.in | \
sed "s/@PKG_VERS@/$pkgversion/" | \
sed "s/@ORIGINAL_FILENAME@/$1/" | \
sed "s/@FILEFLAGS@/$fileflags/" | \
sed "s/@FILETYPE@/$filetype/" | \
- sed "s/@PKG_NAME@/$pkgname/" > versioninfo.rc
+ sed "s/@PKG_NAME@/$pkgname/" | \
+ sed "s/@CC_VERSION@/$cc_version/" > versioninfo.rc
cat $g4win_dir/src/gpg4win.w32-manifest.in | \
sed "s/@PKG_VERS@/$pkgversion_period/" |
sed "s/@PKG_NAME@/$pkgname/" > gpg4win.w32-manifest
}
# Function to parse AUTHENTICODE_FILES from the makefile
parse_authenticode_files() {
local makefile_path=$1
local files=()
local found=0
while IFS= read -r line; do
if [[ $line == "AUTHENTICODE_FILES ="* ]]; then
found=2
line=${line#*=}
fi
if [[ $found -gt 0 ]]; then
for file in $(echo $line | tr -d '\\'); do
files+=("$(basename -- $file)")
found=2
done
fi
if [[ $found -eq 1 && $line != '\\' ]]; then
break
fi
if [[ $found -eq 2 ]]; then
found=1
fi
done < "$makefile_path"
echo "${files[@]}"
}
# Parse the command line arguments
output_file=""
has_versioninfo=0
for arg in "$@"; do
if [ "$arg" == "-o" ]; then
output_file_next=1
elif [ "$output_file_next" == "1" ]; then
output_file=$arg
output_file_next=
if [[ ! $output_file =~ \.dll$ && ! $output_file =~ \.exe$ ]]; then
break
fi
elif [[ $arg =~ versioninfo.o$ ]]; then
has_versioninfo=1
fi
done
# Parse the AUTHENTICODE_FILES from the gpg4win.mk.in
AUTHENTICODE_FILES=($(parse_authenticode_files "$g4win_dir/src/gpg4win.mk.in"))
original=/usr/bin/`basename $0`
if [[ "$original" == *-gcc ]]; then
windres="${original%-gcc}-windres"
elif [[ "$original" == *-g++ ]]; then
windres="${original%-g++}-windres"
fi
# If output file is found and the linker command does
# not already contain versioninfo.o
if [ "$output_file" != "" ] && [ "$has_versioninfo" -eq 0 ]; then
filename=$(basename -- "$output_file")
if contains "${AUTHENTICODE_FILES[@]}" "$filename"; then
echo "Preparing manifest and versioninfo for: $filename"
prepare_resources "$filename"
$windres -i versioninfo.rc -o versioninfo.o
added_obj=versioninfo.o
fi
fi
# Execute the original command
if [ -n "$added_obj" ]; then
/usr/bin/`basename $0` "$@" "$added_obj"
else
/usr/bin/`basename $0` "$@"
fi
diff --git a/src/nsis/config.nsi.in b/src/nsis/config.nsi.in
index 55ad05fd..46c17a40 100644
--- a/src/nsis/config.nsi.in
+++ b/src/nsis/config.nsi.in
@@ -1,366 +1,367 @@
# config.nsi - Configuration settings for gpg4win.nsi. -*- nsi -*-
# Copyright (C) 2005, 2007 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
!define _PACKAGE @PACKAGE@
!define _VERSION @VERSION@
!define _BUILD_FILEVERSION @BUILD_FILEVERSION@
!define _BUILD_TIMESTAMP @BUILD_TIMESTAMP@
!define _BUILD_ISODATE @BUILD_ISODATE@
+!define _BUILD_W64 @BUILD_W64@
!define build @build_cpu@-@build_os@
!define host @host_cpu@-@host_os@
!define MAKE @MAKE@
!define UNZIP @UNZIP@
!define TAR @TAR@
!define MKDIR @MKDIR@
!define CP @CP@
!define RM @RM@
!define STOW @STOW@
!define INSTALL "@INSTALL@"
!define WGET @WGET@
!define DOSLF "\r\n"
# If debugging is desired.
@GPG4WIN_DEBUG@
# The package build list, in order.
!define gpg4win_build_list "@gpg4win_build_list@"
# The default packages source directory.
!define gpg4win_packages @gpg4win_packages@
# The path of each package.
@HAVE_PKG_LIBGPG_ERROR@
!define gpg4win_pkg_libgpg_error @gpg4win_pkg_libgpg_error@
!define gpg4win_pkg_libgpg_error_version @gpg4win_pkg_libgpg_error_version@
@HAVE_PKG_LIBASSUAN@
!define gpg4win_pkg_libassuan @gpg4win_pkg_libassuan@
!define gpg4win_pkg_libassuan_version @gpg4win_pkg_libassuan_version@
@HAVE_PKG_GPGME@
!define gpg4win_pkg_gpgme @gpg4win_pkg_gpgme@
!define gpg4win_pkg_gpgme_version @gpg4win_pkg_gpgme_version@
@HAVE_PKG_GNUPG_W32@
!define gpg4win_pkg_gnupg_w32 @gpg4win_pkg_gnupg_w32@
!define gpg4win_pkg_gnupg_w32_version @gpg4win_pkg_gnupg_w32_version@
@HAVE_PKG_PINENTRY@
!define gpg4win_pkg_pinentry @gpg4win_pkg_pinentry@
!define gpg4win_pkg_pinentry_version @gpg4win_pkg_pinentry_version@
@HAVE_PKG_GPGOL@
!define gpg4win_pkg_gpgol @gpg4win_pkg_gpgol@
!define gpg4win_pkg_gpgol_version @gpg4win_pkg_gpgol_version@
@HAVE_PKG_GPGEX@
!define gpg4win_pkg_gpgex @gpg4win_pkg_gpgex@
!define gpg4win_pkg_gpgex_version @gpg4win_pkg_gpgex_version@
@HAVE_PKG_ZLIB@
!define gpg4win_pkg_zlib @gpg4win_pkg_zlib@
!define gpg4win_pkg_zlib_version @gpg4win_pkg_zlib_version@
@HAVE_PKG_BZIP2@
!define gpg4win_pkg_bzip2 @gpg4win_pkg_bzip2@
!define gpg4win_pkg_bzip2_version @gpg4win_pkg_bzip2_version@
@HAVE_PKG_PKGCONFIG@
!define gpg4win_pkg_pkgconfig @gpg4win_pkg_pkgconfig@
!define gpg4win_pkg_pkgconfig_version @gpg4win_pkg_pkgconfig_version@
!define gpg4win_pkg_pkgconfig_src @gpg4win_pkg_pkgconfig_src@
@HAVE_PKG_LIBICONV@
!define gpg4win_pkg_libiconv @gpg4win_pkg_libiconv@
!define gpg4win_pkg_libiconv_version @gpg4win_pkg_libiconv_version@
!define gpg4win_pkg_libiconv_src @gpg4win_pkg_libiconv_src@
@HAVE_PKG_GETTEXT@
!define gpg4win_pkg_gettext @gpg4win_pkg_gettext@
!define gpg4win_pkg_gettext_version @gpg4win_pkg_gettext_version@
!define gpg4win_pkg_gettext_src @gpg4win_pkg_gettext_src@
@HAVE_PKG_QTBASE@
!define gpg4win_pkg_qtbase @gpg4win_pkg_qtbase@
!define gpg4win_pkg_qtbase_version @gpg4win_pkg_qtbase_version@
!define gpg4win_pkg_qtbase_src @gpg4win_pkg_qtbase_src@
@HAVE_PKG_BREEZE_ICONS@
!define gpg4win_pkg_breeze_icons @gpg4win_pkg_breeze_icons@
!define gpg4win_pkg_breeze_icons_version @gpg4win_pkg_breeze_icons_version@
@HAVE_PKG_KLEOPATRA@
!define gpg4win_pkg_kleopatra @gpg4win_pkg_kleopatra@
!define gpg4win_pkg_kleopatra_version @gpg4win_pkg_kleopatra_version@
@HAVE_PKG_PAPERKEY@
!define gpg4win_pkg_paperkey @gpg4win_pkg_paperkey@
!define gpg4win_pkg_paperkey_version @gpg4win_pkg_paperkey_version@
@HAVE_PKG_KCONFIG@
!define gpg4win_pkg_kconfig @gpg4win_pkg_kconfig@
!define gpg4win_pkg_kconfig_version @gpg4win_pkg_kconfig_version@
@HAVE_PKG_QTTOOLS@
!define gpg4win_pkg_qttools @gpg4win_pkg_qttools@
!define gpg4win_pkg_qttools_version @gpg4win_pkg_qttools_version@
@HAVE_PKG_EXTRA_CMAKE_MODULES@
!define gpg4win_pkg_extra_cmake_modules @gpg4win_pkg_extra_cmake_modules@
!define gpg4win_pkg_extra_cmake_modules_version @gpg4win_pkg_extra_cmake_modules_version@
@HAVE_PKG_KI18N@
!define gpg4win_pkg_ki18n @gpg4win_pkg_ki18n@
!define gpg4win_pkg_ki18n_version @gpg4win_pkg_ki18n_version@
@HAVE_PKG_KWIDGETSADDONS@
!define gpg4win_pkg_kwidgetsaddons @gpg4win_pkg_kwidgetsaddons@
!define gpg4win_pkg_kwidgetsaddons_version @gpg4win_pkg_kwidgetsaddons_version@
@HAVE_PKG_KCOMPLETION@
!define gpg4win_pkg_kcompletion @gpg4win_pkg_kcompletion@
!define gpg4win_pkg_kcompletion_version @gpg4win_pkg_kcompletion_version@
@HAVE_PKG_KWINDOWSYSTEM@
!define gpg4win_pkg_kwindowsystem @gpg4win_pkg_kwindowsystem@
!define gpg4win_pkg_kwindowsystem_version @gpg4win_pkg_kwindowsystem_version@
@HAVE_PKG_KCOREADDONS@
!define gpg4win_pkg_kcoreaddons @gpg4win_pkg_kcoreaddons@
!define gpg4win_pkg_kcoreaddons_version @gpg4win_pkg_kcoreaddons_version@
@HAVE_PKG_LIBKLEO@
!define gpg4win_pkg_libkleo @gpg4win_pkg_libkleo@
!define gpg4win_pkg_libkleo_version @gpg4win_pkg_libkleo_version@
@HAVE_PKG_KCODECS@
!define gpg4win_pkg_kcodecs @gpg4win_pkg_kcodecs@
!define gpg4win_pkg_kcodecs_version @gpg4win_pkg_kcodecs_version@
@HAVE_PKG_KMIME@
!define gpg4win_pkg_kmime @gpg4win_pkg_kmime@
!define gpg4win_pkg_kmime_version @gpg4win_pkg_kmime_version@
@HAVE_PKG_KMBOX@
!define gpg4win_pkg_kmbox @gpg4win_pkg_kmbox@
!define gpg4win_pkg_kmbox_version @gpg4win_pkg_kmbox_version@
@HAVE_PKG_KCONFIGWIDGETS@
!define gpg4win_pkg_kconfigwidgets @gpg4win_pkg_kconfigwidgets@
!define gpg4win_pkg_kconfigwidgets_version @gpg4win_pkg_kconfigwidgets_version@
@HAVE_PKG_KXMLGUI@
!define gpg4win_pkg_kxmlgui @gpg4win_pkg_kxmlgui@
!define gpg4win_pkg_kxmlgui_version @gpg4win_pkg_kxmlgui_version@
@HAVE_PKG_KGUIADDONS@
!define gpg4win_pkg_kguiaddons @gpg4win_pkg_kguiaddons@
!define gpg4win_pkg_kguiaddons_version @gpg4win_pkg_kguiaddons_version@
@HAVE_PKG_KITEMVIEWS@
!define gpg4win_pkg_kitemviews @gpg4win_pkg_kitemviews@
!define gpg4win_pkg_kitemviews_version @gpg4win_pkg_kitemviews_version@
@HAVE_PKG_KITEMMODELS@
!define gpg4win_pkg_kitemmodels @gpg4win_pkg_kitemmodels@
!define gpg4win_pkg_kitemmodels_version @gpg4win_pkg_kitemmodels_version@
@HAVE_PKG_KICONTHEMES@
!define gpg4win_pkg_kiconthemes @gpg4win_pkg_kiconthemes@
!define gpg4win_pkg_kiconthemes_version @gpg4win_pkg_kiconthemes_version@
@HAVE_PKG_QTSVG@
!define gpg4win_pkg_qtsvg @gpg4win_pkg_qtsvg@
!define gpg4win_pkg_qtsvg_version @gpg4win_pkg_qtsvg_version@
@HAVE_PKG_QTTRANSLATIONS@
!define gpg4win_pkg_qttranslations @gpg4win_pkg_qttranslations@
!define gpg4win_pkg_qttranslations_version @gpg4win_pkg_qttranslations_version@
@HAVE_PKG_KARCHIVE@
!define gpg4win_pkg_karchive @gpg4win_pkg_karchive@
!define gpg4win_pkg_karchive_version @gpg4win_pkg_karchive_version@
@HAVE_PKG_KCRASH@
!define gpg4win_pkg_kcrash @gpg4win_pkg_kcrash@
!define gpg4win_pkg_kcrash_version @gpg4win_pkg_kcrash_version@
@HAVE_PKG_KIO@
!define gpg4win_pkg_kio @gpg4win_pkg_kio@
!define gpg4win_pkg_kio_version @gpg4win_pkg_kio_version@
@HAVE_PKG_KSERVICE@
!define gpg4win_pkg_kservice @gpg4win_pkg_kservice@
!define gpg4win_pkg_kservice_version @gpg4win_pkg_kservice_version@
@HAVE_PKG_SOLID@
!define gpg4win_pkg_solid @gpg4win_pkg_solid@
!define gpg4win_pkg_solid_version @gpg4win_pkg_solid_version@
@HAVE_PKG_KBOOKMARKS@
!define gpg4win_pkg_kbookmarks @gpg4win_pkg_kbookmarks@
!define gpg4win_pkg_kbookmarks_version @gpg4win_pkg_kbookmarks_version@
@HAVE_PKG_KJOBWIDGETS@
!define gpg4win_pkg_kjobwidgets @gpg4win_pkg_kjobwidgets@
!define gpg4win_pkg_kjobwidgets_version @gpg4win_pkg_kjobwidgets_version@
@HAVE_PKG_OKULAR@
!define gpg4win_pkg_okular @gpg4win_pkg_okular@
!define gpg4win_pkg_okular_version @gpg4win_pkg_okular_version@
@HAVE_PKG_FREETYPE@
!define gpg4win_pkg_freetype @gpg4win_pkg_freetype@
!define gpg4win_pkg_freetype_version @gpg4win_pkg_freetype_version@
@HAVE_PKG_POPPLER@
!define gpg4win_pkg_poppler @gpg4win_pkg_poppler@
!define gpg4win_pkg_poppler_version @gpg4win_pkg_poppler_version@
@HAVE_PKG_LIBPNG@
!define gpg4win_pkg_libpng @gpg4win_pkg_libpng@
!define gpg4win_pkg_libpng_version @gpg4win_pkg_libpng_version@
@HAVE_PKG_TIFF@
!define gpg4win_pkg_tiff @gpg4win_pkg_tiff@
!define gpg4win_pkg_tiff_version @gpg4win_pkg_tiff_version@
@HAVE_PKG_PCRE2@
!define gpg4win_pkg_pcre2 @gpg4win_pkg_pcre2@
!define gpg4win_pkg_pcre2_version @gpg4win_pkg_pcre2_version@
@HAVE_PKG_OPENJPEG@
!define gpg4win_pkg_openjpeg @gpg4win_pkg_openjpeg@
!define gpg4win_pkg_openjpeg_version @gpg4win_pkg_openjpeg_version@
@HAVE_PKG_JPEG@
!define gpg4win_pkg_jpeg @gpg4win_pkg_jpeg@
!define gpg4win_pkg_jpeg_version @gpg4win_pkg_jpeg_version@
@HAVE_PKG_KPARTS@
!define gpg4win_pkg_kparts @gpg4win_pkg_kparts@
!define gpg4win_pkg_kparts_version @gpg4win_pkg_kparts_version@
@HAVE_PKG_KSTATUSNOTIFIERITEM@
!define gpg4win_pkg_kstatusnotifieritem @gpg4win_pkg_kstatusnotifieritem@
!define gpg4win_pkg_kstatusnotifieritem_version @gpg4win_pkg_kstatusnotifieritem_version@
@HAVE_PKG_KTEXTWIDGETS@
!define gpg4win_pkg_ktextwidgets @gpg4win_pkg_ktextwidgets@
!define gpg4win_pkg_ktextwidgets_version @gpg4win_pkg_ktextwidgets_version@
@HAVE_PKG_KCOLORSCHEME@
!define gpg4win_pkg_kcolorscheme @gpg4win_pkg_kcolorscheme@
!define gpg4win_pkg_kcolorscheme_version @gpg4win_pkg_kcolorscheme_version@
@HAVE_PKG_ZSTD@
!define gpg4win_pkg_zstd @gpg4win_pkg_zstd@
!define gpg4win_pkg_zstd_version @gpg4win_pkg_zstd_version@
@HAVE_PKG_SONNET@
!define gpg4win_pkg_sonnet @gpg4win_pkg_sonnet@
!define gpg4win_pkg_sonnet_version @gpg4win_pkg_sonnet_version@
@HAVE_PKG_THREADWEAVER@
!define gpg4win_pkg_threadweaver @gpg4win_pkg_threadweaver@
!define gpg4win_pkg_threadweaver_version @gpg4win_pkg_threadweaver_version@
@HAVE_PKG_GPG4WIN_TOOLS@
!define gpg4win_pkg_gpg4win_tools @gpg4win_pkg_gpg4win_tools@
!define gpg4win_pkg_gpg4win_tools_version @gpg4win_pkg_gpg4win_tools_version@
@HAVE_PKG_SCUTE@
!define gpg4win_pkg_scute @gpg4win_pkg_scute@
!define gpg4win_pkg_scute_version @gpg4win_pkg_scute_version@
@HAVE_PKG_KCALENDARCORE@
!define gpg4win_pkg_kcalendarcore @gpg4win_pkg_kcalendarcore@
!define gpg4win_pkg_kcalendarcore_version @gpg4win_pkg_kcalendarcore_version@
@HAVE_PKG_LIBICAL@
!define gpg4win_pkg_libical @gpg4win_pkg_libical@
!define gpg4win_pkg_libical_version @gpg4win_pkg_libical_version@
@HAVE_PKG_MIMETREEPARSER@
!define gpg4win_pkg_mimetreeparser @gpg4win_pkg_mimetreeparser@
!define gpg4win_pkg_mimetreeparser_version @gpg4win_pkg_mimetreeparser_version@
@HAVE_PKG_QRENCODE@
!define gpg4win_pkg_qrencode @gpg4win_pkg_qrencode@
!define gpg4win_pkg_qrencode_version @gpg4win_pkg_qrencode_version@
@HAVE_PKG_PRISON@
!define gpg4win_pkg_prison @gpg4win_pkg_prison@
!define gpg4win_pkg_prison_version @gpg4win_pkg_prison_version@
@HAVE_PKG_GPGPASS@
!define gpg4win_pkg_gpgpass @gpg4win_pkg_gpgpass@
!define gpg4win_pkg_gpgpass_version @gpg4win_pkg_gpgpass_version@
@HAVE_PKG_QTHTTPSERVER@
!define gpg4win_pkg_qthttpserver @gpg4win_pkg_qthttpserver@
!define gpg4win_pkg_qthttpserver_version @gpg4win_pkg_qthttpserver_version@
@HAVE_PKG_QTKEYCHAIN@
!define gpg4win_pkg_qtkeychain @gpg4win_pkg_qtkeychain@
!define gpg4win_pkg_qtkeychain_version @gpg4win_pkg_qtkeychain_version@
@HAVE_PKG_QTWEBSOCKETS@
!define gpg4win_pkg_qtwebsockets @gpg4win_pkg_qtwebsockets@
!define gpg4win_pkg_qtwebsockets_version @gpg4win_pkg_qtwebsockets_version@
@HAVE_PKG_SYNTAX_HIGHLIGHTING@
!define gpg4win_pkg_syntax_highlighting @gpg4win_pkg_syntax_highlighting@
!define gpg4win_pkg_syntax_highlighting_version @gpg4win_pkg_syntax_highlighting_version@
@HAVE_PKG_KCONTACTS@
!define gpg4win_pkg_kcontacts @gpg4win_pkg_kcontacts@
!define gpg4win_pkg_kcontacts_version @gpg4win_pkg_kcontacts_version@
@HAVE_PKG_LIBKDEPIM@
!define gpg4win_pkg_libkdepim @gpg4win_pkg_libkdepim@
!define gpg4win_pkg_libkdepim_version @gpg4win_pkg_libkdepim_version@
@HAVE_PKG_KPIMTEXTEDIT@
!define gpg4win_pkg_kpimtextedit @gpg4win_pkg_kpimtextedit@
!define gpg4win_pkg_kpimtextedit_version @gpg4win_pkg_kpimtextedit_version@
@HAVE_PKG_KTEXTADDONS@
!define gpg4win_pkg_ktextaddons @gpg4win_pkg_ktextaddons@
!define gpg4win_pkg_ktextaddons_version @gpg4win_pkg_ktextaddons_version@
@HAVE_PKG_GPGOLJS@
!define gpg4win_pkg_gpgoljs @gpg4win_pkg_gpgoljs@
!define gpg4win_pkg_gpgoljs_version @gpg4win_pkg_gpgoljs_version@
@HAVE_PKG_BREEZE@
!define gpg4win_pkg_breeze @gpg4win_pkg_breeze@
!define gpg4win_pkg_breeze_version @gpg4win_pkg_breeze_version@
# @HAVE_PKG_MAN_NOVICE_EN@
# @HAVE_PKG_MAN_ADVANCED_EN@
diff --git a/src/nsis/gpg4win.nsi b/src/nsis/gpg4win.nsi
index c82cf922..ac927bba 100644
--- a/src/nsis/gpg4win.nsi
+++ b/src/nsis/gpg4win.nsi
@@ -1,136 +1,149 @@
# gpg4win.nsi - Installer for GnuPG 4 Windows.
# Copyright (C) 2005, 2007, 2008 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Unicode true
!cd "${BUILD_DIR}"
!addincludedir "${TOP_SRCDIR}"
!addincludedir "${TOP_SRCDIR}/po"
!addincludedir "${SRCDIR}/nsis"
!addplugindir "${BUILD_DIR}"
!include "config.nsi"
# Define this early automatically it is only defined after
# MUI_LANGUAGE has been called.
!define LANG_ENGLISH 1033
# The package name and version. PRETTY_PACKAGE is a user visible name
# only while PACKAGE is useful for filenames etc. PROD_VERSION is the
# product version and needs to be in the format "MAJ.MIN.MIC.BUILDNR".
# NOTE: Please keep the capitalization of PRETTY_PACKAGE_SHORT as it is
# used as registry key.
!define PACKAGE "${_PACKAGE}"
!define PRETTY_PACKAGE "Gpg4win"
!define PRETTY_PACKAGE_SHORT "Gpg4win"
-!define VERSION "${_VERSION}"
!define PROD_VERSION "${_BUILD_FILEVERSION}"
!define COMPANY "g10 Code GmbH"
-!define COPYRIGHT "Copyright (C) 2023 g10 Code GmbH"
+!define COPYRIGHT "Copyright (C) 2024 g10 Code GmbH"
!define DESCRIPTION "Gpg4win: The GNU Privacy Guard and Tools for Windows"
+!define VERSION "${_VERSION}"
-!define INSTALL_DIR "Gpg4win"
+# Set the installation directory.
+!ifndef INSTALL_DIR
+!define INSTALL_DIR "${PRETTY_PACKAGE_SHORT}"
+!endif
+
+!if ${_BUILD_W64} == "yes"
+InstallDir "$PROGRAMFILES64\${INSTALL_DIR}"
+!define EX_BINDIR "bin_32"
+!define MULTIUSER_USE_PROGRAMFILES64
+!define IS_W64_INST
+!else
+InstallDir "$PROGRAMFILES\${INSTALL_DIR}"
+!define EX_BINDIR "bin_64"
+!endif
!define WELCOME_TITLE_STR "$(T_WelcomeTitleGpg4win)"
!define ABOUT_STR "$(T_AboutGpg4win) \
$\r$\n$\r$\n$\r$\n$_CLICK $\r$\n$\r$\n$\r$\n$\r$\n$\r$\n\
$(T_AboutGpg4winVersion) $\r$\n$(T_AboutGpg4winReleaseDate)"
# The copyright license of the package. Define only one of these.
!define LICENSE_GPL
# Select the best compression algorithm available. The dictionary
# size is the default (8 MB).
!ifndef DISABLE_LZMA
!ifndef SOURCES
SetCompressor /SOLID lzma
# SetCompressorDictSize 8
!endif
!endif
# We support user mode installation but prefer system wide
!define MULTIUSER_EXECUTIONLEVEL Highest
!define MULTIUSER_MUI
!define MULTIUSER_INSTALLMODE_COMMANDLINE
!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "Software\${PRETTY_PACKAGE_SHORT}"
!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME ""
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "Software\${PRETTY_PACKAGE_SHORT}"
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "Install Directory"
!define MULTIUSER_INSTALLMODE_INSTDIR "${PRETTY_PACKAGE_SHORT}"
!include "MultiUser.nsh"
!ifdef DEBUG
!undef DEBUG
!endif
# The installation directory.
!define ipdir "playground/install/pkgs"
!define exipdir "playground/install-ex/pkgs"
!define bpdir "playground/build"
# Variables
VAR is_minimal
VAR with_browser
VAR is_update
# Sections
!include "Sections.nsh"
# We use Memento to remember past installation choices.
!include Memento.nsh
!define MEMENTO_REGISTRY_ROOT SHCTX
!define MEMENTO_REGISTRY_KEY \
Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRETTY_PACKAGE_SHORT}
# We need to know wether we are installing to 64 bit.
!include "x64.nsh"
# Now include the sections.
!define BINARIES
!include "inst-sections.nsi"
# Now include the generic parts.
!define HAVE_STARTMENU
!include "installer.nsi"
# The WelcomeTitle is displayed on the first page.
LangString T_WelcomeTitleGpg4win ${LANG_ENGLISH} \
"Welcome to the installation of Gpg4win"
# The About string as displayed on the first page.
LangString T_AboutGpg4win ${LANG_ENGLISH} \
"Gpg4win is an installer package for Windows for EMail and \
file encryption using the core component GnuPG for Windows. \
Both relevant cryptography standards are supported, OpenPGP \
and S/MIME. Gpg4win and the software included with Gpg4win \
is Free Software."
LangString T_AboutGpg4winVersion ${LANG_ENGLISH} \
"This is Gpg4win version ${VERSION}"
LangString T_AboutGpg4winFileVersion ${LANG_ENGLISH} \
"file version ${PROD_VERSION}"
LangString T_AboutGpg4winReleaseDate ${LANG_ENGLISH} \
"Release date ${_BUILD_ISODATE}"
# At long last, include all the translations.
!include "../po/catalogs.nsi"
# Now include the generic parts to end the installation.
!include "installer-finish.nsi"
diff --git a/src/nsis/inst-gpg4win.nsi b/src/nsis/inst-gpg4win.nsi
index 40401c72..ce97efb6 100644
--- a/src/nsis/inst-gpg4win.nsi
+++ b/src/nsis/inst-gpg4win.nsi
@@ -1,140 +1,169 @@
# inst-gpg4win.nsi - Hidden section for common files. -*- coding: latin-1; -*-
# Copyright (C) 2006 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
+var uninst64_checked
# This is the very first section installed.
Section "-gpg4win" SEC_gpg4win
!ifdef SOURCES
SetOutPath "$INSTDIR"
File "${BUILD_DIR}/../gpg4win-${VERSION}.tar.bz2"
!else
Call KillOtherAppsOrWarn
StrCpy $is_update "0"
# BEGIN MSI IGNORE
# For MSI we ignore this.
# Start the slideshow.
SetDetailsPrint none
SetOutPath "$PLUGINSDIR\Slides"
File "${BUILD_DIR}/slideshow/slide1-gpgol.png"
File "${BUILD_DIR}/slideshow/slide2-gpgex.png"
#File "${BUILD_DIR}/slideshow/slide3-kleopatra.png"
File "${BUILD_DIR}/slideshow/slide4-summary.png"
File "${BUILD_DIR}/slideshow/slides.dat"
g4wihelp::slide_show /NOUNLOAD /CCOLOR=0x000000 "/auto=$PLUGINSDIR\Slides\slides.dat" /FIT=WIDTH
SetDetailsPrint both
SetOutPath "$INSTDIR"
# END MSI IGNORE
+# We do the uninstall check twice once in the 32 bit registry and once
+# looking in the 64 bit registry, even if we are a 32 bit installer.
+# because we could be downgrading a 64 bit installation and would want
+# to call the uninstaller in that case, too.
+ StrCpy $uninst64_checked "0"
+
+ SetRegView 32
+uninstall_check:
# Uninstall an old version if found.
ClearErrors
ReadRegStr $0 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "DisplayVersion"
IfErrors skip_uninst 0
StrCmp $0 "" skip_uninst
DetailPrint "$(T_UninstallingOldVersion)$0"
ReadRegStr $0 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "UninstallString"
IfErrors skip_uninst 0
ReadRegStr $1 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "InstallLocation"
IfErrors skip_uninst 0
ExecWait '$0 /S /UPDATE=1 _?=$1'
# Deleting here does not work?
StrCpy $is_update "1"
Delete /REBOOTOK "$1\gpg4win-uninstall.exe"
RmDir "$1"
SetOutPath "$INSTDIR\share\gpg4win"
skip_uninst:
+ # If we arrive here and uninst64_checked is 1 this means
+ # that we checked both for 32 bit in the first run and
+ # then jumped into another uninstall_check with the
+ # 64bit reg view.
+ StrCmp $uninst64_checked "1" uninst_checks_done 0
+ StrCpy $uninst64_checked "1"
+ SetRegView 64
+ goto uninstall_check
+
+uninst_checks_done:
+!ifdef IS_W64_INST
+# While trying to find the old installation dir and configuration in
+# both 32 and 64 views. For new Versions we only install in the
+# 64 view
+ SetRegView 64
+!else
+ # Legacy installation
+ SetRegView 32
+!endif
+
# BEGIN MSI IGNORE
SetOutPath "$INSTDIR\share\gpg4win"
File "${BUILD_DIR}/HOWTO-SMIME.en.txt"
File "${BUILD_DIR}/HOWTO-SMIME.de.txt"
File "${BUILD_DIR}/versioninfo.txt"
# END MSI IGNORE
# Write a version file.
DetailPrint "Opening VERSION file for writing"
FileOpen $0 "$INSTDIR\VERSION" w
FileWrite $0 "${PRETTY_PACKAGE}-${VERSION}$\r$\n"
FileClose $0
DetailPrint "VERSION closed"
# BEGIN MSI IGNORE
# Register the install directory for Gpg4win suite.
WriteRegStr SHCTX "Software\Gpg4win" "Install Directory" $INSTDIR
DetailPrint "Saved install directory in the registry"
# END MSI IGNORE
# We used to determine the language using a Registry entry.
# Although we don't want to delete the user's Lang Registry Setting
# because he might have have selected a different language than his
# default. We delete the global Lang of the installation.
DeleteRegValue SHCTX "Software\GNU\GnuPG" "Lang"
DetailPrint "Deleted obsolete Lang entry"
# This old key is required for GPGee. Please do not use in new
# applications.
# Note: We don't use it anymore so that gpgme decides what gpg to use
# For the new gpg4win we actually use gpg2.exe.
# To cope with old installations we actually remove this value.
# However we can only remove the SHCTX version not those set by
# the user under HKCU.
#WriteRegStr SHCTX "Software\GNU\GnuPG" "gpgProgram" "$INSTDIR\gpg.exe"
DeleteRegValue SHCTX "Software\GNU\GnuPG" "gpgProgram"
DetailPrint "Deleted obsolete gpgProgram value"
# Install gpg4win included tools
SetOutPath "$INSTDIR\bin"
File "${BUILD_DIR}/sha1sum.exe"
SetOutPath "$INSTDIR\bin"
File "${BUILD_DIR}/sha256sum.exe"
File "${BUILD_DIR}/md5sum.exe"
# Install the mingw32 runtime libraries. They are stored in the
# build directory with a different suffix, so that makensis does not
# list symbol names.
File /oname=libstdc++-6.dll "${BUILD_DIR}/libstdc++-6.dll-x"
File /oname=libwinpthread-1.dll "${BUILD_DIR}/libwinpthread-1.dll-x"
# only one of the following two files exists
File /nonfatal /oname=libgcc_s_sjlj-1.dll "${BUILD_DIR}/libgcc_s_sjlj-1.dll-x"
File /nonfatal /oname=libgcc_s_dw2-1.dll "${BUILD_DIR}/libgcc_s_dw2-1.dll-x"
+ File /nonfatal /oname=libgcc_s_seh-1.dll "${BUILD_DIR}/libgcc_s_seh-1.dll-x"
- SetOutPath "$INSTDIR\bin_64"
- File /nonfatal /oname=libwinpthread-1.dll "${BUILD_DIR}/libwinpthread-1.dll-x64"
+ SetOutPath "$INSTDIR\${EX_BINDIR}"
+ File /nonfatal /oname=libwinpthread-1.dll "${BUILD_DIR}/libwinpthread-1.dll-ex"
SetOutPath "$INSTDIR"
File /oname=pkg-licenses.txt "${SRCDIR}/../doc/pkg-copyright.txt"
!endif
SectionEnd
LangString DESC_Menu_gpg4win_readme ${LANG_ENGLISH} \
"General information on Gpg4win"
LangString DESC_Menu_gpg4win_howtosmime ${LANG_ENGLISH} \
"Instruction to configure S/MIME"
LangString DESC_Menu_gnupg_faq ${LANG_ENGLISH} \
"Show the Frequently Asked Questions document for GnuPG"
diff --git a/src/nsis/inst-gpgex.nsi b/src/nsis/inst-gpgex.nsi
index 75d01afc..3f5ef6d6 100644
--- a/src/nsis/inst-gpgex.nsi
+++ b/src/nsis/inst-gpgex.nsi
@@ -1,128 +1,133 @@
# inst-gpgex.nsi - Installer snippet for gpgex. -*- coding: latin-1; -*-
# Copyright (C) 2005, 2007, 2008 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
!ifdef prefix
!undef prefix
!endif
!ifdef exprefix
!undef exprefix
!endif
!define prefix ${ipdir}/gpgex-${gpg4win_pkg_gpgex_version}
!define exprefix ${exipdir}/gpgex-${gpg4win_pkg_gpgex_version}
Section "-removegpgee"
!ifndef SOURCES
# Uninstall a previous gpgee version, if it exists.
ifFileExists "$INSTDIR\GPGee.dll" 0 gpgex_no_gpgee
UnRegDLL "$INSTDIR\GPGee.dll"
Delete /REBOOTOK "$INSTDIR\bin\GPGee.dll"
Delete /REBOOTOK "$INSTDIR\GPGee.DEU"
Delete "$INSTDIR\GPGee.hlp"
Delete "$INSTDIR\share\gpgee\gpl.txt"
RMDir "$INSTDIR\share\gpgee"
RMDir "$INSTDIR\share"
RMDir "$INSTDIR"
gpgex_no_gpgee:
!endif
SectionEnd
${MementoSection} "GpgEX" SEC_gpgex
SetOutPath "$INSTDIR"
-!ifdef SOURCES
- File "${gpg4win_pkg_gpgex}"
-!else
SetOutPath "$INSTDIR\bin"
ClearErrors
SetOverwrite try
File ${prefix}/bin/gpgex.dll
SetOverwrite lastused
ifErrors 0 do_reg
File /oname=gpgex.dll.tmp ${prefix}/bin/gpgex.dll
Rename /REBOOTOK gpgex.dll.tmp gpgex.dll
do_reg:
# Register the DLL.
ClearErrors
+!ifdef IS_W64_INST
+ ExecWait '"$SYSDIR\regsvr32" /s "$INSTDIR\bin\gpgex.dll"'
+!else
RegDLL "$INSTDIR\bin\gpgex.dll"
+!endif
ifErrors 0 +2
MessageBox MB_OK "$(T_GpgEX_RegFailed)"
SetOutPath "$INSTDIR\share\locale\de\LC_MESSAGES"
File ${prefix}/share/locale/de/LC_MESSAGES/gpgex.mo
SetOutPath "$INSTDIR\share\locale\ar\LC_MESSAGES"
File ${prefix}/share/locale/ar/LC_MESSAGES/gpgex.mo
SetOutPath "$INSTDIR\share\locale\es\LC_MESSAGES"
File ${prefix}/share/locale/es/LC_MESSAGES/gpgex.mo
SetOutPath "$INSTDIR\share\locale\ru\LC_MESSAGES"
File ${prefix}/share/locale/ru/LC_MESSAGES/gpgex.mo
SetOutPath "$INSTDIR\share\locale\pt\LC_MESSAGES"
File ${prefix}/share/locale/pt/LC_MESSAGES/gpgex.mo
SetOutPath "$INSTDIR\share\locale\pl\LC_MESSAGES"
File ${prefix}/share/locale/pl/LC_MESSAGES/gpgex.mo
SetOutPath "$INSTDIR\share\locale\zh_CN\LC_MESSAGES"
File ${prefix}/share/locale/zh_CN/LC_MESSAGES/gpgex.mo
SetOutPath "$INSTDIR\share\locale\zh_TW\LC_MESSAGES"
File ${prefix}/share/locale/zh_TW/LC_MESSAGES/gpgex.mo
SetOutPath "$INSTDIR\share\locale\fr\LC_MESSAGES"
File ${prefix}/share/locale/fr/LC_MESSAGES/gpgex.mo
SetOutPath "$INSTDIR\share\locale\nl\LC_MESSAGES"
File ${prefix}/share/locale/nl/LC_MESSAGES/gpgex.mo
SetOutPath "$INSTDIR\share\doc\gpgex"
File ${prefix}/share/doc/gpgex/gpgex-en.html
File ${prefix}/share/doc/gpgex/gpgex-de.html
+!ifndef IS_W64_INST
+
+# If the installer is 64 bit no need to install an addional
+# variant.
${If} ${RunningX64}
# Install the 64 bit version of the dll.
SetOutPath "$INSTDIR\bin_64"
ClearErrors
SetOverwrite try
File ${exprefix}/bin/gpgex.dll
SetOverwrite lastused
ifErrors 0 do_reg64
File /oname=gpgex.dll.tmp ${exprefix}/bin/gpgex.dll
Rename /REBOOTOK gpgex.dll.tmp gpgex.dll
do_reg64:
# Register the DLL. We need to register both versions. However
# RegDLL can't be used for 64 bit and InstallLib seems to be a
# registry hack.
ClearErrors
ExecWait '"$SYSDIR\regsvr32" /s "$INSTDIR\bin_64\gpgex.dll"'
ifErrors 0 +2
MessageBox MB_OK "$(T_GpgEX_RegFailed) (64 bit)"
# Note: There is no need to install the help an mo files because
# they are identical to those installed by the 32 bit version.
${EndIf}
!endif
${MementoSectionEnd}
LangString T_GpgEX_RegFailed ${LANG_ENGLISH} \
"Warning: Registration of the GpgEX plugin failed."
LangString DESC_SEC_gpgex ${LANG_ENGLISH} \
"GnuPG Shell Extension"
diff --git a/src/nsis/inst-gpgme.nsi b/src/nsis/inst-gpgme.nsi
index 2a5b01fc..b5a964a8 100644
--- a/src/nsis/inst-gpgme.nsi
+++ b/src/nsis/inst-gpgme.nsi
@@ -1,86 +1,86 @@
# inst-gpgme.nsi - Installer snippet for gpgme. -*- coding: latin-1; -*-
# Copyright (C) 2005, 2007, 2008 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
!ifdef prefix
!undef prefix
!endif
!define prefix ${ipdir}/gpgme-${gpg4win_pkg_gpgme_version}
!ifdef exprefix
!undef exprefix
!endif
!define exprefix ${exipdir}/gpgme-${gpg4win_pkg_gpgme_version}
!ifdef DEBUG
Section "gpgme" SEC_gpgme
!else
Section "-gpgme" SEC_gpgme
!endif
SetOutPath "$INSTDIR"
!ifdef SOURCES
File "${gpg4win_pkg_gpgme}"
!else
SetOutPath "$INSTDIR\bin"
ClearErrors
SetOverwrite try
File "${prefix}/bin/libgpgme-11.dll"
SetOverwrite lastused
ifErrors 0 +3
File /oname=libgpgme-11.dll.tmp "${prefix}/bin/libgpgme-11.dll"
Rename /REBOOTOK libgpgme-11.dll.tmp libgpgme-11.dll
ClearErrors
SetOverwrite try
File "${prefix}/bin/libqgpgmeqt6-15.dll"
File "${prefix}/bin/libgpgmepp-6.dll"
File "${prefix}/libexec/gpgme-w32spawn.exe"
File "${prefix}/bin/gpgme-json.exe"
SetOutPath "$INSTDIR\lib"
File /oname=libgpgme.imp "${prefix}/lib/libgpgme.dll.a"
SetOutPath "$INSTDIR\include"
File "${prefix}/include/gpgme.h"
${If} ${RunningX64}
- # Install the 64 bit version of the dll.
- SetOutPath "$INSTDIR\bin_64"
+ # Install the alternative version of the dll.
+ SetOutPath "$INSTDIR\${EX_BINDIR}"
ClearErrors
SetOverwrite try
File ${exprefix}/bin/libgpgme-11.dll
SetOverwrite lastused
ifErrors 0 +3
File /oname=libgpgme-11.dll.tmp "${exprefix}/bin/libgpgme-11.dll"
Rename /REBOOTOK libgpgme-11.dll.tmp libgpgme-11.dll
SetOverwrite try
File ${exprefix}/bin/libgpgmepp-6.dll
SetOverwrite lastused
ifErrors 0 +3
File /oname=libgpgmepp-6.dll.tmp "${exprefix}/bin/libgpgmepp-6.dll"
Rename /REBOOTOK libgpgmepp-6.dll.tmp libgpgmepp-6.dll
File ${exprefix}/bin/gpgme-json.exe
File "${prefix}/libexec/gpgme-w32spawn.exe"
${EndIf}
!endif
SectionEnd
diff --git a/src/nsis/inst-gpgol.nsi b/src/nsis/inst-gpgol.nsi
index d3523e3c..c232f8be 100644
--- a/src/nsis/inst-gpgol.nsi
+++ b/src/nsis/inst-gpgol.nsi
@@ -1,119 +1,128 @@
# inst-gpgol.nsi - Installer snippet for gpgol. -*- coding: latin-1; -*-
# Copyright (C) 2005 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
!ifdef prefix
!undef prefix
!endif
!ifdef exprefix
!undef exprefix
!endif
!define prefix ${ipdir}/gpgol-${gpg4win_pkg_gpgol_version}
!define bdir ${bpdir}/gpgol-${gpg4win_pkg_gpgol_version}-build
!define exprefix ${exipdir}/gpgol-${gpg4win_pkg_gpgol_version}
${MementoSection} "GpgOL" SEC_gpgol
SetOutPath "$INSTDIR"
!ifdef SOURCES
File "${gpg4win_pkg_gpgol}"
!else
SetOutPath "$INSTDIR\bin"
ClearErrors
SetOverwrite try
File ${prefix}/bin/gpgol.dll
SetOverwrite lastused
ifErrors 0 do_reg
File /oname=gpgol.dll.tmp ${prefix}/bin/gpgol.dll
Rename /REBOOTOK gpgol.dll.tmp gpgol.dll
do_reg:
# Register the DLL.
+!ifdef IS_W64_INST
+ # Do the 64 bit call with the bin gpgol.dll
+ ExecWait '"$SYSDIR\regsvr32" /s "$INSTDIR\bin\gpgol.dll"'
+!else
+ # Do the 32 bit call with the bin gpgol.dll
RegDLL "$INSTDIR\bin\gpgol.dll"
+!endif
ifErrors 0 +2
MessageBox MB_OK "$(T_GpgOL_RegFailed)"
SetOutPath "$INSTDIR\share\locale\de\LC_MESSAGES"
File ${prefix}/share/locale/de/LC_MESSAGES/gpgol.mo
SetOutPath "$INSTDIR\share\locale\sv\LC_MESSAGES"
File ${prefix}/share/locale/sv/LC_MESSAGES/gpgol.mo
SetOutPath "$INSTDIR\share\locale\pt\LC_MESSAGES"
File ${prefix}/share/locale/pt/LC_MESSAGES/gpgol.mo
SetOutPath "$INSTDIR\share\locale\fr\LC_MESSAGES"
File ${prefix}/share/locale/fr/LC_MESSAGES/gpgol.mo
SetOutPath "$INSTDIR\share\locale\zh_CN\LC_MESSAGES"
File ${prefix}/share/locale/zh_CN/LC_MESSAGES/gpgol.mo
SetOutPath "$INSTDIR\share\locale\zh_TW\LC_MESSAGES"
File ${prefix}/share/locale/zh_TW/LC_MESSAGES/gpgol.mo
SetOutPath "$INSTDIR\share\locale\nl\LC_MESSAGES"
File ${prefix}/share/locale/nl/LC_MESSAGES/gpgol.mo
SetOutPath "$INSTDIR\share\locale\uk\LC_MESSAGES"
File ${prefix}/share/locale/uk/LC_MESSAGES/gpgol.mo
SetOutPath "$INSTDIR\share\locale\it\LC_MESSAGES"
File ${prefix}/share/locale/it/LC_MESSAGES/gpgol.mo
SetOutPath "$INSTDIR\share\gpgol"
File "${prefix}/share/gpgol/gpgol.cfg"
File "${prefix}/share/gpgol/gpgol-cs.cfg"
File "${prefix}/share/gpgol/gpgol-form-signed.cfg"
File "${prefix}/share/gpgol/gpgol-ms.cfg"
File "${prefix}/share/gpgol/gpgol-form-encrypted.cfg"
File "${prefix}/share/gpgol/encr-l.ico"
File "${prefix}/share/gpgol/encr-s.ico"
File "${prefix}/share/gpgol/encr-s-smime.ico"
File "${prefix}/share/gpgol/sign-l.ico"
File "${prefix}/share/gpgol/sign-s.ico"
File "${prefix}/share/gpgol/sign-s-smime.ico"
SetOutPath "$INSTDIR\share\doc\gpgol"
File "${bdir}/doc/gpgol.pdf"
${If} ${RunningX64}
# Install the 64 bit version of the dll.
- SetOutPath "$INSTDIR\bin_64"
+ SetOutPath "$INSTDIR\${EX_BINDIR}"
ClearErrors
SetOverwrite try
File ${exprefix}/bin/gpgol.dll
SetOverwrite lastused
ifErrors 0 do_reg64
File /oname=gpgol.dll.tmp ${exprefix}/bin/gpgol.dll
Rename /REBOOTOK gpgol.dll.tmp gpgol.dll
do_reg64:
# Register the DLL. We need to register both versions. However
# RegDLL can't be used for 64 bit and InstallLib seems to be a
# registry hack.
ClearErrors
- ExecWait '"$SYSDIR\regsvr32" /s "$INSTDIR\bin_64\gpgol.dll"'
- ifErrors 0 +2
- MessageBox MB_OK "$(T_GpgOL_RegFailed) (64 bit)"
+!ifdef IS_W64_INST
+ # Register the 32 bit DLL that is installed under the ex prefix
+ RegDLL "$INSTDIR\${EX_BINDIR}\gpgol.dll"
+!else
+ ExecWait '"$SYSDIR\regsvr32" /s "$INSTDIR\${EX_BINDIR}\gpgol.dll"'
+!endif
${EndIf}
!endif
${MementoSectionEnd}
LangString T_GpgOL_RegFailed ${LANG_ENGLISH} \
"Warning: Registration of the GpgOL Outlook plugin failed."
LangString DESC_SEC_gpgol ${LANG_ENGLISH} \
"GnuPG for Outlook"
diff --git a/src/nsis/inst-libassuan.nsi b/src/nsis/inst-libassuan.nsi
index 22a17128..87a71943 100644
--- a/src/nsis/inst-libassuan.nsi
+++ b/src/nsis/inst-libassuan.nsi
@@ -1,70 +1,70 @@
# inst-libassuan.nsi - snippet for libassuan. -*- coding: latin-1; -*-
# Copyright (C) 2007 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
!ifdef prefix
!undef prefix
!endif
!define prefix ${ipdir}/libassuan-${gpg4win_pkg_libassuan_version}
!ifdef exprefix
!undef exprefix
!endif
!define exprefix ${exipdir}/libassuan-${gpg4win_pkg_libassuan_version}
!ifdef DEBUG
Section "libassuan" SEC_libassuan
!else
Section "-libassuan" SEC_libassuan
!endif
SetOutPath "$INSTDIR"
!ifdef SOURCES
File "${gpg4win_pkg_libassuan}"
!else
SetOutPath "$INSTDIR\bin"
ClearErrors
SetOverwrite try
File "${prefix}/bin/libassuan-9.dll"
SetOverwrite lastused
ifErrors 0 +3
File /oname=libassuan-9.dll.tmp "${prefix}/bin/libassuan-9.dll"
Rename /REBOOTOK libassuan-9.dll.tmp libassuan-9.dll
SetOutPath "$INSTDIR\lib"
File /oname=libgpg-assuan.imp "${prefix}/lib/libassuan.dll.a"
SetOutPath "$INSTDIR\include"
File "${prefix}/include/assuan.h"
${If} ${RunningX64}
# Install the 64 bit version of the dll.
- SetOutPath "$INSTDIR\bin_64"
+ SetOutPath "$INSTDIR\${EX_BINDIR}"
ClearErrors
SetOverwrite try
File ${exprefix}/bin/libassuan-9.dll
SetOverwrite lastused
ifErrors 0 +3
File /oname=libassuan-9.dll.tmp "${exprefix}/bin/libassuan-9.dll"
Rename /REBOOTOK libassuan-9.dll.tmp libassuan-9.dll
${EndIf}
!endif
SectionEnd
diff --git a/src/nsis/inst-libgpg-error.nsi b/src/nsis/inst-libgpg-error.nsi
index 52d0ffc5..f267f3de 100644
--- a/src/nsis/inst-libgpg-error.nsi
+++ b/src/nsis/inst-libgpg-error.nsi
@@ -1,83 +1,83 @@
# inst-libgpg-error.nsi - snippet for libgpg-error. -*- coding: latin-1; -*-
# Copyright (C) 2005 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
!ifdef prefix
!undef prefix
!endif
!define prefix ${ipdir}/libgpg-error-${gpg4win_pkg_libgpg_error_version}
!ifdef exprefix
!undef exprefix
!endif
!define exprefix ${exipdir}/libgpg-error-${gpg4win_pkg_libgpg_error_version}
!ifdef DEBUG
Section "libgpg-error" SEC_libgpg_error
!else
Section "-libgpg-error" SEC_libgpg_error
!endif
SetOutPath "$INSTDIR"
!ifdef SOURCES
File "${gpg4win_pkg_libgpg_error}"
!else
SetOutPath "$INSTDIR\bin"
ClearErrors
SetOverwrite try
File "${prefix}/bin/libgpg-error-0.dll"
SetOverwrite lastused
ifErrors 0 +3
File /oname=libgpg-error-0.dll.tmp "${prefix}/bin/libgpg-error-0.dll"
Rename /REBOOTOK libgpg-error-0.dll.tmp libgpg-error-0.dll
SetOutPath "$INSTDIR\share\locale\de\LC_MESSAGES"
File ${prefix}/share/locale/de/LC_MESSAGES/libgpg-error.mo
SetOutPath "$INSTDIR\share\locale\pl\LC_MESSAGES"
File ${prefix}/share/locale/pl/LC_MESSAGES/libgpg-error.mo
SetOutPath "$INSTDIR\share\locale\ro\LC_MESSAGES"
File ${prefix}/share/locale/ro/LC_MESSAGES/libgpg-error.mo
SetOutPath "$INSTDIR\share\locale\fr\LC_MESSAGES"
File ${prefix}/share/locale/fr/LC_MESSAGES/libgpg-error.mo
SetOutPath "$INSTDIR\bin"
File ${prefix}/bin/gpg-error.exe
SetOutPath "$INSTDIR\lib"
File /oname=libgpg-error.imp "${prefix}/lib/libgpg-error.dll.a"
SetOutPath "$INSTDIR\include"
File "${prefix}/include/gpg-error.h"
${If} ${RunningX64}
# Install the 64 bit version of the dll.
- SetOutPath "$INSTDIR\bin_64"
+ SetOutPath "$INSTDIR\${EX_BINDIR}"
ClearErrors
SetOverwrite try
File ${exprefix}/bin/libgpg-error-0.dll
SetOverwrite lastused
ifErrors 0 +3
File /oname=libgpg-error-0.dll.tmp "${exprefix}/bin/libgpg-error-0.dll"
Rename /REBOOTOK libgpg-error-0.dll.tmp libgpg-error-0.dll
${EndIf}
!endif
SectionEnd
diff --git a/src/nsis/installer.nsi b/src/nsis/installer.nsi
index eb6f262b..0e7fdb87 100644
--- a/src/nsis/installer.nsi
+++ b/src/nsis/installer.nsi
@@ -1,779 +1,774 @@
# installer.nsi - Installer for GnuPG 4 Windows. -*- coding: latin-1; -*-
# Copyright (C) 2005, 2007 g10 Code GmbH
# Copyright (C) 2017 Intevation 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
# No servicable parts beyond this line. Stay clear :)
!ifdef REQUIRE_W32_NSIS
!ifdef PACKAGE_LIBRARY
!include "Library.nsh"
!endif
!else
!macro InstallLib libtype shared install localfile destfile tempbasedir
File "${localfile}"
!macroend
!endif
!include "FileFunc.nsh"
!include "WinMessages.nsh"
!include "WinVer.nsh"
# We use the modern UI 2.
!include "MUI2.nsh"
!ifdef DEBUG
!undef DEBUG
!endif
# Set the package name. Note that this name should not be sufficed
# with the version because this would get displayed in the start menu.
Name "${PRETTY_PACKAGE}"
OutFile "${PACKAGE}-${VERSION}.exe"
BrandingText "${PRETTY_PACKAGE}-${VERSION}"
# Details button conflicts with splashscreen
ShowInstDetails nevershow
-# Set the installation directory.
-!ifndef INSTALL_DIR
-!define INSTALL_DIR "${PACKAGE}"
-!endif
-InstallDir "$PROGRAMFILES\${INSTALL_DIR}"
-
# Add version information to the file properties.
VIProductVersion "${PROD_VERSION}"
VIAddVersionKey "ProductName" "${PRETTY_PACKAGE_SHORT} (${VERSION})"
!ifdef LICENSE_GPL
VIAddVersionKey "Comments" \
"${PRETTY_PACKAGE_SHORT} is Free Software; you can redistribute it \
and/or modify it under the terms of the GNU General Public License. \
You should have received a copy of the GNU General Public License \
along with this software; if not, write to the Free Software \
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, \
MA 02110-1301, USA"
!else
VIAddVersionKey "Comments" \
"${PRETTY_PACKAGE_SHORT} is Free Software; you can redistribute it \
and/or modify it under the terms of the GNU Lesser General Public \
License. You should have received a copy of the GNU Lesser General \
Public License along with this software; if not, write to the Free \
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, \
MA 02110-1301, USA"
!endif
VIAddVersionKey "CompanyName" "${COMPANY}"
VIAddVersionKey "LegalTrademarks" ""
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
VIAddVersionKey "FileDescription" "${DESCRIPTION}"
VIAddVersionKey "FileVersion" "${PROD_VERSION}"
# Set to the name of another GnuPG installation if one has been detected
Var OtherGnuPGDetected
# Interface Settings
# !define MUI_ABORTWARNING
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP \
"${TOP_SRCDIR}/doc/logo/gpg4win-nsis-header-install-150x57.bmp"
!define MUI_HEADERIMAGE_UNBITMAP \
"${TOP_SRCDIR}/doc/logo/gpg4win-nsis-header-uninstall-150x57.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP \
"${TOP_SRCDIR}/doc/logo/gpg4win-nsis-wizard-install-164x314.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP \
"${TOP_SRCDIR}/doc/logo/gpg4win-nsis-wizard-uninstall-164x314.bmp"
!define MUI_ICON "${TOP_SRCDIR}/doc/logo/gpg4win-nsis-install.ico"
!define MUI_UNICON "${TOP_SRCDIR}/doc/logo/gpg4win-nsis-uninstall.ico"
# Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "SHCTX"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${PRETTY_PACKAGE_SHORT}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
# No Umlaute, please!
!define MUI_LANGDLL_INFO "Please choose a language for the setup.$\r$\n\
Bitte die Sprache des Installations-Vorgangs angeben."
# The list of wizard pages.
!define MUI_WELCOMEPAGE_TITLE "${WELCOME_TITLE_STR}"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW WelcomeFunction
!define MUI_WELCOMEPAGE_TEXT "${ABOUT_STR}"
!insertmacro MUI_PAGE_WELCOME
Function WelcomeFunction
IfSilent leave
ClearErrors
ReadRegStr $0 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "DisplayVersion"
IfErrors leave 0
StrCmp $0 "" leave
SendMessage $mui.WelcomePage.Text ${WM_SETTEXT} 0 "STR:${ABOUT_STR}$\r$\n$(T_UPDATE_STR) $0"
leave:
FunctionEnd
#!define MUI_LICENSEPAGE_BUTTON "$(^NextBtn)"
#!define MUI_PAGE_HEADER_SUBTEXT "$(T_GPLHeader)"
#!insertmacro MUI_PAGE_LICENSE "license.blurb"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW PrintNonAdminWarning
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckExistingVersion
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_PRE BeforeInstallHooks
!insertmacro MUI_PAGE_INSTFILES
# Finish page
!ifndef SOURCES
!define MUI_PAGE_CUSTOMFUNCTION_PRE ShowFinalWarnings
!define MUI_PAGE_CUSTOMFUNCTION_SHOW FinishFunction
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION RunAsUser
!define MUI_FINISHPAGE_LINK "$(T_MoreInfo)"
!define MUI_FINISHPAGE_LINK_LOCATION "$(T_MoreInfoURL)"
!insertmacro MUI_PAGE_FINISH
Function FinishFunction
IfSilent leave
!insertmacro SectionFlagIsSet ${SEC_kleopatra} \
${SF_SELECTED} have_kleo have_nothing
have_nothing:
ShowWindow $mui.FinishPage.Run ${SW_HIDE}
goto leave
have_kleo:
SendMessage $mui.FinishPage.Run.Text ${WM_SETTEXT} 0 "STR:$(T_RunKleopatra)"
goto leave
leave:
FunctionEnd
Function RunAsUser
!insertmacro SectionFlagIsSet ${SEC_kleopatra} \
${SF_SELECTED} do_kleo leave
do_kleo:
g4wihelp::DesktopShellRun "$INSTDIR\bin\kleopatra.exe"
leave:
FunctionEnd
LangString T_RunKleopatra ${LANG_ENGLISH} \
"Run Kleopatra"
# /SOURCES
!endif
# Uninstaller pages.
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!ifndef SOURCES
!define MUI_PAGE_CUSTOMFUNCTION_PRE un.CloseApps
!endif
!insertmacro MUI_UNPAGE_INSTFILES
#!insertmacro MUI_UNPAGE_FINISH
#Page license
#Page components
#Page directory
#Page instfiles
#UninstPage uninstConfirm
#UninstPage instfiles
# Language support. This has to be done after defining the pages, but
# before defining the translation strings. Confusing.
# Enable this to not filter languages for the current code page. Note
# that languages which are then not filtered out may not be displayed
# correctly in the Windows version the user is using. Not recommended,
# but can be useful for testing.
!ifdef DEBUG
!define MUI_LANGDLL_ALLLANGUAGES
!endif
!insertmacro MUI_LANGUAGE "English"
!define PO_HEADER
!include "../po/catalogs.nsi"
!undef PO_HEADER
!insertmacro MUI_RESERVEFILE_LANGDLL
ReserveFile "${BUILD_DIR}\g4wihelp.dll"
!ifdef SOURCES
ReserveFile "${TOP_SRCDIR}\doc\logo\gpg4win-logo-400px.bmp"
ReserveFile "${TOP_SRCDIR}\src\gpg4win-splash.wav"
!endif
ReserveFile "${TOP_SRCDIR}\COPYING"
ReserveFile "${TOP_SRCDIR}\doc\logo\gpg4win-logo-164x314.bmp"
# Language support
LangString T_LangCode ${LANG_ENGLISH} "en"
# Startup page
LangString T_GPLHeader ${LANG_ENGLISH} \
"This software is licensed under the terms of the GNU General Public \
License (GNU GPL)."
LangString T_GPLShort ${LANG_ENGLISH} \
"In short: You are allowed to run this software for any purpose. \
You may distribute it as long as you give the recipients the same \
rights you have received."
LangString T_MoreInfo ${LANG_ENGLISH} \
"Go to Gpg4win's webpage"
LangString T_MoreInfoURL ${LANG_ENGLISH} "https://www.gpg4win.org"
LangString T_NoKeyManager ${LANG_ENGLISH} \
"No key manager has been installed, thus we can't run one now."
# Used as subdirectory name in Start Menu.
LangString DESC_Menu_manuals ${LANG_ENGLISH} \
"Documentation"
LangString DESC_Menu_uninstall ${LANG_ENGLISH} \
"Uninstall"
# Used as subdirectory name on Desktop.
LangString DESC_Desktop_manuals ${LANG_ENGLISH} \
"Gpg4win Documentation"
# Functions
# Custom functions and macros for gpg4win.
!include "g4wihelp.nsi"
# Display a warning if this is a Beta version.
#Function PrintBetaWarning
# MessageBox MB_OK "$(T_BetaWarning)"
#FunctionEnd
# Display a warning if GnuPP has been detected and allow the user to abort
# the installation.
Function PrintGnuPPWarning
MessageBox MB_YESNO "$(T_FoundOldGnuPP)" IDYES cont
Abort
cont:
StrCpy $OtherGnuPGDetected "GnuPP"
FunctionEnd
# Display a warning if GnuPT has been detected and allow the user to abort
# the installation.
Function PrintGnuPTWarning
MessageBox MB_YESNO "$(T_FoundOldGnuPT)" IDYES cont
Abort
cont:
StrCpy $OtherGnuPGDetected "GnuPT"
FunctionEnd
# Display a warning if the Sourceforge WinPT has been detected and
# allow the user to abort the installation.
Function PrintWinPTSFWarning
MessageBox MB_YESNO "$(T_FoundOldWinPTSF)" IDYES cont
Abort
cont:
StrCpy $OtherGnuPGDetected "WinPT-SF"
FunctionEnd
# Display a warning if GnuPG Pack has been detected and abort the
# the installation. This one clobbers our own Registry space.
Function PrintGnuPackWarning
MessageBox MB_OK "$(T_FoundOldGnuPack)"
Abort
FunctionEnd
# Check whether one of the other GnuPG systems has already been
# installed. We do this by looking at the registry.
!ifndef SOURCES
Function CheckOtherGnuPGApps
StrCpy $OtherGnuPGDetected ""
ClearErrors
ReadRegStr $0 SHCTX "Software\GNU\GnuPP\Settings" "Path"
IfErrors +2 0
Call PrintGnuPPWarning
EnumRegKey $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs\GnuPT" 0
StrCmp $0 "" +2
Call PrintGnuPTWarning
ClearErrors
ReadRegStr $0 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\Windows Privacy Tools" "DisplayVersion"
IfErrors +2 0
Call PrintWinPTSFWarning
ReadRegStr $0 SHCTX "Software\GNU\GnuPG" "Install Directory"
Push $0
Push "GnuPG-Pack"
Call StrStr
Pop $0
StrCmp $0 "" +2
Call PrintGnuPackWarning
FunctionEnd
!endif
# Check whether gpg4win has already been installed. This is called as
# a leave function from the directory page. A call to abort will get
# back to the directory selection.
Function CheckExistingVersion
ClearErrors
FileOpen $0 "$INSTDIR\VERSION" r
IfErrors leave
FileRead $0 $R0
FileRead $0 $R1
FileClose $0
Push $R1
Call TrimNewLines
Pop $R1
# Extract major version.
StrCpy $0 $R1 2
StrCmp $0 "1." 0 leave
MessageBox MB_YESNO "$(T_FoundExistingOldVersion)" IDYES leave
Abort
leave:
FunctionEnd
# PrintNonAdminWarning
# Check whether the current user is in the Administrator group or an
# OS version without the need for an Administrator is in use. Print a
# diagnostic if this is not the case and abort installation.
Function PrintNonAdminWarning
#Call PrintBetaWarning
ClearErrors
UserInfo::GetName
IfErrors leave
Pop $0
UserInfo::GetAccountType
Pop $1
StrCmp $1 "Admin" leave +1
MessageBox MB_YESNO "$(T_AdminWanted)" IDNO exit
goto leave
exit:
Quit
leave:
FunctionEnd
# Check for claws mail installation which was shipped in Gpg4win
# versions < 2.2.6
Function CheckClawsUninstall
IfFileExists $INSTDIR\claws-mail.exe 0 leave
MessageBox MB_YESNO "$(T_FoundOldClaws)" IDYES uninstall IDNO leave
uninstall:
!insertmacro SelectSection ${SecUninstClawsMail}
leave:
FunctionEnd
# Check whether this is a reinstall and popup a message box to explain
# that it is better to close other apps before continuing
Function KillOtherAppsOrWarn
g4wihelp::KillProc "kleopatra.exe"
g4wihelp::KillProc "gpgme-w32spawn.exe"
g4wihelp::KillProc "resolver.exe"
g4wihelp::KillProc "overlayer.exe"
g4wihelp::KillProc "gpg-agent.exe"
g4wihelp::KillProc "gpg.exe"
g4wihelp::KillProc "keyboxd.exe"
g4wihelp::KillProc "scdaemon.exe" # should die with the agent
g4wihelp::KillProc "gpgolconfig.exe"
g4wihelp::KillProc "dirmngr.exe"
g4wihelp::KillProc "gpgsm.exe"
g4wihelp::KillProc "okular.exe"
g4wihelp::KillProc "gpgpass.exe"
goto leave
# TODO check for running outlook and offer to kill it.
print_warning:
MessageBox MB_OK|MB_ICONEXCLAMATION "$(T_CloseOtherApps)"
leave:
FunctionEnd
Function un.CloseApps
g4wihelp::KillProc "kleopatra.exe"
g4wihelp::KillProc "gpgme-w32spawn.exe"
g4wihelp::KillProc "resolver.exe"
g4wihelp::KillProc "overlayer.exe"
g4wihelp::KillProc "gpg-agent.exe"
g4wihelp::KillProc "gpg.exe"
g4wihelp::KillProc "keyboxd.exe"
g4wihelp::KillProc "scdaemon.exe" # should die with the agent
g4wihelp::KillProc "gpgolconfig.exe"
g4wihelp::KillProc "dirmngr.exe"
g4wihelp::KillProc "gpgsm.exe"
g4wihelp::KillProc "okular.exe"
g4wihelp::KillProc "gpgpass.exe"
FunctionEnd
# Called right before installation
Function BeforeInstallHooks
Call CheckClawsUninstall
FunctionEnd
# Called right before the final page to show more warnings.
Function ShowFinalWarnings
StrCmp $OtherGnupgDetected "" +2
MessageBox MB_OK "$(T_FoundOldSeeManual)"
leave:
FunctionEnd
#-----------------------------------------------
# Strings pertaining to the install options page
#-----------------------------------------------
# Installation options title
LangString T_InstallOptions ${LANG_ENGLISH} "Install Options"
# Installation options subtitle 1
LangString T_InstallOptLinks ${LANG_ENGLISH} "Start links"
LangString T_InstOptLabelA ${LANG_ENGLISH} \
"Please select where Gpg4win shall install links:"
LangString T_InstOptLabelB ${LANG_ENGLISH} \
"(Only programs will be linked into the quick launch bar.)"
LangString T_InstOptFieldA ${LANG_ENGLISH} \
"Start Menu"
LangString T_InstOptFieldB ${LANG_ENGLISH} \
"Desktop"
LangString T_InstOptFieldC ${LANG_ENGLISH} \
"Quick Launch Bar"
#------------------------------------------------
# String pertaining to the existing version check
#------------------------------------------------
LangString T_FoundExistingVersion ${LANG_ENGLISH} \
"Version $R1 has already been installed. $\r$\n\
Do you want to overwrite it with version ${VERSION}?"
LangString T_FoundExistingOldVersion ${LANG_ENGLISH} \
"An old version $R1 has already been installed. It is \
strongly recommended to deinstall previous versions on \
major upgrades. $\r$\n\
Do you want to continue installing Gpg4win ${VERSION} anyway?"
LangString T_UninstallingOldVersion ${LANG_ENGLISH} \
"Uninstalling Gpg4win-"
#---------------------------------------------
# From the old installation checking functions
#---------------------------------------------
LangString T_FoundOldSeeManual ${LANG_ENGLISH} \
"Please see the Gpg4win user manual to learn how to migrate existing \
keys from other GnuPG based installations to Gpg4win."
#---------
LangString T_FoundOldGnuPP ${LANG_ENGLISH} \
"An old installation of GnuPP (GNU Privacy Project) has been \
detected. That software is not maintained anymore and thus should \
be removed. $\r$\n\
$\r$\n\
Do you want to continue installing Gpg4win and take care of the old \
installation later?"
#---------
LangString T_FoundOldGnuPT ${LANG_ENGLISH} \
"An installation of GnuPT has been detected. This may cause \
problems when used along with Gpg4win. $\r$\n\
$\r$\n\
Do you want to continue installing Gpg4win?"
#---------
LangString T_FoundOldWinPTSF ${LANG_ENGLISH} \
"An old installation of the Sourceforge hosted WinPT has been \
detected. That software is not maintained anymore and should \
be removed. $\r$\n\
$\r$\n\
Do you want to continue installing Gpg4win and take care of the old \
installation later?"
#--------
LangString T_FoundOldGnuPack ${LANG_ENGLISH} \
"An installation of GnuPG-Pack has been detected. You need to \
uninstall it before you can continue with Gpg4win installation. $\r$\n\
$\r$\n\
The installation will be aborted now!"
# From Function PrintBetaWarning
LangString T_BetaWarning ${LANG_ENGLISH} \
"Note: This is a BETA version of Gpg4win. $\r$\n\
$\r$\n\
Beta versions are only intended for testing and \
shall not be used in a production environment."
# From Function PrintNonAdminWarning
LangString T_AdminWanted ${LANG_ENGLISH} \
"Warning: It is recommended to install Gpg4win system-wide with \
administrator rights. \
$\r$\n\
$\r$\n\
Do you want to continue installing Gpg4win without administrator rights?"
# From Function KillOtherAppsOrWarn
LangString T_CloseOtherApps ${LANG_ENGLISH} \
"Please make sure that other applications are not running. \
In particular you should close Outlook and all Explorer \
windows. Gpg4win will try to install anyway but a reboot \
will be required then."
LangString T_ShuttingDownWinPT ${LANG_ENGLISH} \
"Trying to shutdown a possible running instance of WinPT."
# From Function CheckClawsUninstall
LangString T_FoundOldClaws ${LANG_ENGLISH} \
"An old version of Claws Mail was found in your Installation directory. \
$\r$\nPlease note that Claws Mail is no longer bundled with Gpg4win \
and is now available as a standalone package.$\r$\n\
You should uninstall Claws Mail now, and if you wish to \
continue to use it, install an up-to-date version from:$\r$\n\
http://www.claws-mail.org/win32 $\r$\n$\r$\n\
Uninstall Claws Mail from Gpg4win now?"
# From Function CheckClawsUninstall
LangString T_WinisDeprecated ${LANG_ENGLISH} \
"Windows Versions before Windows 7 are no longer maintained by Gpg4win. \
$\r$\nSupport for them may be removed in a future version.\
$\r$\n$\r$\nKleopatra, Okular and GnuPG Password Manager are disabled."
# From Function WelcomeFunction
LangString T_UPDATE_STR ${LANG_ENGLISH} \
"Updating Version"
+# From onInit
+LangString T_ONLYX64 ${LANG_ENGLISH} \
+ "This software only runs on 64 bit Windows."
+
# FIXME: The GetAfterChar function comes from the NSIS wiki.
Function un.GetAfterChar
Exch $0 ; chop char
Exch
Exch $1 ; input string
Push $2
Push $3
StrCpy $2 0
loop:
IntOp $2 $2 - 1
StrCpy $3 $1 1 $2
StrCmp $3 "" 0 +3
StrCpy $0 ""
Goto exit2
StrCmp $3 $0 exit1
Goto loop
exit1:
IntOp $2 $2 + 1
StrCpy $0 $1 "" $2
exit2:
Pop $3
Pop $2
Pop $1
Exch $0 ; output
FunctionEnd
Function un.SourceDelete
Push "/"
Call un.GetAfterChar
Pop $R0
Delete "$INSTDIR\$R0"
FunctionEnd
# StrStr - taken from the NSIS reference
# input, top of stack = string to search for
# top of stack-1 = string to search in
# output, top of stack (replaces with the portion of the string remaining)
# modifies no other variables.
#
# Usage:
# Push "this is a long ass string"
# Push "ass"
# Call StrStr
# Pop $R0
# ($R0 at this point is "ass string")
#
!macro StrStr un
Function ${un}StrStr
Exch $R1 # st=haystack,old$R1, $R1=needle
Exch # st=old$R1,haystack
Exch $R2 # st=old$R1,old$R2, $R2=haystack
Push $R3
Push $R4
Push $R5
StrLen $R3 $R1
StrCpy $R4 0
# $R1=needle
# $R2=haystack
# $R3=len(needle)
# $R4=cnt
# $R5=tmp
loop:
StrCpy $R5 $R2 $R3 $R4
StrCmp $R5 $R1 done
StrCmp $R5 "" done
IntOp $R4 $R4 + 1
Goto loop
done:
StrCpy $R1 $R2 "" $R4
Pop $R5
Pop $R4
Pop $R3
Pop $R2
Exch $R1
FunctionEnd
!macroend
# TrimNewlines - taken from the NSIS reference
# input, top of stack (e.g. whatever$\r$\n)
# output, top of stack (replaces, with e.g. whatever)
# modifies no other variables.
Function TrimNewlines
Exch $R0
Push $R1
Push $R2
StrCpy $R1 0
loop:
IntOp $R1 $R1 - 1
StrCpy $R2 $R0 1 $R1
StrCmp $R2 "$\r" loop
StrCmp $R2 "$\n" loop
IntOp $R1 $R1 + 1
IntCmp $R1 0 no_trim_needed
StrCpy $R0 $R0 $R1
no_trim_needed:
Pop $R2
Pop $R1
Exch $R0
FunctionEnd
Function .onInit
# Temporay disabled until we have fixed the DLL issue (wk 2023-04-11)
Call G4wRunOnce
- SetOutPath $TEMP
-!ifdef SOURCES
- File /oname=gpgspltmp.bmp "${TOP_SRCDIR}/doc/logo/gpg4win-logo-400px.bmp"
- # We play the tune only for the source installer
- File /oname=gpgspltmp.wav "${TOP_SRCDIR}/src/gpg4win-splash.wav"
- g4wihelp::playsound $TEMP\gpgspltmp.wav
- g4wihelp::showsplash 2500 $TEMP\gpgspltmp.bmp
-
- Delete $TEMP\gpgspltmp.bmp
- # Note that we delete gpgspltmp.wav in .onInst{Failed,Success}
-!else
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 /MINIMAL= $is_minimal
${GetOptions} $R0 /WITH_BROWSER= $with_browser
Var /GLOBAL changed_dir
# Check if the install directory was modified on the command line
- StrCmp "$INSTDIR" "$PROGRAMFILES\${INSTALL_DIR}" unmodified 0
+ StrCmp "$INSTDIR" "${InstallDir}" unmodified 0
# It is modified. Save that value.
StrCpy $changed_dir "$INSTDIR"
# MULITUSER_INIT overwrites directory setting from command line
!insertmacro MULTIUSER_INIT
StrCpy $INSTDIR "$changed_dir"
goto initDone
unmodified:
!insertmacro MULTIUSER_INIT
-!endif
initDone:
# Enable this to force a language selection dialog on every run (the
# preferred language is the default). Otherwise, the preferred
# language is stored in the registry, and the installer does not ask
# on upgrades.
!ifdef DEBUG
!define MUI_LANGDLL_ALWAYSSHOW
!endif
+
+ # Since NSIS is still 32 bit we stay on that for NSIS registry
+ # keys.
+ SetRegView 32
!insertmacro MUI_LANGDLL_DISPLAY
${IfNot} ${AtLeastWin7}
MessageBox MB_OK "$(T_WinisDeprecated)"
${Endif}
+!ifdef IS_W64_INST
+ ${IfNot} ${RunningX64}
+ MessageBox MB_OK "$(T_ONLYX64)"
+ Abort
+ ${EndIf}
+!endif
+
${MementoSectionRestore}
+ SetRegView 64
Call CalcDefaults
Call CalcDepends
-!ifndef SOURCES
Call CheckOtherGnuPGApps
-!endif
FunctionEnd
Function un.onInit
-!ifndef SOURCES
- !insertmacro MULTIUSER_UNINIT
+!ifdef IS_W64_INST
+ SetRegView 64
!endif
+ !insertmacro MULTIUSER_UNINIT
# Remove the language preference.
!insertmacro MUI_UNGETLANGUAGE
-!ifndef SOURCES
StrCpy $is_update "0"
${un.GetParameters} $R0
ClearErrors
${un.GetOptions} $R0 /UPDATE= $R1
IfErrors +2
StrCpy $is_update "1"
-!endif
FunctionEnd
# This must be in a central place. Urgs.
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!ifdef HAVE_PKG_GNUPG_W32
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_gnupg_w32} $(DESC_SEC_gnupg_w32)
!endif
!ifdef HAVE_PKG_GPGOL
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgol} $(DESC_SEC_gpgol)
!endif
!ifdef HAVE_PKG_GPGEX
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgex} $(DESC_SEC_gpgex)
!endif
!ifdef HAVE_PKG_PAPERKEY
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_paperkey} $(DESC_SEC_paperkey)
!endif
!ifdef HAVE_PKG_KLEOPATRA
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_kleopatra} $(DESC_SEC_kleopatra)
!endif
!ifdef HAVE_PKG_OKULAR
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_okular} $(DESC_SEC_okular)
!endif
!ifdef HAVE_PKG_GPGPASS
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgpass} $(DESC_SEC_gpgpass)
!endif
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgme_browser} $(DESC_SEC_gpgme_browser)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
diff --git a/src/nsis/uninst-breeze.nsi b/src/nsis/uninst-breeze.nsi
index 98aa70ee..d052b1d2 100644
--- a/src/nsis/uninst-breeze.nsi
+++ b/src/nsis/uninst-breeze.nsi
@@ -1,32 +1,32 @@
# Copyright (C) 2024 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
; Uninstaller section.
Section "-un.breeze"
Delete "$INSTDIR\bin\styles\breeze6.dll"
Delete "$INSTDIR\share\kstyle\themes\breeze.themerc"
Delete "$INSTDIR\share\color-schemes\BreezeDark.colors"
Delete "$INSTDIR\share\color-schemes\BreezeClassic.colors"
Delete "$INSTDIR\share\color-schemes\BreezeLight.colors"
RmDir "$INSTDIR\share\color-schemes"
RmDir "$INSTDIR\share\kstyle\themes"
- RmDir "$INSTDIR\share\kstyly"
+ RmDir "$INSTDIR\share\kstyle"
RmDir "$INSTDIR\share"
RmDir "$INSTDIR\bin\styles"
RmDir "$INSTDIR\bin"
SectionEnd
diff --git a/src/nsis/uninst-gnupg-w32.nsi b/src/nsis/uninst-gnupg-w32.nsi
index 8f61a199..7946f166 100644
--- a/src/nsis/uninst-gnupg-w32.nsi
+++ b/src/nsis/uninst-gnupg-w32.nsi
@@ -1,50 +1,66 @@
# inst-gnupg2.nsi - Uninstaller snippet for gnupg-w32. -*- coding: latin-1; -*-
# Copyright (C) 2015 Intevation 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
!ifdef prefix
!undef prefix
!endif
!define prefix ${ipdir}/gnupg-w32-${gpg4win_pkg_gnupg_w32_version}
-
# Uninstaller section.
Section "un.gnupg_w32"
!ifdef SOURCES
Push "${gpg4win_pkg_gnupg_w32}"
Call un.SourceDelete
!else
+
+ # Check for an installed 32 bit and 64 bit GnuPG
+ StrCpy $uninst64_checked "0"
+uninstall_check:
ClearErrors
ReadRegStr $0 SHCTX "Software\GnuPG" "Install Directory"
- IfErrors gnupg_w32_not_installed 0
+ IfErrors uninstall_not_found 0
+
# It is possible that someone uninstalled gnupg without uninstalling
# gpg4win
StrCmp $0 "" gnupg_w32_not_installed
DetailPrint "$(T_Uninstalling_GnuPG) ${gpg4win_pkg_gnupg_w32_version}"
Delete "$0\bin\gpg-enable-keyboxd.bat"
Delete "$0\bin\gpg-disable-keyboxd.bat"
RmDir "$0\bin"
ExecWait '"$0\gnupg-uninstall.exe" /S _?=$0'
Delete "$0\gnupg-uninstall.exe"
RmDir "$0"
+uninstall_not_found:
+ StrCmp $uninst64_checked "1" gnupg_w32_not_installed 0
+ StrCpy $uninst64_checked "1"
+ SetRegView 64
+ goto uninstall_check
+
gnupg_w32_not_installed:
+!ifdef IS_W64_INST
+ # Go back to the regview acccording to our packaging.
+ SetRegView 64
+!else
+ SetRegView 32
+!endif
!endif
SectionEnd
LangString T_UnInstalling_GnuPG ${LANG_ENGLISH} \
"Uninstalling GnuPG"
diff --git a/src/nsis/uninst-gpg4win.nsi b/src/nsis/uninst-gpg4win.nsi
index f10e9449..2d023dec 100644
--- a/src/nsis/uninst-gpg4win.nsi
+++ b/src/nsis/uninst-gpg4win.nsi
@@ -1,145 +1,147 @@
# uninst-gpg4win.nsi - Hidden uninstaller. -*- coding: latin-1; -*-
# Copyright (C) 2005 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
# This is the very last section of the uninstaller.
Section "-un.gpg4win"
!ifdef SOURCES
Delete "gpg4win-${VERSION}.tar.bz2"
!else
DeleteRegValue SHCTX "Software\GNU\GnuPG" "Install Directory"
# Delete gpg4win included tools
Delete "$INSTDIR\bin\sha1sum.exe"
Delete "$INSTDIR\bin\sha256sum.exe"
Delete "$INSTDIR\bin\md5sum.exe"
# Delete the runtime libaries
Delete "$INSTDIR\bin\libstdc++-6.dll"
Delete "$INSTDIR\bin\libgcc_s_sjlj-1.dll"
Delete "$INSTDIR\bin\libgcc_s_dw2-1.dll"
+ Delete "$INSTDIR\bin\libgcc_s_seh-1.dll"
Delete "$INSTDIR\bin\libwinpthread-1.dll"
- Delete /REBOOTOK "$INSTDIR\bin_64\libwinpthread-1.dll"
+ Delete /REBOOTOK "$INSTDIR\${EX_BINDIR}\libwinpthread-1.dll"
# Delete standard stuff.
Delete "$INSTDIR\share\gpg4win\HOWTO-SMIME.*.txt"
Delete "$INSTDIR\share\gpg4win\versioninfo.txt"
Delete "$INSTDIR\VERSION"
Delete "$INSTDIR\pkg-licenses.txt"
RMDir "$INSTDIR\share\gpg4win"
# Remove the locale directories.
RMDir "$INSTDIR\share\locale\ar\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\ar"
RMDir "$INSTDIR\share\locale\be\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\be"
RMDir "$INSTDIR\share\locale\bg\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\bg"
RMDir "$INSTDIR\share\locale\ca\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\ca"
RMDir "$INSTDIR\share\locale\cs\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\cs"
RMDir "$INSTDIR\share\locale\da\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\da"
RMDir "$INSTDIR\share\locale\de\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\de"
RMDir "$INSTDIR\share\locale\el\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\el"
RMDir "$INSTDIR\share\locale\en@boldquot\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\en@boldquot"
RMDir "$INSTDIR\share\locale\en@quot\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\en@quot"
RMDir "$INSTDIR\share\locale\en_GB\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\en_GB"
RMDir "$INSTDIR\share\locale\eo\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\eo"
RMDir "$INSTDIR\share\locale\es\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\es"
RMDir "$INSTDIR\share\locale\et\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\et"
RMDir "$INSTDIR\share\locale\fi\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\fi"
RMDir "$INSTDIR\share\locale\fr\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\fr"
RMDir "$INSTDIR\share\locale\gl\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\gl"
RMDir "$INSTDIR\share\locale\hu\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\hu"
RMDir "$INSTDIR\share\locale\id\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\id"
RMDir "$INSTDIR\share\locale\id_ID\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\id_ID"
RMDir "$INSTDIR\share\locale\it\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\it"
RMDir "$INSTDIR\share\locale\ja\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\ja"
RMDir "$INSTDIR\share\locale\nb\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\nb"
RMDir "$INSTDIR\share\locale\nl\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\nl"
RMDir "$INSTDIR\share\locale\pl\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\pl"
RMDir "$INSTDIR\share\locale\pt_BR\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\pt_BR"
RMDir "$INSTDIR\share\locale\pt_PT\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\pt_PT"
RMDir "$INSTDIR\share\locale\pt\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\pt"
RMDir "$INSTDIR\share\locale\ro\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\ro"
RMDir "$INSTDIR\share\locale\ru\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\ru"
RMDir "$INSTDIR\share\locale\sk\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\sk"
RMDir "$INSTDIR\share\locale\sv\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\sv"
RMDir "$INSTDIR\share\locale\sr\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\sr"
RMDir "$INSTDIR\share\locale\tr\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\tr"
RMDir "$INSTDIR\share\locale\uk\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\uk"
RMDir "$INSTDIR\share\locale\zh_CN\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\zh_CN"
RMDir "$INSTDIR\share\locale\zh_TW\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\zh_TW"
RMDir "$INSTDIR\share\locale"
# Try again to remove the scdaemon. This is useful because scdaemon
# needs some time to stop after gpg-agent has been stopped.
Delete "$INSTDIR\bin\scdaemon.exe"
# Try to remove other top directories.
RMDir "$INSTDIR\lib"
RMDir "$INSTDIR\include"
RMDir "$INSTDIR\share"
RMDir "$INSTDIR\pub"
RMDir "$INSTDIR\etc"
RMDir "$INSTDIR\bin"
RMDir "$INSTDIR\bin_64"
+ RMDir "$INSTDIR\${EX_BINDIR}"
RMDir "$INSTDIR"
!endif
SectionEnd
diff --git a/src/nsis/uninst-gpgme.nsi b/src/nsis/uninst-gpgme.nsi
index a7d17bb1..076b311e 100644
--- a/src/nsis/uninst-gpgme.nsi
+++ b/src/nsis/uninst-gpgme.nsi
@@ -1,61 +1,61 @@
# uninst-gpgme.nsi - Installer snippet for gpgme. -*- coding: latin-1; -*-
# Copyright (C) 2005, 2007, 2008 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
!ifdef prefix
!undef prefix
!endif
!define prefix ${ipdir}/gpgme-${gpg4win_pkg_gpgme_version}
; Uninstaller section.
Section "-un.gpgme"
!ifdef SOURCES
Push "${gpg4win_pkg_gpgme}"
Call un.SourceDelete
!else
Delete /REBOOTOK "$INSTDIR\bin\libgpgme-11.dll"
Delete /REBOOTOK "$INSTDIR\bin\libqgpgmeqt6-15.dll"
Delete /REBOOTOK "$INSTDIR\bin\libgpgmepp-6.dll"
${If} ${RunningX64}
- Delete /REBOOTOK "$INSTDIR\bin_64\libgpgmepp-6.dll"
- Delete /REBOOTOK "$INSTDIR\bin_64\libgpgme-11.dll"
- Delete /REBOOTOK "$INSTDIR\bin_64\gpgme-json.exe"
- Delete "$INSTDIR\bin_64\gpgme-w32spawn.exe"
+ Delete /REBOOTOK "$INSTDIR\${EX_BINDIR}\libgpgmepp-6.dll"
+ Delete /REBOOTOK "$INSTDIR\${EX_BINDIR}\libgpgme-11.dll"
+ Delete /REBOOTOK "$INSTDIR\${EX_BINDIR}\gpgme-json.exe"
+ Delete "$INSTDIR\${EX_BINDIR}\gpgme-w32spawn.exe"
${EndIf}
Delete "$INSTDIR\bin\gpgme-w32spawn.exe"
Delete "$INSTDIR\bin\gpgme-json.exe"
Delete "$INSTDIR\lib\libgpgme.imp"
Delete "$INSTDIR\include\gpgme.h"
Delete "$INSTDIR\bin\gpgme-chrome.json"
Delete "$INSTDIR\bin\gpgme-mozilla.json"
Delete "$INSTDIR\bin\gpgme-edge.json"
DeleteRegKey SHCTX "Software\Google\Chrome\NativeMessagingHosts\gpgmejson"
DeleteRegKey SHCTX "Software\Microsoft\Edge\NativeMessagingHosts\gpgmejson"
DeleteRegKey SHCTX "Software\Mozilla\NativeMessagingHosts\gpgmejson"
SetRegView 64
DeleteRegKey SHCTX "Software\Google\Chrome\NativeMessagingHosts\gpgmejson"
DeleteRegKey SHCTX "Software\Microsoft\Edge\NativeMessagingHosts\gpgmejson"
DeleteRegKey SHCTX "Software\Mozilla\NativeMessagingHosts\gpgmejson"
SetRegView 32
!endif
SectionEnd
diff --git a/src/nsis/uninst-gpgol.nsi b/src/nsis/uninst-gpgol.nsi
index 5bfe6116..9db83fd0 100644
--- a/src/nsis/uninst-gpgol.nsi
+++ b/src/nsis/uninst-gpgol.nsi
@@ -1,81 +1,86 @@
# uninst-gpgol.nsi - Installer snippet for gpgol. -*- coding: latin-1; -*-
# Copyright (C) 2005 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
!ifdef prefix
!undef prefix
!endif
!define prefix ${ipdir}/gpgol-${gpg4win_pkg_gpgol_version}
; Uninstaller section.
Section "-un.gpgol"
!ifdef SOURCES
Push "${gpg4win_pkg_gpgol}"
Call un.SourceDelete
!else
Delete "$INSTDIR\share\gpgol\*.cfg"
Delete "$INSTDIR\share\gpgol\*.ico"
RMDir "$INSTDIR\share\gpgol"
Delete "$INSTDIR\share\doc\gpgol\gpgol.pdf"
RMDir "$INSTDIR\share\doc\gpgol"
RMDir "$INSTDIR\share\doc"
Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gpgol.mo"
RMDir "$INSTDIR\share\locale\de\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\de"
Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\gpgol.mo"
RMDir "$INSTDIR\share\locale\sv\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\sv"
Delete "$INSTDIR\share\locale\pt\LC_MESSAGES\gpgol.mo"
RMDir "$INSTDIR\share\locale\pt\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\pt"
Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gpgol.mo"
RMDir "$INSTDIR\share\locale\uk\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\uk"
Delete "$INSTDIR\share\locale\nl\LC_MESSAGES\gpgol.mo"
RMDir "$INSTDIR\share\locale\nl\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\nl"
Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gpgol.mo"
RMDir "$INSTDIR\share\locale\fr\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\fr"
Delete "$INSTDIR\share\locale\it\LC_MESSAGES\gpgol.mo"
RMDir "$INSTDIR\share\locale\it\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\it"
Delete "$INSTDIR\share\locale\zh_CN\LC_MESSAGES\gpgol.mo"
RMDir "$INSTDIR\share\locale\zh_CN\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\zh_CN"
Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\gpgol.mo"
RMDir "$INSTDIR\share\locale\zh_TW\LC_MESSAGES"
RMDir "$INSTDIR\share\locale\zh_TW"
RMDir "$INSTDIR\share\locale"
RMDir "$INSTDIR\share\"
+!ifdef IS_W64_INST
UnRegDLL "$INSTDIR\bin\gpgol.dll"
-
+ ExecWait '"$SYSDIR\regsvr32" /u /s "$INSTDIR\${EX_BINDIR}\gpgol.dll"'
+!else
+ UnRegDLL "$INSTDIR\${EX_BINDIR}\gpgol.dll"
+ ExecWait '"$SYSDIR\regsvr32" /u /s "$INSTDIR\bin\gpgol.dll"'
+!endif
Delete /REBOOTOK "$INSTDIR\bin\gpgol.dll"
${If} ${RunningX64}
- ExecWait '"$SYSDIR\regsvr32" /u /s "$INSTDIR\bin_64\gpgol.dll"'
- Delete /REBOOTOK "$INSTDIR\bin_64\gpgol.dll"
+ Delete /REBOOTOK "$INSTDIR\${EX_BINDIR}\gpgol.dll"
+ RMDir "$INSTDIR/${EX_BINDIR}"
${EndIf}
RMDir "$INSTDIR"
!endif
SectionEnd
diff --git a/src/nsis/uninst-libassuan.nsi b/src/nsis/uninst-libassuan.nsi
index df0637ec..0d0f3c4b 100644
--- a/src/nsis/uninst-libassuan.nsi
+++ b/src/nsis/uninst-libassuan.nsi
@@ -1,42 +1,42 @@
# uninst-libassuan.nsi - Uninstaller f. libassuan. -*- coding: latin-1; -*-
# Copyright (C) 2007 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
!ifdef prefix
!undef prefix
!endif
!define prefix ${ipdir}/libassuan-${gpg4win_pkg_libassuan_version}
; Uninstaller section.
Section "-un.libassuan"
!ifdef SOURCES
Push "${gpg4win_pkg_libassuan}"
Call un.SourceDelete
!else
Delete /REBOOTOK "$INSTDIR\bin\libassuan-9.dll"
Delete "$INSTDIR\lib\libassuan.imp"
Delete "$INSTDIR\include\assuan.h"
${If} ${RunningX64}
- Delete /REBOOTOK "$INSTDIR\bin_64\libassuan-9.dll"
+ Delete /REBOOTOK "$INSTDIR\${EX_BINDIR}\libassuan-9.dll"
${EndIf}
!endif
SectionEnd
diff --git a/src/nsis/uninst-libgpg-error.nsi b/src/nsis/uninst-libgpg-error.nsi
index b9303927..151aade8 100644
--- a/src/nsis/uninst-libgpg-error.nsi
+++ b/src/nsis/uninst-libgpg-error.nsi
@@ -1,49 +1,49 @@
# uninst-libgpg-error.nsi - Installer f. libgpg-error. -*- coding: latin-1; -*-
# Copyright (C) 2005 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
!ifdef prefix
!undef prefix
!endif
!define prefix ${ipdir}/libgpg-error-${gpg4win_pkg_libgpg_error_version}
; Uninstaller section.
Section "-un.libgpg-error"
!ifdef SOURCES
Push "${gpg4win_pkg_libgpg_error}"
Call un.SourceDelete
!else
Delete /REBOOTOK "$INSTDIR\bin\libgpg-error-0.dll"
Delete "$INSTDIR\share\locale\de\LC_MESSAGES\libgpg-error.mo"
Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\libgpg-error.mo"
Delete "$INSTDIR\share\locale\ro\LC_MESSAGES\libgpg-error.mo"
Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\libgpg-error.mo"
Delete "$INSTDIR\bin\gpg-error.exe"
Delete "$INSTDIR\lib\libgpg-error.imp"
Delete "$INSTDIR\lib\libgpg-assuan.imp"
Delete "$INSTDIR\include\gpg-error.h"
${If} ${RunningX64}
- Delete /REBOOTOK "$INSTDIR\bin_64\libgpg-error-0.dll"
+ Delete /REBOOTOK "$INSTDIR\${EX_BINDIR}\libgpg-error-0.dll"
${EndIf}
!endif
SectionEnd
diff --git a/src/versioninfo.rc.in.in b/src/versioninfo.rc.in.in
index 9c0c1a6a..acceda8b 100644
--- a/src/versioninfo.rc.in.in
+++ b/src/versioninfo.rc.in.in
@@ -1,56 +1,56 @@
/* versioninfo.rc.in.in - Generic versioninfo template
* Copyright (C) 2024 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 program 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.
* SPDX-License-Identifier: FSFULLR
*/
/* This file is processed by configure to create versioninfo.rc.in which
is then processed by the linker wrapper to create a package specific
version info file. The same goes for the manifest.*/
#line __LINE__ "versioninfo.rc"
#include <afxres.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION @PKG_VERS@
PRODUCTVERSION @BUILD_FILEVERSION_TR@
FILEFLAGSMASK 0x3fL
FILEFLAGS @FILEFLAGS@
FILEOS 0x40004L /* VOS_NT (0x40000) | VOS__WINDOWS32 (0x4) */
FILETYPE @FILETYPE@ /* VFT_APP (0x1) or VFT_DLL (0x2) */
FILESUBTYPE 0x0L /* Unknwon, this is relevant for drivers. */
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
- VALUE "Comments", "\0"
+ VALUE "Comments", "Compiled with: @CC_VERSION@\0"
VALUE "CompanyName", "@COMPANY_NAME@\0"
- VALUE "FileDescription", "This file is part of @PRODUCT_NAME@\0"
+/* VALUE "FileDescription", "@PRODUCT_NAME@ - @ORIGINAL_FILENAME@\0" */
VALUE "FileVersion", "@PKG_VERS@\0"
VALUE "InternalName", "@PKG_NAME@\0"
- VALUE "LegalCopyright", "\0"
+/* VALUE "LegalCopyright", "This file is part of @PRODUCT_NAME@\0" */
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "@ORIGINAL_FILENAME@\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "@PRODUCT_NAME@\0"
VALUE "ProductVersion", "@PACKAGE_VERSION@\0"
VALUE "SpecialBuild", "@BUILD_TIMESTAMP@\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
1 RT_MANIFEST "gpg4win.w32-manifest"
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Nov 8, 4:43 AM (1 d, 11 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
73/2d/5875189a64a84884920ed94ef120
Attached To
rW Gpg4win
Event Timeline
Log In to Comment