diff --git a/Makefile.am b/Makefile.am index 06a481f5..dd69c572 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,125 +1,127 @@ # Makefile.am - Installer for GnuPG 4 Windows Makefile. # Copyright (C) 2005, 2008, 2012 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 . ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = dist-xz no-dist-gzip DISTCHECK_CONFIGURE_FLAGS = --host=i686-w64-mingw32 if BUILD_GPG4WIN po = po else po = endif if BUILD_GPG4WIN doc = doc else doc = endif SUBDIRS = ${po} packages ${doc} src # find patches -type f | sort | sed 's/$/ \\/' | sed 's/^/ /' # find patches-appimage -type f | sort | sed 's/$/ \\/' | sed 's/^/ /' EXTRA_DIST = autogen.sh README.GIT ONEWS \ doc/license-page doc/GPLv3 \ build-aux/git-log-footer build-aux/git-log-fix \ docker/appimage/Dockerfile \ docker/build-appimage-docker-image.sh \ docker/build-gpg4win-docker-image.sh \ docker/gpg4win-bullseye/Dockerfile \ docker/run-appimage-build.sh \ docker/run-gpg4win-build.sh \ patches/extra-cmake-modules/0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch \ patches/kconfig/0001-Read-defaults-from-Windows-registry.patch \ patches/kconfigwidgets/0001-Fix-crash-on-exit-on-Windows.patch \ patches/kconfigwidgets/0001-Make-QDbus-optional.patch \ patches/kiconthemes/0001-Make-DBus-optional.patch \ patches/kleopatra/set-windows-registry.patch \ patches/kxmlgui/0001-make-qdbus-optional.patch \ patches/kxmlgui/0004-Cruedly-disable-KSendbugmail.patch \ patches/libkleo/set-cxx-standard.patch \ patches/qtbase/0001-Fix-build-without-std-thread.patch \ patches/qtbase/0001-Gpg4win-qstandardpaths-patch.patch \ patches/qtbase/0002-Gpg4win-theme-names-and-relpaths.patch \ patches/qtbase/0003-Fix-build-with-GCC-11-include-limits.patch \ patches/qttools/disable-most-tools.patch \ patches/kcoreaddons/0001-Fix-MINGW-build.patch \ patches/ki18n/0001-Undef-snprintf-for-windows.patch \ patches/kio/Fix-cross-build.patch \ patches/kservice/0001-Remove-unused-include.patch \ + patches/okular/0001-WIP-Buildfix-with-reduced-depdencies.patch \ + patches/kparts/0001-Dirty-hack-to-remove-KTextWidgets.patch \ patches-appimage/kconfigwidgets/0001-build-without-KF5Auth.patch \ patches-appimage/kconfigwidgets/fake-version.patch \ patches-appimage/qtwayland-5.15.0/00-disable-wayland-server.patch \ patches-appimage/libkleo/set-cxx-standard.patch \ patches-appimage/kmime/set-cxx-standard.patch \ patches-appimage/gnupg-2.3.7/0001-dirmngr-Fix-NTBTLS-include-for-test.patch \ patches-appimage/kleopatra/0001-po-Update-German-translation-for-3.1.26.patch \ patches-appimage/libkleo/0001-po-Update-German-translation-for-kleopatra-3.1.26.patch \ patches-appimage/libkleo/gpg4win-check.patch copy-news: cp NEWS doc/website/NEWS.last copy-release: gpg4win-$(VERSION).tar.bz2 installers/gpg4win-$(VERSION).exe \ installers/gpg4win-light-$(VERSION).exe \ installers/gpg4win-vanilla-$(VERSION).exe @echo Copying $(VERSION) to $(RELEASEHOST) >&2 @set -e;\ if ssh "$$(echo $(RELEASEHOST)|cut -d: -f -1)" \ test -f "$$(echo $(RELEASEHOST)/gpg4win-$(VERSION).exe|cut -d: -f2-)";\ then echo "This release has already been copied to the server" >&2 ;\ else scp gpg4win-$(VERSION).tar.bz2 \ installers/gpg4win-$(VERSION).exe \ installers/gpg4win-light-$(VERSION).exe \ installers/gpg4win-vanilla-$(VERSION).exe \ installers/gpg4win-src-$(VERSION).exe $(RELEASEHOST)/ ;\ for f in en de ; do \ scp src/README.$$f.txt \ $(RELEASEHOST)/README-$(VERSION).$$f.txt; \ done;\ fi dist-hook: gen-ChangeLog gen_start_date = 2012-03-26T00:00:00 .PHONY: gen-ChangeLog gen-ChangeLog: set -e; \ if test -d $(top_srcdir)/.git; then \ (cd $(top_srcdir) && \ $(GITLOG_TO_CHANGELOG) --append-dot --tear-off \ --amend=build-aux/git-log-fix \ --since=$(gen_start_date) ) > $(distdir)/cl-t; \ cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\ rm -f $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi download: packages/packages.common packages/packages.4 packages/packages.3 (cd packages; ./download.sh) msi: $(MAKE) $(AM_MAKEFLAGS) -C src msi msi-signed: $(MAKE) $(AM_MAKEFLAGS) -C src msi-signed msi-upload: $(MAKE) $(AM_MAKEFLAGS) -C src msi-upload diff --git a/configure.ac b/configure.ac index 7076cc1b..8fcdcb99 100644 --- a/configure.ac +++ b/configure.ac @@ -1,501 +1,506 @@ # 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 . # (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. m4_define([mym4_package],[gpg4win]) m4_define([mym4_isvsd],m4_if(m4_esyscmd([ls packages/gnupg-2.*.tar.* | \ head -1 | cut -d. -f2 | tr -d '\n']),[2], [yes], [no])) m4_if(mym4_isvsd,yes, [m4_define([mym4_major],[3]) m4_define([mym4_minor],[1]) m4_define([mym4_micro],[27])], [m4_define([mym4_major],[4]) m4_define([mym4_minor],[1]) m4_define([mym4_micro],[1])]) # 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]) # Remember to update these version numbers also in the NEWS file. MANUALVERSION_EINSTEIGER="2.0.2" MANUALDATE_EINSTEIGER="30. Mai 2006" MANUALVERSION_DURCHBLICKER="2.0.2" MANUALDATE_DURCHBLICKER="30. Mai 2006" MANUALVERSION_NOVICES="1.0.0" MANUALDATE_NOVICES="Nov. 30, 2006" MANUALVERSION_ADVANCED="0.0.0" MANUALDATE_ADVANCED="Nov. 30, 2006" COMPENDIUM_VERSION_DE="4.0.1" COMPENDIUM_DATE_DE="3. April 2018" COMPENDIUMINPROGRESS_DE="zuletzt leicht korrigiert am 3. April 2018" COMPENDIUM_VERSION_EN="3.0.0" COMPENDIUM_DATE_EN="30th November 2016" COMPENDIUMINPROGRESS_EN="last minor changes from 30th November 2016" MANUALINPROGRESS_DE=m4_if(my_isbeta,[yes],["~und evtl. seitdem weiter bearbeitet"]) MANUALINPROGRESS_EN=m4_if(my_isbeta,[yes],["~and may have been further edited"]) IS_VSD_BUILD=mym4_isvsd 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 # XXX: It seems to be impossible in the way we call cmake to pass # defines with spaces. So we use a nice "FOUR-PER-EM SPACE" U+2005 *cough* DISTRIBUTION_TEXT=m4_if(mym4_isvsd, [yes], ["g10 Code GmbH"], ["Gpg4win"]) AC_CONFIG_SRCDIR(src/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 AM_CONFIG_HEADER(config.h) # Language support AM_PO_SUBDIRS AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_SUBST(MANUALVERSION_EINSTEIGER) AC_SUBST(MANUALDATE_EINSTEIGER) AC_SUBST(MANUALVERSION_DURCHBLICKER) AC_SUBST(MANUALDATE_DURCHBLICKER) AC_SUBST(MANUALINPROGRESS_DE) AC_SUBST(MANUALVERSION_NOVICES) AC_SUBST(MANUALDATE_NOVICES) AC_SUBST(MANUALVERSION_ADVANCED) AC_SUBST(MANUALDATE_ADVANCED) AC_SUBST(MANUALINPROGRESS_EN) AC_SUBST(COMPENDIUM_VERSION_DE) AC_SUBST(COMPENDIUM_DATE_DE) AC_SUBST(COMPENDIUMINPROGRESS_DE) AC_SUBST(COMPENDIUM_VERSION_EN) AC_SUBST(COMPENDIUM_DATE_EN) AC_SUBST(COMPENDIUMINPROGRESS_EN) AC_SUBST(GIT_BETASTRING) AC_SUBST(IS_BETA_BUILD) AC_SUBST(IS_VSD_BUILD) AC_SUBST(DISTRIBUTION_TEXT) # 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}" AC_SUBST(BUILD_TIMESTAMP) AC_SUBST(BUILD_ISODATE) AC_SUBST(BUILD_FILEVERSION) # 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) # For development it is often faster to build without manuals. AC_ARG_ENABLE(manuals, AC_HELP_STRING([--disable-manuals], [Do not build the manuals (for debugging)]), build_manuals=$enableval, build_manuals=yes) AM_CONDITIONAL(BUILD_MANUALS, test "$build_manuals" = yes) # Additionaly enable building gpgex for another host AC_ARG_WITH([additional-gpgex-host], AC_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, AC_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) # # 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(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) 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 # Try to find the KF5ConfigConfig to set up host tooling # variable for the kconfig compiler. # A variable path here would probably be better but we cant # use $libdir to avoid it beeing required to configure gpg4win # build with a multiarch libdir set. kf5_host_tooling="/usr/lib/x86_64-linux-gnu/cmake" if test ! -f "$kf5_host_tooling/KF5Config/KF5ConfigConfig.cmake"; then missing_tools="$missing_tools libkf5config-dev" fi AC_SUBST(kf5_host_tooling) GPG4WIN_RUNTIME_LIBRARY(libstdc++-6) GPG4WIN_RUNTIME_LIBRARY(libwinpthread-1) if test -f "/usr/lib/gcc/i686-w64-mingw32/10-win32/libgcc_s_dw2-1.dll"; then AC_MSG_NOTICE([Using dw2 exceptions.]) GPG4WIN_RUNTIME_LIBRARY(libgcc_s_dw2-1) $CP /dev/null src/libgcc_s_sjlj-1.dll-x else AC_MSG_NOTICE([Using sjlj exceptions.]) GPG4WIN_RUNTIME_LIBRARY(libgcc_s_sjlj-1) $CP /dev/null src/libgcc_s_dw2-1.dll-x 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]) # 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]) GPG4WIN_IPKG([compendium]) # The GnuPG Package. GPG4WIN_BPKG_BINSRC([gnupg-w32]) GPG4WIN_BPKG_MSISRC([gnupg-msi]) # Qt related stuff. GPG4WIN_SPKG([qtbase]) GPG4WIN_SPKG([qttools], [qtbase]) GPG4WIN_SPKG([qttranslations], [qtsvg qttools qtwinextras]) GPG4WIN_SPKG([qtwinextras], [qtbase]) GPG4WIN_SPKG([qtsvg], [qtbase]) GPG4WIN_KDEPKG([breeze-icons], [extra-cmake-modules qtbase]) GPG4WIN_KDEPKG([kleopatra], [kio gnupg-w32 breeze-icons kxmlgui libkleo kitemmodels qttranslations]) 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 qtwinextras]) GPG4WIN_KDEPKG([kcoreaddons], [qtbase qttools]) GPG4WIN_KDEPKG([kcodecs], [qtbase qttools]) GPG4WIN_KDEPKG([kguiaddons], [qtbase qttools]) GPG4WIN_KDEPKG([kmime], [kcodecs ki18n]) GPG4WIN_KDEPKG([kconfigwidgets], [kwidgetsaddons kguiaddons ki18n kcodecs kconfig]) 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]) GPG4WIN_KDEPKG([libkleo], [kmime kconfigwidgets kwindowsystem kcompletion gpgme]) GPG4WIN_KDEPKG([gpg4win-tools], [libkleo gpgme]) + GPG4WIN_KDEPKG([threadweaver], [qtbase extra-cmake-modules]) + GPG4WIN_KDEPKG([freetype], [zlib bzip2]) + GPG4WIN_KDEPKG([poppler], [gpgme kio qtbase freetype]) + GPG4WIN_KDEPKG([kparts], [kio kservice kxmlgui kconfigwidgets kwidgetsaddons]) + GPG4WIN_KDEPKG([okular], [kparts gpgme kio poppler threadweaver qtsvg]) GPG4WIN_FINALIZE fi # Packages for the AppImage if test "$build_appimage" = yes ; then appimage_dup_sources="" APPIMAGE_SPKG([sqlite]) 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 qtx11extras]) # 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_SPKG([qtbase], [gnupg]) APPIMAGE_SPKG([qttools], [qtbase]) APPIMAGE_SPKG([qttranslations], [qtsvg qttools qtx11extras]) APPIMAGE_SPKG([qtx11extras], [qtbase]) APPIMAGE_SPKG([qtwayland], [qtbase]) APPIMAGE_SPKG([qtsvg], [qtbase]) APPIMAGE_KDEPKG([extra-cmake-modules], [qttools]) APPIMAGE_KDEPKG([breeze-icons], [extra-cmake-modules qtbase]) APPIMAGE_KDEPKG([kconfig], [qtbase qttools extra-cmake-modules]) APPIMAGE_KDEPKG([ki18n], [qtbase qttools extra-cmake-modules]) APPIMAGE_KDEPKG([kcoreaddons], [qtbase qttools extra-cmake-modules]) APPIMAGE_KDEPKG([kcodecs], [qtbase qttools extra-cmake-modules]) APPIMAGE_KDEPKG([kdbusaddons], [qtbase qttools extra-cmake-modules]) APPIMAGE_KDEPKG([kguiaddons], [qtbase qttools extra-cmake-modules]) APPIMAGE_KDEPKG([kitemviews], [qtbase qttools extra-cmake-modules]) APPIMAGE_KDEPKG([kitemmodels], [qtbase qttools extra-cmake-modules]) APPIMAGE_KDEPKG([karchive], [qtbase qttools extra-cmake-modules]) APPIMAGE_KDEPKG([kwindowsystem], [qtbase qtx11extras extra-cmake-modules]) APPIMAGE_KDEPKG([kcrash], [kwindowsystem kcoreaddons]) APPIMAGE_KDEPKG([kmime], [kcodecs ki18n]) APPIMAGE_KDEPKG([kwidgetsaddons], [kconfig qttools qtbase]) APPIMAGE_KDEPKG([kcompletion], [kwidgetsaddons]) APPIMAGE_KDEPKG([kconfigwidgets], [kwidgetsaddons kguiaddons ki18n kcodecs kconfig]) APPIMAGE_KDEPKG([kiconthemes], [qtsvg kconfigwidgets karchive]) APPIMAGE_KDEPKG([kxmlgui], [kiconthemes kconfigwidgets kitemviews]) APPIMAGE_KDEPKG([libkleo], [kmime kconfigwidgets kwindowsystem kcompletion gpgme]) APPIMAGE_KDEPKG([kleopatra], [gnupg gpgme breeze-icons kxmlgui libkleo kitemmodels qttranslations kdbusaddons]) 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/config.nsi src/gpg4win.mk) AC_CONFIG_FILES(doc/Makefile) AC_CONFIG_FILES(doc/logo/Makefile) AC_CONFIG_FILES(doc/manual/Makefile doc/manual/version.tex) AC_CONFIG_FILES(src/toolchain.cmake) AC_CONFIG_FILES(src/appimage/Makefile src/appimage/appimage.mk) AC_CONFIG_FILES(src/appimage/rsync-filters/Makefile) 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} Distribution: ${DISTRIBUTION_TEXT} " if test -n "$JOBS"; then echo " make jobs: ${JOBS}" else echo "" fi diff --git a/packages/gen-frameworks.sh b/packages/gen-frameworks.sh index 8375082e..1d813f82 100755 --- a/packages/gen-frameworks.sh +++ b/packages/gen-frameworks.sh @@ -1,114 +1,116 @@ #!/bin/bash # Copyright (C) 2016 Intevation GmbH # Copyright (C) 2021 g10 Code GmbH # # Software engineering by Ingo Klöcker # # 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 . # # SPDX-License-Identifier: GPL-2.0+ # Grab the version information for KDE Frameworks and generate a text block # that can be copy and pasted into packages.current. set -e if [ -z "$1" ]; then echo "Usage $0 > snippet" exit 1 fi FRAMEWORKS="extra-cmake-modules kconfig ki18n kwidgetsaddons kcompletion kwindowsystem kcoreaddons kcodecs kconfigwidgets kdbusaddons kxmlgui kguiaddons kitemviews kitemmodels kiconthemes breeze-icons karchive kcrash kio kbookmarks kservice solid - kjobwidgets" + kjobwidgets + threadweaver + kparts" fullversion=$1 case ${fullversion} in *.*.*) majorversion=${fullversion%.*} ;; *.*) majorversion=${fullversion} fullversion=${majorversion}.0 echo "Using full version ${fullversion}" ;; *) echo "Invalid version ${fullversion}" exit 1 ;; esac curdate=$(date +%Y-%m-%d) KEYRING=$(dirname $0)/kde-release-keys.gpg server=https://download.kde.org/stable/frameworks echo "server ${server}" tmpdir=$(mktemp -d -t gen-frameworks.XXXXXXXXXX) for fw in $FRAMEWORKS; do # Download packages over https now and verify that the signature matches tarfile="$fw-${fullversion}.tar.xz" tarfileurl="${server}/$majorversion/${tarfile}" if ! curl -L --silent --show-error --fail "${tarfileurl}" > "$tmpdir/${tarfile}"; then echo "Downloading ${tarfileurl} failed" exit 1 fi sigfile="${tarfile}.sig" sigfileurl="${tarfileurl}.sig" if ! curl -L --silent --show-error --fail "${sigfileurl}" > "$tmpdir/${sigfile}"; then echo "Downloading ${sigfileurl} failed" exit 1 fi # Check the signature if ! gpgv --keyring "$KEYRING" "$tmpdir/${sigfile}" "$tmpdir/${tarfile}"; then echo "Signature for $tmpdir/${tarfile} is not valid!" exit 1 fi sha2=$(sha256sum $tmpdir/${tarfile} | cut -d ' ' -f 1) echo "# $fw" echo "# last changed: $curdate" echo "# by: ah" echo "# verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh)" echo "file $majorversion/${tarfile}" echo "chk $sha2" echo "" done rm -r $tmpdir diff --git a/packages/packages.common b/packages/packages.common index 8a8fe626..368d5232 100644 --- a/packages/packages.common +++ b/packages/packages.common @@ -1,460 +1,496 @@ # packages.common - list of packages for use with gpg4win -*- sh -*- # # The download script processes the statements here to # actually download the packages. The syntax is trivial: # # If the first non whitespace character of a line is #, the line is # considered a comment. If the first word of a line is "server", the # rest of the line will be taken as the base URL for following file # commands. If the first word of a line is "file" the rest of the # line will be appended to the current base URL (with a / as # delimiter). The statement "chk" is followed by the SHA256 checksum of # the last file. # # zlib # server https://gnupg.org/ftp/gcrypt # last-changed: 2022-04-07 # by: wk # verified: swdb file zlib/zlib-1.2.12.tar.gz chk 91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9 # # GNU # server ftp://ftp.gnu.org/pub/gnu # last-changed: 2017-02-15 # by: ah # verified: Sig 68D9 4D8A AEEA D48A E7DC 5B90 4F49 4A94 2E46 16C2 file libiconv/libiconv-1.15.tar.gz chk ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 # last-changed: 2021-08-17 # by: ah (checksum added by ik) # verified: Sig 9001 B85A F9E1 B83D F1BD A942 F5BE 8B26 7C6A 406D file gettext/gettext-0.21.tar.xz chk d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192 # # GIMP stuff for W32 # server http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies # checked: 2012-03-28 wk - Not updated - not a security problem name pkgconfig-0.23.tar.gz file pkg-config-0.23.tar.gz chk 08a0e072d6a05419a58124db864f0685e6ac96e71b2875bf15ac12714e983b53 name pkgconfig-0.23.zip file pkg-config_0.23-3_win32.zip chk 677d6055494e24cad6c49eab33eee618ddc6ed65da827c8b5b7da761b4063278 +server https://download.savannah.gnu.org/releases/ +# last-changed: 2023-04-19 +# by: ah +# verified: SIG E30674707856409FF1948010BE6C3AAC63AD8E3F +file freetype/freetype-2.13.0.tar.xz +chk 5ee23abd047636c24b2d43c6625dcafc66661d1aca64dec9e0d05df29592624c # # SQLite # server https://www.sqlite.org # last changed: 2021-09-20 # by: ik # verified: SHA1 checksum on https://web.archive.org/web/20190228201545/https://www.sqlite.org/download.html name sqlite-3.27.2.tar.gz file 2019/sqlite-autoconf-3270200.tar.gz chk 50c39e85ea28b5ecfdb3f9e860afe9ba606381e21836b2849efca6a0bfe6ef6e # # Stripped down version of BZIP2 # (full source at http://bzip.org) # server ftp://ftp.g10code.com/g10code/bzip2 # checked: 2014-07-16 ah file bzip2-1.0.6-g10.tar.gz chk c2a9b3aec1a38d34b66106116a39f64b01d84f475fef75c40ea0bda0ea67ed07 # # GnuPG et al. # # All tarballs from this server are verified with an openpgp # signature made by "Werner Koch (dist sig)" or one of the other # gnupg main contributors. # Server changed from ftp to https by wk 2021-09-22 server https://gnupg.org/ftp/gcrypt # last changed 2023-04-11 # by wk # verified: swdb file libgpg-error/libgpg-error-1.47.tar.bz2 chk 9e3c670966b96ecc746c28c2c419541e3bcb787d1a73930f5e5f5e1bcbbb9bdb # last-changed: 2021-04-21 # by: ah # verified: distsigkey.gpg file libassuan/libassuan-2.5.5.tar.bz2 chk 8e8c2fcc982f9ca67dcbb1d95e2dc746b1739a4668bc20b3a3c5be632edb34e4 # last changed 2021-09-20 # by ik # verified: distsigkey.gpg file npth/npth-1.6.tar.bz2 chk 1393abd9adcf0762d34798dc34fdcf4d0d22a8410721e76f1e3afcd1daa4e2d1 # last changed 2022-12-19 # by ah # verified: Signature from: 6DAA6E64A76D2840571B4902528897B826403ADA file libksba/libksba-1.6.3.tar.bz2 chk 3f72c68db30971ebbf14367527719423f0a4d5f8103fc9f4a1c01a9fa440de5c # last changed 2022-04-07 # by wk # verified: swdb file ntbtls/ntbtls-0.3.1.tar.bz2 chk 8922181fef523b77b71625e562e4d69532278eabbd18bc74579dbe14135729ba #name gnupg-msi-2.3.1-beta18-20210420-src.tar.xz #file binary/gnupg-w32-2.3.1_20210420.tar.xz #chk e1a2dc705c940938b7bf7a17f521a41b1ef14139acd8860b2fd59aed2750aa3b #name gnupg-msi-2.3.1-20210420-bin.wixlib #file binary/gnupg-w32-2.3.1_20210420.wixlib #chk 133817a4c4d11996956676c5c200222839ee5dc16e9476bd682d4e68b33ef73e # pinentry # last changed: 2022-08-24 # by: wk # verified: swdb file pinentry/pinentry-1.2.1.tar.bz2 chk 457a185e5a85238fb945a955dc6352ab962dc8b48720b62fc9fa48c7540a4067 # last changed 2023-04-20 # by wk # verified: [build tree] file gpgme/gpgme-1.20.0.tar.bz2 chk 25a5785a5da356689001440926b94e967d02e13c49eb7743e35ef0cf22e42750 # last changed: 2021-01-07 # by: ah file scute/scute-1.7.0.tar.bz2 chk 437fe758b27c243a5ee2535c6b065ea1d09f2c9a02d83567d2f934bb6395c249 # GpgOL # last-changed: 2022-12-19 # by: ah # verified: build tree file gpgol/gpgol-2.5.6.tar.bz2 chk f4d05b53e57fc362437236aab71c50d8e3bd441cf48986512d04dfc89faaa3c1 # # GpgEX # # last-changed: 2022-11-18 # by: ah # verified: distsigkey.gpg #file gpgex/gpgex-1.0.10-beta5.tar.bz2 #chk f7e4c619aefed02dfbb07363a4435878a50999b290c60779e670fceb826e283e # # GnuPG utilities # server http://www.jabberwocky.com/software/paperkey # last-changed: 2017-12-05 # by: ah # verified: SIG 7D92 FD31 3AB6 F373 4CC5 9CA1 DB69 8D71 9924 2560 file paperkey-1.5.tar.gz chk c4737943083ce92e41faf13c27a9d608105b6285c0840dfb684a7ee294142ddf # # Kleopatra and dependencies # # Qt base # last changed: 2020-07-22 # by: ah # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtbase-everywhere-src-5.15.2.tar.xz.sha256 server http://download.qt.io/official_releases/qt/ name qtbase-5.15.2.tar.xz file 5.15/5.15.2/submodules/qtbase-everywhere-src-5.15.2.tar.xz chk 909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8 # Qt Tools # last changed: 2020-07-22 # by: ah # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qttools-everywhere-src-5.15.2.tar.xz.sha256 name qttools-5.15.2.tar.xz file 5.15/5.15.2/submodules/qttools-everywhere-src-5.15.2.tar.xz chk c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc # Qt Winextras # last changed: 2020-07-22 # by: ah # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtwinextras-everywhere-src-5.15.2.tar.xz.sha256 name qtwinextras-5.15.2.tar.xz file 5.15/5.15.2/submodules/qtwinextras-everywhere-src-5.15.2.tar.xz chk 65b8272005dec00791ab7d81ab266d1e3313a3bbd8e54e546d984cf4c4ab550e # Qt X11 extras # last changed: 2021-09-20 # by: ik # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtx11extras-everywhere-src-5.15.2.tar.xz.sha256 name qtx11extras-5.15.2.tar.xz file 5.15/5.15.2/submodules/qtx11extras-everywhere-src-5.15.2.tar.xz chk 7014702ee9a644a5a93da70848ac47c18851d4f8ed622b29a72eed9282fc6e3e # Qt WaylandClient # last changed: 2021-09-21 # by: ik # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtwayland-everywhere-src-5.15.2.tar.xz.sha256 name qtwayland-5.15.2.tar.xz file 5.15/5.15.2/submodules/qtwayland-everywhere-src-5.15.2.tar.xz chk 193732229ff816f3aaab9a5e2f6bed71ddddbf1988ce003fe8dd84a92ce9aeb5 # Qt svg # last changed: 2020-07-22 # by: ah # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtsvg-everywhere-src-5.15.2.tar.xz.sha256 name qtsvg-5.15.2.tar.xz file 5.15/5.15.2/submodules/qtsvg-everywhere-src-5.15.2.tar.xz chk 8bc3c2c1bc2671e9c67d4205589a8309b57903721ad14c60ea21a5d06acb585e # Qt translations # last changed: 2020-07-22 # by: ah # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qttranslations-everywhere-src-5.15.2.tar.xz.sha256 name qttranslations-5.15.2.tar.xz file 5.15/5.15.2/submodules/qttranslations-everywhere-src-5.15.2.tar.xz chk d5788e86257b21d5323f1efd94376a213e091d1e5e03b45a95dd052b5f570db8 # KDE Frameworks generated by gen-frameworks.sh # When outdated activate this link: #server https://download.kde.org/Attic/frameworks/ server https://download.kde.org/stable/frameworks ##### Paste Here ##### # # Don't forget to update gpg4win.mk.in with new version numbers # # extra-cmake-modules # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/extra-cmake-modules-5.104.0.tar.xz chk e49eb21fdb66634b84cccbf6ba65eae3f8e0eee0dc72d50f627280f49df585d9 # kconfig # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kconfig-5.104.0.tar.xz chk b8e7a6b7b0e78e3eb01755a965d893bd95c231befeff10479243e5a182ec2938 # ki18n # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/ki18n-5.104.0.tar.xz chk fe815b9e28c680fa472c7ab56e4d7934a8915f19409734a13433797a4be14ee1 # kwidgetsaddons # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kwidgetsaddons-5.104.0.tar.xz chk 4abbb552cd43e51ad2070d8780ca7112e2c9771c2258734ae4a97712b9123120 # kcompletion # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kcompletion-5.104.0.tar.xz chk b0ed0246871283df04c62f0df2b221e32911cb4d292d5ae42f860958032eb510 # kwindowsystem # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kwindowsystem-5.104.0.tar.xz chk 6b10ee354ebb7d2dfd6baa1374929d30811f8169c8233e55849e31e38e6af81a # kcoreaddons # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kcoreaddons-5.104.0.tar.xz chk ed760d4a7fed6c03480dcc3cfe621a49ac5ca9853c846080afe393f7ce794e40 # kcodecs # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kcodecs-5.104.0.tar.xz chk 7ec909f6865eba87a99b046a9aeaa6a83c01308ad1dda87be3f69e91a7909d6b # kconfigwidgets # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kconfigwidgets-5.104.0.tar.xz chk eb9014b813a1c8a18c78ef11be296964b31338e5237080a74234bf97ead64522 # kdbusaddons # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kdbusaddons-5.104.0.tar.xz chk 4c6add0481c407bc3768729e27e8644feba748c333872e62aaa3260338fd56b4 # kxmlgui # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kxmlgui-5.104.0.tar.xz chk f45d5a5411b3ca0197c1e4720c27c7d85e351aeee03aca861066e8db3c7c93e6 # kguiaddons # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kguiaddons-5.104.0.tar.xz chk fb8d8de25b684af6f9e9e893912664a18231486ac995d2522676018c3e93840d # kitemviews # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kitemviews-5.104.0.tar.xz chk 94920dc68c187319fa79c64e194e9ebecaef8c97fc4bd6aba342c18bc75a48bc # kitemmodels # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kitemmodels-5.104.0.tar.xz chk 0bac2fe2fc607443e3332911655ced5dd309e346f2f6a2ff3f29b2f45b7b18d7 # kiconthemes # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kiconthemes-5.104.0.tar.xz chk 70f4d9f950acdaa28b539838226ed1cff7e70cdcf177272185bac7c75a6cccdf # breeze-icons # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/breeze-icons-5.104.0.tar.xz chk ff2dacc3fb6f1c7acd378638329f2e5b5fc4fdb3dab1321716d2d54b32eaae6a # karchive # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/karchive-5.104.0.tar.xz chk b62f3dfe68691ad2917d0592d66ffc02cfbcc7571b7d1fb1d3fadd695534fd2e # kcrash # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kcrash-5.104.0.tar.xz chk 12d6004f9e2e51a9d74f044462753dd7410e10a40a1f6b07727dcd5b52a7ea96 # kio # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kio-5.104.0.tar.xz chk 5a8b93a5de72406fc4cc7b9aa4715be6d1d5264e617b26be257f5d0e26dde310 # kbookmarks # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kbookmarks-5.104.0.tar.xz chk 85e565590233cfc6dc8c3459717c327961e79c74199d4d1c2741b40946936354 # kservice # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kservice-5.104.0.tar.xz chk 215b109738ea5a10f97c4abbd3c9b9da58c826127708eddd34af345b4e8ad8a3 # solid # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/solid-5.104.0.tar.xz chk 2a9a33bc71b4cafec35b9692bd7681a736eeb4e4b81c25f5bd87dbec38c143cf # kjobwidgets # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kjobwidgets-5.104.0.tar.xz chk 3b254124d3bf20666a514710fef8990325da2ade14f49368b1bed1256eb8fea1 + +# threadweaver +# last changed: 2023-04-19 +# by: ah +# verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) +file 5.104/threadweaver-5.104.0.tar.xz +chk 963decfdf0cf780406eb585efdb213539a00cd16ae4dff2b2ffe8822a609a647 + +# kparts +# last changed: 2023-04-19 +# by: ah +# verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) +file 5.104/kparts-5.104.0.tar.xz +chk 66a40646cc4890669991cc63d33803ec335b0c08b7aeb0476b2a852951e700cd + ### END PASTE ### server http://download.kde.org/stable/release-service/ # kmime # last changed: 2022-02-01 # by: ah # verified: PGP Sig D81C0CB38EB725EF6691C385BB463350D6EF31EF #file 21.12.1/src/kmime-21.12.1.tar.xz #chk c1f4c06c61f6b4ddde7395b1cfb1f2411a32638e09c6f0a58c6557a7dffe4120 # # Snapshots stored on the GnuPG server # server https://gnupg.org/ftp/gcrypt/snapshots # gpgex # last changed: 2022-12-06 # by: aheinecke # verified: Tarball created by aheinecke. file gpgex/gpgex-1.0.10-beta5.tar.xz chk 2c227634528ef76bcca7fd4b7fe5c38a535f6e68bbe5b2cdc6cc4a74810b2dba # gpg4win-tools # last changed: 2022-08-29 # by: aheinecke # verified: Tarball created by aheinecke. file gpg4win-tools/gpg4win-tools-202208290924.tar.xz chk fe20b69d84893618625d76e55f772477a80628da98411c8bb9c1a5e01028b3f9 # kmime # last changed: 2023-03-22 # by: aheinecke # verified: Tarball created by aheinecke. file kmime/kmime-202303221649.tar.xz chk 0a26c6b7a1b921191e52ee17d8d131f606a1def9ed09e31074a1c7aed5c4c6b7 # libkleo # last changed: 2023-03-22 # by: aheinecke # verified: Tarball created by aheinecke. file libkleo/libkleo-202303221217.tar.xz chk 0dfe1000d56242c95b54dd59be831e4a11f6bf19b194c922e719638c5eef98fa # kleopatra # last changed: 2023-03-22 # by: aheinecke # verified: Tarball created by aheinecke. file kleopatra/kleopatra-202303221715.tar.xz chk 8b78bc7d5487db5ae6fa1addc9756f24922a9af8386210f453c015e3f0e30eab + +# Okular and dependencies +# poppler +# last changed: 2023-04-17 +# by: aheinecke +# verified: Tarball created by aheinecke. +file poppler/poppler-202304171532.tar.xz +chk bbe1abc9caa2b5eb1582a7ab5974fd0e27babb333230b34add16227c75f292cc + +# okular +# last changed: 2023-04-19 +# by: aheinecke +# verified: Tarball created by aheinecke. +file okular/okular-202304191155.tar.xz +chk aca442b9823310f3f7205b07bc04cdfc69a911d8e162bb2e90aa9b6f40f1c0d7 diff --git a/patches/kparts/0001-Dirty-hack-to-remove-KTextWidgets.patch b/patches/kparts/0001-Dirty-hack-to-remove-KTextWidgets.patch new file mode 100755 index 00000000..4a6b580b --- /dev/null +++ b/patches/kparts/0001-Dirty-hack-to-remove-KTextWidgets.patch @@ -0,0 +1,178 @@ +#! /bin/sh +patch -p1 -l -f $* < $0 +exit $? + +From 8249018af650498e38da2ea99198f4a9f60db4ef Mon Sep 17 00:00:00 2001 +From: Andre Heinecke +Date: Tue, 25 Apr 2023 16:16:01 +0200 +Subject: [PATCH] Dirty hack to remove KTextWidgets + +This is not even functionally tested because the +hacked code is not really used in Gpg4win. +--- + CMakeLists.txt | 2 +- + KF5PartsConfig.cmake.in | 2 +- + src/CMakeLists.txt | 5 ++++- + src/browserrun.cpp | 11 +++++++++++ + src/readwritepart.cpp | 2 ++ + src/textextension.cpp | 2 ++ + src/textextension.h | 4 ++++ + 7 files changed, 25 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 28ac4cb..c8e36cf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ find_package(KF5IconThemes ${KF_DEP_VERSION} REQUIRED) + find_package(KF5KIO ${KF_DEP_VERSION} REQUIRED) + find_package(KF5JobWidgets ${KF_DEP_VERSION} REQUIRED) + find_package(KF5Service ${KF_DEP_VERSION} REQUIRED) +-find_package(KF5TextWidgets ${KF_DEP_VERSION} REQUIRED) ++find_package(KF5TextWidgets ${KF_DEP_VERSION}) + find_package(KF5WidgetsAddons ${KF_DEP_VERSION} REQUIRED) + find_package(KF5XmlGui ${KF_DEP_VERSION} REQUIRED) + +diff --git a/KF5PartsConfig.cmake.in b/KF5PartsConfig.cmake.in +index 7623e3f..90b4891 100644 +--- a/KF5PartsConfig.cmake.in ++++ b/KF5PartsConfig.cmake.in +@@ -2,7 +2,7 @@ + + include(CMakeFindDependencyMacro) + find_dependency(KF5KIO "@KF_DEP_VERSION@") +-find_dependency(KF5TextWidgets "@KF_DEP_VERSION@") ++#find_dependency(KF5TextWidgets "@KF_DEP_VERSION@") + find_dependency(KF5XmlGui "@KF_DEP_VERSION@") + + include("${CMAKE_CURRENT_LIST_DIR}/KF5PartsTargets.cmake") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ebf0966..0bb4c32 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -104,10 +104,13 @@ target_include_directories(KF5Parts + + target_link_libraries(KF5Parts PUBLIC KF5::KIOWidgets #browserrun.h uses krun.h + KF5::XmlGui # essential to the technology +- KF5::TextWidgets # needed for KFind, as interface ++ KF5::CoreAddons + PRIVATE KF5::I18n #few uses of i18n and i18nc, can be probably stripped down + KF5::IconThemes #only used by KPart::iconLoader() + ) ++if(KF5TextWidgets_FOUND) ++ target_link_libraries(KF5Parts PUBLIC KF5::KF5TextWidgets) ++endif() + + set_target_properties(KF5Parts PROPERTIES VERSION ${KPARTS_VERSION} + SOVERSION ${KPARTS_SOVERSION} +diff --git a/src/browserrun.cpp b/src/browserrun.cpp +index ae9dd0f..e9543af 100644 +--- a/src/browserrun.cpp ++++ b/src/browserrun.cpp +@@ -14,7 +14,9 @@ + #include + #include + #include ++#ifdef GPG4WIN_HACK + #include ++#endif + #include + #include + #include +@@ -410,7 +412,9 @@ void KParts::BrowserRun::saveUrl(const QUrl &url, const QString &suggestedFileNa + + auto *job = new KIO::CommandLauncherJob(downloadManager, args); + job->setExecutable(downloadManager); ++#ifdef GPG4WIN_HACK + job->setUiDelegate(new KDialogJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, window)); ++#endif + job->start(); + return; + } +@@ -454,7 +458,10 @@ void BrowserRun::saveUrlUsingKIO(const QUrl &srcUrl, const QUrl &destUrl, QWidge + job->addMetaData(QStringLiteral("MaxCacheSize"), QStringLiteral("0")); // Don't store in http cache. + job->addMetaData(QStringLiteral("cache"), QStringLiteral("cache")); // Use entry from cache if available. + KJobWidgets::setWindow(job, window); ++ ++#ifdef GPG4WIN_HACK + job->uiDelegate()->setAutoErrorHandlingEnabled(true); ++#endif + } + + void BrowserRun::handleError(KJob *job) +@@ -522,12 +529,16 @@ void BrowserRun::redirectToError(int error, const QString &errorText) + void BrowserRun::slotCopyToTempFileResult(KJob *job) + { + if (job->error()) { ++#ifdef GPG4WIN_HACK + job->uiDelegate()->showErrorMessage(); ++#endif + } else { + // Same as KRun::foundMimeType but with a different URL + const QUrl destUrl = static_cast(job)->destUrl(); + KIO::OpenUrlJob *job = new KIO::OpenUrlJob(destUrl, d->m_mimeType); ++#ifdef GPG4WIN_HACK + job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, d->m_window)); ++#endif + job->setRunExecutables(true); + job->start(); + } +diff --git a/src/readwritepart.cpp b/src/readwritepart.cpp +index 55d7c34..6feba30 100644 +--- a/src/readwritepart.cpp ++++ b/src/readwritepart.cpp +@@ -275,7 +275,9 @@ void ReadWritePartPrivate::slotUploadFinished(KJob *) + Q_EMIT q->canceled(error); + } else { + #ifndef Q_OS_ANDROID ++#ifndef Q_OS_WIN + ::org::kde::KDirNotify::emitFilesAdded(m_url.adjusted(QUrl::RemoveFilename)); ++#endif + #endif + + m_uploadJob = nullptr; +diff --git a/src/textextension.cpp b/src/textextension.cpp +index f442482..dc2104c 100644 +--- a/src/textextension.cpp ++++ b/src/textextension.cpp +@@ -58,7 +58,9 @@ QString KParts::TextExtension::pageText(Format) const + return QString(); + } + ++#ifdef WITH_KTEXTWIDGETS + bool KParts::TextExtension::findText(const QString &, KFind::SearchOptions) const + { + return false; + } ++#endif +diff --git a/src/textextension.h b/src/textextension.h +index 5d959c7..a865514 100644 +--- a/src/textextension.h ++++ b/src/textextension.h +@@ -10,7 +10,9 @@ + + #include + ++#ifdef WITH_KTEXTWIDGETS + #include ++#endif + #include + #include + +@@ -76,6 +78,7 @@ public: + */ + virtual QString pageText(Format format) const; + ++#ifdef WITH_KTEXTWIDGETS + /** + * Returns true if @p string is found using the given @p options. + * +@@ -89,6 +92,7 @@ public: + * options available in @ref KFind::SearchOptions. + */ + virtual bool findText(const QString &string, KFind::SearchOptions options) const; ++#endif + + // for future extensions can be made via slots + +-- +2.40.0 diff --git a/patches/okular/0001-WIP-Buildfix-with-reduced-depdencies.patch b/patches/okular/0001-WIP-Buildfix-with-reduced-depdencies.patch new file mode 100755 index 00000000..2e8e37cc --- /dev/null +++ b/patches/okular/0001-WIP-Buildfix-with-reduced-depdencies.patch @@ -0,0 +1,1079 @@ +#! /bin/sh +patch -p1 -l -f $* < $0 +exit $? + +From 5f06785155c2878fea6ba43db2eb9ef9c74a5197 Mon Sep 17 00:00:00 2001 +From: Andre Heinecke +Date: Tue, 25 Apr 2023 16:06:44 +0200 +Subject: [PATCH] WIP: Buildfix with reduced depdencies + +This needs to be split up and cleaned up. +Easy ones: +Qt QML and Qt Quick + +KTextWidgets should only remove the spellchecking and some +undo behavior in Text annotations + +Phonon disables all Media features. + +KIOFileWidgets should functionally be replaced for Windows +with native code but needs testing. + +DBus needs probably replacement by Kleopatras variant +of KUniqueService for the same functionality. +--- + CMakeLists.txt | 53 +++++++++++++++++++++++++------- + core/document.cpp | 13 ++++++++ + part/annotwindow.cpp | 9 ++++++ + part/annotwindow.h | 4 +++ + part/dlgpresentation.cpp | 11 +++++++ + part/formwidgets.cpp | 4 ++- + part/formwidgets.h | 5 +++ + part/pageview.cpp | 22 +++++++++++-- + part/pageviewmouseannotation.cpp | 5 ++- + part/pageviewutils.cpp | 6 ++++ + part/part.cpp | 16 ++++++++++ + part/part.h | 4 +++ + part/presentationwidget.cpp | 38 ++++++++++++++++++----- + shell/CMakeLists.txt | 7 ++++- + shell/main.cpp | 1 - + shell/okular_main.cpp | 11 +++++++ + shell/shell.cpp | 9 +++++- + shell/shell.h | 6 +++- + shell/welcomescreen.cpp | 9 ++++++ + 19 files changed, 207 insertions(+), 26 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 009924862..4f007bcf3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -102,7 +102,7 @@ ecm_setup_version(${PROJECT_VERSION} + VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/core/version.h" + PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/Okular5ConfigVersion.cmake") + +-find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core Test Widgets PrintSupport Svg Qml Quick) ++find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core Test Widgets PrintSupport Svg) + + if(ANDROID) + find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS AndroidExtras) +@@ -147,8 +147,16 @@ if(KF5JS_FOUND) + endif() + + if (BUILD_DESKTOP) +- find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS DBus) +- find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS Parts Crash IconThemes TextWidgets) ++ find_package(Qt5DBus ${QT_REQUIRED_VERSION} CONFIG) ++ if (Qt5DBus_FOUND) ++ add_definitions(-DHAVE_DBUS) ++ endif() ++ find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS Parts Crash IconThemes) ++ ++ find_package(KF5TextWidgets ${KF5_REQUIRED_VERSION} CONFIG) ++ if (KF5TextWidgets_FOUND) ++ add_definitions(-DHAVE_TEXTWIDGETS) ++ endif() + + find_package(KF5Purpose) + set_okular_optional_package_properties(KF5Purpose PROPERTIES +@@ -169,6 +177,7 @@ if (BUILD_DESKTOP) + endif() + + if (BUILD_MOBILE) ++ find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Qml Quick) + find_package(KF5Kirigami2) + set_package_properties(KF5Kirigami2 PROPERTIES + DESCRIPTION "A QtQuick based components set" +@@ -191,7 +200,14 @@ if(NOT WIN32 AND NOT ANDROID AND NOT APPLE) + else() + set(HAVE_X11 FALSE) + endif() +-find_package(Phonon4Qt5 CONFIG REQUIRED) ++ ++find_package(Phonon4Qt5 CONFIG) ++set_okular_optional_package_properties(Phonon4Qt5 PROPERTIES ++ PURPOSE "Support for media files in okular.") ++if (Phonon_FOUND) ++ add_definitions(-DHAVE_PHONON) ++ set(PHONON_LIB Phonon::phonon4qt) ++endif() + + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules) + +@@ -315,11 +331,16 @@ endif(NOT WIN32) + + # okularcore + ++if (Phonon_FOUND) ++set(media_SRCS ++ core/audioplayer.cpp ++) ++endif() ++ + set(okularcore_SRCS + core/action.cpp + core/annotations.cpp + core/area.cpp +- core/audioplayer.cpp + core/bookmarkmanager.cpp + core/chooseenginedialog.cpp + core/document.cpp +@@ -352,7 +373,9 @@ set(okularcore_SRCS + core/script/event.cpp + core/synctex/synctex_parser.c + core/synctex/synctex_parser_utils.c ++ ${media_SRCS} + ) ++ + qt5_add_resources(okularcore_SRCS + core/script/builtin.qrc + ) +@@ -435,7 +458,7 @@ PRIVATE + KF5::I18n + KF5::ThreadWeaver + KF5::Bookmarks +- Phonon::phonon4qt5 ++ ${PHONON_LIB} + Qt5::Svg + ${MATH_LIB} + ZLIB::ZLIB +@@ -479,6 +502,13 @@ install(FILES conf/okular.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) + install(FILES conf/okular_core.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) + install(FILES core/okularGenerator.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) + ++if (Phonon_FOUND) ++set(additional_phonon_SRCS ++ part/snapshottaker.cpp ++ part/videowidget.cpp ++) ++endif() ++ + if(BUILD_DESKTOP) + # okularpart + set(okularpart_SRCS +@@ -541,15 +571,14 @@ if(BUILD_DESKTOP) + part/searchwidget.cpp + part/sidebar.cpp + part/side_reviews.cpp +- part/snapshottaker.cpp + part/thumbnaillist.cpp + part/toc.cpp + part/toggleactionmenu.cpp +- part/videowidget.cpp + part/layers.cpp + part/signaturepartutils.cpp + part/signaturepropertiesdialog.cpp + part/signaturepanel.cpp ++ ${additional_phonon_SRCS} + ) + + if (Qt5TextToSpeech_FOUND) +@@ -565,21 +594,23 @@ generate_export_header(okularpart BASE_NAME okularpart) + target_link_libraries(okularpart okularcore + ${MATH_LIB} + Qt5::Svg +- Phonon::phonon4qt5 ++ ${PHONON_LIB} + KF5::Archive + KF5::Bookmarks + KF5::I18n + KF5::IconThemes + KF5::ItemViews + KF5::KIOCore +- KF5::KIOFileWidgets + KF5::KIOWidgets + KF5::Parts + KF5::Solid + KF5::WindowSystem +- KF5::TextWidgets + ) + ++if(KF5TextWidgets_FOUND) ++ target_link_libraries(okularpart KF5::TextWidgets) ++endif() ++ + if(KF5Wallet_FOUND) + target_link_libraries(okularpart KF5::Wallet) + endif() +diff --git a/core/document.cpp b/core/document.cpp +index 234243480..d996a40f0 100644 +--- a/core/document.cpp ++++ b/core/document.cpp +@@ -70,8 +70,10 @@ + #include "action.h" + #include "annotations.h" + #include "annotations_p.h" ++#ifdef HAVE_PHONON + #include "audioplayer.h" + #include "audioplayer_p.h" ++#endif + #include "bookmarkmanager.h" + #include "chooseenginedialog_p.h" + #include "debug_p.h" +@@ -2576,7 +2578,9 @@ Document::OpenResult Document::openDocument(const QString &docFile, const QUrl & + d->m_nextDocumentDestination = QString(); + } + ++#ifdef HAVE_PHONON + AudioPlayer::instance()->d->m_currentDocument = fromFileDescriptor ? QUrl() : d->m_url; ++#endif + + const QStringList docScripts = d->m_generator->metaData(QStringLiteral("DocumentScripts"), QStringLiteral("JavaScript")).toStringList(); + if (!docScripts.isEmpty()) { +@@ -2648,8 +2652,10 @@ void Document::closeDocument() + d->m_fontThread = nullptr; + } + ++#ifdef HAVE_PHONON + // stop any audio playback + AudioPlayer::instance()->stopPlaybacks(); ++#endif + + // close the current document and save document info if a document is still opened + if (d->m_generator && d->m_pagesVector.size() > 0) { +@@ -2773,7 +2779,9 @@ void Document::closeDocument() + d->m_documentInfo = DocumentInfo(); + d->m_documentInfoAskedKeys.clear(); + ++#ifdef HAVE_PHONON + AudioPlayer::instance()->d->m_currentDocument = QUrl(); ++#endif + + d->m_undoStack->clear(); + d->m_docdataMigrationNeeded = false; +@@ -4304,10 +4312,12 @@ void Document::processAction(const Action *action) + } + } break; + ++#ifdef HAVE_PHONON + case Action::Sound: { + const SoundAction *linksound = static_cast(action); + AudioPlayer::instance()->playSound(linksound->sound(), linksound); + } break; ++#endif + + case Action::Script: { + const ScriptAction *linkscript = static_cast(action); +@@ -4317,6 +4327,7 @@ void Document::processAction(const Action *action) + d->m_scripter->execute(linkscript->scriptType(), linkscript->script()); + } break; + ++#ifdef HAVE_PHONON + case Action::Movie: + Q_EMIT processMovieAction(static_cast(action)); + break; +@@ -4331,6 +4342,8 @@ void Document::processAction(const Action *action) + + Q_EMIT processRenditionAction(static_cast(action)); + } break; ++#endif ++ + case Action::BackendOpaque: { + d->m_generator->opaqueAction(static_cast(action)); + } break; +diff --git a/part/annotwindow.cpp b/part/annotwindow.cpp +index 68bc16f4d..c77c42697 100644 +--- a/part/annotwindow.cpp ++++ b/part/annotwindow.cpp +@@ -13,7 +13,12 @@ + // qt/kde includes + #include + #include ++#ifdef HAVE_TEXTWIDGETS + #include ++#else ++#include ++#define KTextEdit QTextEdit ++#endif + #include + #include + #include +@@ -21,9 +26,11 @@ + #include + #include + #include ++#include + #include + #include + #include ++#include + #include + #include + #include +@@ -234,7 +241,9 @@ AnnotWindow::AnnotWindow(QWidget *parent, Okular::Annotation *annot, Okular::Doc + + connect(textEdit, &KTextEdit::textChanged, this, &AnnotWindow::slotsaveWindowText); + connect(textEdit, &KTextEdit::cursorPositionChanged, this, &AnnotWindow::slotsaveWindowText); ++#ifdef HAVE_TEXTWIDGETS + connect(textEdit, &KTextEdit::aboutToShowContextMenu, this, &AnnotWindow::slotUpdateUndoAndRedoInContextMenu); ++#endif + connect(m_document, &Okular::Document::annotationContentsChangedByUndoRedo, this, &AnnotWindow::slotHandleContentsChangedByUndoRedo); + + if (!canEditAnnotation) { +diff --git a/part/annotwindow.h b/part/annotwindow.h +index 8f48e698a..8d99b1ebd 100644 +--- a/part/annotwindow.h ++++ b/part/annotwindow.h +@@ -25,6 +25,10 @@ namespace GuiUtils + class LatexRenderer; + } + ++#ifndef HAVE_TEXTWIDGETS ++#define KTextEdit QTextEdit ++#endif ++ + class KTextEdit; + class MovableTitle; + class QMenu; +diff --git a/part/dlgpresentation.cpp b/part/dlgpresentation.cpp +index 5dd763b3f..4b4d6c5e2 100644 +--- a/part/dlgpresentation.cpp ++++ b/part/dlgpresentation.cpp +@@ -10,7 +10,13 @@ + + #include + #include ++ ++#ifdef HAVE_TEXTWIDGETS + #include ++#else ++#include ++#define KPluralHandlingSpinBox QSpinBox ++#endif + + #include + #include +@@ -35,7 +41,12 @@ DlgPresentation::DlgPresentation(QWidget *parent) + + KPluralHandlingSpinBox *advanceTime = new KPluralHandlingSpinBox(this); + advanceTime->setPrefix(i18nc("Spinbox prefix: Advance automatically: every n seconds", "every ")); ++#ifdef HAVE_TEXTWIDGETS + advanceTime->setSuffix(ki18ncp("Advance every %1 seconds", " second", " seconds")); ++#else ++ advanceTime->setPrefix(i18nc("Spinbox suffix: Advance automatically: every n seconds", " seconds")); ++#endif ++ + advanceTime->setObjectName(QStringLiteral("kcfg_SlidesAdvanceTime")); + + QHBoxLayout *advanceAutomaticallyLayout = new QHBoxLayout(); +diff --git a/part/formwidgets.cpp b/part/formwidgets.cpp +index c2291e4c6..cc737ea9c 100644 +--- a/part/formwidgets.cpp ++++ b/part/formwidgets.cpp +@@ -614,14 +614,16 @@ TextAreaEdit::TextAreaEdit(Okular::FormFieldText *text, PageView *pageView) + , FormWidgetIface(this, text) + { + setAcceptRichText(text->isRichText()); ++#ifdef HAVE_TEXTWIDGETS + setCheckSpellingEnabled(text->canBeSpellChecked()); ++ connect(this, &KTextEdit::aboutToShowContextMenu, this, &TextAreaEdit::slotUpdateUndoAndRedoInContextMenu); ++#endif + setAlignment(text->textAlignment()); + setPlainText(text->text()); + setUndoRedoEnabled(false); + + connect(this, &QTextEdit::textChanged, this, &TextAreaEdit::slotChanged); + connect(this, &QTextEdit::cursorPositionChanged, this, &TextAreaEdit::slotChanged); +- connect(this, &KTextEdit::aboutToShowContextMenu, this, &TextAreaEdit::slotUpdateUndoAndRedoInContextMenu); + m_prevCursorPos = textCursor().position(); + m_prevAnchorPos = textCursor().anchor(); + m_editing = false; +diff --git a/part/formwidgets.h b/part/formwidgets.h +index ea0d2fef8..e59276593 100644 +--- a/part/formwidgets.h ++++ b/part/formwidgets.h +@@ -13,7 +13,12 @@ + #include "core/area.h" + #include "core/form.h" + ++#ifdef HAVE_TEXTWIDGETS + #include ++#else ++#include ++#define KTextEdit QTextEdit ++#endif + #include + #include + #include +diff --git a/part/pageview.cpp b/part/pageview.cpp +index 8e0206ef1..20119da5e 100644 +--- a/part/pageview.cpp ++++ b/part/pageview.cpp +@@ -83,12 +83,14 @@ + #include "tts.h" + #endif + #include "core/action.h" +-#include "core/audioplayer.h" + #include "core/document_p.h" + #include "core/form.h" + #include "core/generator.h" + #include "core/misc.h" ++#ifdef HAVE_PHONON ++#include "core/audioplayer.h" + #include "core/movie.h" ++#endif + #include "core/page.h" + #include "core/page_p.h" + #include "core/sourcereference.h" +@@ -1128,6 +1130,7 @@ void PageView::selectAll() + + void PageView::createAnnotationsVideoWidgets(PageViewItem *item, const QList &annotations) + { ++#ifdef HAVE_PHONON + qDeleteAll(item->videoWidgets()); + item->videoWidgets().clear(); + +@@ -1152,6 +1155,7 @@ void PageView::createAnnotationsVideoWidgets(PageViewItem *item, const QList &pageSet, int setupFlag + + // For the video widgets we don't really care about reusing them since they don't contain much info so just + // create them again ++#ifdef HAVE_PHONON + createAnnotationsVideoWidgets(item, pageSet[i]->annotations()); + const QHash videoWidgets = item->videoWidgets(); + for (VideoWidget *vw : videoWidgets) { +@@ -1219,6 +1224,7 @@ void PageView::notifySetup(const QVector &pageSet, int setupFlag + vw->show(); + vw->hide(); + } ++#endif + } + } + +@@ -1576,12 +1582,14 @@ void PageView::notifyCurrentPageChanged(int previous, int current) + { + if (previous != -1) { + PageViewItem *item = d->items.at(previous); ++#ifdef HAVE_PHONON + if (item) { + const QHash videoWidgetsList = item->videoWidgets(); + for (VideoWidget *videoWidget : videoWidgetsList) { + videoWidget->pageLeft(); + } + } ++#endif + + // On close, run the widget scripts, needed for running animated PDF + const Okular::Page *page = d->document->page(previous); +@@ -1596,12 +1604,14 @@ void PageView::notifyCurrentPageChanged(int previous, int current) + + if (current != -1) { + PageViewItem *item = d->items.at(current); ++#ifdef HAVE_PHONON + if (item) { + const QHash videoWidgetsList = item->videoWidgets(); + for (VideoWidget *videoWidget : videoWidgetsList) { + videoWidget->pageEntered(); + } + } ++#endif + + // update zoom text and factor if in a ZoomFit/* zoom mode + if (d->zoomMode != ZoomFixed) { +@@ -4360,6 +4370,7 @@ QMenu *PageView::createProcessLinkMenu(PageViewItem *item, const QPoint eventPos + // creating the menu and its actions + QAction *processLink = menu->addAction(i18n("Follow This Link")); + processLink->setObjectName(QStringLiteral("ProcessLinkAction")); ++#ifdef HAVE_PHONON + if (link->actionType() == Okular::Action::Sound) { + processLink->setText(i18n("Play this Sound")); + if (Okular::AudioPlayer::instance()->state() == Okular::AudioPlayer::PlayingState) { +@@ -4367,6 +4378,7 @@ QMenu *PageView::createProcessLinkMenu(PageViewItem *item, const QPoint eventPos + connect(actStopSound, &QAction::triggered, []() { Okular::AudioPlayer::instance()->stopPlaybacks(); }); + } + } ++#endif + + if (dynamic_cast(link)) { + QAction *actCopyLinkLocation = menu->addAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18n("Copy Link Address")); +@@ -4667,6 +4679,8 @@ void PageView::slotRequestVisiblePixmaps(int newValue) + Okular::NormalizedRect r = fwi->rect(); + fwi->moveTo(qRound(i->uncroppedGeometry().left() + i->uncroppedWidth() * r.left) + 1 - viewportRect.left(), qRound(i->uncroppedGeometry().top() + i->uncroppedHeight() * r.top) + 1 - viewportRect.top()); + } ++ ++#ifdef HAVE_PHONON + const QHash videoWidgets = i->videoWidgets(); + for (VideoWidget *vw : videoWidgets) { + const Okular::NormalizedRect r = vw->normGeometry(); +@@ -4677,7 +4691,7 @@ void PageView::slotRequestVisiblePixmaps(int newValue) + vw->pageLeft(); + } + } +- ++#endif + if (!i->isVisible()) { + continue; + } +@@ -5307,6 +5321,7 @@ void PageView::externalKeyPressEvent(QKeyEvent *e) + + void PageView::slotProcessMovieAction(const Okular::MovieAction *action) + { ++#ifdef HAVE_PHONON + const Okular::MovieAnnotation *movieAnnotation = action->annotation(); + if (!movieAnnotation) { + return; +@@ -5346,10 +5361,12 @@ void PageView::slotProcessMovieAction(const Okular::MovieAction *action) + vw->play(); + break; + }; ++#endif + } + + void PageView::slotProcessRenditionAction(const Okular::RenditionAction *action) + { ++#ifdef HAVE_PHONON + Okular::Movie *movie = action->movie(); + if (!movie) { + return; +@@ -5390,6 +5407,7 @@ void PageView::slotProcessRenditionAction(const Okular::RenditionAction *action) + default: + return; + }; ++#endif + } + + void PageView::slotFitWindowToPage() +diff --git a/part/pageviewmouseannotation.cpp b/part/pageviewmouseannotation.cpp +index 1e2edaaff..73649ff87 100644 +--- a/part/pageviewmouseannotation.cpp ++++ b/part/pageviewmouseannotation.cpp +@@ -647,6 +647,7 @@ void MouseAnnotation::processAction(const AnnotationDescription &ad) + Okular::Annotation *ann = ad.annotation; + PageViewItem *pageItem = ad.pageViewItem; + ++#ifdef HAVE_PHONON + if (ann->subType() == Okular::Annotation::AMovie) { + VideoWidget *vw = pageItem->videoWidgets().value(static_cast(ann)->movie()); + vw->show(); +@@ -655,7 +656,9 @@ void MouseAnnotation::processAction(const AnnotationDescription &ad) + VideoWidget *vw = pageItem->videoWidgets().value(static_cast(ann)->movie()); + vw->show(); + vw->play(); +- } else if (ann->subType() == Okular::Annotation::AScreen) { ++ } else ++#endif ++ if (ann->subType() == Okular::Annotation::AScreen) { + m_document->processAction(static_cast(ann)->action()); + } else if (ann->subType() == Okular::Annotation::AFileAttachment) { + const Okular::FileAttachmentAnnotation *fileAttachAnnot = static_cast(ann); +diff --git a/part/pageviewutils.cpp b/part/pageviewutils.cpp +index 3da2fb52c..d42e74cfd 100644 +--- a/part/pageviewutils.cpp ++++ b/part/pageviewutils.cpp +@@ -14,6 +14,8 @@ + #include + #include + #include ++#include ++#include + + // local includes + #include "core/form.h" +@@ -128,10 +130,12 @@ void PageViewItem::setWHZC(int w, int h, double z, const Okular::NormalizedRect + Okular::NormalizedRect r = fwi->rect(); + fwi->setWidthHeight(qRound(fabs(r.right - r.left) * m_uncroppedGeometry.width()), qRound(fabs(r.bottom - r.top) * m_uncroppedGeometry.height())); + } ++#ifdef HAVE_PHONON + for (VideoWidget *vw : qAsConst(m_videoWidgets)) { + const Okular::NormalizedRect r = vw->normGeometry(); + vw->resize(qRound(fabs(r.right - r.left) * m_uncroppedGeometry.width()), qRound(fabs(r.bottom - r.top) * m_uncroppedGeometry.height())); + } ++#endif + } + + void PageViewItem::moveTo(int x, int y) +@@ -146,10 +150,12 @@ void PageViewItem::moveTo(int x, int y) + Okular::NormalizedRect r = (*it)->rect(); + (*it)->moveTo(qRound(x + m_uncroppedGeometry.width() * r.left) + 1, qRound(y + m_uncroppedGeometry.height() * r.top) + 1); + } ++#ifdef HAVE_PHONON + for (VideoWidget *vw : qAsConst(m_videoWidgets)) { + const Okular::NormalizedRect r = vw->normGeometry(); + vw->move(qRound(x + m_uncroppedGeometry.width() * r.left) + 1, qRound(y + m_uncroppedGeometry.height() * r.top) + 1); + } ++#endif + } + + void PageViewItem::setVisible(bool visible) +diff --git a/part/part.cpp b/part/part.cpp +index c6301fd73..493c4b8f7 100644 +--- a/part/part.cpp ++++ b/part/part.cpp +@@ -34,10 +34,13 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include + #include ++#include + #include + #include + #include +@@ -123,6 +126,11 @@ + #include + #include + ++#ifdef Q_OS_WIN ++#include ++#include ++#endif ++ + #ifdef OKULAR_KEEP_FILE_OPEN + class FileKeeper + { +@@ -321,6 +329,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &args) + + setupConfigSkeleton(args, componentName()); + ++#ifdef HAVE_DBUS + numberOfParts++; + if (numberOfParts == 1) { + m_registerDbusName = QStringLiteral("/okular"); +@@ -328,6 +337,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &args) + m_registerDbusName = QStringLiteral("/okular%1").arg(numberOfParts); + } + QDBusConnection::sessionBus().registerObject(m_registerDbusName, this, QDBusConnection::ExportScriptableSlots); ++#endif + + // connect the started signal to tell the job the mimetypes we like, + // and get some more information from it +@@ -984,7 +994,9 @@ void Part::setupActions() + + Part::~Part() + { ++#ifdef HAVE_DBUS + QDBusConnection::sessionBus().unregisterObject(m_registerDbusName); ++#endif + + m_document->removeObserver(this); + +@@ -3848,7 +3860,11 @@ void Part::setEditorCmd(const QString &editorCmd) + + void Part::slotOpenContainingFolder() + { ++#ifdef Q_OS_WIN ++ ShellExecuteW(NULL, L"explore", (wchar_t *)localFilePath().utf16(), NULL, NULL, SW_SHOWDEFAULT); ++#else + KIO::highlightInFileManager({QUrl(localFilePath())}); ++#endif + } + + } // namespace Okular +diff --git a/part/part.h b/part/part.h +index c880d4747..f463d1ada 100644 +--- a/part/part.h ++++ b/part/part.h +@@ -20,7 +20,11 @@ + #include + #include + #include ++#ifdef HAVE_DBUS + #include // krazy:exclude=includes ++#else ++#define Q_NOREPLY ++#endif + + #include + #include +diff --git a/part/presentationwidget.cpp b/part/presentationwidget.cpp +index bd5192c53..81e069195 100644 +--- a/part/presentationwidget.cpp ++++ b/part/presentationwidget.cpp +@@ -7,9 +7,6 @@ + #include "presentationwidget.h" + + // qt/kde includes +-#include +-#include +-#include + #include + + #include +@@ -39,6 +36,9 @@ + #include + + #ifdef Q_OS_LINUX ++#include ++#include ++#include + #include + #include // For ::close() for sleep inhibition + #endif +@@ -51,10 +51,13 @@ + #include "annotationtools.h" + #include "core/action.h" + #include "core/annotations.h" ++#ifdef HAVE_PHONON + #include "core/audioplayer.h" ++#include "core/movie.h" ++#include "videowidget.h" ++#endif + #include "core/document.h" + #include "core/generator.h" +-#include "core/movie.h" + #include "core/page.h" + #include "drawingtoolactions.h" + #include "gui/debug_ui.h" +@@ -64,7 +67,6 @@ + #include "presentationsearchbar.h" + #include "settings.h" + #include "settings_core.h" +-#include "videowidget.h" + + // comment this to disable the top-right progress indicator + #define ENABLE_PROGRESS_OVERLAY +@@ -76,7 +78,9 @@ struct PresentationFrame { + + ~PresentationFrame() + { ++#ifdef HAVE_PHONON + qDeleteAll(videoWidgets); ++#endif + } + + PresentationFrame(const PresentationFrame &) = delete; +@@ -94,17 +98,21 @@ struct PresentationFrame { + } + geometry.setRect((width - pageWidth) / 2, (height - pageHeight) / 2, pageWidth, pageHeight); + ++#ifdef HAVE_PHONON + for (VideoWidget *vw : qAsConst(videoWidgets)) { + const Okular::NormalizedRect r = vw->normGeometry(); + QRect vwgeom = r.geometry(geometry.width(), geometry.height()); + vw->resize(vwgeom.size()); + vw->move(geometry.topLeft() + vwgeom.topLeft()); + } ++#endif + } + + const Okular::Page *page; + QRect geometry; ++#ifdef HAVE_PHONON + QHash videoWidgets; ++#endif + std::vector drawings; + }; + +@@ -256,8 +264,10 @@ PresentationWidget::PresentationWidget(QWidget *parent, Okular::Document *doc, D + connect(m_nextPageTimer, &QTimer::timeout, this, &PresentationWidget::slotNextPage); + setPlayPauseIcon(); + ++#ifdef HAVE_PHONON + connect(m_document, &Okular::Document::processMovieAction, this, &PresentationWidget::slotProcessMovieAction); + connect(m_document, &Okular::Document::processRenditionAction, this, &PresentationWidget::slotProcessRenditionAction); ++#endif + + // handle cursor appearance as specified in configuration + if (Okular::Settings::slidesCursor() == Okular::Settings::EnumSlidesCursor::HiddenDelay) { +@@ -286,8 +296,10 @@ PresentationWidget::~PresentationWidget() + // allow power management saver again + allowPowerManagement(); + ++#ifdef HAVE_PHONON + // stop the audio playbacks + Okular::AudioPlayer::instance()->stopPlaybacks(); ++#endif + + // remove our highlights + if (m_searchBar) { +@@ -331,6 +343,7 @@ void PresentationWidget::notifySetup(const QVector &pageSet, int + for (const Okular::Page *page : pageSet) { + PresentationFrame *frame = new PresentationFrame(); + frame->page = page; ++#ifdef HAVE_PHONON + const QList annotations = page->annotations(); + for (Okular::Annotation *a : annotations) { + if (a->subType() == Okular::Annotation::AMovie) { +@@ -355,6 +368,7 @@ void PresentationWidget::notifySetup(const QVector &pageSet, int + } + } + } ++#endif + frame->recalcGeometry(m_width, m_height, screenRatio); + // add the frame to the vector + m_frames.push_back(frame); +@@ -401,13 +415,14 @@ void PresentationWidget::notifyCurrentPageChanged(int previousPage, int currentP + { + if (previousPage != -1) { + // stop video playback ++#ifdef HAVE_PHONON + for (VideoWidget *vw : qAsConst(m_frames[previousPage]->videoWidgets)) { + vw->stop(); + vw->pageLeft(); + } +- + // stop audio playback, if any + Okular::AudioPlayer::instance()->stopPlaybacks(); ++#endif + + // perform the page closing action, if any + if (m_document->page(previousPage)->pageAction(Okular::Page::Closing)) { +@@ -474,10 +489,12 @@ void PresentationWidget::notifyCurrentPageChanged(int previousPage, int currentP + } + } + ++#ifdef HAVE_PHONON + // start autoplay video playback + for (VideoWidget *vw : qAsConst(m_frames[m_frameIndex]->videoWidgets)) { + vw->pageEntered(); + } ++#endif + } + } + +@@ -673,6 +690,7 @@ void PresentationWidget::mousePressEvent(QMouseEvent *e) + + const Okular::Annotation *annotation = getAnnotation(e->x(), e->y()); + if (annotation) { ++#ifdef HAVE_PHONON + if (annotation->subType() == Okular::Annotation::AMovie) { + const Okular::MovieAnnotation *movieAnnotation = static_cast(annotation); + +@@ -687,7 +705,9 @@ void PresentationWidget::mousePressEvent(QMouseEvent *e) + vw->show(); + vw->play(); + return; +- } else if (annotation->subType() == Okular::Annotation::AScreen) { ++ } ++#endif ++ if (annotation->subType() == Okular::Annotation::AScreen) { + m_document->processAction(static_cast(annotation)->action()); + return; + } +@@ -2258,6 +2278,7 @@ void PresentationWidget::initTransition(const Okular::PageTransition *transition + + void PresentationWidget::slotProcessMovieAction(const Okular::MovieAction *action) + { ++#ifdef HAVE_PHONON + const Okular::MovieAnnotation *movieAnnotation = action->annotation(); + if (!movieAnnotation) { + return; +@@ -2290,10 +2311,12 @@ void PresentationWidget::slotProcessMovieAction(const Okular::MovieAction *actio + vw->play(); + break; + }; ++#endif + } + + void PresentationWidget::slotProcessRenditionAction(const Okular::RenditionAction *action) + { ++#ifdef HAVE_PHONON + Okular::Movie *movie = action->movie(); + if (!movie) { + return; +@@ -2327,6 +2350,7 @@ void PresentationWidget::slotProcessRenditionAction(const Okular::RenditionActio + default: + return; + }; ++#endif + } + + void PresentationWidget::slotTogglePlayPause() +diff --git a/shell/CMakeLists.txt b/shell/CMakeLists.txt +index 597f0b74c..7b83323e3 100644 +--- a/shell/CMakeLists.txt ++++ b/shell/CMakeLists.txt +@@ -23,7 +23,12 @@ ecm_add_app_icon(okular_SRCS ICONS ${ICONS_SRCS}) + + add_executable(okular ${okular_SRCS}) + +-target_link_libraries(okular KF5::I18n KF5::Parts KF5::WindowSystem KF5::Crash KF5::IconThemes Qt5::DBus) ++target_link_libraries(okular KF5::I18n KF5::Parts KF5::WindowSystem KF5::Crash KF5::IconThemes) ++ ++if(TARGET Qt5::DBus) ++ target_link_libraries(okular Qt5::DBus) ++endif() ++ + if(TARGET KF5::Activities) + target_compile_definitions(okular PUBLIC -DWITH_KACTIVITIES=1) + +diff --git a/shell/main.cpp b/shell/main.cpp +index 35f3aea65..dd08abeaf 100644 +--- a/shell/main.cpp ++++ b/shell/main.cpp +@@ -21,7 +21,6 @@ + #include + #include + #include +-#include + #include + #include + +diff --git a/shell/okular_main.cpp b/shell/okular_main.cpp +index c23f46356..78ed04936 100644 +--- a/shell/okular_main.cpp ++++ b/shell/okular_main.cpp +@@ -16,8 +16,11 @@ + #include + #include + #include ++#ifdef HAVE_DBUS + #include ++#endif + #include ++#include + + #include "config-okular.h" + #if HAVE_X11 +@@ -47,6 +50,7 @@ static bool attachUniqueInstance(const QStringList &paths, const QString &serial + return false; + } + ++#ifdef HAVE_DBUS + QDBusInterface iface(QStringLiteral("org.kde.okular"), QStringLiteral("/okularshell"), QStringLiteral("org.kde.okular")); + if (!iface.isValid()) { + return false; +@@ -64,6 +68,7 @@ static bool attachUniqueInstance(const QStringList &paths, const QString &serial + if (!ShellUtils::noRaise(serializedOptions)) { + iface.call(QStringLiteral("tryRaise"), startupId()); + } ++#endif + + return true; + } +@@ -81,6 +86,7 @@ static bool attachExistingInstance(const QStringList &paths, const QString &seri + return false; + } + ++#ifdef HAVE_DBUS + // If DBus isn't running, we can't attach to an existing instance. + auto *sessionInterface = QDBusConnection::sessionBus().interface(); + if (!sessionInterface) { +@@ -113,6 +119,7 @@ static bool attachExistingInstance(const QStringList &paths, const QString &seri + if (!bestService) { + return false; + } ++#endif + + for (const QString &arg : paths) { + // Copy stdin to temporary file which can be opened by the existing +@@ -142,11 +149,13 @@ static bool attachExistingInstance(const QStringList &paths, const QString &seri + path = ShellUtils::urlFromArg(arg, ShellUtils::qfileExistFunc(), page).url(); + } + ++#ifdef HAVE_DBUS + // Returns false if it can't fit another document + const QDBusReply reply = bestService->call(QStringLiteral("openDocument"), path, serializedOptions); + if (!reply.isValid() || !reply.value()) { + return false; + } ++#endif + } + + if (!ShellUtils::editorCmd(serializedOptions).isEmpty()) { +@@ -156,7 +165,9 @@ static bool attachExistingInstance(const QStringList &paths, const QString &seri + exit(1); + } + ++#ifdef HAVE_DBUS + bestService->call(QStringLiteral("tryRaise"), startupId()); ++#endif + + return true; + } +diff --git a/shell/shell.cpp b/shell/shell.cpp +index 3685f6116..f72429caf 100644 +--- a/shell/shell.cpp ++++ b/shell/shell.cpp +@@ -36,11 +36,15 @@ + #include + #include + #include ++#ifdef HAVE_DBUS + #include ++#endif + #include + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -237,6 +241,7 @@ Shell::Shell(const QString &serializedOptions) + readSettings(); + + m_unique = ShellUtils::unique(serializedOptions); ++#ifdef HAVE_DBUS + if (m_unique) { + m_unique = QDBusConnection::sessionBus().registerService(QStringLiteral("org.kde.okular")); + if (!m_unique) { +@@ -258,7 +263,7 @@ Shell::Shell(const QString &serializedOptions) + } + + QDBusConnection::sessionBus().registerObject(QStringLiteral("/okularshell"), this, QDBusConnection::ExportScriptableSlots); +- ++#endif + // Make sure that the welcome scren is visible on startup. + showWelcomeScreen(); + } else { +@@ -333,9 +338,11 @@ Shell::~Shell() + } + m_tabs.clear(); + } ++#ifdef HAVE_DBUS + if (m_unique) { + QDBusConnection::sessionBus().unregisterService(QStringLiteral("org.kde.okular")); + } ++#endif + + delete m_tabWidget; + } +diff --git a/shell/shell.h b/shell/shell.h +index facffe33b..a864cb72e 100644 +--- a/shell/shell.h ++++ b/shell/shell.h +@@ -20,7 +20,11 @@ + #include + + #include +-#include // krazy:exclude=includes ++#ifdef HAVE_DBUS ++#include // krazy:exclude=include ++#else ++#define Q_NOREPLY ++#endif + + #include "welcomescreen.h" + +diff --git a/shell/welcomescreen.cpp b/shell/welcomescreen.cpp +index 128abd7a2..ead12eb7c 100644 +--- a/shell/welcomescreen.cpp ++++ b/shell/welcomescreen.cpp +@@ -21,6 +21,11 @@ + + #include "recentitemsmodel.h" + ++#ifdef Q_OS_WIN ++#include ++#include ++#endif ++ + class RecentsListItemDelegate : public QStyledItemDelegate + { + Q_OBJECT +@@ -78,7 +83,11 @@ public: + showDirectoryAction->setIcon(QIcon::fromTheme(QStringLiteral("document-open-folder"))); + connect(showDirectoryAction, &QAction::triggered, this, [item]() { + if (item->url.isLocalFile()) { ++#ifdef Q_OS_WIN ++ ShellExecuteW(NULL, L"explore", (wchar_t *)item->url.toLocalFile().utf16(), NULL, NULL, SW_SHOWDEFAULT); ++#else + KIO::highlightInFileManager({item->url}); ++#endif + } + }); + menu.addAction(showDirectoryAction); +-- +2.40.0 diff --git a/src/Makefile.am b/src/Makefile.am index 21675c2a..418f5ae8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,636 +1,655 @@ # 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 . EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi \ config.site config.nsi.in \ libiconv.def libintl.def loreley.mid \ gpg4win-splash.wav exdll.h g4wihelp.c desktopshellrun.cpp \ g4wihelp.nsi slideshow.cpp gpgwrap.c \ inst-sections.nsi installer.nsi installer-finish.nsi \ zlib.pc sha1sum.c \ potomo Memento.nsh \ inst-gpg4win.nsi uninst-gpg4win.nsi \ inst-gettext.nsi uninst-gettext.nsi \ inst-gnupg-w32.nsi uninst-gnupg-w32.nsi \ inst-gpgme.nsi uninst-gpgme.nsi \ inst-paperkey.nsi uninst-paperkey.nsi \ inst-gpgol.nsi uninst-gpgol.nsi \ inst-gpgex.nsi uninst-gpgex.nsi \ inst-libassuan.nsi uninst-libassuan.nsi \ inst-libgpg-error.nsi uninst-libgpg-error.nsi \ inst-libiconv.nsi uninst-libiconv.nsi \ inst-compendium.nsi uninst-compendium.nsi \ inst-man_advanced_de.nsi uninst-man_advanced_de.nsi \ inst-man_advanced_en.nsi uninst-man_advanced_en.nsi \ inst-man_novice_de.nsi uninst-man_novice_de.nsi \ inst-man_novice_en.nsi uninst-man_novice_en.nsi \ inst-pinentry.nsi uninst-pinentry.nsi \ inst-pkgconfig.nsi uninst-pkgconfig.nsi \ inst-zlib.nsi uninst-zlib.nsi \ inst-kconfig.nsi uninst-kconfig.nsi \ inst-kleopatra.nsi uninst-kleopatra.nsi \ inst-bzip2.nsi uninst-bzip2.nsi \ inst-qtbase.nsi uninst-qtbase.nsi \ inst-ki18n.nsi uninst-ki18n.nsi \ inst-kio.nsi uninst-kio.nsi \ inst-kbookmarks.nsi uninst-kbookmarks.nsi \ inst-kservice.nsi uninst-kservice.nsi \ inst-solid.nsi uninst-solid.nsi \ inst-kjobwidgets.nsi uninst-kjobwidgets.nsi \ inst-kwidgetsaddons.nsi uninst-kwidgetsaddons.nsi \ inst-kcompletion.nsi uninst-kcompletion.nsi \ inst-kwindowsystem.nsi uninst-kwindowsystem.nsi \ inst-libkleo.nsi uninst-libkleo.nsi \ inst-kcoreaddons.nsi uninst-kcoreaddons.nsi \ inst-kcodecs.nsi uninst-kcodecs.nsi \ inst-kconfigwidgets.nsi uninst-kconfigwidgets.nsi \ inst-kxmlgui.nsi uninst-kxmlgui.nsi \ inst-kiconthemes.nsi uninst-kiconthemes.nsi \ inst-breeze-icons.nsi uninst-breeze-icons.nsi \ inst-karchive.nsi uninst-karchive.nsi \ inst-kcrash.nsi uninst-kcrash.nsi \ inst-kitemviews.nsi uninst-kitemviews.nsi \ inst-kitemmodels.nsi uninst-kitemmodels.nsi \ inst-kguiaddons.nsi uninst-kguiaddons.nsi \ inst-kmime.nsi uninst-kmime.nsi \ inst-kde-l10n.nsi uninst-kde-l10n.nsi \ inst-qtsvg.nsi uninst-qtsvg.nsi \ inst-qttools.nsi uninst-qttools.nsi \ inst-qttranslations.nsi uninst-qttranslations.nsi \ inst-qtwinextras.nsi uninst-qtwinextras.nsi \ inst-scute.nsi uninst-scute.nsi \ inst-extra-cmake-modules.nsi uninst-extra-cmake-modules.nsi \ inst-gpg4win-tools.nsi uninst-gpg4win-tools.nsi \ inst-gpgme-browser.nsi \ + inst-poppler.nsi uninst-poppler.nsi \ + inst-freetype.nsi uninst-freetype.nsi \ + inst-threadweaver.nsi uninst-threadweaver.nsi \ + inst-kparts.nsi uninst-kparts.nsi \ + inst-okular.nsi uninst-okular.nsi \ inst-final.nsi 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 \ kdeglobals qtlogging.ini \ make-msi.pl make-msi.guids \ build-gpg4win.sh \ WixUI_Gpg4win.wxs icons/shield.ico if BUILD_APPIMAGE appimage = appimage else appimage = endif SUBDIRS = ${appimage} # These paths must be absolute, as we switch directories pretty often. root := $(shell pwd)/playground stampdir := $(shell pwd)/stamps gpg4win_readme_ll = en de ar es fr ru pt zh README_files = $(addsuffix .txt,$(addprefix README.,$(gpg4win_readme_ll))) 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 $(README_files) \ $(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 \ pinentry libassuan ntbtls pcre \ paperkey regex libiconv gettext scute gpg4win_qtpkgs = qtbase qttools qtwinextras qtsvg qttranslations # Source packages following the KDE pattern gpg4win_kdepkgs = 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 + kjobwidgets poppler okular freetype threadweaver \ + kparts # Supported source packages to build in an additional architecture gpg4win_expkgs = libgpg-error libassuan libiconv gettext gpgex gpgol \ gpgme # 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 # 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 # We would like to use --with-libiconv-prefix and # --with-libintl-prefix, but these don't work with the cheesy # non-"libfoo.la" versions of iconv and gettext that we are using. #gpg4win_pkg_libgpg_error_configure = \ # --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir) gpg4win_pkg_libgpg_error_configure = --silent \ CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib \ --enable-static --enable-install-gpg-error-config gpg4win_pkg_libgpg_error_ex_configure = --silent \ --enable-static --enable-install-gpg-error-config # 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 = --silent --enable-static gpg4win_pkg_libassuan_ex_configure = --with-gpg-error-prefix=$(ex_idir) --silent --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\" # We would like to use --with-libiconv-prefix and # --with-libintl-prefix, but these don't work with the cheesy # non-"libfoo.la" versions of iconv and gettext that we are using. gpg4win_pkg_pinentry_configure = \ --enable-pinentry-qt \ $(pinentry_enable_disable) \ --disable-pinentry-fltk \ --disable-pinentry-curses \ --disable-fallback-curses \ CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib # --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir) # The LDFLAGS is needed for -lintl for glib. The QT4 variables work # around the lack of cross compilation support in qt-dev. gpg4win_pkg_gpgme_configure = --silent \ --with-gpg-error-prefix=$(idir) --enable-static \ LDFLAGS=-L$(idir)/lib \ --enable-languages=qt,cpp \ --disable-gpg-test \ --disable-gpgsm-test gpg4win_pkg_gpgme_ex_configure = --silent \ --with-gpg-error-prefix=$(ex_idir) --enable-static \ --with-libassuan-prefix=$(ex_idir) \ LDFLAGS=-L$(ex_idir)/lib \ --enable-languages=cpp \ --disable-gpg-test \ --disable-gpgsm-test gpg4win_pkg_gpgol_configure = --silent \ --with-gpgme-prefix=$(idir) --with-gpg-error-prefix=$(idir) \ --with-libassuan-prefix=$(idir) gpg4win_pkg_gpgol_ex_configure = --silent \ --with-gpgme-prefix=$(ex_idir) --with-gpg-error-prefix=$(ex_idir) \ --with-libassuan-prefix=$(ex_idir) gpg4win_pkg_gpgex_configure = --silent \ --with-gpg-error-prefix=$(idir) \ --with-libassuan-prefix=$(idir) gpg4win_pkg_gpgex_ex_configure = --silent \ --with-gpg-error-prefix=$(ex_idir) \ --with-libassuan-prefix=$(ex_idir) gpg4win_pkg_paperkey_configure = --silent gpg4win_pkg_ki18n_configure = -DBUILD_WITH_QML=OFF gpg4win_pkg_kconfig_configure = -DKCONFIG_USE_DBUS=OFF -DKCONFIG_USE_QML=OFF gpg4win_pkg_qtbase_configure = ../$$$${pkg_version}/configure -opensource \ -confirm-license \ -xplatform win32-g++ \ -device-option CROSS_COMPILE=$(host)- \ -device-option PKG_CONFIG='$(host)-pkg-config' \ -no-use-gold-linker \ -release \ -shared \ -prefix $$$${pkgidir} \ -I '$(idir)/include' \ -L '$(idir)/lib' \ -no-icu \ -opengl desktop \ -no-glib \ -accessibility \ -nomake examples \ -nomake tests \ -no-sql-mysql \ -no-sql-sqlite \ -no-sql-odbc \ -no-sql-psql \ -no-sql-tds \ -qt-zlib \ -qt-libpng \ -qt-libjpeg \ -qt-freetype \ -qt-pcre \ -no-openssl \ -no-dbus \ -v # qtbase # invoke qmake with removed debug options as a workaround for # https://bugreports.qt-project.org/browse/QTBUG-30898 gpg4win_pkg_qtbase_make_args = \ QMAKE='$$$${pkgbdir}/bin/qmake' -# Qmake still writes debug names in pkgconfig files. +# Make install step. Somehow qtprintsupport is now installed automatically. define gpg4win_pkg_qtbase_post_install (cd $$$${pkgbdir}; \ + make install; \ + cd $$$${pkgbdir}/src/printsupport; \ make install;) endef gpg4win_pkg_qttools_configure = \ "$(idir)/bin/qmake" ../$$$${pkg_version} define gpg4win_pkg_qttools_post_install (cd $$$${pkgbdir}; \ mkdir -p $$$${pkgidir}; \ cp -r bin lib include $$$${pkgidir}) endef # Qmake does not support setting the installation path. # really https://bugreports.qt.io/browse/QTBUG-12341 gpg4win_pkg_qtwinextras_configure = \ "$(idir)/bin/qmake" ../$$$${pkg_version} define gpg4win_pkg_qtwinextras_post_install (cd $$$${pkgbdir}; \ mkdir -p $$$${pkgidir}/bin; \ cp -r lib include $$$${pkgidir}; \ mv $$$${pkgidir}/lib/*.dll $$$${pkgidir}/bin;) endef gpg4win_pkg_qtsvg_configure = \ "$(idir)/bin/qmake" ../$$$${pkg_version} # XXX Adding the qtconf after qtsvg is a weird hack # because somhow (yay qmake) zlib is not linked if # the qt conf exists before that. The qt conf is # needed for qttranslations to find the correct path # of the translation tools. define gpg4win_pkg_qtsvg_post_install (cd $$$${pkgbdir}; \ mkdir -p $$$${pkgidir}; \ cp -r lib include plugins $$$${pkgidir}; \ mkdir -p $$$${pkgidir}/bin; \ mv $$$${pkgidir}/lib/*.dll $$$${pkgidir}/bin; \ echo "[Paths]" > $$$${pkgidir}/bin/qt.conf; \ echo "Prefix = .." >> $$$${pkgidir}/bin/qt.conf) endef gpg4win_pkg_qttranslations_configure = \ "$(idir)/bin/qmake" ../$$$${pkg_version} define gpg4win_pkg_qttranslations_post_install ( rm -fR $$$${pkgidir}/qttranslations; \ mkdir -p $$$${pkgidir}; \ cp -r $$$${pkgbdir}/translations $$$${pkgidir}/qttranslations;) 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_DISTRIBUTION_TEXT="$(DISTRIBUTION_TEXT)" gpg4win_pkg_breeze_icons_configure = \ -DBINARY_ICONS_RESOURCE=OFF gpg4win_pkg_kbookmarks_configure = \ -DANDROID=ON gpg4win_pkg_kservice_configure = \ -DANDROID=ON gpg4win_pkg_kjobwidgets_configure = \ -DANDROID=ON +gpg4win_pkg_poppler_configure = \ + -DENABLE_DCTDECODER=none \ + -DENABLE_LIBOPENJPEG=none + +gpg4win_pkg_okular_configure = \ + -DFORCE_NOT_REQUIRED_DEPENDENCIES="KF5Purpose\;KF5TextWidgets\;Qt5TextToSpeech\;LibZip\;KF5Wallet\;KF5DocTools\;KF5JS\;Phonon4Qt5\;TIFF\;JPEG\;LibSpectre\;KF5KExiv2\;CHM\;KF5KHtml\;DjVuLibre\;EPub\;QMobipocket\;Discount" + # 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 # Supported binary packages. gpg4win_bpkgs = pkgconfig gnupg-w32 kde-l10n # libiconv needs some special magic to generate a usable import # library. # define gpg4win_pkg_libiconv_post_install # (cp $(srcdir)/libiconv.def $$$${pkgidir}/lib; \ # cd $$$${pkgidir}/lib; \ # $(DLLTOOL) --output-lib libiconv.dll.a --def libiconv.def) # endef # libiconv needs some special magic to generate a usable import # library. Note that we include some internal symbols that are not # actually part of the DLL. They are needed by the AM_GNU_GETTEXT # configure test, but not used otherwise. # define gpg4win_pkg_gettext_post_install # (cp $(srcdir)/libintl.def $$$${pkgidir}/lib; \ # cd $$$${pkgidir}/lib; \ # $(DLLTOOL) --output-lib libintl.dll.a --def libintl.def) # endef # 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 # We don't use khelpcenter in kleopatra so remove the help links and # point to the correct common folder # TODO Needs to be fixed with current doc #define gpg4win_pkg_kleopatra_post_install # (for i in de en ; do \ # (cd $$$${pkgidir}/share/doc/HTML/$$$${i}; \ # perl -pi -e 's/help:\///g' `find . -name \*.html`; \ # perl -pi -e 's@common/@../../common/@g' `find . -name \*.html`); \ # done) #endef #define gpg4win_pkg_libiconv_post_install #(cp $(srcdir)/libiconv.def $$$${pkgidir}/lib; \ #cd $$$${pkgidir}/lib; \ #$(DLLTOOL) --output-lib libiconv.dll.a --def libiconv.def) #endef # Supported internal packages. Internal packages do not require any # special support. Thus, this variable is actually unused, and no # rules are added in gpg4win.mk. gpg4win_ipkgs = man_novice_de man_advanced_de man_novice_en man_advanced_en \ compendium # Default to same version. VSD_VERSION=$(VERSION) # Include installer targets for customized packages -include gnupg-vsd/custom.mk # Signging host/key setup for codesigning -include gnupg-vsd/sign.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 = inst-sections.nsi installer.nsi installer-finish.nsi \ $(addsuffix .nsi,$(addprefix inst-,$(gpg4win_build_list))) \ $(addsuffix .nsi,$(addprefix uninst-,$(gpg4win_build_list))) # Sign additional files as per signing setup # This is a bit of a hack. $(stampdir)/stamp-additional-signedfiles: $(stampdir)/stamp-binaries (set -e;\ cd "$(idir)"; \ for f in $(AUTHENTICODE_FILES); do \ if [ -f "$$f" ]; then \ $(call AUTHENTICODE_sign,"$$f","$$f");\ else \ echo "speedo: WARNING: file '$$f' not available for signing";\ 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) 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: gpg4win.nsi $(common_nsi) $(stampdir)/stamp-final \ g4wihelp.dll gpgwrap.exe \ $(foosum_exe) \ $(README_files) $(HOWTO_files) \ license.blurb versioninfo.txt $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \ -DSRCDIR=$(srcdir) $(EXTRA_MAKENSIS_FLAGS) $(srcdir)/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 installers/gpg4win-src-$(VERSION).exe: gpg4win-src.nsi $(common_nsii) \ $(stampdir)/stamp-final \ $(stampdir)/stamp-dist-self \ license.blurb $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \ -DSRCDIR=$(srcdir) $(EXTRA_MAKENSIS_FLAGS) $(srcdir)/gpg4win-src.nsi && \ mv gpg4win-src-$(VERSION).exe installers/gpg4win-src-$(VERSION).exe 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 -o exdll.o $(srcdir)/exdll.c $(CC) -DUNICODE -static-libgcc -I. -O2 -c -o desktopshellrun.o $(srcdir)/desktopshellrun.cpp $(CC) -DUNICODE -static-libgcc -I. -O2 -c -o slideshow.o $(srcdir)/slideshow.cpp $(CC) -DUNICODE -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 diff --git a/src/config.nsi.in b/src/config.nsi.in index 65744329..8db051bc 100644 --- a/src/config.nsi.in +++ b/src/config.nsi.in @@ -1,240 +1,264 @@ # 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 @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_QTWINEXTRAS@ !define gpg4win_pkg_qtwinextras @gpg4win_pkg_qtwinextras@ !define gpg4win_pkg_qtwinextras_version @gpg4win_pkg_qtwinextras_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_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_KPARTS@ +!define gpg4win_pkg_kparts @gpg4win_pkg_kparts@ +!define gpg4win_pkg_kparts_version @gpg4win_pkg_kparts_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@ # Internal packages. @HAVE_PKG_COMPENDIUM@ # @HAVE_PKG_MAN_NOVICE_EN@ # @HAVE_PKG_MAN_ADVANCED_EN@ diff --git a/src/inst-kio.nsi b/src/inst-freetype.nsi similarity index 83% copy from src/inst-kio.nsi copy to src/inst-freetype.nsi index c9490d6f..c490d111 100644 --- a/src/inst-kio.nsi +++ b/src/inst-freetype.nsi @@ -1,32 +1,31 @@ # Copyright (C) 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, 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}/kio-${gpg4win_pkg_kio_version} +!define prefix ${ipdir}/freetype-${gpg4win_pkg_freetype_version} !ifdef DEBUG -Section "kio" SEC_kio +Section "freetype" SEC_freetype !else -Section "-kio" SEC_kio +Section "-freetype" SEC_freetype !endif SetOutPath "$INSTDIR" SetOutPath "$INSTDIR\bin" - File ${prefix}/bin/libKF5KIOCore.dll - File ${prefix}/bin/libKF5KIOWidgets.dll + File ${prefix}/bin/libfreetype.dll SectionEnd diff --git a/src/inst-kio.nsi b/src/inst-kio.nsi index c9490d6f..215cf5dc 100644 --- a/src/inst-kio.nsi +++ b/src/inst-kio.nsi @@ -1,32 +1,33 @@ # Copyright (C) 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, 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}/kio-${gpg4win_pkg_kio_version} !ifdef DEBUG Section "kio" SEC_kio !else Section "-kio" SEC_kio !endif SetOutPath "$INSTDIR" SetOutPath "$INSTDIR\bin" + File ${prefix}/bin/libKF5KIOGui.dll File ${prefix}/bin/libKF5KIOCore.dll File ${prefix}/bin/libKF5KIOWidgets.dll SectionEnd diff --git a/src/inst-kjobwidgets.nsi b/src/inst-kjobwidgets.nsi index 4fb4fe43..c1fd05d9 100644 --- a/src/inst-kjobwidgets.nsi +++ b/src/inst-kjobwidgets.nsi @@ -1,31 +1,31 @@ # Copyright (C) 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, 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}/kjobwidgets-${gpg4win_pkg_kjobwidgets_version} !ifdef DEBUG Section "kjobwidgets" SEC_kjobwidgets !else Section "-kjobwidgets" SEC_kjobwidgets !endif SetOutPath "$INSTDIR" SetOutPath "$INSTDIR\bin" - File ${prefix}/bin/libKF5KJobWidgets.dll + File ${prefix}/bin/libKF5JobWidgets.dll SectionEnd diff --git a/src/inst-kio.nsi b/src/inst-kparts.nsi similarity index 83% copy from src/inst-kio.nsi copy to src/inst-kparts.nsi index c9490d6f..6c94fe77 100644 --- a/src/inst-kio.nsi +++ b/src/inst-kparts.nsi @@ -1,32 +1,31 @@ # Copyright (C) 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, 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}/kio-${gpg4win_pkg_kio_version} +!define prefix ${ipdir}/kparts-${gpg4win_pkg_kparts_version} !ifdef DEBUG -Section "kio" SEC_kio +Section "kparts" SEC_kparts !else -Section "-kio" SEC_kio +Section "-kparts" SEC_kparts !endif SetOutPath "$INSTDIR" SetOutPath "$INSTDIR\bin" - File ${prefix}/bin/libKF5KIOCore.dll - File ${prefix}/bin/libKF5KIOWidgets.dll + File ${prefix}/bin/libKF5Parts.dll SectionEnd diff --git a/src/inst-okular.nsi b/src/inst-okular.nsi new file mode 100644 index 00000000..a0c5ab1d --- /dev/null +++ b/src/inst-okular.nsi @@ -0,0 +1,85 @@ +# Copyright (C) 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, 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}/okular-${gpg4win_pkg_okular_version} + +# Okular - Opt in for now. +${MementoUnselectedSection} "Okular (experimental)" SEC_okular + + SetOutPath "$INSTDIR\bin" + File ${prefix}/bin/okular.exe + File ${prefix}/bin/libOkular5Core.dll + SetOutPath "$INSTDIR\bin\plugins\okular\generators" +# File ${prefix}/plugins/okular/generators/okularGenerator_fb.dll +# File ${prefix}/plugins/okular/generators/okularGenerator_comicbook.dll +# File ${prefix}/plugins/okular/generators/okularGenerator_kimgio.dll +# File ${prefix}/plugins/okular/generators/okularGenerator_dvi.dll +# File ${prefix}/plugins/okular/generators/okularGenerator_txt.dll +# File ${prefix}/plugins/okular/generators/okularGenerator_fax.dll + File ${prefix}/lib/plugins/okular/generators/okularGenerator_poppler.dll +# File ${prefix}/plugins/okular/generators/okularGenerator_xps.dll + SetOutPath "$INSTDIR\bin\plugins" + File ${prefix}/lib/plugins/okularpart.dll + + + SetOutPath "$INSTDIR\share\icons\hicolor\128x128\apps" + + File ${prefix}/share/icons/hicolor/128x128/apps/okular.png + + SetOutPath "$INSTDIR\share\icons\hicolor\16x16\apps" + + File ${prefix}/share/icons/hicolor/16x16/apps/okular.png + + SetOutPath "$INSTDIR\share\icons\hicolor\22x22\apps" + + File ${prefix}/share/icons/hicolor/22x22/apps/okular.png + + SetOutPath "$INSTDIR\share\icons\hicolor\32x32\apps" + + File ${prefix}/share/icons/hicolor/32x32/apps/okular.png + + SetOutPath "$INSTDIR\share\icons\hicolor\48x48\apps" + + File ${prefix}/share/icons/hicolor/48x48/apps/okular.png + + SetOutPath "$INSTDIR\share\icons\hicolor\64x64\apps" + + File ${prefix}/share/icons/hicolor/64x64/apps/okular.png + + WriteRegStr SHCTX "Software\RegisteredApplications" "Gpg4win.Okular" "SOFTWARE\Gpg4win\Okular\Capabilities" + WriteRegStr SHCTX "Software\Gpg4win\Okular" "" "Okular" + WriteRegStr SHCTX "Software\Gpg4win\Okular\Capabilities\FileAssociations" ".pdf" "gpg4win.AssocFile.Okular.PDF" + WriteRegStr SHCTX "Software\Gpg4win\Okular\Capabilities\MimeAssociations" "application/pdf" "gpg4win.AssocFile.Okular.PDF" + WriteRegStr SHCTX "Software\Gpg4win\kleopatra\Capabilities" "ApplicationDescription" "$(DESC_SEC_okular)" + WriteRegStr SHCTX "Software\Gpg4win\kleopatra\Capabilities" "ApplicationIcon" "$INSTDIR\bin\okular.exe,0" + WriteRegStr SHCTX "Software\Gpg4win\kleopatra\Capabilities" "ApplicationName" "Okular" + + WriteRegExpandStr SHCTX "Software\Classes\gpg4win.AssocFile.Okular.PDF\shell\open\command" "" "$\"$INSTDIR\bin\Okular.exe$\" -- $\"%1$\"" + WriteRegStr SHCTX "Software\Classes\gpg4win.AssocFile.Okular.PDF\CurVer" "" "${VERSION}" + # TODO need to generate a icon from application-pdf + WriteRegStr SHCTX "Software\Classes\gpg4win.AssocFile.Okular.PDF\DefaultIcon" "" "$INSTDIR\share\gpg4win\file-ext.ico" + +${MementoSectionEnd} + +LangString DESC_SEC_okular ${LANG_ENGLISH} \ + "A high security PDF reader to sign and verify pdf documents with GnuPG." + +LangString DESC_Menu_okular ${LANG_ENGLISH} \ + "Run the Okular PDF viewer to sign and verify documents with GnuPG." diff --git a/src/inst-kio.nsi b/src/inst-poppler.nsi similarity index 81% copy from src/inst-kio.nsi copy to src/inst-poppler.nsi index c9490d6f..dde22449 100644 --- a/src/inst-kio.nsi +++ b/src/inst-poppler.nsi @@ -1,32 +1,32 @@ # Copyright (C) 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, 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}/kio-${gpg4win_pkg_kio_version} +!define prefix ${ipdir}/poppler-${gpg4win_pkg_poppler_version} !ifdef DEBUG -Section "kio" SEC_kio +Section "poppler" SEC_poppler !else -Section "-kio" SEC_kio +Section "-poppler" SEC_poppler !endif SetOutPath "$INSTDIR" SetOutPath "$INSTDIR\bin" - File ${prefix}/bin/libKF5KIOCore.dll - File ${prefix}/bin/libKF5KIOWidgets.dll + File ${prefix}/bin/libpoppler-127.dll + File ${prefix}/bin/libpoppler-qt5-1.dll SectionEnd diff --git a/src/inst-sections.nsi b/src/inst-sections.nsi index 7541b0c9..b07b7f81 100644 --- a/src/inst-sections.nsi +++ b/src/inst-sections.nsi @@ -1,877 +1,993 @@ # inst-sections.nsi - Installer for GPG4Win sections. -*- coding: latin-1; -*- # Copyright (C) 2005, 2006, 2007, 2008, 2009, 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 . !include "inst-gpg4win.nsi" # The order of installation must be the same as the build order. You # can use tsort on the info in configure.ac, or just check out # gpg4win_build_list in config.nsi. The order determines also the # order in the packages selection dialog. !ifdef HAVE_PKG_BZIP2 !include "inst-bzip2.nsi" !endif !ifdef HAVE_PKG_LIBICONV !include "inst-libiconv.nsi" !endif !ifdef HAVE_PKG_LIBTASN1 !include "inst-libtasn1.nsi" !endif !ifdef HAVE_PKG_BREEZE_ICONS !include "inst-breeze-icons.nsi" !endif !ifdef HAVE_PKG_PKGCONFIG !include "inst-pkgconfig.nsi" !endif !ifdef HAVE_PKG_ZLIB !include "inst-zlib.nsi" !endif !ifdef HAVE_PKG_QTBASE !include "inst-qtbase.nsi" !endif !ifdef HAVE_PKG_GETTEXT !include "inst-gettext.nsi" !endif !ifdef HAVE_PKG_LIBASSUAN !include "inst-libassuan.nsi" !endif !ifdef HAVE_PKG_LIBGPG_ERROR !include "inst-libgpg-error.nsi" !endif !ifdef HAVE_PKG_PINENTRY !include "inst-pinentry.nsi" !endif # BEGIN MSI IGNORE !ifdef HAVE_PKG_GNUPG_W32 !include "inst-gnupg-w32.nsi" !endif # END MSI IGNORE !ifdef HAVE_PKG_GPGME !include "inst-gpgme.nsi" !endif !ifdef HAVE_PKG_QTTOOLS !include "inst-qttools.nsi" !endif !ifdef HAVE_PKG_QTWINEXTRAS !include "inst-qtwinextras.nsi" !endif !ifdef HAVE_PKG_KCONFIG !include "inst-kconfig.nsi" !endif !ifdef HAVE_PKG_KI18N !include "inst-ki18n.nsi" !endif !ifdef HAVE_PKG_KWIDGETSADDONS !include "inst-kwidgetsaddons.nsi" !endif !ifdef HAVE_PKG_KCOMPLETION !include "inst-kcompletion.nsi" !endif !ifdef HAVE_PKG_KWINDOWSYSTEM !include "inst-kwindowsystem.nsi" !endif !ifdef HAVE_PKG_KCOREADDONS !include "inst-kcoreaddons.nsi" !endif !ifdef HAVE_PKG_KCODECS !include "inst-kcodecs.nsi" !endif !ifdef HAVE_PKG_KCONFIGWIDGETS !include "inst-kconfigwidgets.nsi" !endif !ifdef HAVE_PKG_KXMLGUI !include "inst-kxmlgui.nsi" !endif !ifdef HAVE_PKG_KGUIADDONS !include "inst-kguiaddons.nsi" !endif !ifdef HAVE_PKG_KMIME !include "inst-kmime.nsi" !endif # include translations unconditionally !include "inst-kde-l10n.nsi" !ifdef HAVE_PKG_KICONTHEMES !include "inst-kiconthemes.nsi" !endif !ifdef HAVE_PKG_KARCHIVE !include "inst-karchive.nsi" !endif +!ifdef HAVE_PKG_KJOBWIDGETS +!include "inst-kjobwidgets.nsi" +!endif !ifdef HAVE_PKG_PCRE !include "inst-pcre.nsi" !endif !ifdef HAVE_PKG_KCRASH !include "inst-kcrash.nsi" !endif !ifdef HAVE_PKG_KIO !include "inst-kio.nsi" !endif !ifdef HAVE_PKG_SOLID !include "inst-solid.nsi" !endif +!ifdef HAVE_PKG_FREETYPE +!include "inst-freetype.nsi" +!endif +!ifdef HAVE_PKG_THREADWEAVER +!include "inst-threadweaver.nsi" +!endif +!ifdef HAVE_PKG_POPPLER +!include "inst-poppler.nsi" +!endif +!ifdef HAVE_PKG_KPARTS +!include "inst-kparts.nsi" +!endif +!ifdef HAVE_PKG_OKULAR +!include "inst-okular.nsi" +!endif !ifdef HAVE_PKG_KBOOKMARKS !include "inst-kbookmarks.nsi" !endif !ifdef HAVE_PKG_KSERVICE !include "inst-kservice.nsi" !endif !ifdef HAVE_PKG_KITEMVIEWS !include "inst-kitemviews.nsi" !endif !ifdef HAVE_PKG_KITEMMODELS !include "inst-kitemmodels.nsi" !endif !ifdef HAVE_PKG_LIBKLEO !include "inst-libkleo.nsi" !endif !ifdef HAVE_PKG_EXTRA_CMAKE_MODULES !include "inst-extra-cmake-modules.nsi" !endif !ifdef HAVE_PKG_QTSVG !include "inst-qtsvg.nsi" !endif !ifdef HAVE_PKG_QTTRANSLATIONS !include "inst-qttranslations.nsi" !endif !ifdef HAVE_PKG_GPG4WIN_TOOLS !include "inst-gpg4win-tools.nsi" !endif !ifdef HAVE_PKG_SCUTE !include "inst-scute.nsi" !endif !ifdef HAVE_PKG_PAPERKEY !include "inst-paperkey.nsi" !endif !ifdef HAVE_PKG_MAN_NOVICE_EN !include "inst-man_novice_en.nsi" !endif !ifdef HAVE_PKG_MAN_ADVANCED_EN !include "inst-man_advanced_en.nsi" !endif !ifdef HAVE_PKG_MAN_NOVICE_DE !include "inst-man_novice_de.nsi" !endif !ifdef HAVE_PKG_MAN_ADVANCED_DE !include "inst-man_advanced_de.nsi" !endif # These are displayed in the selection dialog. !ifdef HAVE_PKG_KLEOPATRA !include "inst-kleopatra.nsi" !endif !ifdef HAVE_PKG_GPGOL !include "inst-gpgol.nsi" !endif !ifdef HAVE_PKG_GPGEX !include "inst-gpgex.nsi" !endif !ifdef HAVE_PKG_COMPENDIUM !include "inst-compendium.nsi" !endif !include "inst-gpgme-browser.nsi" !include "inst-final.nsi" # We have to invoke the uninstallers in reverse order! !ifdef HAVE_PKG_MAN_ADVANCED_DE !include "uninst-man_advanced_de.nsi" !endif !ifdef HAVE_PKG_MAN_NOVICE_DE !include "uninst-man_novice_de.nsi" !endif !ifdef HAVE_PKG_MAN_ADVANCED_EN !include "uninst-man_advanced_en.nsi" !endif !ifdef HAVE_PKG_MAN_NOVICE_EN !include "uninst-man_novice_en.nsi" !endif !ifdef HAVE_PKG_COMPENDIUM !include "uninst-compendium.nsi" !endif !ifdef HAVE_PKG_PAPERKEY !include "uninst-paperkey.nsi" !endif !ifdef HAVE_PKG_GPGEX !include "uninst-gpgex.nsi" !endif !ifdef HAVE_PKG_GPGOL !include "uninst-gpgol.nsi" !endif !ifdef HAVE_PKG_KLEOPATRA !include "uninst-kleopatra.nsi" !endif !ifdef HAVE_PKG_GPGME !include "uninst-gpgme.nsi" !endif !ifdef HAVE_PKG_GNUPG_W32 !include "uninst-gnupg-w32.nsi" !endif !ifdef HAVE_PKG_PINENTRY !include "uninst-pinentry.nsi" !endif !ifdef HAVE_PKG_GNUTLS !include "uninst-gnutls.nsi" !endif !ifdef HAVE_PKG_CURL !include "uninst-curl.nsi" !endif !ifdef HAVE_PKG_LIBGPG_ERROR !include "uninst-libgpg-error.nsi" !endif !ifdef HAVE_PKG_LIBASSUAN !include "uninst-libassuan.nsi" !endif !ifdef HAVE_PKG_GETTEXT !include "uninst-gettext.nsi" !endif !ifdef HAVE_PKG_QTBASE !include "uninst-qtbase.nsi" !endif !ifdef HAVE_PKG_ZLIB !include "uninst-zlib.nsi" !endif !ifdef HAVE_PKG_PKGCONFIG !include "uninst-pkgconfig.nsi" !endif !ifdef HAVE_PKG_BREEZE_ICONS !include "uninst-breeze-icons.nsi" !endif !ifdef HAVE_PKG_MAN_ADVANCED_DE !include "uninst-man_advanced_de.nsi" !endif !ifdef HAVE_PKG_MAN_NOVICE_DE !include "uninst-man_novice_de.nsi" !endif !ifdef HAVE_PKG_MAN_ADVANCED_EN !include "uninst-man_advanced_en.nsi" !endif !ifdef HAVE_PKG_MAN_NOVICE_EN !include "uninst-man_novice_en.nsi" !endif !ifdef HAVE_PKG_LIBICONV !include "uninst-libiconv.nsi" !endif !ifdef HAVE_PKG_QTTOOLS !include "uninst-qttools.nsi" !endif !ifdef HAVE_PKG_QTWINEXTRAS !include "uninst-qtwinextras.nsi" !endif !ifdef HAVE_PKG_KCONFIG !include "uninst-kconfig.nsi" !endif !ifdef HAVE_PKG_KI18N !include "uninst-ki18n.nsi" !endif !ifdef HAVE_PKG_KWIDGETSADDONS !include "uninst-kwidgetsaddons.nsi" !endif !ifdef HAVE_PKG_KCOMPLETION !include "uninst-kcompletion.nsi" !endif !ifdef HAVE_PKG_KWINDOWSYSTEM !include "uninst-kwindowsystem.nsi" !endif !ifdef HAVE_PKG_KCOREADDONS !include "uninst-kcoreaddons.nsi" !endif !ifdef HAVE_PKG_KCODECS !include "uninst-kcodecs.nsi" !endif !ifdef HAVE_PKG_KCONFIGWIDGETS !include "uninst-kconfigwidgets.nsi" !endif !ifdef HAVE_PKG_KGUIADDONS !include "uninst-kguiaddons.nsi" !endif !ifdef HAVE_PKG_KXMLGUI !include "uninst-kxmlgui.nsi" !endif !ifdef HAVE_PKG_KICONTHEMES !include "uninst-kiconthemes.nsi" !endif !ifdef HAVE_PKG_KARCHIVE !include "uninst-karchive.nsi" !endif +!ifdef HAVE_PKG_KJOBWIDGETS +!include "uninst-kjobwidgets.nsi" +!endif !ifdef HAVE_PKG_PCRE !include "uninst-pcre.nsi" !endif !ifdef HAVE_PKG_KCRASH !include "uninst-kcrash.nsi" !endif !ifdef HAVE_PKG_KIO !include "uninst-kio.nsi" !endif !ifdef HAVE_PKG_KJOBWIDGETS !include "uninst-kjobwidgets.nsi" !endif !ifdef HAVE_PKG_SOLID !include "uninst-solid.nsi" !endif +!ifdef HAVE_PKG_FREETYPE +!include "uninst-freetype.nsi" +!endif +!ifdef HAVE_PKG_THREADWEAVER +!include "uninst-threadweaver.nsi" +!endif +!ifdef HAVE_PKG_POPPLER +!include "uninst-poppler.nsi" +!endif +!ifdef HAVE_PKG_KPARTS +!include "uninst-kparts.nsi" +!endif +!ifdef HAVE_PKG_OKULAR +!include "uninst-okular.nsi" +!endif !ifdef HAVE_PKG_KBOOKMARKS !include "uninst-kbookmarks.nsi" !endif !ifdef HAVE_PKG_KSERVICE !include "uninst-kservice.nsi" !endif !ifdef HAVE_PKG_KITEMVIEWS !include "uninst-kitemviews.nsi" !endif !ifdef HAVE_PKG_KITEMMODELS !include "uninst-kitemmodels.nsi" !endif !ifdef HAVE_PKG_KMIME !include "uninst-kmime.nsi" !endif !include "uninst-kde-l10n.nsi" !ifdef HAVE_PKG_LIBKLEO !include "uninst-libkleo.nsi" !endif !ifdef HAVE_PKG_EXTRA_CMAKE_MODULES !include "uninst-extra-cmake-modules.nsi" !endif !ifdef HAVE_PKG_BZIP2 !include "uninst-bzip2.nsi" !endif !ifdef HAVE_PKG_QTSVG !include "uninst-qtsvg.nsi" !endif !ifdef HAVE_PKG_QTTRANSLATIONS !include "uninst-qttranslations.nsi" !endif !ifdef HAVE_PKG_GPG4WIN_TOOLS !include "uninst-gpg4win-tools.nsi" !endif !ifdef HAVE_PKG_SCUTE !include "uninst-scute.nsi" !endif !include "uninst-gpg4win.nsi" # Dependency Management ${MementoSectionDone} Function CalcDefaults !ifdef HAVE_PKG_KLEOPATRA g4wihelp::config_fetch_bool "inst_kleopatra" StrCmp $R0 "1" 0 calc_defaults_kleopatra_not_one !insertmacro SelectSection ${SEC_kleopatra} Goto calc_defaults_kleopatra_done calc_defaults_kleopatra_not_one: StrCmp $R0 "0" 0 calc_defaults_kleopatra_done !insertmacro UnselectSection ${SEC_kleopatra} calc_defaults_kleopatra_done: !endif +!ifdef HAVE_PKG_OKULAR + g4wihelp::config_fetch_bool "inst_okular" + StrCmp $R0 "1" 0 calc_defaults_okular_not_one + !insertmacro SelectSection ${SEC_okular} + Goto calc_defaults_okular_done + calc_defaults_okular_not_one: + StrCmp $R0 "0" 0 calc_defaults_okular_done + !insertmacro UnselectSection ${SEC_okular} +calc_defaults_okular_done: +!endif + !ifdef HAVE_PKG_GPGOL g4wihelp::config_fetch_bool "inst_gpgol" StrCmp $R0 "1" 0 calc_defaults_gpgol_not_one !insertmacro SelectSection ${SEC_gpgol} Goto calc_defaults_gpgol_done calc_defaults_gpgol_not_one: StrCmp $R0 "0" 0 calc_defaults_gpgol_done !insertmacro UnselectSection ${SEC_gpgol} calc_defaults_gpgol_done: !endif !ifdef HAVE_PKG_GPGEX g4wihelp::config_fetch_bool "inst_gpgex" StrCmp $R0 "1" 0 calc_defaults_gpgex_not_one !insertmacro SelectSection ${SEC_gpgex} Goto calc_defaults_gpgex_done calc_defaults_gpgex_not_one: StrCmp $R0 "0" 0 calc_defaults_gpgex_done !insertmacro UnselectSection ${SEC_gpgex} calc_defaults_gpgex_done: !endif !ifdef HAVE_PKG_PAPERKEY g4wihelp::config_fetch_bool "inst_paperkey" StrCmp $R0 "1" 0 calc_defaults_paperkey_not_one !insertmacro SelectSection ${SEC_paperkey} Goto calc_defaults_paperkey_done calc_defaults_paperkey_not_one: StrCmp $R0 "0" 0 calc_defaults_paperkey_done !insertmacro UnselectSection ${SEC_paperkey} calc_defaults_paperkey_done: !endif !ifdef HAVE_PKG_COMPENDIUM g4wihelp::config_fetch_bool "inst_compendium" StrCmp $R0 "1" 0 calc_defaults_compendium_not_one !insertmacro SelectSection ${SEC_compendium} Goto calc_defaults_compendium_done calc_defaults_compendium_not_one: StrCmp $R0 "0" 0 calc_defaults_compendium_done !insertmacro UnselectSection ${SEC_compendium} calc_defaults_compendium_done: !endif !ifdef HAVE_PKG_MAN_NOVICE_DE g4wihelp::config_fetch_bool "inst_man_novice_de" StrCmp $R0 "1" 0 calc_defaults_man_novice_de_not_one !insertmacro SelectSection ${SEC_man_novice_de} Goto calc_defaults_man_novice_de_done calc_defaults_man_novice_de_not_one: StrCmp $R0 "0" 0 calc_defaults_man_novice_de_done !insertmacro UnselectSection ${SEC_man_novice_de} calc_defaults_man_novice_de_done: !endif !ifdef HAVE_PKG_MAN_NOVICE_EN g4wihelp::config_fetch_bool "inst_man_novice_en" StrCmp $R0 "1" 0 calc_defaults_man_novice_en_not_one !insertmacro SelectSection ${SEC_man_novice_en} Goto calc_defaults_man_novice_en_done calc_defaults_man_novice_en_not_one: StrCmp $R0 "0" 0 calc_defaults_man_novice_en_done !insertmacro UnselectSection ${SEC_man_novice_en} calc_defaults_man_novice_en_done: !endif !ifdef HAVE_PKG_MAN_ADVANCED_DE g4wihelp::config_fetch_bool "inst_man_advanced_de" StrCmp $R0 "1" 0 calc_defaults_man_advanced_de_not_one !insertmacro SelectSection ${SEC_man_advanced_de} Goto calc_defaults_man_advanced_de_done calc_defaults_man_advanced_de_not_one: StrCmp $R0 "0" 0 calc_defaults_man_advanced_de_done !insertmacro UnselectSection ${SEC_man_advanced_de} calc_defaults_man_advanced_de_done: !endif !ifdef HAVE_PKG_MAN_ADVANCED_EN g4wihelp::config_fetch_bool "inst_man_advanced_en" StrCmp $R0 "1" 0 calc_defaults_man_advanced_en_not_one !insertmacro SelectSection ${SEC_man_advanced_en} Goto calc_defaults_man_advanced_en_done calc_defaults_man_advanced_en_not_one: StrCmp $R0 "0" 0 calc_defaults_man_advanced_en_done !insertmacro UnselectSection ${SEC_man_advanced_en} calc_defaults_man_advanced_en_done: !endif # Check if minimal install was requested on the command line StrCmp $is_minimal '1' select_minimal continue select_minimal: !insertmacro UnselectSection ${SEC_kleopatra} + !insertmacro UnselectSection ${SEC_okular} !insertmacro UnselectSection ${SEC_gpgol} !insertmacro UnselectSection ${SEC_gpgex} !insertmacro UnselectSection ${SEC_gpgme_browser} !insertmacro UnselectSection ${SEC_compendium} # We only do pinentry and gnupg-w32 !insertmacro SelectSection ${SEC_paperkey} !insertmacro SelectSection ${SEC_gnupg_w32} !insertmacro SelectSection ${SEC_pinentry} !insertmacro SelectSection ${SEC_gpgme} continue: # Check if browser integration was selected on the command line # or in the ini # You can either select the browser integration by adding # inst_browser = true to a gpg4win.ini or adding a # /WITH_BROWSER=1 command line switch to the installer. g4wihelp::config_fetch_bool "inst_browser" StrCmp $R0 "1" select_browser 0 StrCmp $with_browser '1' select_browser skip_browser select_browser: !insertmacro SelectSection ${SEC_gpgme_browser} skip_browser: FunctionEnd Function CalcDepends # This section could very well be autogenerated from the # information in configure.ac. Note that it doesn't hurt to have # stuff here for packages that we don't include. # First clear all indirect dependencies. !ifdef HAVE_PKG_LIBICONV !insertmacro UnselectSection ${SEC_libiconv} !endif !ifdef HAVE_PKG_GETTEXT !insertmacro UnselectSection ${SEC_gettext} !endif !ifdef HAVE_PKG_ZLIB !insertmacro UnselectSection ${SEC_zlib} !endif !ifdef HAVE_PKG_PKGCONFIG !insertmacro UnselectSection ${SEC_pkgconfig} !endif !ifdef HAVE_PKG_BZIP2 !insertmacro UnselectSection ${SEC_bzip2} !endif !ifdef HAVE_PKG_LIBGPG_ERROR !insertmacro UnselectSection ${SEC_libgpg_error} !endif !ifdef HAVE_PKG_LIBASSUAN !insertmacro UnselectSection ${SEC_libassuan} !endif !ifdef HAVE_PKG_GPGME !insertmacro UnselectSection ${SEC_gpgme} !endif !ifdef HAVE_PKG_QTBASE !insertmacro UnselectSection ${SEC_qtbase} !endif !ifdef HAVE_PKG_QTTOOLS !insertmacro UnselectSection ${SEC_qttools} !endif !ifdef HAVE_PKG_QTWINEXTRAS !insertmacro UnselectSection ${SEC_qtwinextras} !endif +!ifdef HAVE_PKG_FREETYPE + !insertmacro UnselectSection ${SEC_freetype} +!endif !ifdef HAVE_PKG_BREEZE_ICONS !insertmacro UnselectSection ${SEC_breeze_icons} !endif !ifdef HAVE_PKG_KCONFIG !insertmacro UnselectSection ${SEC_kconfig} !endif !ifdef HAVE_PKG_KI18N !insertmacro UnselectSection ${SEC_ki18n} !endif !ifdef HAVE_PKG_KWIDGETSADDONS !insertmacro UnselectSection ${SEC_kwidgetsaddons} !endif !ifdef HAVE_PKG_KCOMPLETION !insertmacro UnselectSection ${SEC_kcompletion} !endif !ifdef HAVE_PKG_KWINDOWSYSTEM !insertmacro UnselectSection ${SEC_kwindowsystem} !endif !ifdef HAVE_PKG_KCOREADDONS !insertmacro UnselectSection ${SEC_kcoreaddons} !endif !ifdef HAVE_PKG_KCODECS !insertmacro UnselectSection ${SEC_kcodecs} !endif !ifdef HAVE_PKG_KCONFIGWIDGETS !insertmacro UnselectSection ${SEC_kconfigwidgets} !endif !ifdef HAVE_PKG_KXMLGUI !insertmacro UnselectSection ${SEC_kxmlgui} !endif !ifdef HAVE_PKG_KICONTHEMES !insertmacro UnselectSection ${SEC_kiconthemes} !endif !ifdef HAVE_PKG_KARCHIVE !insertmacro UnselectSection ${SEC_karchive} !endif !ifdef HAVE_PKG_KCRASH !insertmacro UnselectSection ${SEC_kcrash} !endif !ifdef HAVE_PKG_KIO !insertmacro UnselectSection ${SEC_kio} !endif !ifdef HAVE_PKG_KJOBWIDGETS !insertmacro UnselectSection ${SEC_kjobwidgets} !endif !ifdef HAVE_PKG_SOLID !insertmacro UnselectSection ${SEC_solid} !endif +!ifdef HAVE_PKG_POPPLER + !insertmacro UnselectSection ${SEC_poppler} +!endif +!ifdef HAVE_PKG_KPARTS + !insertmacro UnselectSection ${SEC_kparts} +!endif +!ifdef HAVE_PKG_FREETYPE + !insertmacro UnselectSection ${SEC_freetype} +!endif !ifdef HAVE_PKG_KBOOKMARKS !insertmacro UnselectSection ${SEC_kbookmarks} !endif !ifdef HAVE_PKG_KSERVICE !insertmacro UnselectSection ${SEC_kservice} !endif !ifdef HAVE_PKG_KITEMVIEWS !insertmacro UnselectSection ${SEC_kitemviews} !endif !ifdef HAVE_PKG_KITEMMODELS !insertmacro UnselectSection ${SEC_kitemmodels} !endif !ifdef HAVE_PKG_KGUIADDONS !insertmacro UnselectSection ${SEC_kguiaddons} !endif !ifdef HAVE_PKG_LIBKLEO !insertmacro UnselectSection ${SEC_libkleo} !endif !ifdef HAVE_PKG_KMIME !insertmacro UnselectSection ${SEC_kmime} !endif !ifdef HAVE_PKG_KDE_L10N !insertmacro UnselectSection ${SEC_kde_l10n} !endif !ifdef HAVE_PKG_QTSVG !insertmacro UnselectSection ${SEC_qtsvg} !endif !ifdef HAVE_PKG_QTTRANSLATIONS !insertmacro UnselectSection ${SEC_qttranslations} !endif !ifdef HAVE_PKG_GPG4WIN_TOOLS !insertmacro UnselectSection ${SEC_gpg4win_tools} !endif # BEGIN MSI IGNORE # MSI pulls this in through the gnupg-w32 component. # Always install gnupg2. This is also ensured by putting # these packages in the RO section and enabling them by default, but # it doesn't harm to add it explicitely here as well. # TODO: Handle newer / other gnupg versions !insertmacro SelectSection ${SEC_gnupg_w32} !insertmacro SelectSection ${SEC_gpgme} # Then enable all dependencies, mostly in reverse build list order! # First the explicitely installed packages. # END MSI IGNORE !ifdef HAVE_PKG_PAPERKEY !insertmacro SectionFlagIsSet ${SEC_paperkey} \ ${SF_SELECTED} have_paperkey skip_paperkey have_paperkey: # All dependencies are linked in statically. skip_paperkey: !endif !ifdef HAVE_PKG_GPGEX !insertmacro SectionFlagIsSet ${SEC_gpgex} \ ${SF_SELECTED} have_gpgex skip_gpgex have_gpgex: # This is not a build dependency, but it is a run-time dependency. !insertmacro SelectSection ${SEC_kleopatra} # Other dependencies are linked in statically. skip_gpgex: !endif !ifdef HAVE_PKG_GPGOL !insertmacro SectionFlagIsSet ${SEC_gpgol} \ ${SF_SELECTED} have_gpgol skip_gpgol have_gpgol: !insertmacro SelectSection ${SEC_gpgme} !insertmacro SelectSection ${SEC_gpg4win_tools} # This is not a build dependency, but it is a run-time dependency. !insertmacro SelectSection ${SEC_kleopatra} skip_gpgol: !endif +!ifdef HAVE_PKG_OKULAR + ${IfNot} ${AtLeastWin7} + # Disable Okular for Windows below 7 + SectionSetFlags ${SEC_okular} 16 + ${Endif} + !insertmacro SectionFlagIsSet ${SEC_okular} ${SF_SELECTED} have_okular skip_okular + have_okular: + !insertmacro SelectSection ${SEC_gpgme} + !insertmacro SelectSection ${SEC_qtbase} + !insertmacro SelectSection ${SEC_breeze_icons} + !insertmacro SelectSection ${SEC_kconfig} + !insertmacro SelectSection ${SEC_ki18n} + !insertmacro SelectSection ${SEC_kwidgetsaddons} + !insertmacro SelectSection ${SEC_kcompletion} + !insertmacro SelectSection ${SEC_kwindowsystem} + !insertmacro SelectSection ${SEC_kcoreaddons} + !insertmacro SelectSection ${SEC_kcodecs} + !insertmacro SelectSection ${SEC_kconfigwidgets} + !insertmacro SelectSection ${SEC_kxmlgui} + !insertmacro SelectSection ${SEC_kitemviews} + !insertmacro SelectSection ${SEC_kitemmodels} + !insertmacro SelectSection ${SEC_kiconthemes} + !insertmacro SelectSection ${SEC_karchive} + !insertmacro SelectSection ${SEC_kio} + !insertmacro SelectSection ${SEC_kjobwidgets} + !insertmacro SelectSection ${SEC_solid} + !insertmacro SelectSection ${SEC_kservice} + !insertmacro SelectSection ${SEC_kbookmarks} + !insertmacro SelectSection ${SEC_freetype} + !insertmacro SelectSection ${SEC_poppler} + !insertmacro SelectSection ${SEC_threadweaver} + !insertmacro SelectSection ${SEC_kparts} +# KArchive depdens on zlib + !insertmacro SelectSection ${SEC_zlib} + !insertmacro SelectSection ${SEC_kcrash} + !insertmacro SelectSection ${SEC_kguiaddons} + !insertmacro SelectSection ${SEC_qtsvg} + !insertmacro SelectSection ${SEC_qttranslations} + !insertmacro SelectSection ${SEC_kde_l10n} + !insertmacro SelectSection ${SEC_qttools} + !insertmacro SelectSection ${SEC_freetype} + !insertmacro SelectSection ${SEC_qtwinextras} + !insertmacro SelectSection ${SEC_extra-cmake-modules} + skip_okular: +!endif + !ifdef HAVE_PKG_KLEOPATRA !ifndef SOURCES ${IfNot} ${AtLeastWin7} # Disable Kleo for Windows below 7 SectionSetFlags ${SEC_kleopatra} 16 ${Endif} !endif !insertmacro SectionFlagIsSet ${SEC_kleopatra} ${SF_SELECTED} have_kleopatra skip_kleopatra have_kleopatra: !insertmacro SelectSection ${SEC_gpgme} !insertmacro SelectSection ${SEC_compendium} !insertmacro SelectSection ${SEC_qtbase} !insertmacro SelectSection ${SEC_breeze_icons} !insertmacro SelectSection ${SEC_kconfig} !insertmacro SelectSection ${SEC_ki18n} !insertmacro SelectSection ${SEC_kwidgetsaddons} !insertmacro SelectSection ${SEC_kcompletion} !insertmacro SelectSection ${SEC_kwindowsystem} !insertmacro SelectSection ${SEC_kcoreaddons} !insertmacro SelectSection ${SEC_kcodecs} !insertmacro SelectSection ${SEC_kconfigwidgets} !insertmacro SelectSection ${SEC_kxmlgui} !insertmacro SelectSection ${SEC_kitemviews} !insertmacro SelectSection ${SEC_kitemmodels} !insertmacro SelectSection ${SEC_kiconthemes} !insertmacro SelectSection ${SEC_karchive} !insertmacro SelectSection ${SEC_kio} !insertmacro SelectSection ${SEC_kjobwidgets} !insertmacro SelectSection ${SEC_solid} !insertmacro SelectSection ${SEC_kservice} !insertmacro SelectSection ${SEC_kbookmarks} # KArchive depdens on zlib !insertmacro SelectSection ${SEC_zlib} !insertmacro SelectSection ${SEC_kcrash} !insertmacro SelectSection ${SEC_kguiaddons} !insertmacro SelectSection ${SEC_qtsvg} !insertmacro SelectSection ${SEC_qttranslations} !insertmacro SelectSection ${SEC_kmime} !insertmacro SelectSection ${SEC_kde_l10n} !insertmacro SelectSection ${SEC_libkleo} !insertmacro SelectSection ${SEC_qttools} !insertmacro SelectSection ${SEC_qtwinextras} !insertmacro SelectSection ${SEC_extra-cmake-modules} skip_kleopatra: !endif !insertmacro SectionFlagIsSet ${SEC_gpgme_browser} ${SF_SELECTED} have_gpgme_browser skip_gpgme_browser have_gpgme_browser: !insertmacro SelectSection ${SEC_gpgme} skip_gpgme_browser: # Now the implicitely installed packages. !ifdef HAVE_PKG_GPGME !insertmacro SectionFlagIsSet ${SEC_gpgme} \ ${SF_SELECTED} have_gpgme skip_gpgme have_gpgme: # GPGME does not depend on gnupg2. Do this in the # actual application instead. !insertmacro SelectSection ${SEC_libgpg_error} !insertmacro SelectSection ${SEC_libassuan} !ifdef HAVE_PKG_QTBASE !insertmacro SelectSection ${SEC_qtbase} !endif skip_gpgme: !endif !ifdef HAVE_PKG_PINENTRY !insertmacro SectionFlagIsSet ${SEC_pinentry} \ ${SF_SELECTED} have_pinentry skip_pinentry have_pinentry: !insertmacro SelectSection ${SEC_libiconv} !insertmacro SelectSection ${SEC_libgpg_error} !insertmacro SelectSection ${SEC_libassuan} !ifdef HAVE_PKG_QTBASE !insertmacro SelectSection ${SEC_qtbase} !endif # BEGIN MSI IGNORE !ifdef HAVE_PKG_GTK_ !insertmacro SelectSection ${SEC_gtk_} !endif # END MSI IGNORE skip_pinentry: !endif !ifdef HAVE_PKG_QTBASE !ifndef SOURCES ${IfNot} ${AtLeastWin7} # Disable qt for Windows below 7 !insertmacro UnSelectSection ${SEC_qtbase} ${Endif} !endif !insertmacro SectionFlagIsSet ${SEC_qtbase} \ ${SF_SELECTED} have_qt skip_qt have_qt: !insertmacro SelectSection ${SEC_zlib} !insertmacro SelectSection ${SEC_qttranslations} skip_qt: !endif !ifdef HAVE_PKG_LIBASSUAN !insertmacro SectionFlagIsSet ${SEC_libassuan} ${SF_SELECTED} have_libassuan skip_libassuan have_libassuan: !insertmacro SelectSection ${SEC_libgpg_error} skip_libassuan: !endif !ifdef HAVE_PKG_LIBGPG_ERROR !insertmacro SectionFlagIsSet ${SEC_libgpg_error} ${SF_SELECTED} have_libgpg_error skip_libgpg_error have_libgpg_error: !insertmacro SelectSection ${SEC_libiconv} !insertmacro SelectSection ${SEC_gettext} skip_libgpg_error: !endif # Package "bzip2" has no dependencies. # Package "pkgconfig" has no dependencies. # Package "zlib" has no dependencies. !ifdef HAVE_PKG_GETTEXT !insertmacro SectionFlagIsSet ${SEC_gettext} \ ${SF_SELECTED} have_gettext skip_gettext have_gettext: !insertmacro SelectSection ${SEC_libiconv} skip_gettext: !endif # Package "libiconv" has no dependencies. FunctionEnd Function .onInstFailed Delete $TEMP\gpgspltmp.wav FunctionEnd Function .onInstSuccess ${MementoSectionSave} Delete $TEMP\gpgspltmp.wav FunctionEnd Function .onSelChange Call CalcDepends FunctionEnd # This also must be in a central place. Also Urgs. Section "-startmenu" UserInfo::GetAccountType Pop $1 StrCmp $1 "Admin" is_admin is_no_admin is_admin: SetShellVarContext all is_no_admin: # NOT SetOutPath. StrCpy $OUTDIR "%HOMEDRIVE%%HOMEPATH%" # Check if the start menu entries where requested. g4wihelp::config_fetch_bool "inst_start_menu" StrCmp $R0 "0" no_start_menu !ifdef HAVE_PKG_KLEOPATRA SectionGetFlags ${SEC_kleopatra} $R0 IntOp $R0 $R0 & ${SF_SELECTED} IntCmp $R0 ${SF_SELECTED} 0 no_kleopatra_menu CreateShortCut "$SMPROGRAMS\Kleopatra.lnk" \ "$INSTDIR\bin\kleopatra.exe" \ "" "$INSTDIR\bin\kleopatra.exe" "" SW_SHOWNORMAL "" $(DESC_Menu_kleopatra) no_kleopatra_menu: !endif +!ifdef HAVE_PKG_OKULAR + SectionGetFlags ${SEC_okular} $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} 0 no_okular_menu + CreateShortCut "$SMPROGRAMS\Okular.lnk" \ + "$INSTDIR\bin\okular.exe" \ + "" "$INSTDIR\bin\okular.exe" "" SW_SHOWNORMAL "" $(DESC_Menu_okular) + no_okular_menu: +!endif + no_start_menu: # Check if the desktop entries where requested. g4wihelp::config_fetch_bool "inst_desktop" StrCmp $R0 "0" no_desktop !ifdef HAVE_PKG_KLEOPATRA SectionGetFlags ${SEC_kleopatra} $R0 IntOp $R0 $R0 & ${SF_SELECTED} IntCmp $R0 ${SF_SELECTED} 0 no_kleopatra_desktop StrCmp $is_update '1' no_kleopatra_desktop CreateShortCut "$DESKTOP\Kleopatra.lnk" \ "$INSTDIR\bin\kleopatra.exe" \ "" "$INSTDIR\bin\kleopatra.exe" "" SW_SHOWNORMAL "" $(DESC_Menu_kleopatra) no_kleopatra_desktop: !endif no_desktop: SectionEnd diff --git a/src/inst-kio.nsi b/src/inst-threadweaver.nsi similarity index 81% copy from src/inst-kio.nsi copy to src/inst-threadweaver.nsi index c9490d6f..49fdc66a 100644 --- a/src/inst-kio.nsi +++ b/src/inst-threadweaver.nsi @@ -1,32 +1,31 @@ # Copyright (C) 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, 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}/kio-${gpg4win_pkg_kio_version} +!define prefix ${ipdir}/threadweaver-${gpg4win_pkg_threadweaver_version} !ifdef DEBUG -Section "kio" SEC_kio +Section "threadweaver" SEC_threadweaver !else -Section "-kio" SEC_kio +Section "-threadweaver" SEC_threadweaver !endif SetOutPath "$INSTDIR" SetOutPath "$INSTDIR\bin" - File ${prefix}/bin/libKF5KIOCore.dll - File ${prefix}/bin/libKF5KIOWidgets.dll + File ${prefix}/bin/libKF5ThreadWeaver.dll SectionEnd diff --git a/src/installer-finish.nsi b/src/installer-finish.nsi index db1b589e..eb17c5c3 100644 --- a/src/installer-finish.nsi +++ b/src/installer-finish.nsi @@ -1,142 +1,143 @@ # installer-finish.nsi - Installer for GPG4Win. -*- coding: latin-1; -*- # Copyright (C) 2005, 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 Var MYTMP Function SetupExtensions System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)' FunctionEnd LangString T_File_Type_gpg_Name ${LANG_ENGLISH} \ "OpenPGP Binary File" LangString T_File_Type_asc_Name ${LANG_ENGLISH} \ "OpenPGP Text File" LangString T_File_Type_sig_Name ${LANG_ENGLISH} \ "OpenPGP Signature" LangString T_File_Type_pgp_key_Name ${LANG_ENGLISH} \ "OpenPGP Certificate File" LangString T_File_Type_pem_Name ${LANG_ENGLISH} \ "CMS (S/MIME) File" LangString T_File_Type_x509_Name ${LANG_ENGLISH} \ "X509 Certificate File" LangString T_File_Type_kgrp_Name ${LANG_ENGLISH} \ "Kleopatra Certificate Groups" LangString T_File_Type_x509_info_tip ${LANG_ENGLISH} \ "Certificate for CMS (S/MIME)." LangString T_File_Type_info_tip ${LANG_ENGLISH} \ "This can be encrypted data, a signature or a certificate." LangString T_File_Type_sig_info_tip ${LANG_ENGLISH} \ "A cryptographic signature to verify the authenticity of another file." LangString T_File_Type_kgrp_info_tip ${LANG_ENGLISH} \ "Certificate groups to be used by Kleopatra for encryption." LangString T_File_Type_pgp_key_info_tip ${LANG_ENGLISH} \ "Certificate for OpenPGP." # Last section is a hidden one. Section WriteUninstaller "$INSTDIR\${PACKAGE}-uninstall.exe" # Windows Add/Remove Programs support # Note that the version is appended to the DisplayName, despite that # this is not necessary as a click on "support information" gives # the version number. Some tools do that, other don't. I don't # like it but others want me to do that. -wk StrCpy $MYTMP "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRETTY_PACKAGE_SHORT}" WriteRegExpandStr SHCTX $MYTMP "UninstallString" '"$INSTDIR\${PACKAGE}-uninstall.exe"' WriteRegExpandStr SHCTX $MYTMP "InstallLocation" "$INSTDIR" WriteRegStr SHCTX $MYTMP "DisplayName" "${PRETTY_PACKAGE} (${VERSION})" WriteRegStr SHCTX $MYTMP "DisplayIcon" "$INSTDIR\bin\kleopatra.exe,0" WriteRegStr SHCTX $MYTMP "DisplayVersion" "${VERSION}" WriteRegStr SHCTX $MYTMP "Publisher" "The Gpg4win Project" WriteRegStr SHCTX $MYTMP "URLInfoAbout" "http://www.gpg4win.org/" WriteRegDWORD SHCTX $MYTMP "NoModify" "1" WriteRegDWORD SHCTX $MYTMP "NoRepair" "1" WriteRegStr SHCTX "Software\Classes\MIME\Database\Content Type\application/pgp" "Extension" ".gpg" WriteRegStr SHCTX "Software\Classes\MIME\Database\Content Type\application/pgp-signature" "Extension" ".sig" WriteRegStr SHCTX "Software\Classes\MIME\Database\Content Type\application/pgp-encrypted" "Extension" ".gpg" WriteRegStr SHCTX "Software\Classes\MIME\Database\Content Type\application/pgp-keys" "Extension" ".gpg" call SetupExtensions SectionEnd Section Uninstall UserInfo::GetAccountType Pop $1 StrCmp $1 "Admin" is_admin is_no_admin is_admin: SetShellVarContext all is_no_admin: #--------------------------------------------------- # Delete the menu entries and any empty parent menus #--------------------------------------------------- Delete "$SMPROGRAMS\GPA.lnk" Delete "$SMPROGRAMS\Kleopatra.lnk" + Delete "$SMPROGRAMS\Okular.lnk" # Delete Desktop links. StrCmp $is_update '1' no_desktop_delete !ifdef HAVE_PKG_GPA Delete "$DESKTOP\GPA.lnk" !endif !ifdef HAVE_PKG_KLEOPATRA Delete "$DESKTOP\Kleopatra.lnk" !endif no_desktop_delete: Delete "$INSTDIR\${PACKAGE}-uninstall.exe" Delete "$INSTDIR\share\gpg4win\file-ext.ico" RMDir "$INSTDIR\share\gpg4win" RMDir "$INSTDIR\share" RMDir "$INSTDIR" # If we installed in the default location, try to be really, really # nice with sugar on it to clean up behind us. In any case, try very # hard to get rid of directories which could have REBOOTOK files. RMDir /REBOOTOK "$INSTDIR\bin" RMDir /REBOOTOK "$INSTDIR" # Clean the registry. DeleteRegValue SHCTX "Software\${PRETTY_PACKAGE_SHORT}" \ "Install Directory" DeleteRegKey /ifempty SHCTX "Software\${PRETTY_PACKAGE_SHORT}" # Remove Windows Add/Remove Programs support. DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRETTY_PACKAGE_SHORT}" DeleteRegKey SHCTX "Software\Classes\MIME\Database\Content Type\application/pgp" DeleteRegKey SHCTX "Software\Classes\MIME\Database\Content Type\application/pgp-signature" DeleteRegKey SHCTX "Software\Classes\MIME\Database\Content Type\application/pgp-encrypted" DeleteRegKey SHCTX "Software\Classes\MIME\Database\Content Type\application/pgp-keys" SectionEnd diff --git a/src/installer.nsi b/src/installer.nsi index b8732980..ee2d56b1 100644 --- a/src/installer.nsi +++ b/src/installer.nsi @@ -1,784 +1,789 @@ # 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_SHOWREADME "share\gpg4win\README.$(T_LangCode).txt" !define MUI_FINISHPAGE_SHOWREADME_TEXT "$(T_ShowReadme)" !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED !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_ShowReadme ${LANG_ENGLISH} \ "Show the README file" 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 "dirmngr.exe" g4wihelp::KillProc "gpgsm.exe" + g4wihelp::KillProc "okular.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 "dirmngr.exe" g4wihelp::KillProc "gpgsm.exe" + g4wihelp::KillProc "okular.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 is disabled." + $\r$\n$\r$\nKleopatra and Okular are disabled." # From Function WelcomeFunction LangString T_UPDATE_STR ${LANG_ENGLISH} \ "Updating Version" # 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 # 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 !insertmacro MUI_LANGDLL_DISPLAY ${IfNot} ${AtLeastWin7} MessageBox MB_OK "$(T_WinisDeprecated)" ${Endif} ${MementoSectionRestore} Call CalcDefaults Call CalcDepends !ifndef SOURCES Call CheckOtherGnuPGApps !endif FunctionEnd Function un.onInit !ifndef SOURCES !insertmacro MULTIUSER_UNINIT !endif # 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_MAN_NOVICE_EN !insertmacro MUI_DESCRIPTION_TEXT ${SEC_man_novice_en} $(DESC_SEC_man_novice_en) !endif !ifdef HAVE_PKG_MAN_ADVANCED_EN !insertmacro MUI_DESCRIPTION_TEXT ${SEC_man_advanced_en} $(DESC_SEC_man_advanced_en) !endif !ifdef HAVE_PKG_COMPENDIUM !insertmacro MUI_DESCRIPTION_TEXT ${SEC_compendium} $(DESC_SEC_compendium) !endif !ifdef HAVE_PKG_MAN_NOVICE_DE !insertmacro MUI_DESCRIPTION_TEXT ${SEC_man_novice_de} $(DESC_SEC_man_novice_de) !endif !ifdef HAVE_PKG_MAN_ADVANCED_DE !insertmacro MUI_DESCRIPTION_TEXT ${SEC_man_advanced_de} $(DESC_SEC_man_advanced_de) !endif !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgme_browser} $(DESC_SEC_gpgme_browser) !insertmacro MUI_FUNCTION_DESCRIPTION_END diff --git a/src/uninst-kio.nsi b/src/uninst-freetype.nsi similarity index 84% copy from src/uninst-kio.nsi copy to src/uninst-freetype.nsi index a9bafe11..29181fad 100644 --- a/src/uninst-kio.nsi +++ b/src/uninst-freetype.nsi @@ -1,28 +1,27 @@ # Copyright (C) 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, 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}/kio-${gpg4win_pkg_kio_version} +!define prefix ${ipdir}/freetype-${gpg4win_pkg_freetype_version} ; Uninstaller section. -Section "-un.kio" - Delete "$INSTDIR\bin\libKF5KIOCore.dll" - Delete "$INSTDIR\bin\libKF5KIOWidgets.dll" +Section "-un.freetype" + Delete "$INSTDIR\bin\libfreetype.dll" RmDir "$INSTDIR\bin" SectionEnd diff --git a/src/uninst-kio.nsi b/src/uninst-kio.nsi index a9bafe11..24619970 100644 --- a/src/uninst-kio.nsi +++ b/src/uninst-kio.nsi @@ -1,28 +1,29 @@ # Copyright (C) 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, 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}/kio-${gpg4win_pkg_kio_version} ; Uninstaller section. Section "-un.kio" + Delete "$INSTDIR\bin\libKF5KIOGui.dll" Delete "$INSTDIR\bin\libKF5KIOCore.dll" Delete "$INSTDIR\bin\libKF5KIOWidgets.dll" RmDir "$INSTDIR\bin" SectionEnd diff --git a/src/uninst-kleopatra.nsi b/src/uninst-kleopatra.nsi index 106859ac..013c1d07 100644 --- a/src/uninst-kleopatra.nsi +++ b/src/uninst-kleopatra.nsi @@ -1,238 +1,239 @@ # uninst-kleopatra.nsi - Installer snippet for kleopatra. -*- 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}/kleopatra-${gpg4win_pkg_kleopatra_version} ; Uninstaller section. Section "-un.kleopatra" !ifdef SOURCES Push "${gpg4win_pkg_kleopatra}" Call un.SourceDelete !else Delete "$INSTDIR\bin\kleopatra.exe" # Delete "$INSTDIR\bin\kwatchgnupg.exe" RMDir "$INSTDIR\bin" Delete "$INSTDIR\share\icons\hicolor\64x64\apps\kleopatra.png" Delete "$INSTDIR\share\icons\hicolor\48x48\apps\kleopatra.png" Delete "$INSTDIR\share\icons\hicolor\32x32\apps\kleopatra.png" Delete "$INSTDIR\share\icons\hicolor\256x256\apps\kleopatra.png" Delete "$INSTDIR\share\icons\hicolor\22x22\apps\kleopatra.png" Delete "$INSTDIR\share\icons\hicolor\16x16\apps\kleopatra.png" Delete "$INSTDIR\share\icons\hicolor\16x16\apps\gpg4win-compact.png" Delete "$INSTDIR\share\icons\hicolor\128x128\apps\kleopatra.png" Delete "$INSTDIR\share\icons\hicolor\icon-theme.cache" Delete "$INSTDIR\share\icons\hicolor\index.theme" RMDir "$INSTDIR\share\icons\hicolor\64x64\apps" RMDir "$INSTDIR\share\icons\hicolor\64x64" RMDir "$INSTDIR\share\icons\hicolor\48x48\apps" RMDir "$INSTDIR\share\icons\hicolor\48x48" RMDir "$INSTDIR\share\icons\hicolor\32x32\apps" RMDir "$INSTDIR\share\icons\hicolor\32x32" RMDir "$INSTDIR\share\icons\hicolor\256x256\apps" RMDir "$INSTDIR\share\icons\hicolor\256x256" RMDir "$INSTDIR\share\icons\hicolor\22x22\apps" RMDir "$INSTDIR\share\icons\hicolor\22x22" RMDir "$INSTDIR\share\icons\hicolor\16x16\apps" RMDir "$INSTDIR\share\icons\hicolor\16x16" RMDir "$INSTDIR\share\icons\hicolor\128x128\apps" RMDir "$INSTDIR\share\icons\hicolor\128x128" RMDir "$INSTDIR\share\icons\hicolor" + RMDir "$INSTDIR\share\icons" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\menuwindow.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\menuview.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\menutools.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\menusettings.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\menuhelp.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\menucertificates.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\menu.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\introduction.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\index.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\functions.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\functions-search.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\functions-newkey.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\functions-keybox-management.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\credits-and-license.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\configuration.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\configuration-dn-order.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\configuration-smime-validation.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\configuration-gnupg-system.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\configuration-crypto-operations.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\configuration-appearance.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\commandline-options.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\admin.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\admin-key-filters.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\admin-checksum-definitions.html" # Delete "$INSTDIR\share\doc\HTML\en\kleopatra\admin-archive-definitions.html" # # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\menuwindow.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\menuview.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\menutools.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\menusettings.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\menuhelp.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\menucertificates.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\menu.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\introduction.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\index.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\functions.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\functions-search.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\functions-newkey.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\functions-keybox-management.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\credits-and-license.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\configuration.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\configuration-dn-order.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\configuration-smime-validation.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\configuration-gnupg-system.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\configuration-crypto-operations.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\configuration-appearance.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\commandline-options.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\admin.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\admin-key-filters.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\admin-checksum-definitions.html" # Delete "$INSTDIR\share\doc\HTML\de\kleopatra\admin-archive-definitions.html" # # Delete "$INSTDIR\share\doc\HTML\common\xml.dcl" # Delete "$INSTDIR\share\doc\HTML\common\x11-license.html" # Delete "$INSTDIR\share\doc\HTML\common\top.jpg" # Delete "$INSTDIR\share\doc\HTML\common\top-right.png" # Delete "$INSTDIR\share\doc\HTML\common\top-right.jpg" # Delete "$INSTDIR\share\doc\HTML\common\top-middle.png" # Delete "$INSTDIR\share\doc\HTML\common\top-left.png" # Delete "$INSTDIR\share\doc\HTML\common\top-left.jpg" # Delete "$INSTDIR\share\doc\HTML\common\top-kde.jpg" # Delete "$INSTDIR\share\doc\HTML\common\tabs.css" # Delete "$INSTDIR\share\doc\HTML\common\qpl-license.html" # Delete "$INSTDIR\share\doc\HTML\common\print.css" # Delete "$INSTDIR\share\doc\HTML\common\mainheader.html" # Delete "$INSTDIR\share\doc\HTML\common\mainfooter.html" # Delete "$INSTDIR\share\doc\HTML\common\lgpl-license.html" # Delete "$INSTDIR\share\doc\HTML\common\lgpl-license" # Delete "$INSTDIR\share\doc\HTML\common\kde_logo_bg.png" # Delete "$INSTDIR\share\doc\HTML\common\kde_logo.png" # Delete "$INSTDIR\share\doc\HTML\common\kde.css" # Delete "$INSTDIR\share\doc\HTML\common\kde-localised.css.template" # Delete "$INSTDIR\share\doc\HTML\common\kde-docs.css" # Delete "$INSTDIR\share\doc\HTML\common\kde-default.css" # Delete "$INSTDIR\share\doc\HTML\common\header.html" # Delete "$INSTDIR\share\doc\HTML\common\gpl-license.html" # Delete "$INSTDIR\share\doc\HTML\common\gpl-license" # Delete "$INSTDIR\share\doc\HTML\common\footer.html" # Delete "$INSTDIR\share\doc\HTML\common\flat.css" # Delete "$INSTDIR\share\doc\HTML\common\fdl-notice.html" # Delete "$INSTDIR\share\doc\HTML\common\fdl-license.html" # Delete "$INSTDIR\share\doc\HTML\common\fdl-license" # Delete "$INSTDIR\share\doc\HTML\common\favicon.ico" # Delete "$INSTDIR\share\doc\HTML\common\doxygen.css" # Delete "$INSTDIR\share\doc\HTML\common\bsd-license.html" # Delete "$INSTDIR\share\doc\HTML\common\bottom-right.png" # Delete "$INSTDIR\share\doc\HTML\common\bottom-middle.png" # Delete "$INSTDIR\share\doc\HTML\common\bottom-left.png" # Delete "$INSTDIR\share\doc\HTML\common\block_title_top.png" # Delete "$INSTDIR\share\doc\HTML\common\block_title_mid.png" # Delete "$INSTDIR\share\doc\HTML\common\block_title_bottom.png" # Delete "$INSTDIR\share\doc\HTML\common\artistic-license.html" # Delete "$INSTDIR\share\doc\HTML\common\9.png" # Delete "$INSTDIR\share\doc\HTML\common\8.png" # Delete "$INSTDIR\share\doc\HTML\common\7.png" # Delete "$INSTDIR\share\doc\HTML\common\6.png" # Delete "$INSTDIR\share\doc\HTML\common\5.png" # Delete "$INSTDIR\share\doc\HTML\common\4.png" # Delete "$INSTDIR\share\doc\HTML\common\3.png" # Delete "$INSTDIR\share\doc\HTML\common\2.png" # Delete "$INSTDIR\share\doc\HTML\common\10.png" # Delete "$INSTDIR\share\doc\HTML\common\1.png" # Delete "$INSTDIR\share\doc\HTML\common\fdl-translated.html" # Delete "$INSTDIR\share\doc\HTML\common\gpl-translated.html" # Delete "$INSTDIR\share\doc\HTML\common\lgpl-translated.html" # Delete "$INSTDIR\share\doc\HTML\common\kde-localised.css" Delete "$INSTDIR\share\kdeglobals" Delete "$INSTDIR\share\QtProject\qtlogging.ini" # Delete "$INSTDIR\share\apps\kwatchgnupg\pics\kwatchgnupg2.png" # Delete "$INSTDIR\share\apps\kwatchgnupg\pics\kwatchgnupg.png" # Delete "$INSTDIR\share\apps\kwatchgnupg\kwatchgnupgui.rc" Delete "$INSTDIR\share\kleopatra\pics\kleopatra_wizard.svgz" Delete "$INSTDIR\share\kleopatra\pics\kleopatra_wizard.png" Delete "$INSTDIR\share\kleopatra\pics\kleopatra_splashscreen.svgz" Delete "$INSTDIR\share\kleopatra\pics\kleopatra_splashscreen.png" Delete "$INSTDIR\share\kleopatra\pics\gpg4win.png" Delete "$INSTDIR\share\kleopatra\kleopatra.rc" Delete "$INSTDIR\bin\libkleopatraclientgui.dll" Delete "$INSTDIR\bin\libkleopatraclientcore.dll" Delete "$INSTDIR\bin\libkleopatraclientgui.dll" # RMDir "$INSTDIR\share\doc\HTML\en\kleopatra" # RMDir "$INSTDIR\share\doc\HTML\en" # RMDir "$INSTDIR\share\doc\HTML\common" # RMDir "$INSTDIR\share\doc\HTML\de\kleopatra" # RMDir "$INSTDIR\share\doc\HTML\de" # RMDir "$INSTDIR\share\doc\HTML" # RMDir "$INSTDIR\share\doc" RMDir "$INSTDIR\share\QtProject" RMDir "$INSTDIR\share\kleopatra\pics" RMDir "$INSTDIR\share\kleopatra" RMDir "$INSTDIR\share" RMDir "$INSTDIR" DetailPrint "Unregistering file extensions" DeleteRegKey SHCTX "Software\Classes\gpg4win.AssocFile.kleopatra.GPG" DeleteRegKey SHCTX "Software\Classes\gpg4win.AssocFile.kleopatra.ASC" DeleteRegKey SHCTX "Software\Classes\gpg4win.AssocFile.kleopatra.CMS" DeleteRegKey SHCTX "Software\Classes\gpg4win.AssocFile.kleopatra.X509" DeleteRegKey SHCTX "Software\Classes\gpg4win.AssocFile.kleopatra.PGPSIG" DeleteRegKey SHCTX "Software\Classes\gpg4win.AssocFile.kleopatra.PGPKEY" DeleteRegKey SHCTX "Software\Classes\gpg4win.AssocFile.kleopatra.KGRP" DeleteRegKey SHCTX "Software\Gpg4win\kleopatra" DeleteRegValue SHCTX "Software\RegisteredApplications" "Gpg4win.kleopatra" DeleteRegValue SHCTX "Software\Classes\.gpg" "gpg4win.AssocFile.kleopatra.GPG" DeleteRegValue SHCTX "Software\Classes\.asc" "gpg4win.AssocFile.kleopatra.ASC" DeleteRegValue SHCTX "Software\Classes\.pgp" "gpg4win.AssocFile.kleopatra.PGP" DeleteRegValue SHCTX "Software\Classes\.pem" "gpg4win.AssocFile.kleopatra.CMS" DeleteRegValue SHCTX "Software\Classes\.p7s" "gpg4win.AssocFile.kleopatra.CMS" DeleteRegValue SHCTX "Software\Classes\.p7m" "gpg4win.AssocFile.kleopatra.CMS" DeleteRegValue SHCTX "Software\Classes\.arl" "gpg4win.AssocFile.kleopatra.CMS" DeleteRegValue SHCTX "Software\Classes\.crl" "gpg4win.AssocFile.kleopatra.CMS" DeleteRegValue SHCTX "Software\Classes\.crl" "gpg4win.AssocFile.kleopatra.CMS" DeleteRegValue SHCTX "Software\Classes\.kgrp" "gpg4win.AssocFile.Kleopatra.KGRP" DeleteRegKey SHCTX "Software\Classes\P7SFile\DefaultIcon" DeleteRegKey SHCTX "Software\Classes\P7SFile\shell\open\command" DeleteRegKey SHCTX "Software\Classes\P7MFile\DefaultIcon" DeleteRegKey SHCTX "Software\Classes\P7MFile\shell\open\command" DeleteRegKey SHCTX "Software\Classes\openpgp4fpr" DeleteRegKey /ifempty SHCTX "Software\Classes\.gpg" DeleteRegKey /ifempty SHCTX "Software\Classes\.asc" DeleteRegKey /ifempty SHCTX "Software\Classes\.pgp" DeleteRegKey /ifempty SHCTX "Software\Classes\.sig" DeleteRegKey /ifempty SHCTX "Software\Classes\.pem" DeleteRegKey /ifempty SHCTX "Software\Classes\.p7m" DeleteRegKey /ifempty SHCTX "Software\Classes\.p7s" DeleteRegKey /ifempty SHCTX "Software\Classes\.crl" DeleteRegKey /ifempty SHCTX "Software\Classes\.arl" DeleteRegKey /ifempty SHCTX "Software\Classes\.kgrp" !endif SectionEnd diff --git a/src/uninst-kio.nsi b/src/uninst-kparts.nsi similarity index 84% copy from src/uninst-kio.nsi copy to src/uninst-kparts.nsi index a9bafe11..91e48b7e 100644 --- a/src/uninst-kio.nsi +++ b/src/uninst-kparts.nsi @@ -1,28 +1,27 @@ # Copyright (C) 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, 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}/kio-${gpg4win_pkg_kio_version} +!define prefix ${ipdir}/kparts-${gpg4win_pkg_kparts_version} ; Uninstaller section. -Section "-un.kio" - Delete "$INSTDIR\bin\libKF5KIOCore.dll" - Delete "$INSTDIR\bin\libKF5KIOWidgets.dll" +Section "-un.kparts" + Delete "$INSTDIR\bin\libKF5Parts.dll" RmDir "$INSTDIR\bin" SectionEnd diff --git a/src/uninst-okular.nsi b/src/uninst-okular.nsi new file mode 100644 index 00000000..1997affc --- /dev/null +++ b/src/uninst-okular.nsi @@ -0,0 +1,66 @@ +# Copyright (C) 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, 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}/okular-${gpg4win_pkg_okular_version} + +; Uninstaller section. +Section "-un.okular" + Delete "$INSTDIR\bin\okular.exe" + Delete "$INSTDIR\bin\libOkular5Core.dll" + Delete "$INSTDIR\bin\plugins\okularpart.dll" + Delete "$INSTDIR\bin\plugins\okular\generators\okularGenerator_poppler.dll" + RmDir "$INSTDIR\bin\plugins\okular\generators" + RmDir "$INSTDIR\bin\plugins\okular" + RmDir "$INSTDIR\bin\plugins" + RmDir "$INSTDIR\bin" + Delete "$INSTDIR\share\icons\hicolor\64x64\apps\okular.png" + Delete "$INSTDIR\share\icons\hicolor\48x48\apps\okular.png" + Delete "$INSTDIR\share\icons\hicolor\32x32\apps\okular.png" + Delete "$INSTDIR\share\icons\hicolor\22x22\apps\okular.png" + Delete "$INSTDIR\share\icons\hicolor\16x16\apps\okular.png" + Delete "$INSTDIR\share\icons\hicolor\128x128\apps\okular.png" + Delete "$INSTDIR\share\icons\hicolor\icon-theme.cache" + Delete "$INSTDIR\share\icons\hicolor\index.theme" + RMDir "$INSTDIR\share\icons\hicolor\64x64\apps" + RMDir "$INSTDIR\share\icons\hicolor\64x64" + RMDir "$INSTDIR\share\icons\hicolor\48x48\apps" + RMDir "$INSTDIR\share\icons\hicolor\48x48" + RMDir "$INSTDIR\share\icons\hicolor\32x32\apps" + RMDir "$INSTDIR\share\icons\hicolor\32x32" + RMDir "$INSTDIR\share\icons\hicolor\22x22\apps" + RMDir "$INSTDIR\share\icons\hicolor\22x22" + RMDir "$INSTDIR\share\icons\hicolor\16x16\apps" + RMDir "$INSTDIR\share\icons\hicolor\16x16" + RMDir "$INSTDIR\share\icons\hicolor\128x128\apps" + RMDir "$INSTDIR\share\icons\hicolor\128x128" + RMDir "$INSTDIR\share\icons\hicolor" + RMDir "$INSTDIR\share\icons" + RMDir "$INSTDIR\share" + RMDir "$INSTDIR" + + + DetailPrint "Unregistering file extensions" + + DeleteRegValue SHCTX "Software\RegisteredApplications" "Gpg4win.Okular" + DeleteRegKey SHCTX "Software\Gpg4win\Okular" + + DeleteRegKey SHCTX "Software\Classes\gpg4win.AssocFile.Okular.PDF" + +SectionEnd diff --git a/src/uninst-kio.nsi b/src/uninst-poppler.nsi similarity index 83% copy from src/uninst-kio.nsi copy to src/uninst-poppler.nsi index a9bafe11..a65bdcc9 100644 --- a/src/uninst-kio.nsi +++ b/src/uninst-poppler.nsi @@ -1,28 +1,28 @@ # Copyright (C) 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, 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}/kio-${gpg4win_pkg_kio_version} +!define prefix ${ipdir}/poppler-${gpg4win_pkg_poppler_version} ; Uninstaller section. -Section "-un.kio" - Delete "$INSTDIR\bin\libKF5KIOCore.dll" - Delete "$INSTDIR\bin\libKF5KIOWidgets.dll" +Section "-un.poppler" + Delete "$INSTDIR\bin\libpoppler-127.dll" + Delete "$INSTDIR\bin\libpoppler-qt5-1.dll" RmDir "$INSTDIR\bin" SectionEnd diff --git a/src/uninst-kio.nsi b/src/uninst-threadweaver.nsi similarity index 84% copy from src/uninst-kio.nsi copy to src/uninst-threadweaver.nsi index a9bafe11..1f1b46ef 100644 --- a/src/uninst-kio.nsi +++ b/src/uninst-threadweaver.nsi @@ -1,28 +1,27 @@ # Copyright (C) 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, 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}/kio-${gpg4win_pkg_kio_version} +!define prefix ${ipdir}/threadweaver-${gpg4win_pkg_kbookmarks_version} ; Uninstaller section. -Section "-un.kio" - Delete "$INSTDIR\bin\libKF5KIOCore.dll" - Delete "$INSTDIR\bin\libKF5KIOWidgets.dll" +Section "-un.threadweaver" + Delete "$INSTDIR\bin\libKF5ThreadWeaver.dll" RmDir "$INSTDIR\bin" SectionEnd