# check if we can use 7zip
have_7zip=`which 7za`
+grep -q gtk-3.0 _build/config.log && GTK3_BUILD=1
if [ "$1" != "" ]; then
if [ "$1" == "debug" ]; then
DEBUG_BUILD=1
echo -n .
# 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 gtk-2.0
grab_files lib/engines "*"
grab_files lib gdk-pixbuf-2.0
grab_files share mime
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
pushd $workdir > /dev/null
mkdir -p $workdir/share/locale/
for LOCALE in $(cat $temp_dir/locale.list); do
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
rm $temp_dir/locale.list
-# Use small icons and tango icons
-gtk_etc_dir="$workdir/etc/gtk-2.0/"
+# we want to override default gtk settings
+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
-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-fallback-icon-theme = "Tango"
+_EOF
+
+fi
+
+cat >> $gtk_rc_file << _EOF
gtk-toolbar-style = GTK_TOOLBAR_ICONS
+gtk-toolbar-icon-size = GTK_ICON_SIZE_MENU
_EOF
popd > /dev/null