Added WinPT and GPGee
authorWerner Koch <wk@gnupg.org>
Wed, 26 Oct 2005 13:28:49 +0000 (13:28 +0000)
committerWerner Koch <wk@gnupg.org>
Wed, 26 Oct 2005 13:28:49 +0000 (13:28 +0000)
12 files changed:
ChangeLog
README
TODO
configure.ac
include/config.nsi.in
m4/gpg4win.m4
packages/download.sh
src/Makefile.am
src/gpg4win.nsi
src/inst-sections.nsi
src/installer-finish.nsi
src/installer.nsi

index 596659d..ee0eb98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2005-10-26  Werner Koch  <wk@g10code.com>
+
+       * README: Add basic instructions on how to add new packages.
+
+       * configure.ac: Add detection of GPGee and WinPT.
+       * m4/gpg4win.m4 (GPG4WIN_BPKG_BINSRC): New.
+
+       * include/config.nsi.in: Add defines for WinPT and GGee.
+       * src/inst-winpt.nsi: New.
+       * src/inst-gpgee.nsi: New.
+       * src/uninst-winpt.nsi: New.
+       * src/uninst-gpgee.nsi: New.
+       * src/Makefile.am (gpg4win_bpkgs): Add WinPT and GPGee.
+       * src/inst-sections.nsi: Ditto.
+       * src/installer-finish.nsi: Ditto.
+       * packages/download.sh (server_winpt): Add WinPT.
+       (server_gpgee): Add temporary location for gpgee.
+       (server_g10code): Add temporary location for gpg-error, gpgme,
+       gpa and gpgol.
+
+2005-10-25  Werner Koch  <wk@g10code.com>
+
+       * src/installer.nsi: Don't put the version into the "Name" variable.
+
 2005-10-24  Marcus Brinkmann  <marcus@g10code.de>
 
        * COPYING: New file.
diff --git a/README b/README
index 55060e4..9c51949 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,7 @@
 This is gpg4win - the GUI Installer Builder for W32.
 
 Instructions:
+=============
 
 1. Download the source and binary packages that are required to build
    the installer:
@@ -24,6 +25,34 @@ src/gpg4win-X.Y.Z.exe
 src/gpg4win-src-X.Y.Z.exe
 
 
+Adding new packages to the installer:
+=====================================
+
+This requires editing a couple of files; we might eventually automate
+some of tehse tasks.  Here is a short run up:
+
+1. Add constants for the package FOO into include/config.nsi.in .
+
+2. Create 2 new installer scripts, named src/inst-foo.nsi and
+   uninst-foo.nsi .
+
+3. Add foo to one the variables gpg4win_bpgks (if foo should not be
+   build be the gpg4win) or gpg4win_spkgs (if foo should be build by
+   gpg4win) in src/Makefile.am
+
+4. Add FOO to inst-sections.nsi and installer-finish.nsi.  The latter
+   is required for menu shortcuts.
+
+5. Add detection of packages to configure.ac.  Check out the available
+   mcros in m4/gpg4win.m4.  Depending on the way an upstream package
+   is packaged, you might need to write a new macro.
+
+6. Add download information to packages/download.sh.
+
+Then run the usual "aclocal -I m4 && automake && autoconf" or whatever
+to create the actual configure file and run configure as described above.
+
+
 Copyright 2005 g10 Code GmbH
 
 This file is free software; as a special exception the author gives
diff --git a/TODO b/TODO
index 692237d..918547b 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,9 @@
+                                                          -*- outline -*-
+
+* Missing stuff
+** No sources yet for WinPT due to current changes in its build system
+** WinPT signature file should better be named .sig
+
 * Component related issues:
 ** Check out which locale files to install and where. !!!
 ** Check which iconv to use !!
index e1f12bb..1bcdc2f 100644 (file)
@@ -69,12 +69,17 @@ GPG4WIN_BPKG_GTK_DEV([glib], [pkgconfig])
 GPG4WIN_BPKG_GTK_DEV([gtk+], [atk pango glib libiconv gettext pkgconfig])
 GPG4WIN_BPKG_GTK_DEV([atk], [glib pkgconfig])
 GPG4WIN_BPKG_GTK_DEV([pango], [glib pkgconfig])
+#fixme: Theseare intermediate package.
+GPG4WIN_BPKG_BINSRC([gpgee], [gnupg])
+GPG4WIN_BPKG_BINSRC([winpt], [gpgme gnupg])
+
 
 GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
 GPG4WIN_SPKG([gpgme], [libgpg-error gnupg])
 GPG4WIN_SPKG([gnupg])
 GPG4WIN_SPKG([gpgol], [gpgme])
 GPG4WIN_SPKG([gpa], [libiconv gettext zlib gtk+ libpng glib gpgme])
+#GPG4WIN_SPKG([winpt], [gpgme gnupg])
 
 GPG4WIN_FINALIZE
 
index 305e231..491380f 100644 (file)
 !define gpg4win_pkg_gpa @gpg4win_pkg_gpa@
 !define gpg4win_pkg_gpa_version @gpg4win_pkg_gpa_version@
 
+@HAVE_PKG_WINPT@
+!define gpg4win_pkg_winpt @gpg4win_pkg_winpt@
+!define gpg4win_pkg_winpt_version @gpg4win_pkg_winpt_version@
+!define gpg4win_pkg_winpt_src @gpg4win_pkg_winpt_src@
+
+@HAVE_PKG_GPGEE@
+!define gpg4win_pkg_gpgee @gpg4win_pkg_gpgee@
+!define gpg4win_pkg_gpgee_version @gpg4win_pkg_gpgee_version@
+!define gpg4win_pkg_gpgee_src @gpg4win_pkg_gpgee_src@
+
 @HAVE_PKG_ZLIB@
 !define gpg4win_pkg_zlib @gpg4win_pkg_zlib@
 !define gpg4win_pkg_zlib_version @gpg4win_pkg_zlib_version@
index aca8fb0..e38f9f1 100644 (file)
@@ -474,3 +474,58 @@ AC_DEFUN([GPG4WIN_BPKG_GNU],
           [$3],
           [$4])
 ])
+
+
+# GPG4WIN_BPKG_BINSRC([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
+# Set up package PKG which is expected to ge delivered as two ZIP files
+# with a "-src" and a "-bin" suffix.
+AC_DEFUN([GPG4WIN_BPKG_BINSRC],
+[
+  AC_REQUIRE([GPG4WIN_INIT])
+  _gpg4win_pkg=maybe
+  AC_ARG_ENABLE([pkg-$1],
+    AS_HELP_STRING([--enable-pkg-$1[=DIR]],
+                   [include package $1]),
+    _gpg4win_pkg=$enableval)
+  _gpg4win_bpkg=no
+  _gpg4win_version=
+  AS_IF([test x$_gpg4win_pkg != xno],
+        [GPG4WIN_FIND($1-bin, [$1-\(.*\)-bin],,
+         $_gpg4win_pkg,
+         _gpg4win_bpkg=$gpg4win_val
+        _gpg4win_version=$gpg4win_version)])
+
+  # At this point, _gpg4win_bpkg is no, or the actual package binary file.
+
+  # gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
+  gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_bpkg
+  AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
+
+  # gpg4win_pkg_PKGNAME_version=VERSION
+  gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
+  AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
+
+  AS_IF([test $_gpg4win_bpkg != no],
+    GPG4WIN_FIND($1-src, [$1-\(.*\)-src],,
+                 $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
+       AC_MSG_ERROR(can not find sources for package $1))
+    # gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
+    gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src=$_gpg4win_bpkg
+    AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src)
+
+    # FIXME: Add a version consistency check here.  Both packages
+    # must match!
+
+    GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
+
+    _gpg4win_pkgs="$_gpg4win_pkgs $1"
+    # Record dependencies.  Also enter every package as node.
+    _gpg4win_deps="$_gpg4win_deps $1 $1"
+    AS_IF([test ! -z "$2"],
+          for _gpg4win_i in $2; do
+           _gpg4win_deps="$_gpg4win_deps $_gpg4win_i $1"
+          done)
+          [$3],
+          [$4])
+])
+
index dd9357c..41dd0bc 100644 (file)
@@ -73,6 +73,22 @@ ${WGET} -c ${server_gtk}/gtk+-2.6.6.tar.bz2
 ${WGET} -c ${server_gimp}/pkgconfig-0.15.zip
 ${WGET} -c ${server_gimp}/pkgconfig-0.15.0.tar.gz
 
+# WinPT
+
+#server_winpt="http://wald.intevation.org/frs/download.php"
+server_winpt="ftp://ftp.g10code.com/g10code/scratch"
+
+${WGET} -c ${server_winpt}/winpt-0.10.2_beta-bin.zip
+${WGET} -c ${server_winpt}/winpt-0.10.2_beta-src.zip
+
+# GPGee
+# Note: This is a temporary location
+
+server_gpgee="ftp://ftp.g10code.com/g10code/scratch"
+
+${WGET} -c ${server_gpgee}/gpgee-1.2.2-bin.zip
+${WGET} -c ${server_gpgee}/gpgee-1.2.2-src.zip
+
 
 # GnuPG stuff.
 
@@ -81,8 +97,15 @@ server_gnupg=http://ftp.gnupg.org/gcrypt
 ${WGET} -c ${server_gnupg}/gnupg/gnupg-1.4.2.tar.gz
 ${WGET} -c ${server_gnupg}/gnupg/gnupg-1.4.2.tar.gz.sig
 
-${WGET} -c ${server_gnupg}/gpgme/gpgme-1.1.0.tar.gz
-${WGET} -c ${server_gnupg}/gpgme/gpgme-1.1.0.tar.gz.sig
+#${WGET} -c ${server_gnupg}/gpgme/gpgme-1.1.0.tar.gz
+#${WGET} -c ${server_gnupg}/gpgme/gpgme-1.1.0.tar.gz.sig
 
 # libgpg-error, GPA and GPGol currently come from manually crafted
-# packages.
+# packages.  However, we make them available at a scratch location
+
+server_g10code="ftp://ftp.g10code.com/g10code/scratch"
+
+${WGET} -c ${server_g10code}/libgpg-error-1.2-cvs.tar.bz2
+${WGET} -c ${server_g10code}/gpgme-1.2.0-cvs.tar.bz2
+${WGET} -c ${server_g10code}/gpa-0.7.1-cvs.tar.bz2
+${WGET} -c ${server_g10code}/gpgol-0.9.4-cvs.tar.bz2
index c0f4b61..a807f49 100644 (file)
@@ -46,7 +46,8 @@ gpg4win_pkg_gpgol_configure = \
   --with-gpgme-prefix=$(idir) --with-gpg-error-prefix=$(idir)
 
 # Supported binary packages.
-gpg4win_bpkgs :=  libiconv gettext pkgconfig zlib glib libpng pango atk gtk+
+gpg4win_bpkgs :=  libiconv gettext pkgconfig zlib glib libpng pango atk gtk+ \
+                 winpt gpgee
 
 # libiconv needs some special magic to generate a usable import
 # library.
index b279efa..dc150af 100644 (file)
   It includes an advanced key management facility and is compliant \
   with the proposed OpenPGP Internet standard as described in RFC2440. \
   \r\n\r\n$_CLICK \
-  \r\n\r\n\r\n\r\n\r\nThis is GnuPG version ${VERSION}\r\n\
+  \r\n\r\n\r\n\r\n\r\nThis is GPG4WIN version ${VERSION}\r\n\
   file version ${PROD_VERSION}"
 !define ABOUT_GERMAN \
   "GnuPG is das Werkzeug aus dem GNU Projekt zur sicheren Kommunikation \
    sowie zum sicheren Speichern von Daten. \
    \r\n\r\n$_CLICK \
-   \r\n\r\n\r\n\r\n\r\nDies ist GnuPG Version ${VERSION}\r\n\
+   \r\n\r\n\r\n\r\n\r\nDies ist GPG4WIN Version ${VERSION}\r\n\
    Dateiversion ${PROD_VERSION}"
 
 
index 107fac2..f299bac 100644 (file)
 !ifdef HAVE_PKG_GPA
 !include "inst-gpa.nsi"
 !endif
+!ifdef HAVE_PKG_WINPT
+!include "inst-winpt.nsi"
+!endif
+!ifdef HAVE_PKG_GPGEE
+!include "inst-gpgee.nsi"
+!endif
 
 # We have to invoke the uninstallers in reverse order!
 
+!ifdef HAVE_PKG_GPGEE
+!include "uninst-gpgee.nsi"
+!endif
+!ifdef HAVE_PKG_WINPT
+!include "uninst-winpt.nsi"
+!endif
 !ifdef HAVE_PKG_GPA
 !include "uninst-gpa.nsi"
 !endif
@@ -153,6 +165,22 @@ Function CalcDepends
 
   # Then enable all dependencies in reverse build list order!
 
+!ifdef HAVE_PKG_GPGEE
+  !insertmacro SectionFlagIsSet ${SEC_gpgee} ${SF_SELECTED} have_gpgee skip_gpgee
+  have_gpgee:
+  !insertmacro SelectSection ${SEC_gpgme}
+  !insertmacro SelectSection ${SEC_gnupg}
+  skip_gpgee:
+!endif
+
+!ifdef HAVE_PKG_WINPT
+  !insertmacro SectionFlagIsSet ${SEC_winpt} ${SF_SELECTED} have_winpt skip_winpt
+  have_winpt:
+  !insertmacro SelectSection ${SEC_gpgme}
+  !insertmacro SelectSection ${SEC_gnupg}
+  skip_winpt:
+!endif
+
 !ifdef HAVE_PKG_GPA
   !insertmacro SectionFlagIsSet ${SEC_gpa} ${SF_SELECTED} have_gpa skip_gpa
   have_gpa:
@@ -263,6 +291,12 @@ FunctionEnd
 !ifdef HAVE_PKG_GPA
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpa} $(DESC_SEC_gpa)
 !endif
+!ifdef HAVE_PKG_WINPT
+  !insertmacro MUI_DESCRIPTION_TEXT ${SEC_winpt} $(DESC_SEC_winpt)
+!endif
+!ifdef HAVE_PKG_GPGEE
+  !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgee} $(DESC_SEC_gpgee)
+!endif
 !ifdef HAVE_PKG_GNUPG
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gnupg} $(DESC_SEC_gnupg)
 !endif
@@ -275,6 +309,10 @@ Section "-startmenu"
 !ifdef HAVE_STARTMENU
 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
     CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
+!ifdef HAVE_PKG_WINPT
+    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\WINPT.lnk" \
+       "$INSTDIR\winpt.exe"
+!endif
 !ifdef HAVE_PKG_GPA
     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GPA.lnk" \
        "$INSTDIR\gpa.exe"
index 203d786..706c5d7 100644 (file)
@@ -40,6 +40,9 @@ SectionEnd
 Section Uninstall
 !ifdef HAVE_STARTMENU
 !insertmacro MUI_STARTMENU_GETFOLDER ${STARTMENU_FOLDER} $R0
+!ifdef HAVE_PKG_WINPT
+  Delete "$SMPROGRAMS\$R0\WINPT.lnk"
+!endif
 !ifdef HAVE_PKG_GPA
   Delete "$SMPROGRAMS\$R0\GPA.lnk"
 !endif
index 2b28a0d..e1148ec 100644 (file)
@@ -34,8 +34,9 @@
 !include "MUI.nsh"
 
 
-# Set the package name.
-Name "${PRETTY_PACKAGE} ${VERSION}"
+# 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}"
 
 
 # Set the output filename.