* 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.
This commit is contained in:
Werner Koch 2005-03-30 14:23:01 +00:00
parent 1985805cdf
commit 0fae3c3738
4 changed files with 112 additions and 15 deletions

View File

@ -1,3 +1,10 @@
2005-03-30 Werner Koch <wk@g10code.com>
* 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 <wk@g10code.com>
* mk-w32-dist: Check for patch files.

View File

@ -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

View File

@ -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

View File

@ -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"
;-------------------------------------