Thu, 04 Mar 2010 04:16:49 +0000
mkdir -p is better than checking for directory existence
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
1 | #!/bin/bash |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
2 | # Script to generate zip file for GTK+ runtime to be included in Pidgin installer |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
3 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
4 | PIDGIN_BASE=$1 |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
5 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
6 | if [ ! -e $PIDGIN_BASE/ChangeLog.win32 ]; then |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
7 | echo `basename $0` must must have the pidgin base dir specified as a parameter. |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
8 | exit 1 |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
9 | fi |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
10 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
11 | STAGE_DIR=$PIDGIN_BASE/pidgin/win32/nsis/gtk_runtime_stage |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
12 | #Subdirectory of $STAGE_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
13 | INSTALL_DIR=Gtk |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
14 | CONTENTS_FILE=$INSTALL_DIR/CONTENTS |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
15 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
16 | #This needs to be changed every time there is any sort of change. |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
17 | BUNDLE_VERSION=2.14.7.0 |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
18 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
19 | ATK="http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.24/atk_1.24.0-1_win32.zip ATK 1.24.0-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
20 | CAIRO="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.10-1_win32.zip Cairo 1.8.10-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
21 | EXPAT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip Expat 2.0.1-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
22 | FONTCONFIG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip Fontconfig 2.8.0-2" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
23 | FREETYPE="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.3.11-2_win32.zip Freetype 2.3.11-2" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
24 | GETTEXT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17-1.zip Gettext 0.17-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
25 | GLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.20/glib_2.20.5-1_win32.zip Glib 2.20.5-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
26 | GTK="http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.14/gtk+_2.14.7-1_win32.zip GTK+ 2.14.7-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
27 | LIBJPEG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/jpeg_7-1_win32.zip libjpeg 7-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
28 | #Used by GTK+ |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
29 | LIBPNG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.2.39-1_win32.zip libpng 1.2.39-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
30 | #Used by Cairo |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
31 | LIBPNG2="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.0-1_win32.zip libpng 1.4.0-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
32 | LIBTIFF="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libtiff_3.9.1-1_win32.zip libtiff 3.9.1-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
33 | PANGO="http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.26/pango_1.26.2-1_win32.zip Pango 1.26.2-1" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
34 | ZLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-1.2.3.zip zlib 1.2.3" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
35 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
36 | ALL="ATK CAIRO EXPAT FONTCONFIG FREETYPE GETTEXT GLIB GTK LIBJPEG LIBPNG LIBPNG2 LIBTIFF PANGO ZLIB" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
37 | |
|
29806
aface02b85bc
mkdir -p is better than checking for directory existence
Daniel Atallah <datallah@pidgin.im>
parents:
29798
diff
changeset
|
38 | mkdir -p $STAGE_DIR |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
39 | cd $STAGE_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
40 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
41 | rm -rf $INSTALL_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
42 | mkdir $INSTALL_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
43 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
44 | #new CONTENTS file |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
45 | echo Bundle Version $BUNDLE_VERSION > $CONTENTS_FILE |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
46 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
47 | function download_and_extract { |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
48 | URL=${1%%\ *} |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
49 | NAME=${1#*\ } |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
50 | FILE=`basename $URL` |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
51 | if [ ! -e $FILE ]; then |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
52 | echo Downloading $NAME |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
53 | wget $URL |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
54 | fi |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
55 | unzip -q $FILE -d $INSTALL_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
56 | echo "$NAME" >> $CONTENTS_FILE |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
57 | } |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
58 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
59 | for VAL in $ALL |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
60 | do |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
61 | VAR=${!VAL} |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
62 | download_and_extract "$VAR" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
63 | done |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
64 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
65 | #Default GTK+ Theme to MS-Windows |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
66 | echo gtk-theme-name = \"MS-Windows\" > $INSTALL_DIR/etc/gtk-2.0/gtkrc |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
67 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
68 | #Blow away translations that we don't have in Pidgin |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
69 | for LOCALE_DIR in $INSTALL_DIR/share/locale/* |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
70 | do |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
71 | LOCALE=`basename $LOCALE_DIR` |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
72 | if [ ! -e $PIDGIN_BASE/po/$LOCALE.po ]; then |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
73 | echo Remove $LOCALE translation as it is missing from Pidgin |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
74 | rm -r $LOCALE_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
75 | fi |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
76 | done |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
77 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
78 | #Generate zip file to be included in installer |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
79 | zip -9 -r ../gtk-runtime-$BUNDLE_VERSION.zip Gtk |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
80 |