source: filezilla/trunk/fuentes/data/makezip.sh.in @ 130

Last change on this file since 130 was 130, checked in by jrpelegrina, 4 years ago

First release to xenial

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