-
Notifications
You must be signed in to change notification settings - Fork 128
Expand file tree
/
Copy pathmakezip.sh.in
More file actions
85 lines (64 loc) · 2.01 KB
/
Copy pathmakezip.sh.in
File metadata and controls
85 lines (64 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#! /bin/sh
FILEZILLA_LINGUAS="@FILEZILLA_LINGUAS@"
PACKAGE_VERSION="@PACKAGE_VERSION@"
top_builddir="@top_builddir@"
top_srcdir="@top_srcdir@"
# Creates a zip file with the Win32 binaries
if [ -e "win32zip" ]; then
echo "Target directory already exists"
exit 1
fi
install_prefix=$1
if [ -z "$install_prefix" ]; then
echo "Install prefix not given"
exit 1
elif ! [ -d "$install_prefix" ]; then
echo "Install prefix does not exist"
exit 1
fi
targetdir="win32zip/FileZilla-$PACKAGE_VERSION"
mkdir -p "$targetdir" || exit 1
echo Copying executables
# 2-3 parameters:
# $1: relative path to top build dir, no leading nor trailing slashes
# $2: executable name
# $3: optional target name
copy_libtool()
{
local target
if [ "$3" == "" ]; then
target="$2"
else
target="$3"
fi
if [ -x "$top_builddir/$1/.libs/$2" ]; then
cp "$top_builddir/$1/.libs/$2" "$targetdir/$target" || exit 1
else
cp "$top_builddir/$1/$2" "$targetdir/$target" || exit 1
fi
}
copy_libtool "src/interface" "filezilla.exe"
copy_libtool "src/putty" "fzsftp.exe"
copy_libtool "src/putty" "fzputtygen.exe"
copy_libtool "src/fzshellext" "libfzshellext-0.dll" "fzshellext.dll"
cp "$top_srcdir/src/fzshellext/fzshellext_64.dll" "$targetdir/fzshellext_64.dll" || exit 1
cp "$top_srcdir/data/mingwm10.dll" "$targetdir" || exit 1
echo Copying locales
mkdir -p $targetdir/locales || exit 1
for i in $FILEZILLA_LINGUAS; do
mkdir -p "$targetdir/locales/$i" || exit 1
cp "$top_builddir/locales/$i.mo" "$targetdir/locales/$i/filezilla.mo" || exit 1
done
echo Copying resources
cp -r "$install_prefix/share/filezilla/resources" "$targetdir/resources" || exit 1
echo Copy docs
mkdir -p "$targetdir/docs"
cp "$top_srcdir/docs/fzdefaults.xml.example" "$targetdir/docs" || exit 1
echo Copying other files
cp "$top_srcdir/GPL.html" "$targetdir" || exit 1
cp "$top_srcdir/AUTHORS" "$targetdir" || exit 1
cp "$top_srcdir/NEWS" "$targetdir" || exit 1
cd win32zip
zip -r -9 ../FileZilla.zip "FileZilla-$PACKAGE_VERSION" || exit 1
cd ..
rm -rf win32zip