aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scripts/ChangeLog7
-rw-r--r--scripts/conf-w32/bzip2-1.diff2
-rwxr-xr-xscripts/mk-w32-dist86
-rw-r--r--scripts/w32installer.nsi32
4 files changed, 112 insertions, 15 deletions
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
index abd8d4156..5551457ab 100644
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-30 Werner Koch <[email protected]>
+
+ * w32installer.nsi: Allow including of WINPT source. Include
+ libiconv source.
+ * mk-w32-dist: Add code to detect presence of source. Calculate a
+ build number; add option --build-number to overide.
+
2005-03-14 Werner Koch <[email protected]>
* mk-w32-dist: Check for patch files.
diff --git a/scripts/conf-w32/bzip2-1.diff b/scripts/conf-w32/bzip2-1.diff
index 568d8f508..60036d07f 100644
--- a/scripts/conf-w32/bzip2-1.diff
+++ b/scripts/conf-w32/bzip2-1.diff
@@ -3,7 +3,7 @@ below should be applied to a stock bzip2-1.0.2 source. The Build as
usual using the mingw32 cross compiler package from Debian and install
the library and header file on top of the cross compiler installation
(/usr/i586-mingw32msvc/lib/). Note that for ease of maintenance we
-don't used a DLL. [wk 2005-03-14]
+don't use a DLL. [wk 2005-03-14]
diff -u orig/bzip2-1.0.2/Makefile bzip2-1.0.2/Makefile
diff --git a/scripts/mk-w32-dist b/scripts/mk-w32-dist
index c40787371..e81939f1e 100755
--- a/scripts/mk-w32-dist
+++ b/scripts/mk-w32-dist
@@ -36,6 +36,20 @@ else
exit 1
fi
+# Windows uses an internal build number. We use the last day of the
+# year concatenated with the hour. for it. If it happens that a new
+# release of the same version is to be made in the next year, the
+# build number must be given manually by adding the appropriate number
+# of days.
+if [ "$1" = "--build-number" -a -n "$2" ]; then
+ build_number="$2"
+ shift
+ shift
+else
+ build_number=$(date -u '+%j%k' | sed 's/^0*\(.*\)/\1/')
+fi
+
+
if i586-mingw32msvc-strip --version >/dev/null 2>&1 ; then
STRIP=i586-mingw32msvc-strip
else
@@ -92,7 +106,8 @@ get_langname () {
# Figure out the version
version=$(sed -n 's/^#[ ]*define[ ][ ]*VERSION[ ][ ]*\"\([0-9.a-z-]*\)\"/\1/p' $bindir/config.h)
-prod_version=$(echo "$version"|awk -F'[^0-9]' '{print $1 "." $2 "." $3 ".1"}')
+prod_version=$(echo "$version"|awk -F'[^0-9]' '{print $1 "." $2 "." $3 }')
+prod_version="${prod_version}.${build_number}"
echo "building version $version ($prod_version)"
rm * >/dev/null 2>/dev/null || true
@@ -189,7 +204,7 @@ if [ -n "$topdir" ]; then
# iconv.dll is a hard requirement
if [ ! -f "$topdir/iconv/iconv.dll" ]; then
- echo "iconv.dll not availavle" >&2
+ echo "iconv.dll not available" >&2
exit 1
fi
ln "$topdir/iconv/iconv.dll" iconv.dll
@@ -208,19 +223,74 @@ if [ -n "$topdir" ]; then
winpt_defs="-DWITH_WINPT"
fi
- # See whether we should include the source.
- if [ ! -d "$topdir/tarballs" ]; then
- # FIXME
- :
+ # See whether we should include the source and figure out the
+ # version numbers of the source files.
+ if [ -d "$topdir/tarballs" ]; then
+ have_gnupg_src=no
+ have_libiconv_src=no
+ have_winpt_src=no
+ for i in `find "$topdir/tarballs" -type f -name '*.tar.gz'`; do
+ fname=$(basename "$i" .gz)
+ zcat "$i" > "$fname"
+ case "$fname" in
+ gnupg-*)
+ tmp=$(echo "$fname" | \
+ sed -n 's/^[^-]*-\([0-9.a-z-]*\)\.tar$/\1/p')
+ echo "gnupg source version is $tmp" >&2
+ if [ "$version" != "$tmp" ]; then
+ echo "gnupg source version does not match" >&2
+ exit 1
+ fi
+ have_gnupg_src=yes
+ ;;
+ libiconv-*)
+ tmp=$(echo "$fname" | \
+ sed -n 's/^[^-]*-\([0-9.a-z-]*\)\.tar$/\1/p')
+ echo "libiconv source version is $tmp" >&2
+ src_defs="$src_defs -DLIBICONV_VERSION=$tmp"
+ have_libiconv_src=yes
+ ;;
+ winpt-*)
+ tmp=$(echo "$fname" | \
+ sed -n 's/^[^-]*-\([0-9.a-z-]*\)\.tar$/\1/p')
+ echo "winpt source version is $tmp" >&2
+ src_defs="$src_defs -DWINPT_VERSION=$tmp"
+ have_winpt_src=yes
+ ;;
+
+ *)
+ echo "WARNING: unknown source file $fname ignored" >&2
+ ;;
+ esac
+ done
+ if [ -n "$src_defs" ]; then
+ if [ $have_gnupg_src = "no" ]; then
+ echo "gnupg source missing" >&2
+ exit 1
+ fi
+ if [ $have_libiconv_src = "no" ]; then
+ echo "libiconv source missing" >&2
+ exit 1
+ fi
+ if [ -n "$winpt_defs" ]; then
+ if [ $have_winpt_src = "no" ]; then
+ echo "winpt source missing" >&2
+ exit 1
+ fi
+ fi
+
+ src_defs="$src_defs -DWITH_SOURCE"
+ fi
+
fi
# Now run the installer
echo "invoking installer as:"
- echo makensis -v2 -nocd -DVERSION="${version}" \
+ echo makensis -nocd -DVERSION="${version}" \
-DPROD_VERSION="${prod_version}" \
-DGNUPG_SRCDIR="${srcdir}" ${winpt_defs} ${src_defs} \
${patches_defs} ${srcdir}/scripts/w32installer.nsi
- BUILDINFO=$buildinfo makensis -v2 -nocd -DVERSION="${version}" \
+ BUILDINFO=$buildinfo makensis -nocd -DVERSION="${version}" \
-DPROD_VERSION="${prod_version}" \
-DGNUPG_SRCDIR="${srcdir}" ${winpt_defs} ${src_defs} \
${patches_defs} ${srcdir}/scripts/w32installer.nsi
diff --git a/scripts/w32installer.nsi b/scripts/w32installer.nsi
index 6d7f97d22..ebb414f3d 100644
--- a/scripts/w32installer.nsi
+++ b/scripts/w32installer.nsi
@@ -37,7 +37,6 @@ InstallDirRegKey HKLM "Software\GNU\GnuPG" "Install Directory"
SetCompressor lzma
-
VIProductVersion "${PROD_VERSION}"
VIAddVersionKey "ProductName" "GNU Privacy Guard (${VERSION})"
VIAddVersionKey "Comments" \
@@ -132,6 +131,8 @@ Page custom CustomPageOptions
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
ReserveFile "opt.ini"
ReserveFile "COPYING.txt"
+ReserveFile "README-W32.txt"
+ReserveFile "${NSISDIR}/Plugins/System.dll"
ReserveFile "${NSISDIR}/Plugins/UserInfo.dll"
@@ -236,15 +237,22 @@ SectionEnd ; Section Documentation
;------------------
!ifdef WITH_SOURCE
-Section "Source" SecSource
+Section /o "Source" SecSource
SetOutPath "$INSTDIR\Src"
- ; Note that we include the uncompressed tarball because this allows
+ ; Note that we include the uncompressed tarballs because this allows
; far better compression results for the distribution. We might
; want to compress it again after installation.
+
File "gnupg-${VERSION}.tar"
+ File "libiconv-${LIBICONV_VERSION}.tar"
+
+!ifdef WITH_WINPT
+ File "winpt-$(WINPT_VERSION}.tar"
+!endif ; WITH_WINPT
+
SectionEnd ; Section Source
!endif
@@ -389,6 +397,11 @@ Section "Uninstall"
Delete "$INSTDIR\Doc\NEWS.txt"
Delete "$INSTDIR\Doc\FAQ.txt"
+ Delete "$INSTDIR\Src\gnupg-${VERSION}.tar"
+ Delete "$INSTDIR\Src\libiconv-${LIBICONV_VERSION}.tar"
+ Delete "$INSTDIR\Src\winpt-$(WINPT_VERSION}.tar"
+ Delete "$INSTDIR\Src\*.diff"
+
Delete "$INSTDIR\uninst-gnupg.exe"
;;------------------------
@@ -553,13 +566,15 @@ LangString T_About ${LANG_ENGLISH} \
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\
- built on $%BUILDINFO%"
+ built on $%BUILDINFO%\r\n\
+ file version ${PROD_VERSION}"
LangString T_About ${LANG_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\
- erstellt am $%BUILDINFO%"
+ \r\n\r\n\r\n\r\n\r\nDies ist GnuPG Version ${VERSION}\r\n\
+ erstellt am $%BUILDINFO%\r\n\
+ Dateiversion ${PROD_VERSION}"
; Startup page
LangString T_GPLHeader ${LANG_ENGLISH} \
@@ -634,6 +649,11 @@ LangString DESC_SecDoc ${LANG_ENGLISH} \
LangString DESC_SecDoc ${LANG_GERMAN} \
"Handbuchseiten und eine FAQ"
+LangString DESC_SecSource ${LANG_ENGLISH} \
+ "Quelltextdateien"
+LangString DESC_SecSource ${LANG_GERMAN} \
+ "Source files"
+
;-------------------------------------