From 6127dd1dd6448dde9152eef3e422ac60546f195f Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 17 Dec 2023 22:03:02 +0100 Subject: [PATCH] Generalization of the ucrt build script --- scripts/deploy-win-ucrt64.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/scripts/deploy-win-ucrt64.sh b/scripts/deploy-win-ucrt64.sh index 973b79a31..72e8eaa89 100644 --- a/scripts/deploy-win-ucrt64.sh +++ b/scripts/deploy-win-ucrt64.sh @@ -26,7 +26,6 @@ fi pwd=$(pwd) -enable64bit=1 args="" suffix="" @@ -42,7 +41,7 @@ while [ "$1" != "" ]; do echo "Options:" echo " -s Binary suffix" echo "" - echo "By default, both 32 and 64 bit builds are performed" + echo "Only 64 bit builds are performed." exit 0 elif [ "$1" = "-s" ]; then shift @@ -67,9 +66,7 @@ if [ "$KLAYOUT_BUILD_IN_PROGRESS" == "" ]; then # Run ourself in UCRT64 system for the win64 build - if [ "$enable64bit" != "0" ]; then - MSYSTEM=UCRT64 bash --login -c "cd $pwd ; $self" - fi + MSYSTEM=UCRT64 bash --login -c "cd $pwd ; $self" exit 0 @@ -79,9 +76,20 @@ fi # Actual build branch if [ "$MSYSTEM" == "UCRT64" ]; then + arch=win64-ucrt ucrt_inst=/ucrt64 - ucrt_vssdk="C:/Program Files (x86)/Windows Kits/10/Redist/10.0.22621.0/ucrt/DLLs/x64" + + shopt -s nullglob + ucrt_vssdk=(/c/Program\ Files\ \(x86\)/Windows\ Kits/10/Redist/10.0.*) + shopt -u nullglob + ucrt_vssdk=${ucrt_vssdk[0]} + if [ "$ucrt_vssdk" = "" ]; then + echo "ERROR: ucrt64 DLLs not found" + exit 1 + fi + ucrt_vssdk=$(cygpath -w "${a[0]}") + else echo "ERROR: not in ucrt64 system." fi @@ -105,6 +113,8 @@ echo " version = $KLAYOUT_VERSION" echo " build args = $KLAYOUT_BUILD_ARGS" echo " suffix = $KLAYOUT_BUILD_SUFFIX" echo "" +echo " UCRT libs = $ucrt_vssdk" +echo "" rm -rf $target ./build.sh -python $python -ruby $ruby -bin $target -build $build -j2$KLAYOUT_BUILD_ARGS