3
# Copyright (C) 2010-2011 Peter de Ridder <peter@xfce.org>
5
# This library is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU Lesser General Public
7
# License as published by the Free Software Foundation; either
8
# version 2.1 of the License, or (at your option) any later version.
10
# See the file COPYING for the full license text.
12
# a bit of configuration
13
root_dir=$MINGW_PREFIX
16
# create temporary working directory
19
# generate unique filename
20
ARCHIVE=midori$1-`date +%Y%m%d%H%M`.zip
22
echo -n "Creating $ARCHIVE ."
24
# create destination folder
25
mkdir $temp_dir/midori$1
29
# auto generate dll list, only of existing files
30
pushd $root_dir/bin > /dev/null
31
$script_dir/dll-recursive.sh midori*.exe gspawn-*-helper*.exe libhunspell*.dll > $temp_dir/midori.exe.lst
32
files=`ls | cat - $temp_dir/midori.exe.lst | sort | uniq -d`
33
rm $temp_dir/midori.exe.lst
38
# copy auto generate dll list
39
pushd $root_dir/bin > /dev/null
40
mkdir $temp_dir/midori$1/bin
41
cp $files $temp_dir/midori$1/bin
47
pushd $root_dir > /dev/null
48
find etc "(" -name "*midori*" -o -name "gtkrc" ")" -prune -exec mkdir -p $temp_dir/midori$1/{} ";" -exec rmdir --ignore-fail-on-non-empty $temp_dir/midori$1/{} ";" -exec cp -r {} $temp_dir/midori$1/{} ";"
54
pushd $root_dir > /dev/null
55
find lib "(" -path "lib/midori/*" -o -path "lib/gtk-2.0/*" -o -path "lib/enchant/*" -o -path "lib/engines/*" ")" -a -name "*.dll" -prune -exec mkdir -p $temp_dir/midori$1/{} ";" -exec rmdir --ignore-fail-on-non-empty $temp_dir/midori$1/{} ";" -exec cp -r {} $temp_dir/midori$1/{} ";"
61
pushd $root_dir > /dev/null
62
find share "(" -name "*midori*" -o -name "icons" -o -name "MS-Windows" -o -name "mime" ")" -prune -exec mkdir -p $temp_dir/midori$1/{} ";" -exec rmdir --ignore-fail-on-non-empty $temp_dir/midori$1/{} ";" -exec cp -r {} $temp_dir/midori$1/{} ";"
64
# copy locales for gtk
65
# so we have translated stock items, file dialogs
67
find share "(" -name "midori.mo" ")" > locale.list
68
mkdir -p $temp_dir/midori$1/share/locale/
69
for LOCALE in $(cat locale.list); do
70
LOCALE=$(echo $LOCALE|awk -F/ '{print $3}')
71
cp /usr/share/locale/$LOCALE/LC_MESSAGES/gtk20.mo $temp_dir/midori$1/share/locale/$LOCALE/LC_MESSAGES/
78
# copy doc files to root
79
cp $temp_dir/midori$1/share/doc/midori/{COPYING,AUTHORS} $temp_dir/midori$1
83
ARCHIVE=`pwd`/$ARCHIVE
85
# store as tar.bz2 file
86
pushd $temp_dir > /dev/null
87
zip -rq $ARCHIVE midori$1
92
# remove working directory