mirror of https://github.com/KLayout/klayout.git
Add an option to Windows build script to support building and deployment of 64bit coordinate version
This commit is contained in:
parent
6d6ac23f50
commit
897ccb12bf
|
|
@ -28,31 +28,39 @@ pwd=$(pwd)
|
|||
|
||||
enable32bit=1
|
||||
enable64bit=1
|
||||
args=""
|
||||
suffix=""
|
||||
|
||||
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
||||
echo "Runs the Windows build include installer generation."
|
||||
echo ""
|
||||
echo "Run this script from the root directory."
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo " scripts/deploy-win-mingw.sh <options>"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -32 Run 32 bit build only"
|
||||
echo " -64 Run 64 bit build only"
|
||||
echo ""
|
||||
echo "By default, both 32 and 64 bit builds are performed"
|
||||
exit 0
|
||||
elif [ "$1" = "-32" ]; then
|
||||
enable64bit=0
|
||||
enable32bit=1
|
||||
elif [ "$1" = "-64" ]; then
|
||||
enable64bit=1
|
||||
enable32bit=0
|
||||
elif [ "$1" != "" ]; then
|
||||
echo "ERROR: invalid option $1 (use -h for details)"
|
||||
exit 1
|
||||
fi
|
||||
while [ "$1" != "" ]; do
|
||||
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
||||
echo "Runs the Windows build include installer generation."
|
||||
echo ""
|
||||
echo "Run this script from the root directory."
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo " scripts/deploy-win-mingw.sh <options>"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -32 Run 32 bit build only"
|
||||
echo " -64 Run 64 bit build only"
|
||||
echo " -s <suffix> Binary suffix"
|
||||
echo ""
|
||||
echo "By default, both 32 and 64 bit builds are performed"
|
||||
exit 0
|
||||
elif [ "$1" = "-32" ]; then
|
||||
enable64bit=0
|
||||
enable32bit=1
|
||||
elif [ "$1" = "-64" ]; then
|
||||
enable64bit=1
|
||||
enable32bit=0
|
||||
elif [ "$1" = "-s" ]; then
|
||||
shift
|
||||
suffix="-$1"
|
||||
else
|
||||
args="$args $1"
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
# ---------------------------------------------------
|
||||
# Bootstrap script
|
||||
|
|
@ -63,6 +71,8 @@ if [ "$KLAYOUT_BUILD_IN_PROGRESS" == "" ]; then
|
|||
self=$(which $0)
|
||||
|
||||
export KLAYOUT_BUILD_IN_PROGRESS=1
|
||||
export KLAYOUT_BUILD_ARGS="$args"
|
||||
export KLAYOUT_BUILD_SUFFIX="$suffix"
|
||||
|
||||
# Run ourself in MINGW32 system for the win32 build
|
||||
if [ "$enable32bit" != "0" ]; then
|
||||
|
|
@ -104,13 +114,15 @@ plugins="audio generic iconengines imageformats platforms printsupport sqldriver
|
|||
echo "------------------------------------------------------------------"
|
||||
echo "Running build for architecture $arch .."
|
||||
echo ""
|
||||
echo " target = $target"
|
||||
echo " build = $build"
|
||||
echo " version = $KLAYOUT_VERSION"
|
||||
echo " target = $target"
|
||||
echo " build = $build"
|
||||
echo " version = $KLAYOUT_VERSION"
|
||||
echo " build args = $KLAYOUT_BUILD_ARGS"
|
||||
echo " suffix = $KLAYOUT_BUILD_SUFFIX"
|
||||
echo ""
|
||||
|
||||
rm -rf $target
|
||||
./build.sh -python $python -ruby $ruby -bin $target -build $build -j2
|
||||
./build.sh -python $python -ruby $ruby -bin $target -build $build -j2$KLAYOUT_BUILD_ARGS
|
||||
|
||||
if ! [ -e $target ]; then
|
||||
echo "ERROR: Target directory $target not found"
|
||||
|
|
@ -227,12 +239,12 @@ done
|
|||
# longer require the copy
|
||||
cp $scripts/klayout-inst.nsis $target
|
||||
cd $target
|
||||
NSIS_VERSION=$KLAYOUT_VERSION NSIS_ARCH=$arch "$makensis" klayout-inst.nsis
|
||||
NSIS_VERSION=$KLAYOUT_VERSION NSIS_ARCH=$arch$KLAYOUT_BUILD_SUFFIX "$makensis" klayout-inst.nsis
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# Produce the .zip file
|
||||
|
||||
zipname="klayout-$KLAYOUT_VERSION-$arch"
|
||||
zipname="klayout-$KLAYOUT_VERSION-$arch$KLAYOUT_BUILD_SUFFIX"
|
||||
|
||||
echo "Making .zip file $zipname.zip .."
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue