2006-10-20 20:18:44 +02:00
|
|
|
#!/bin/sh
|
2006-12-31 02:29:11 +01:00
|
|
|
# Copyright (C) 2006 MySQL AB
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2006-10-20 20:18:44 +02:00
|
|
|
|
|
|
|
# Exit if failing to copy, we want exact specifications, not
|
|
|
|
# just "what happen to be built".
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Read first argument that is the base name of the resulting TAR file.
|
|
|
|
# See usage() function below for a description on the arguments.
|
|
|
|
#
|
|
|
|
# NOTE: We will read the rest of the command line later on.
|
|
|
|
# NOTE: Pattern matching with "{..,..}" can't be used, not portable.
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
# FIXME FIXME "debug", own build or handled here?
|
|
|
|
# FIXME FIXME add way to copy from other builds executables
|
|
|
|
|
|
|
|
usage()
|
|
|
|
{
|
|
|
|
echo <<EOF
|
|
|
|
Usage: make_win_bin_dist [ options ] package-base-name [ copy-defs... ]
|
|
|
|
|
|
|
|
This is a script to run from the top of a source tree built on Windows.
|
|
|
|
The "package-base-name" argument should be something like
|
|
|
|
|
|
|
|
mysql-noinstall-5.0.25-win32 (or winx64)
|
|
|
|
|
2007-05-15 18:19:18 +02:00
|
|
|
and will become the name of the directory of the unpacked ZIP (stripping
|
2006-10-20 20:18:44 +02:00
|
|
|
away the "noinstall" part of the ZIP file name if any) and the base
|
|
|
|
for the resulting package name.
|
|
|
|
|
|
|
|
Options are
|
|
|
|
|
|
|
|
--embedded Pack the embedded server and give error if not built.
|
|
|
|
The default is to pack it if it is built.
|
|
|
|
|
|
|
|
--no-embedded Don't pack the embedded server even if built
|
|
|
|
|
|
|
|
--debug Pack the debug binaries and give error if not built.
|
2007-05-15 18:19:18 +02:00
|
|
|
The default is to pack them if they are built.
|
2006-10-20 20:18:44 +02:00
|
|
|
|
|
|
|
--no-debug Don't pack the debug binaries even if built
|
|
|
|
|
|
|
|
--only-debug The target for this build was "Debug", and we just
|
|
|
|
want to replace the normal binaries with debug
|
|
|
|
versions, i.e. no separate "debug" directories.
|
|
|
|
|
2007-05-15 18:19:18 +02:00
|
|
|
--exe-suffix=SUF Add a suffix to the filename part of the "mysqld" binary.
|
2006-10-20 20:18:44 +02:00
|
|
|
|
|
|
|
As you might want to include files of directories from other builds
|
2007-05-15 18:19:18 +02:00
|
|
|
(like a "mysqld-max.exe" server), you can instruct this script to copy
|
2006-10-20 20:18:44 +02:00
|
|
|
them in for you. This is the "copy-def" arguments, and they are of the
|
|
|
|
form
|
|
|
|
|
|
|
|
relative-dest-name=source-name .....
|
|
|
|
|
|
|
|
i.e. can be something like
|
|
|
|
|
|
|
|
bin/mysqld-max.exe=../my-max-build/sql/release/mysqld.exe
|
|
|
|
|
|
|
|
If you specify a directory the whole directory will be copied.
|
|
|
|
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# We need to be at the top of a source tree, check that we are
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ ! -d "sql" ] ; then
|
|
|
|
echo "You need to run this script from inside the source tree"
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Actual argument processing, first part
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
NOINST_NAME=""
|
|
|
|
TARGET="release"
|
|
|
|
PACK_EMBEDDED="" # Could be "no", "yes" or empty
|
|
|
|
PACK_DEBUG="" # Could be "no", "yes" or empty
|
|
|
|
EXE_SUFFIX=""
|
|
|
|
|
|
|
|
for arg do
|
|
|
|
shift
|
|
|
|
case "$arg" in
|
|
|
|
--embedded) PACK_EMBEDDED="yes" ;;
|
|
|
|
--no-embedded) PACK_EMBEDDED="no" ;;
|
|
|
|
--debug) PACK_DEBUG="yes" ;;
|
|
|
|
--no-debug) PACK_DEBUG="no" ;;
|
|
|
|
--only-debug) TARGET="debug" ; PACK_DEBUG="no" ;;
|
|
|
|
--exe-suffix=*) EXE_SUFFIX=`echo "$arg" | sed -e "s,--exe-suffix=,,"` ;;
|
|
|
|
-*)
|
|
|
|
echo "Unknown argument '$arg'"
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
NOINST_NAME="$arg"
|
|
|
|
break
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ x"$NOINST_NAME" = x"" ] ; then
|
|
|
|
echo "No base package name given"
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
DESTDIR=`echo $NOINST_NAME | sed 's/-noinstall-/-/'`
|
|
|
|
|
|
|
|
if [ -e $DESTDIR ] ; then
|
|
|
|
echo "Please remove the old $DESTDIR before running this script"
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
|
2007-03-18 10:47:15 +01:00
|
|
|
trap 'echo "Clearning up and exiting..." ; rm -fr $DESTDIR; exit 1' ERR
|
|
|
|
|
2007-04-04 14:19:47 +02:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Adjust target name if needed, release with debug info has another name
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ x"$TARGET" = x"release" -a -f "client/relwithdebinfo/mysql.exe" ]
|
|
|
|
then
|
|
|
|
TARGET="relwithdebinfo"
|
|
|
|
fi
|
|
|
|
|
2006-10-20 20:18:44 +02:00
|
|
|
# ----------------------------------------------------------------------
|
2007-03-18 10:47:15 +01:00
|
|
|
# Copy executables, and client DLL
|
2006-10-20 20:18:44 +02:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
mkdir $DESTDIR
|
|
|
|
mkdir $DESTDIR/bin
|
2007-04-04 14:19:47 +02:00
|
|
|
cp client/$TARGET/*.exe $DESTDIR/bin/
|
|
|
|
cp extra/$TARGET/*.exe $DESTDIR/bin/
|
|
|
|
cp storage/myisam/$TARGET/*.exe $DESTDIR/bin/
|
2007-04-11 14:27:03 +02:00
|
|
|
cp server-tools/instance-manager/$TARGET/*.{exe,map} $DESTDIR/bin/
|
2007-08-02 20:51:04 +02:00
|
|
|
if [ x"$TARGET" != x"release" ] ; then
|
2007-04-11 14:27:03 +02:00
|
|
|
cp server-tools/instance-manager/$TARGET/*.pdb $DESTDIR/bin/
|
|
|
|
fi
|
2007-04-04 14:19:47 +02:00
|
|
|
cp tests/$TARGET/*.exe $DESTDIR/bin/
|
|
|
|
cp libmysql/$TARGET/*.exe $DESTDIR/bin/
|
|
|
|
cp libmysql/$TARGET/libmysql.dll $DESTDIR/bin/
|
2006-10-20 20:18:44 +02:00
|
|
|
|
|
|
|
# FIXME really needed?!
|
|
|
|
mv $DESTDIR/bin/comp_err.exe $DESTDIR/bin/comp-err.exe
|
|
|
|
|
|
|
|
cp sql/$TARGET/mysqld.exe $DESTDIR/bin/mysqld$EXE_SUFFIX.exe
|
2007-04-04 14:19:47 +02:00
|
|
|
cp sql/$TARGET/mysqld.map $DESTDIR/bin/mysqld$EXE_SUFFIX.map
|
2007-08-02 20:51:04 +02:00
|
|
|
if [ x"$TARGET" != x"release" ] ; then
|
2007-04-11 14:27:03 +02:00
|
|
|
cp sql/$TARGET/mysqld.pdb $DESTDIR/bin/mysqld$EXE_SUFFIX.pdb
|
|
|
|
fi
|
2006-10-20 20:18:44 +02:00
|
|
|
|
2007-05-16 20:52:50 +02:00
|
|
|
if [ x"$PACK_DEBUG" = x"" -a -f "sql/debug/mysqld.exe" -o \
|
2007-05-15 18:19:18 +02:00
|
|
|
x"$PACK_DEBUG" = x"yes" ] ; then
|
2006-10-20 20:18:44 +02:00
|
|
|
cp sql/debug/mysqld.exe $DESTDIR/bin/mysqld-debug.exe
|
|
|
|
cp sql/debug/mysqld.pdb $DESTDIR/bin/mysqld-debug.pdb
|
|
|
|
cp sql/debug/mysqld.map $DESTDIR/bin/mysqld-debug.map
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Copy data directory, readme files etc
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
if [ -d win/data ] ; then
|
2007-03-18 10:47:15 +01:00
|
|
|
cp -pR win/data $DESTDIR/
|
2006-10-20 20:18:44 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# FIXME maybe a flag to define "release build", or do the
|
|
|
|
# check from the calling script that all these are there,
|
|
|
|
# and with the correct content.
|
|
|
|
|
|
|
|
mkdir $DESTDIR/Docs
|
|
|
|
cp Docs/INSTALL-BINARY $DESTDIR/Docs/
|
|
|
|
cp Docs/manual.chm $DESTDIR/Docs/ || /bin/true
|
|
|
|
cp ChangeLog $DESTDIR/Docs/ || /bin/true
|
|
|
|
cp support-files/my-*.ini $DESTDIR/
|
|
|
|
|
|
|
|
if [ -f COPYING ] ; then
|
|
|
|
cp COPYING EXCEPTIONS-CLIENT $DESTDIR/
|
|
|
|
cp COPYING $DESTDIR/Docs/
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# These will be filled in when we enable embedded. Note that if no
|
|
|
|
# argument is given, it is copied if exists, else a check is done.
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
copy_embedded()
|
|
|
|
{
|
|
|
|
mkdir -p $DESTDIR/Embedded/DLL/release \
|
|
|
|
$DESTDIR/Embedded/static/release \
|
|
|
|
$DESTDIR/include
|
|
|
|
cp libmysqld/libmysqld.def $DESTDIR/include/
|
|
|
|
cp libmysqld/$TARGET/mysqlserver.lib $DESTDIR/Embedded/static/release/
|
2007-08-06 08:28:16 +02:00
|
|
|
cp libmysqld/$TARGET/mysqlserver.pdb $DESTDIR/Embedded/static/release/
|
2006-10-20 20:18:44 +02:00
|
|
|
cp libmysqld/$TARGET/libmysqld.dll $DESTDIR/Embedded/DLL/release/
|
|
|
|
cp libmysqld/$TARGET/libmysqld.exp $DESTDIR/Embedded/DLL/release/
|
|
|
|
cp libmysqld/$TARGET/libmysqld.lib $DESTDIR/Embedded/DLL/release/
|
2007-08-06 08:28:16 +02:00
|
|
|
cp libmysqld/$TARGET/libmysqld.pdb $DESTDIR/Embedded/DLL/release/
|
2006-10-20 20:18:44 +02:00
|
|
|
|
2007-05-15 18:19:18 +02:00
|
|
|
if [ x"$PACK_DEBUG" = x"" -a -f "libmysqld/debug/libmysqld.lib" -o \
|
|
|
|
x"$PACK_DEBUG" = x"yes" ] ; then
|
2007-08-06 08:28:16 +02:00
|
|
|
mkdir -p $DESTDIR/Embedded/DLL/debug \
|
|
|
|
$DESTDIR/Embedded/static/debug
|
2007-08-06 08:31:09 +02:00
|
|
|
cp libmysqld/debug/mysqlserver.lib $DESTDIR/Embedded/static/debug/
|
|
|
|
cp libmysqld/debug/mysqlserver.pdb $DESTDIR/Embedded/static/debug/
|
2006-10-20 20:18:44 +02:00
|
|
|
cp libmysqld/debug/libmysqld.dll $DESTDIR/Embedded/DLL/debug/
|
|
|
|
cp libmysqld/debug/libmysqld.exp $DESTDIR/Embedded/DLL/debug/
|
|
|
|
cp libmysqld/debug/libmysqld.lib $DESTDIR/Embedded/DLL/debug/
|
2007-08-06 08:28:16 +02:00
|
|
|
cp libmysqld/debug/libmysqld.pdb $DESTDIR/Embedded/DLL/debug/
|
2006-10-20 20:18:44 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2007-05-15 18:19:18 +02:00
|
|
|
if [ x"$PACK_EMBEDDED" = x"" -a \
|
2006-10-20 20:18:44 +02:00
|
|
|
-f "libmysqld/$TARGET/mysqlserver.lib" -a \
|
|
|
|
-f "libmysqld/$TARGET/libmysqld.lib" -o \
|
2007-05-15 18:19:18 +02:00
|
|
|
x"$PACK_EMBEDDED" = x"yes" ] ; then
|
2006-10-20 20:18:44 +02:00
|
|
|
copy_embedded
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
2007-06-12 19:49:02 +02:00
|
|
|
# Note: Make sure to sync with include/Makefile.am and WiX installer
|
|
|
|
# XML specifications
|
2006-10-20 20:18:44 +02:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
mkdir -p $DESTDIR/include
|
2007-06-12 19:49:02 +02:00
|
|
|
cp include/mysql.h \
|
|
|
|
include/mysql_com.h \
|
|
|
|
include/mysql_time.h \
|
2006-06-30 15:15:20 +02:00
|
|
|
include/my_list.h \
|
2007-06-12 19:49:02 +02:00
|
|
|
include/my_alloc.h \
|
|
|
|
include/typelib.h \
|
2006-06-30 15:15:20 +02:00
|
|
|
include/my_dbug.h \
|
|
|
|
include/m_string.h \
|
2007-06-12 19:49:02 +02:00
|
|
|
include/my_sys.h \
|
|
|
|
include/my_xml.h \
|
|
|
|
include/mysql_embed.h \
|
|
|
|
include/my_pthread.h \
|
|
|
|
include/my_no_pthread.h \
|
|
|
|
include/decimal.h \
|
|
|
|
include/errmsg.h \
|
2006-06-30 15:15:20 +02:00
|
|
|
include/my_global.h \
|
2007-06-12 19:49:02 +02:00
|
|
|
include/my_net.h \
|
|
|
|
include/my_getopt.h \
|
|
|
|
include/sslopt-longopts.h \
|
|
|
|
include/my_dir.h \
|
|
|
|
include/sslopt-vars.h \
|
|
|
|
include/sslopt-case.h \
|
|
|
|
include/sql_common.h \
|
|
|
|
include/keycache.h \
|
|
|
|
include/m_ctype.h \
|
|
|
|
include/my_attribute.h \
|
|
|
|
include/mysqld_error.h \
|
|
|
|
include/sql_state.h \
|
2007-06-13 19:19:11 +02:00
|
|
|
include/mysqld_ername.h \
|
2007-06-12 19:49:02 +02:00
|
|
|
include/mysql_version.h \
|
|
|
|
include/config-win.h \
|
|
|
|
libmysql/libmysql.def \
|
|
|
|
$DESTDIR/include/
|
2006-09-01 14:34:37 +02:00
|
|
|
|
2007-08-02 20:59:23 +02:00
|
|
|
mkdir -p $DESTDIR/include/mysql
|
|
|
|
cp include/mysql/plugin.h $DESTDIR/include/mysql/
|
2006-10-20 20:18:44 +02:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Client libraries, and other libraries
|
|
|
|
# FIXME why "libmysql.dll" installed both in "bin" and "lib/opt"?
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
mkdir -p $DESTDIR/lib/opt
|
|
|
|
cp libmysql/$TARGET/libmysql.dll \
|
|
|
|
libmysql/$TARGET/libmysql.lib \
|
CMakeLists.txt (several), make_win_bin_dist:
Aligned client library build and use with the Unix version when it
comes to what source to include directly in the builds, and what
libraries to link with (bug#30118).
Also reviewed, corrected and made more clear when static or dynamic
Thread Local Storage is to be used. Some code duplication was removed,
and some redundant library usage were removed, reducing the risk of
incorrect TLS usage.
client/CMakeLists.txt:
- Removed code duplication by moving build of "mysqlclient" to
the "libmysql" directory
- Link clients with the new "mysqlclient_notls", to protect for
the case the clients use more than the client API, and access
thread data directly.
- Synced explicit target addition of sources with Unix.
dbug/CMakeLists.txt:
No need to set CXX flags, no C++ code
libmysql/CMakeLists.txt:
- Aligned more with Unix version when it comes to included source files
- Build both DLL and static library in this directory
- Produce separe static TLS version of the static client library, for
use when building clients in this build that might access TLS
storage directly.
mysys/CMakeLists.txt:
We only have to build the static TLS version, as no clients are
linking directly with the "mysys" library.
scripts/make_win_bin_dist:
Ajusted paths to new "mysqlclient.lib" location in source tree
sql/CMakeLists.txt:
Removed duplicate "ha_blackhole.cc" in file listing
Removed explicit link to "dbug.lib" not needed
Link with the static TLS "mysqlclient_notls"
tests/CMakeLists.txt:
Removed explicit link to "dbug", "mysys", "yassl", "taocrypt" and
"zlib" not needed.
Added explicit source addition "../mysys/my_memmem.c".
No need for setting CXX flags, no C++ code.
Use the static TLS "mysqlclient_notls" for linkage.
zlib/CMakeLists.txt:
No need for a dynamic TLS version of this library, no access to thread
storage is done from it. Also no need to define MYSQL_CLIENT, not used,
or __WIN32__ that is handled by the library header without this define.
2007-08-02 12:49:27 +02:00
|
|
|
libmysql/$TARGET/mysqlclient.lib \
|
2007-08-02 20:51:04 +02:00
|
|
|
mysys/$TARGET/mysys.lib \
|
2006-10-20 20:18:44 +02:00
|
|
|
regex/$TARGET/regex.lib \
|
|
|
|
strings/$TARGET/strings.lib \
|
|
|
|
zlib/$TARGET/zlib.lib $DESTDIR/lib/opt/
|
|
|
|
|
2007-05-15 18:19:18 +02:00
|
|
|
if [ x"$PACK_DEBUG" = x"" -a -f "libmysql/debug/libmysql.lib" -o \
|
|
|
|
x"$PACK_DEBUG" = x"yes" ] ; then
|
2006-10-20 20:18:44 +02:00
|
|
|
mkdir -p $DESTDIR/lib/debug
|
|
|
|
cp libmysql/debug/libmysql.dll \
|
|
|
|
libmysql/debug/libmysql.lib \
|
CMakeLists.txt (several), make_win_bin_dist:
Aligned client library build and use with the Unix version when it
comes to what source to include directly in the builds, and what
libraries to link with (bug#30118).
Also reviewed, corrected and made more clear when static or dynamic
Thread Local Storage is to be used. Some code duplication was removed,
and some redundant library usage were removed, reducing the risk of
incorrect TLS usage.
client/CMakeLists.txt:
- Removed code duplication by moving build of "mysqlclient" to
the "libmysql" directory
- Link clients with the new "mysqlclient_notls", to protect for
the case the clients use more than the client API, and access
thread data directly.
- Synced explicit target addition of sources with Unix.
dbug/CMakeLists.txt:
No need to set CXX flags, no C++ code
libmysql/CMakeLists.txt:
- Aligned more with Unix version when it comes to included source files
- Build both DLL and static library in this directory
- Produce separe static TLS version of the static client library, for
use when building clients in this build that might access TLS
storage directly.
mysys/CMakeLists.txt:
We only have to build the static TLS version, as no clients are
linking directly with the "mysys" library.
scripts/make_win_bin_dist:
Ajusted paths to new "mysqlclient.lib" location in source tree
sql/CMakeLists.txt:
Removed duplicate "ha_blackhole.cc" in file listing
Removed explicit link to "dbug.lib" not needed
Link with the static TLS "mysqlclient_notls"
tests/CMakeLists.txt:
Removed explicit link to "dbug", "mysys", "yassl", "taocrypt" and
"zlib" not needed.
Added explicit source addition "../mysys/my_memmem.c".
No need for setting CXX flags, no C++ code.
Use the static TLS "mysqlclient_notls" for linkage.
zlib/CMakeLists.txt:
No need for a dynamic TLS version of this library, no access to thread
storage is done from it. Also no need to define MYSQL_CLIENT, not used,
or __WIN32__ that is handled by the library header without this define.
2007-08-02 12:49:27 +02:00
|
|
|
libmysql/debug/mysqlclient.lib \
|
2006-10-20 20:18:44 +02:00
|
|
|
mysys/debug/mysys.lib \
|
|
|
|
regex/debug/regex.lib \
|
|
|
|
strings/debug/strings.lib \
|
|
|
|
zlib/debug/zlib.lib $DESTDIR/lib/debug/
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Copy the test directory
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
2007-08-02 20:51:04 +02:00
|
|
|
mkdir $DESTDIR/mysql-test
|
2006-10-20 20:18:44 +02:00
|
|
|
cp mysql-test/mysql-test-run.pl $DESTDIR/mysql-test/
|
|
|
|
cp mysql-test/README $DESTDIR/mysql-test/
|
2007-08-02 20:51:04 +02:00
|
|
|
cp -R mysql-test/{t,r,include,suite,std_data,lib} $DESTDIR/mysql-test/
|
2006-06-30 15:15:20 +02:00
|
|
|
|
2006-10-20 20:18:44 +02:00
|
|
|
# Note that this will not copy "extra" if a soft link
|
|
|
|
if [ -d mysql-test/extra ] ; then
|
2007-08-02 20:51:04 +02:00
|
|
|
mkdir $DESTDIR/mysql-test/extra
|
2006-10-20 20:18:44 +02:00
|
|
|
cp -pR mysql-test/extra/* $DESTDIR/mysql-test/extra/
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Copy what could be usable in the "scripts" directory. Currently
|
2007-05-15 18:19:18 +02:00
|
|
|
# only SQL files, others are Bourne shell scripts or Perl scripts
|
2006-10-20 20:18:44 +02:00
|
|
|
# not really usable on Windows.
|
|
|
|
#
|
|
|
|
# But to be nice to the few Cygwin users we might have in 5.0 we
|
2007-05-15 18:19:18 +02:00
|
|
|
# continue to copy the stuff, but don't include it in the WiX install.
|
2006-10-20 20:18:44 +02:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
mkdir -p $DESTDIR/scripts
|
|
|
|
|
|
|
|
# Uncomment and remove the for loop in 5.1
|
|
|
|
#cp scripts/*.sql $DESTDIR/scripts/
|
|
|
|
|
2006-06-30 15:15:20 +02:00
|
|
|
for i in `cd scripts && ls`; do \
|
|
|
|
if echo $i | grep -q '\.sh'; then \
|
2006-10-20 20:18:44 +02:00
|
|
|
cp scripts/$i $DESTDIR/scripts/`echo $i | sed -e 's/\.sh$//'`; \
|
2007-04-20 20:46:55 +02:00
|
|
|
elif [ -d scripts/$i -o $i = Makefile.am -o $i = Makefile.in -o -e scripts/$i.sh ] ; then \
|
2006-06-30 15:15:20 +02:00
|
|
|
: ; \
|
|
|
|
else \
|
2006-10-20 20:18:44 +02:00
|
|
|
cp scripts/$i $DESTDIR/scripts/$i; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
cp -pR sql/share $DESTDIR/
|
2006-09-01 14:34:37 +02:00
|
|
|
cp -pR sql-bench $DESTDIR/
|
|
|
|
rm -f $DESTDIR/sql-bench/*.sh $DESTDIR/sql-bench/Makefile*
|
2006-10-20 20:18:44 +02:00
|
|
|
|
2007-05-15 18:19:18 +02:00
|
|
|
# The SQL initialisation code is really expected to be in "share"
|
2007-04-04 14:19:47 +02:00
|
|
|
mv $DESTDIR/scripts/*.sql $DESTDIR/share/ || true
|
|
|
|
|
2007-08-02 20:51:04 +02:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Clean up from possibly copied SCCS directories
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
rm -rf `find $DISTDIR -type d -name SCCS -print`
|
|
|
|
|
2006-10-20 20:18:44 +02:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Copy other files specified on command line DEST=SOURCE
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
for arg do
|
|
|
|
dst=`echo $arg | sed 's/=.*$//'`
|
|
|
|
src=`echo $arg | sed 's/^.*=//'`
|
|
|
|
|
|
|
|
if [ x"$dst" = x"" -o x"$src" = x"" ] ; then
|
|
|
|
echo "Invalid specification of what to copy"
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p `dirname $DESTDIR/$dst`
|
|
|
|
cp -pR "$src" $DESTDIR/$dst
|
2006-06-30 15:15:20 +02:00
|
|
|
done
|
|
|
|
|
2006-10-20 20:18:44 +02:00
|
|
|
# ----------------------------------------------------------------------
|
2007-05-15 18:19:18 +02:00
|
|
|
# Finally create the ZIP archive
|
2006-10-20 20:18:44 +02:00
|
|
|
# ----------------------------------------------------------------------
|
2006-06-30 15:15:20 +02:00
|
|
|
|
2006-10-20 20:18:44 +02:00
|
|
|
rm -f $NOINST_NAME.zip
|
|
|
|
zip -r $NOINST_NAME.zip $DESTDIR
|
|
|
|
rm -Rf $DESTDIR
|