1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-25 01:42:45 +02:00

* 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> 2005-03-14 Werner Koch <wk@g10code.com>
* mk-w32-dist: Check for patch files. * 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 usual using the mingw32 cross compiler package from Debian and install
the library and header file on top of the cross compiler installation the library and header file on top of the cross compiler installation
(/usr/i586-mingw32msvc/lib/). Note that for ease of maintenance we (/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 -u orig/bzip2-1.0.2/Makefile bzip2-1.0.2/Makefile

View File

@ -36,6 +36,20 @@ else
exit 1 exit 1
fi 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 if i586-mingw32msvc-strip --version >/dev/null 2>&1 ; then
STRIP=i586-mingw32msvc-strip STRIP=i586-mingw32msvc-strip
else else
@ -92,7 +106,8 @@ get_langname () {
# Figure out the version # Figure out the version
version=$(sed -n 's/^#[ ]*define[ ][ ]*VERSION[ ][ ]*\"\([0-9.a-z-]*\)\"/\1/p' $bindir/config.h) 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)" echo "building version $version ($prod_version)"
rm * >/dev/null 2>/dev/null || true rm * >/dev/null 2>/dev/null || true
@ -189,7 +204,7 @@ if [ -n "$topdir" ]; then
# iconv.dll is a hard requirement # iconv.dll is a hard requirement
if [ ! -f "$topdir/iconv/iconv.dll" ]; then if [ ! -f "$topdir/iconv/iconv.dll" ]; then
echo "iconv.dll not availavle" >&2 echo "iconv.dll not available" >&2
exit 1 exit 1
fi fi
ln "$topdir/iconv/iconv.dll" iconv.dll ln "$topdir/iconv/iconv.dll" iconv.dll
@ -208,19 +223,74 @@ if [ -n "$topdir" ]; then
winpt_defs="-DWITH_WINPT" winpt_defs="-DWITH_WINPT"
fi fi
# See whether we should include the source. # See whether we should include the source and figure out the
if [ ! -d "$topdir/tarballs" ]; then # version numbers of the source files.
# FIXME 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 fi
# Now run the installer # Now run the installer
echo "invoking installer as:" echo "invoking installer as:"
echo makensis -v2 -nocd -DVERSION="${version}" \ echo makensis -nocd -DVERSION="${version}" \
-DPROD_VERSION="${prod_version}" \ -DPROD_VERSION="${prod_version}" \
-DGNUPG_SRCDIR="${srcdir}" ${winpt_defs} ${src_defs} \ -DGNUPG_SRCDIR="${srcdir}" ${winpt_defs} ${src_defs} \
${patches_defs} ${srcdir}/scripts/w32installer.nsi ${patches_defs} ${srcdir}/scripts/w32installer.nsi
BUILDINFO=$buildinfo makensis -v2 -nocd -DVERSION="${version}" \ BUILDINFO=$buildinfo makensis -nocd -DVERSION="${version}" \
-DPROD_VERSION="${prod_version}" \ -DPROD_VERSION="${prod_version}" \
-DGNUPG_SRCDIR="${srcdir}" ${winpt_defs} ${src_defs} \ -DGNUPG_SRCDIR="${srcdir}" ${winpt_defs} ${src_defs} \
${patches_defs} ${srcdir}/scripts/w32installer.nsi ${patches_defs} ${srcdir}/scripts/w32installer.nsi

View File

@ -37,7 +37,6 @@ InstallDirRegKey HKLM "Software\GNU\GnuPG" "Install Directory"
SetCompressor lzma SetCompressor lzma
VIProductVersion "${PROD_VERSION}" VIProductVersion "${PROD_VERSION}"
VIAddVersionKey "ProductName" "GNU Privacy Guard (${VERSION})" VIAddVersionKey "ProductName" "GNU Privacy Guard (${VERSION})"
VIAddVersionKey "Comments" \ VIAddVersionKey "Comments" \
@ -132,6 +131,8 @@ Page custom CustomPageOptions
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
ReserveFile "opt.ini" ReserveFile "opt.ini"
ReserveFile "COPYING.txt" ReserveFile "COPYING.txt"
ReserveFile "README-W32.txt"
ReserveFile "${NSISDIR}/Plugins/System.dll"
ReserveFile "${NSISDIR}/Plugins/UserInfo.dll" ReserveFile "${NSISDIR}/Plugins/UserInfo.dll"
@ -236,15 +237,22 @@ SectionEnd ; Section Documentation
;------------------ ;------------------
!ifdef WITH_SOURCE !ifdef WITH_SOURCE
Section "Source" SecSource Section /o "Source" SecSource
SetOutPath "$INSTDIR\Src" 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 ; far better compression results for the distribution. We might
; want to compress it again after installation. ; want to compress it again after installation.
File "gnupg-${VERSION}.tar" File "gnupg-${VERSION}.tar"
File "libiconv-${LIBICONV_VERSION}.tar"
!ifdef WITH_WINPT
File "winpt-$(WINPT_VERSION}.tar"
!endif ; WITH_WINPT
SectionEnd ; Section Source SectionEnd ; Section Source
!endif !endif
@ -389,6 +397,11 @@ Section "Uninstall"
Delete "$INSTDIR\Doc\NEWS.txt" Delete "$INSTDIR\Doc\NEWS.txt"
Delete "$INSTDIR\Doc\FAQ.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" Delete "$INSTDIR\uninst-gnupg.exe"
;;------------------------ ;;------------------------
@ -553,13 +566,15 @@ LangString T_About ${LANG_ENGLISH} \
with the proposed OpenPGP Internet standard as described in RFC2440. \ with the proposed OpenPGP Internet standard as described in RFC2440. \
\r\n\r\n$_CLICK \ \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 GnuPG version ${VERSION}\r\n\
built on $%BUILDINFO%" built on $%BUILDINFO%\r\n\
file version ${PROD_VERSION}"
LangString T_About ${LANG_GERMAN} \ LangString T_About ${LANG_GERMAN} \
"GnuPG is das Werkzeug aus dem GNU Projekt zur sicheren Kommunikation \ "GnuPG is das Werkzeug aus dem GNU Projekt zur sicheren Kommunikation \
sowie zum sicheren Speichern von Daten. \ sowie zum sicheren Speichern von Daten. \
\r\n\r\n$_CLICK \ \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 GnuPG Version ${VERSION}\r\n\
erstellt am $%BUILDINFO%" erstellt am $%BUILDINFO%\r\n\
Dateiversion ${PROD_VERSION}"
; Startup page ; Startup page
LangString T_GPLHeader ${LANG_ENGLISH} \ LangString T_GPLHeader ${LANG_ENGLISH} \
@ -634,6 +649,11 @@ LangString DESC_SecDoc ${LANG_ENGLISH} \
LangString DESC_SecDoc ${LANG_GERMAN} \ LangString DESC_SecDoc ${LANG_GERMAN} \
"Handbuchseiten und eine FAQ" "Handbuchseiten und eine FAQ"
LangString DESC_SecSource ${LANG_ENGLISH} \
"Quelltextdateien"
LangString DESC_SecSource ${LANG_GERMAN} \
"Source files"
;------------------------------------- ;-------------------------------------