pidgin: 0f8cb7d0: The rest of the plumbing needed to build...

datallah at pidgin.im datallah at pidgin.im
Mon Mar 1 09:46:11 EST 2010


-----------------------------------------------------------------
Revision: 0f8cb7d032ff061ba0d837a701dce520b630315a
Ancestor: 37a75d3f68ccde96a9e7fec7df5e7367df0a6586
Author: datallah at pidgin.im
Date: 2010-03-01T14:41:17
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0f8cb7d032ff061ba0d837a701dce520b630315a

Added files:
        pidgin/win32/nsis/generate_gtk_zip.sh
Modified files:
        Makefile.mingw pidgin/Makefile.am
        pidgin/win32/nsis/pidgin-installer.nsi

ChangeLog: 

The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer

-------------- next part --------------
============================================================
--- pidgin/win32/nsis/generate_gtk_zip.sh	61bd557216196a9c4bd33424b93254aab8f00790
+++ pidgin/win32/nsis/generate_gtk_zip.sh	61bd557216196a9c4bd33424b93254aab8f00790
@@ -0,0 +1,83 @@
+#!/bin/bash
+# Script to generate zip file for GTK+ runtime to be included in Pidgin installer
+
+PIDGIN_BASE=$1
+
+if [ ! -e $PIDGIN_BASE/ChangeLog.win32 ]; then
+	echo `basename $0` must must have the pidgin base dir specified as a parameter.
+	exit 1
+fi
+
+STAGE_DIR=$PIDGIN_BASE/pidgin/win32/nsis/gtk_runtime_stage
+#Subdirectory of $STAGE_DIR
+INSTALL_DIR=Gtk
+CONTENTS_FILE=$INSTALL_DIR/CONTENTS
+
+#This needs to be changed every time there is any sort of change.
+BUNDLE_VERSION=2.14.7.0
+
+ATK="http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.24/atk_1.24.0-1_win32.zip ATK 1.24.0-1"
+CAIRO="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.10-1_win32.zip Cairo 1.8.10-1"
+EXPAT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip Expat 2.0.1-1"
+FONTCONFIG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip Fontconfig 2.8.0-2"
+FREETYPE="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.3.11-2_win32.zip Freetype 2.3.11-2"
+GETTEXT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17-1.zip Gettext 0.17-1"
+GLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.20/glib_2.20.5-1_win32.zip Glib 2.20.5-1"
+GTK="http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.14/gtk+_2.14.7-1_win32.zip GTK+ 2.14.7-1"
+LIBJPEG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/jpeg_7-1_win32.zip libjpeg 7-1"
+#Used by GTK+
+LIBPNG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.2.39-1_win32.zip libpng 1.2.39-1"
+#Used by Cairo
+LIBPNG2="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.0-1_win32.zip libpng 1.4.0-1"
+LIBTIFF="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libtiff_3.9.1-1_win32.zip libtiff 3.9.1-1"
+#PANGO="http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango_1.22.4-1_win32.zip Pango 1.22.4-1"
+PANGO="http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.26/pango_1.26.2-1_win32.zip Pango 1.26.2-1"
+ZLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-1.2.3.zip zlib 1.2.3"
+
+ALL="ATK CAIRO EXPAT FONTCONFIG FREETYPE GETTEXT GLIB GTK LIBJPEG LIBPNG LIBPNG2 LIBTIFF PANGO ZLIB"
+
+if [ ! -e $STAGE_DIR ]; then
+	mkdir $STAGE_DIR
+fi
+cd $STAGE_DIR
+
+rm -rf $INSTALL_DIR
+mkdir $INSTALL_DIR
+
+#new CONTENTS file
+echo Bundle Version $BUNDLE_VERSION > $CONTENTS_FILE
+
+function download_and_extract {
+	URL=${1%%\ *}
+	NAME=${1#*\ }
+	FILE=`basename $URL`
+	if [ ! -e $FILE ]; then
+		echo Downloading $NAME
+		wget $URL
+	fi
+	unzip -q $FILE -d $INSTALL_DIR
+	echo "$NAME" >> $CONTENTS_FILE
+}
+
+for VAL in $ALL
+do
+	VAR=${!VAL}
+	download_and_extract "$VAR"
+done
+
+#Default GTK+ Theme to MS-Windows
+echo gtk-theme-name = \"MS-Windows\" > $INSTALL_DIR/etc/gtk-2.0/gtkrc
+
+#Blow away translations that we don't have in Pidgin
+for LOCALE_DIR in $INSTALL_DIR/share/locale/*
+do
+	LOCALE=`basename $LOCALE_DIR`
+	if [ ! -e $PIDGIN_BASE/po/$LOCALE.po ]; then
+		echo Remove $LOCALE translation as it is missing from Pidgin
+		rm -r $LOCALE_DIR
+	fi
+done
+
+#Generate zip file to be included in installer
+zip -9 -r ../gtk-runtime-$BUNDLE_VERSION.zip Gtk
+
============================================================
--- Makefile.mingw	f31ce25ca877d2af4cf4266a98c6209c847a81cd
+++ Makefile.mingw	44423e5ee159f50b77317a11b8d552f8bf389168
@@ -31,10 +31,7 @@ awk 'BEGIN {FS="."} { \
     exit; \
 }' VERSION)
 
-GTK_INSTALL_VERSION = $(shell \
-  source ../gtk_installer/version.sh; \
-  echo $$gtk_version \
-)
+GTK_INSTALL_VERSION = 2.14.7.0
 
 STRIPPED_RELEASE_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-win32bin
 DEBUG_SYMBOLS_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-dbgsym
@@ -74,7 +71,7 @@ EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o
 #build an expression for `find` to use to ignore the above files
 EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o -name %,$(EXTERNAL_DLLS))
 
-.PHONY: all docs install installer installer_offline installer_zip debug_symbols_zip installers clean uninstall create_release_install_dir generate_translations_installer_include $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT)
+.PHONY: all docs install installer installer_offline installer_zip debug_symbols_zip installers clean uninstall create_release_install_dir generate_installer_includes $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT)
 
 all: $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H)
 	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE)
@@ -92,7 +89,10 @@ endif
 	$(MAKE) -C share/ca-certs -f $(MINGW_MAKEFILE) install
 	$(MAKE) -C share/sounds -f $(MINGW_MAKEFILE) install
 
-generate_translations_installer_include: create_release_install_dir 
+pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip:
+	pidgin/win32/nsis/generate_gtk_zip.sh `pwd`
+
+generate_installer_includes: create_release_install_dir pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip
 	rm -f pidgin/win32/nsis/pidgin-translations.nsh
 	find $(STRIPPED_RELEASE_DIR)/locale -maxdepth 1 -mindepth 1 \
 	 -exec basename {} ';' \
@@ -106,11 +106,11 @@ create_release_install_dir: install
 	 -not \( -false $(EXTERNAL_DLLS_FIND_EXP) \) \
 	 -exec $(STRIP) --strip-unneeded {} ';'
 
-installer: create_release_install_dir generate_translations_installer_include
+installer: create_release_install_dir generate_installer_includes
 	$(MAKENSIS) $(MAKENSISOPT)V3 $(MAKENSISOPT)DPIDGIN_VERSION="$(PIDGIN_VERSION)" $(MAKENSISOPT)DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" $(MAKENSISOPT)DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" $(MAKENSISOPT)DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" pidgin/win32/nsis/pidgin-installer.nsi
 	mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION).exe ./
 
-installer_offline: create_release_install_dir generate_translations_installer_include debug_symbols_zip
+installer_offline: create_release_install_dir generate_installer_includes debug_symbols_zip
 	$(MAKENSIS) $(MAKENSISOPT)V3 $(MAKENSISOPT)DPIDGIN_VERSION="$(PIDGIN_VERSION)" $(MAKENSISOPT)DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" $(MAKENSISOPT)DOFFLINE_INSTALLER $(MAKENSISOPT)DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" $(MAKENSISOPT)DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" pidgin/win32/nsis/pidgin-installer.nsi
 	mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION)-offline.exe ./
 
============================================================
--- pidgin/Makefile.am	cd11e417bfa4be7fdc8509554dae705a9cac14bc
+++ pidgin/Makefile.am	2d0b2d2761a4c80825b61216e80a8a7e20cfd646
@@ -21,6 +21,7 @@ EXTRA_DIST = \
 		win32/winpidgin.c \
 		win32/wspell.c \
 		win32/wspell.h \
+		win32/nsis/generate_gtk_zip.sh \
 		win32/nsis/pixmaps/pidgin-header.bmp \
 		win32/nsis/pixmaps/pidgin-intro.bmp \
 		win32/nsis/pixmaps/pidgin-install.ico \
============================================================
--- pidgin/win32/nsis/pidgin-installer.nsi	db2816d17352e200421fddd0fb37fe2cbc39e6cd
+++ pidgin/win32/nsis/pidgin-installer.nsi	b7f0b34d1545a8de4755116e08578673ec0952dd
@@ -28,6 +28,7 @@ SetDateSave on
 ShowInstDetails show
 ShowUninstDetails show
 SetDateSave on
+RequestExecutionLevel highest
 
 ; $name and $INSTDIR are set in .onInit function..
 
@@ -340,7 +341,7 @@ Section $(GTK_SECTION_TITLE) SecGtk
 !ifdef OFFLINE_INSTALLER
 
   SetOutPath $PLUGINSDIR
-  File /oname=gtk.zip "..\..\..\..\gtk_installer\gtk-runtime-${GTK_INSTALL_VERSION}.zip"
+  File /oname=gtk.zip ".\gtk-runtime-${GTK_INSTALL_VERSION}.zip"
 
 !else
 
@@ -356,6 +357,9 @@ Section $(GTK_SECTION_TITLE) SecGtk
 
 !endif
 
+  ;Delete the old Gtk directory
+  RMDir /r "$INSTDIR\Gtk"
+
   SetOutPath "$INSTDIR"
   nsisunz::UnzipToLog $R1 "$INSTDIR"
   Pop $R0


More information about the Commits mailing list