/pidgin/main: eb212da4069d: win32: check NSIS, fix installers
Tomasz Wasilczyk
tomkiewicz at cpw.pidgin.im
Mon Apr 22 17:54:40 EDT 2013
Changeset: eb212da4069dea5e7534a353a9be4639bd23ffd1
Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date: 2013-04-22 23:54 +0200
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/eb212da4069d
Description:
win32: check NSIS, fix installers
diffstat:
Makefile.mingw | 33 ++++++++++++------------
pidgin/win32/nsis/generate_gtk_zip.sh | 2 +-
pidgin/win32/prepare-workspace.sh | 46 ++++++++++++++++++++++++++++------
3 files changed, 55 insertions(+), 26 deletions(-)
diffs (200 lines):
diff --git a/Makefile.mingw b/Makefile.mingw
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -50,19 +50,8 @@ PIDGIN_INST_DEP_DIR="$(WIN32_DEV_TOP)/pi
# Any *.dll or *.exe files included in win32-install-dir that we don't compile
# should be included in this list so they don't get stripped
EXTERNAL_DLLS = \
- comerr32.dll \
exchndl.dll \
- freebl3.dll \
- gssapi32.dll \
- k5sprt32.dll \
- krb5_32.dll \
- libnspr4.dll \
- libplc4.dll \
- libplds4.dll \
libsasl.dll \
- libxml2-2.dll \
- nss3.dll \
- nssutil3.dll \
saslANONYMOUS.dll \
saslCRAMMD5.dll \
saslDIGESTMD5.dll \
@@ -70,11 +59,7 @@ EXTERNAL_DLLS = \
saslLOGIN.dll \
saslPLAIN.dll \
libsilc-1-1-2.dll \
- libsilcclient-1-1-3.dll \
- smime3.dll \
- softokn3.dll \
- sqlite3.dll \
- ssl3.dll
+ libsilcclient-1-1-3.dll
#build an expression for `find` to use to ignore the above files
EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o -name %,$(EXTERNAL_DLLS))
@@ -138,7 +123,9 @@ create_release_install_dir: install
find $(STRIPPED_RELEASE_DIR) \( -name '*.dll' -o -name '*.exe' \) \
-not \( -false $(EXTERNAL_DLLS_FIND_EXP) \) \
-exec $(STRIP) --strip-unneeded {} ';'
+ifdef SIGN_EXECUTABLES
$(call authenticode_sign, $(STRIPPED_RELEASE_DIR)/pidgin.exe, "Pidgin $(PIDGIN_VERSION)")
+endif
installer: generate_installer_includes
$(eval $@_DEBUG_SYMBOLS_SHA1SUM := $(shell sha1sum $(DEBUG_SYMBOLS_DIR).zip | sed -e "s/\ .*$$//"))
@@ -147,23 +134,33 @@ installer: generate_installer_includes
-DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" -DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" \
-DDEBUG_SYMBOLS_SHA1SUM="$($@_DEBUG_SYMBOLS_SHA1SUM)" -DGTK_SHA1SUM="$($@_GTK_SHA1SUM)"\
pidgin/win32/nsis/pidgin-installer.nsi
+ifdef SIGN_EXECUTABLES
$(call authenticode_sign, pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION).exe, "Pidgin Installer")
+endif
mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION).exe ./
+ifdef SIGN_EXECUTABLES
$(call gpg_sign, pidgin-$(PIDGIN_VERSION).exe)
+endif
installer_offline: generate_installer_includes
$(MAKENSIS) -V3 -DPIDGIN_VERSION="$(PIDGIN_VERSION)" -DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" \
-DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" -DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" \
-DOFFLINE_INSTALLER \
pidgin/win32/nsis/pidgin-installer.nsi
+ifdef SIGN_EXECUTABLES
$(call authenticode_sign, pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION)-offline.exe, "Pidgin Installer")
+endif
mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION)-offline.exe ./
+ifdef SIGN_EXECUTABLES
$(call gpg_sign, pidgin-$(PIDGIN_VERSION)-offline.exe)
+endif
installer_zip: create_release_install_dir
rm -f pidgin-$(PIDGIN_VERSION)-win32-bin.zip
zip -9 -r pidgin-$(PIDGIN_VERSION)-win32-bin.zip $(STRIPPED_RELEASE_DIR)
+ifdef SIGN_EXECUTABLES
$(call gpg_sign, pidgin-$(PIDGIN_VERSION)-win32-bin.zip)
+endif
debug_symbols_zip: install
rm -rf $(DEBUG_SYMBOLS_DIR) $(DEBUG_SYMBOLS_DIR).zip
@@ -171,9 +168,11 @@ debug_symbols_zip: install
tar -cf - `find $(PIDGIN_INSTALL_DIR) \( -name '*.dll' -o -name '*.exe' \) \
-not \( -false $(EXTERNAL_DLLS_FIND_EXP) \) -print` \
| tar --strip 2 --xform s/$$/.dbgsym/ -xC $(DEBUG_SYMBOLS_DIR) -f -
- cp $(MEANWHILE_TOP)/bin/libmeanwhile-1.dll.unstripped $(DEBUG_SYMBOLS_DIR)/libmeanwhile-1.dll.dbgsym
+ cp $(MEANWHILE_TOP)/bin/libmeanwhile-1.dll.debug $(DEBUG_SYMBOLS_DIR)/libmeanwhile-1.dll.dbgsym
zip -9 -r $(DEBUG_SYMBOLS_DIR).zip $(DEBUG_SYMBOLS_DIR)
+ifdef SIGN_EXECUTABLES
$(call gpg_sign, $(DEBUG_SYMBOLS_DIR).zip)
+endif
installers: installer installer_offline debug_symbols_zip installer_zip
diff --git a/pidgin/win32/nsis/generate_gtk_zip.sh b/pidgin/win32/nsis/generate_gtk_zip.sh
--- a/pidgin/win32/nsis/generate_gtk_zip.sh
+++ b/pidgin/win32/nsis/generate_gtk_zip.sh
@@ -29,7 +29,7 @@ function download() {
exit 1
fi
failed=0
- wget -t 3 "$1" -O "$2" -o "wget.log" --retry-connrefused --waitretry=2 \
+ wget -t 5 "$1" -O "$2" -o "wget.log" --retry-connrefused --waitretry=5 \
--ca-certificate="${STAGE_DIR}/../cacert.pem" \
|| failed=1
if [ $failed != 0 ] ; then
diff --git a/pidgin/win32/prepare-workspace.sh b/pidgin/win32/prepare-workspace.sh
--- a/pidgin/win32/prepare-workspace.sh
+++ b/pidgin/win32/prepare-workspace.sh
@@ -9,6 +9,7 @@
BONJOUR_GUID_PACKED="5CA28B3B1DEA7654999C464610C010EB"
ACTIVEPERL_GUID_PACKED="BC98F31FB8440B94CB3674649419766C 547A2C684F806164DB756F228DAB5840 5E7EC16051106BB43818746C209BC8D7"
PERL_DIR_FALLBACK="/cygdrive/c/Perl/bin"
+NSIS_DIR_REGKEY="HKEY_LOCAL_MACHINE/SOFTWARE/NSIS/@"
DEBUG_SKIP_DOWNLOADING=0
DEBUG_SKIP_INSTALL=0
@@ -89,6 +90,8 @@ ARCHIVES+="ARC_INT "
ARC_MWH="${DOWNLOAD_HOST}mingw32-meanwhile-devel-1.0.2-3.1.noarch.rpm;meanwhile;1.0.2-3.1;5a7cfa0057d865149e56445ca100489dc73843ee;${OBS_SKIP};meanwhile-1.0"
ARCHIVES+="ARC_MWH "
+ARC_MWHD="${DOWNLOAD_HOST}mingw32-meanwhile-debug-1.0.2-3.1.noarch.rpm;meanwhile debug symbols;1.0.2-3.1;ad1b315089d0ccb9605c287c382ef307cd864a6a;${OBS_SKIP};meanwhile-1.0"
+ARCHIVES+="ARC_MWHD "
ARC_PRL="${DOWNLOAD_HOST}perl-5.10.0.tar.gz;Perl;5.10.0;46496029a80cabdfa119cbd70bc14d14bfde8071;perl-5.10.0;perl-5.10"
ARCHIVES+="ARC_PRL "
@@ -141,16 +144,23 @@ function path_real() {
fi
}
+function reg_get_path() {
+ reg_ret=""
+ reg_key="/proc/registry/$1"
+ if [ -f $reg_key ] ; then
+ path_win32_to_cygwin "`cat ${reg_key}`"
+ reg_ret="${path_ret}"
+ return 0
+ fi
+ return 1
+}
+
function reg_get_install_path() {
reg_ret=""
for guid_packed in $1 ; do
- reg_key="/proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Installer/UserData/S-1-5-18/Products/${guid_packed}/InstallProperties/InstallLocation"
- if [ -f $reg_key ] ; then
- path_win32_to_cygwin "`cat ${reg_key}`"
- reg_ret="${path_ret}"
- break
- fi
+ reg_get_path "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Installer/UserData/S-1-5-18/Products/${guid_packed}/InstallProperties/InstallLocation" && return 0
done
+ return 1
}
function check_path() {
@@ -158,8 +168,8 @@ function check_path() {
expected="$2"
expected=`${REALPATH} -e "$expected"`
- current=`which "${chk_cmd}"`
- if [ "$expected" == "" ] || [ "$current" == "" ]; then
+ current=`which "${chk_cmd}" 2> /dev/null`
+ if [ "$expected" == "" ]; then
echo "Error while checking path"
exit 1
fi
@@ -349,6 +359,25 @@ if ! ${REALPATH} -e "${PERL_DIR}/perl" &
exit 1
fi
+# checking for NSIS
+
+reg_get_path "${NSIS_DIR_REGKEY}"
+NSIS_DIR=$reg_ret
+if [ "${NSIS_DIR}" == "" ]; then
+ echo "NSIS not found, please install it."
+ exit 1
+fi
+
+if ! ${REALPATH} -e "${NSIS_DIR}/Plugins/nsisunz.dll" &> /dev/null ; then
+ echo "NSIS plugin \"nsisunz.dll\" not found in \"${NSIS_DIR}/Plugins\", please install it."
+ exit 1
+fi
+
+if ! ${REALPATH} -e "${NSIS_DIR}/Plugins/SHA1Plugin.dll" &> /dev/null ; then
+ echo "NSIS plugin \"SHA1Plugin.dll\" not found in \"${NSIS_DIR}/Plugins\", please install it."
+ exit 1
+fi
+
# downloading archives
if [ $DEBUG_SKIP_DOWNLOADING == 0 ]; then
echo "Downloading and verifying archives..."
@@ -383,6 +412,7 @@ echo "Checking PATH..."
path_changed=0
check_path "gcc" "${WIN32DEV_BASE}/mingw/bin/gcc" || path_changed=1
check_path "perl" "${PERL_DIR}/perl" || path_changed=1
+check_path "makensis" "${NSIS_DIR}/makensis" || path_changed=1
if [ $path_changed == 1 ]; then
echo "PATH changed - executing sub-shell"
bash
More information about the Commits
mailing list