File: makezip.sh.in

package info (click to toggle)
filezilla 3.69.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,772 kB
  • sloc: cpp: 97,617; ansic: 54,984; sh: 5,225; makefile: 2,080; xml: 375
file content (100 lines) | stat: -rw-r--r-- 2,564 bytes parent folder | download | duplicates (3)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#! /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
  elif [ -x "$top_builddir/$1/$2" ]; then
    cp "$top_builddir/$1/$2" "$targetdir/$target" || exit 1
  else
    if [ "$4" != "1" ]; then
      exit 1
    fi
  fi
}


copy_libtool "src/interface" "filezilla.exe"
copy_libtool "src/putty" "fzsftp.exe"
copy_libtool "src/putty" "fzputtygen.exe"
copy_libtool "src/storj" "fzstorj.exe" "" 1
copy_libtool "src/fzshellext/32" "libfzshellext-0.dll" "fzshellext.dll"
copy_libtool "src/fzshellext/64" "libfzshellext-0.dll" "fzshellext_64.dll"

echo Copying DLLs
cp dlls_gui/*.dll "$targetdir/"

echo Copying locales

if [ "${FILEZILLA_LINGUAS}" != "" ]; then
  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

  lfz_prefix=`pkg-config --variable=prefix libfilezilla`
  for i in "${lfz_prefix}"/share/locale/*/LC_MESSAGES/libfilezilla.mo; do
    locale=`echo $i | sed 's/.*\/\([^\/\]*\)\/LC_MESSAGES\/libfilezilla.mo/\1/'`
    mkdir -p "$targetdir/locales/$locale" || exit 1
    cp "$i" "$targetdir/locales/$locale/libfilezilla.mo" || exit 1
  done
fi

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