view pidgin/win32/nsis/generate_gtk_zip.sh @ 30865:1cdae196aac8

Standardize on "cancelled". QuLogic: so, canceled or cancelled? that patch on #12130 is pretty thorough... wabz: cancelled :D wabz: that cancelled thing actually bothered me in the past wabz: never quite enough to do such a patch :p elb: that's an en_US vs en_GB thing elb: both are correct, but canceled is more common in en_{US,CA} and cancelled in en_{GB,AU,NZ,etc.} elb: personally, I use cancelled QuLogic: yea, that's what I went for before, but I think I couldn't change any strings because we were frozen QuLogic: you all had to pick the spelling that was opposite from the guy's patch, didn't you... rekkanoryo: well, considering we're generally en_US in our strings, it should be canceled in our source elb: considering they're both correct, and while I'm anal retentive, I'm not anal retentive about that, I have no preference ;-) rekkanoryo: I don't really care either way, I just think that we should be consistently en_US or en_GB throughout elb: right elb: my point is, they're both correct for en_US elb: one 'l' is simply more common rekkanoryo: ah rekkanoryo: if they're both technically correct for en_US, then "cancelled" is my vote rekkanoryo: one 'l' always looks wrong to me elb: the dictionary claims they are Sorry, dwc. Closes #12130.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 23 Aug 2010 01:41:31 +0000
parents c940e427e486
children
line wrap: on
line source

#!/bin/bash
# Script to generate zip file for GTK+ runtime to be included in Pidgin installer

PIDGIN_BASE=$1

if [ ! -e $PIDGIN_BASE/ChangeLog ]; 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.16.6.0

ATK="http://ftp.acc.umu.se/pub/gnome/binaries/win32/atk/1.26/atk_1.26.0-1_win32.zip ATK 1.26.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.acc.umu.se/pub/gnome/binaries/win32/gtk+/2.16/gtk+_2.16.6-2_win32.zip GTK+ 2.16.6-2"
LIBPNG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.0-1_win32.zip libpng 1.4.0-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 LIBPNG PANGO ZLIB"

mkdir -p $STAGE_DIR
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 || return 1
	fi
	EXTENSION=${FILE##*.}
	#This is an OpenSuSE build service RPM
	if [ $EXTENSION == 'rpm' ]; then
		echo "Generating zip from $FILE"
		FILE=$(../rpm2zip.sh $FILE)
	fi
	unzip -q $FILE -d $INSTALL_DIR || exit 1
	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 Removing $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

exit 0