MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:kent Date:August 28 2006 4:41pm
Subject:bk commit into 5.0 tree (kent:1.2249)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kent. When kent does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-08-28 18:41:41+02:00, kent@stripped +1 -0
  make_win_bin_dist:
    Added option --exe-suffix=<suffix> to set suffix in name of "mysqld" exe.
    Added way to include files from other builds into the package.
    Added check that we are in the right directory running script.

  scripts/make_win_bin_dist@stripped, 2006-08-28 18:03:46+02:00, kent@stripped +65 -15
    Added option --exe-suffix=<suffix> to set suffix in name of "mysqld" exe.
    Added way to include files from other builds into the package.
    Added check that we are in the right directory running script.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	kent
# Host:	c-7b4072d5.010-2112-6f72651.cust.bredbandsbolaget.se
# Root:	/Users/kent/mysql/bk/mysql-5.0-cmake

--- 1.3/scripts/make_win_bin_dist	2006-08-28 18:41:56 +02:00
+++ 1.4/scripts/make_win_bin_dist	2006-08-28 18:41:56 +02:00
@@ -20,34 +20,59 @@
   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)
+
+and will be the name of the directory of the unpacked ZIP (stripping
+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.
+  --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
+  --no-embedded    Don't pack the embedded server even if built
 
-  --debug        Pack the debug binaries and give error if not built.
+  --debug          Pack the debug binaries and give error if not built.
 
-  --no-debug     Don't pack the debug binaries even if built
+  --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.
+  --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.
 
-The "package-base-name" should be something like
+  --exe-suffix=SUF Add a suffix to the "mysqld" binary.
 
-  mysql-noinstall-5.0.25-win32  (or winx64)
+As you might want to include files of directories from other builds
+(like a "mysqld-max.exe" server), you can instruct this script do copy
+them in for you. This is the "copy-def" arguments, and they are of the
+form
 
-and will be the name of the directory of the unpacked ZIP (stripping
-away the "noinstall" part) and the base for the resulting package
-name.
+  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
 # ----------------------------------------------------------------------
 
@@ -55,14 +80,17 @@
 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
@@ -101,9 +129,9 @@
 cp libmysql/$TARGET/libmysql.dll               $DESTDIR/bin/
 
 # FIXME really needed?!
-mv $DESTDIR/bin/comp_err.exe                   $DESTDIR/bin/comp-err.exe
+mv $DESTDIR/bin/comp_err.exe             $DESTDIR/bin/comp-err.exe
 
-cp sql/$TARGET/mysqld.exe                      $DESTDIR/bin/mysqld.exe
+cp sql/$TARGET/mysqld.exe                $DESTDIR/bin/mysqld$EXE_SUFFIX.exe
 
 if [ x"$PACK_DEBUG" = "" -a -f "sql/debug/mysqld.exe" -o \
      x"$PACK_DEBUG" = "yes" ] ; then
@@ -291,5 +319,27 @@
 cp -pR sql-bench $DESTDIR/
 rm -f $DESTDIR/sql-bench/*.sh $DESTDIR/sql-bench/Makefile*
 
+# ----------------------------------------------------------------------
+# 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
+done
+
+# ----------------------------------------------------------------------
+# Finally creat the ZIP archive
+# ----------------------------------------------------------------------
+
+rm -f $NOINST_NAME.zip
 zip -r $NOINST_NAME.zip $DESTDIR
 rm -Rf $DESTDIR
Thread
bk commit into 5.0 tree (kent:1.2249)kent28 Aug