From e57c89f56145d6afd292ed2993c78ba698755419 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 22 Jun 2024 15:18:25 -0500 Subject: [PATCH] [buildcore] Windows fixes --- base.mk | 19 ++++++++++--------- scripts/setup-build.py | 2 +- scripts/util.py | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/base.mk b/base.mk index 128f34b..839510c 100644 --- a/base.mk +++ b/base.mk @@ -10,21 +10,22 @@ ifeq (${OS},Windows_NT) SHELL := powershell.exe .SHELLFLAGS := -NoProfile -Command BC_VAR_OS=windows + BC_CMD_HOST_PY3=python else BC_VAR_OS=$(shell uname | tr [:upper:] [:lower:]) -endif - -ifneq ($(shell which python3 2> /dev/null),) - BC_CMD_HOST_PY3=python3 -else - ifeq ($(shell python -c 'import sys; print(sys.version_info[0])'),3) - BC_CMD_HOST_PY3=python + ifneq ($(shell which python3 2> /dev/null),) + BC_CMD_HOST_PY3=python3 else - echo 'Please install Python3 on host' - exit 1 + ifeq ($(shell python -c 'import sys; print(sys.version_info[0])'),3) + BC_CMD_HOST_PY3=python + else + echo 'Please install Python3 on host' + exit 1 + endif endif endif + ifdef BC_VAR_USE_DOCKER_DEVENV ifneq ($(shell which docker 2> /dev/null),) BC_VAR_DEVENV=devenv$(shell pwd | sed 's/\//-/g') diff --git a/scripts/setup-build.py b/scripts/setup-build.py index 8a2c8aa..ec89aa6 100755 --- a/scripts/setup-build.py +++ b/scripts/setup-build.py @@ -96,7 +96,7 @@ def main() -> int: cmake_cmd.append(build_tool) if qt_path != '': cmake_cmd.append(qt_path) - if platform.system() == 'Windows': + if platform.system() == 'Windows' and platform.system() == 'AMD64': cmake_cmd.append('-A x64') cmake_err = subprocess.run(cmake_cmd).returncode diff --git a/scripts/util.py b/scripts/util.py index c37e633..383ee5f 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -32,7 +32,7 @@ def get_os() -> str: def get_arch() -> str: - arch = platform.machine() - if arch.lower() == 'amd64': + arch = platform.machine().lower() + if arch == 'amd64': arch = 'x86_64' return arch