makedist.midori: Handle GTK3 builds too

This commit is contained in:
Paweł Forysiuk 2012-06-26 18:56:06 +02:00 committed by Christian Dywan
parent 12708f535c
commit a15d4009c2

View file

@ -35,6 +35,7 @@ temp_dir=`mktemp -d`
# check if we can use 7zip # check if we can use 7zip
have_7zip=`which 7za` have_7zip=`which 7za`
grep -q gtk-3.0 _build/config.log && GTK3_BUILD=1
if [ "$1" != "" ]; then if [ "$1" != "" ]; then
if [ "$1" == "debug" ]; then if [ "$1" == "debug" ]; then
DEBUG_BUILD=1 DEBUG_BUILD=1
@ -136,8 +137,13 @@ grab_files etc fonts
echo -n . echo -n .
# copy lib # copy lib
if [ "$GTK3_BUILD" == "1" ]; then
grab_files lib gtk-3.0
else
grab_files lib gtk-2.0
fi
grab_files lib midori grab_files lib midori
grab_files lib gtk-2.0
grab_files lib/engines "*" grab_files lib/engines "*"
grab_files lib gdk-pixbuf-2.0 grab_files lib gdk-pixbuf-2.0
@ -158,7 +164,14 @@ grab_files share MS-Windows
grab_files share mime grab_files share mime
grab_files share midori.mo grab_files share midori.mo
grab_files share webkitgtk-1.0 if [ "$GTK3_BUILD" == "1" ]; then
grab_files share webkitgtk-3.0
grab_files share schemas
MO_VER=30
else
grab_files share webkitgtk-1.0
MO_VER=20
fi
if [ "$DEBUG_BUILD" == "" ];then if [ "$DEBUG_BUILD" == "" ];then
pushd $workdir > /dev/null pushd $workdir > /dev/null
@ -174,17 +187,42 @@ find share "(" -name "midori.mo" ")" > $temp_dir/locale.list
mkdir -p $workdir/share/locale/ mkdir -p $workdir/share/locale/
for LOCALE in $(cat $temp_dir/locale.list); do for LOCALE in $(cat $temp_dir/locale.list); do
LOCALE=$(echo $LOCALE|awk -F/ '{print $3}') LOCALE=$(echo $LOCALE|awk -F/ '{print $3}')
cp /usr/share/locale/$LOCALE/LC_MESSAGES/gtk20.mo $workdir/share/locale/$LOCALE/LC_MESSAGES/ cp /usr/share/locale/$LOCALE/LC_MESSAGES/gtk$MO_VER.mo $workdir/share/locale/$LOCALE/LC_MESSAGES/
done done
rm $temp_dir/locale.list rm $temp_dir/locale.list
# Use small icons and tango icons # we want to override default gtk settings
gtk_etc_dir="$workdir/etc/gtk-2.0/" if [ "$GTK3_BUILD" == "1" ]; then
gtk_etc_dir="$workdir/etc/gtk-3.0/"
gtk_rc_file="$gtk_etc_dir/settings.ini"
else
gtk_etc_dir="$workdir/etc/gtk-2.0/"
gtk_rc_file="$gtk_etc_dir/gtkrc"
fi
mkdir -p $gtk_etc_dir mkdir -p $gtk_etc_dir
cat > $gtk_etc_dir/gtkrc << _EOF rm $gtk_rc_file
# Use small icons by default and Tango theme
if [ "$GTK3_BUILD" == "1" ]; then
cat > $gtk_rc_file << _EOF
[Settings]
gtk-fallback-icon-theme = Tango
_EOF
else
cat > $gtk_rc_file << _EOF
gtk-theme-name = "MS-Windows" gtk-theme-name = "MS-Windows"
gtk-fallback-icon-theme = "Tango" gtk-fallback-icon-theme = "Tango"
_EOF
fi
cat >> $gtk_rc_file << _EOF
gtk-toolbar-style = GTK_TOOLBAR_ICONS gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size = GTK_ICON_SIZE_MENU
_EOF _EOF
popd > /dev/null popd > /dev/null