diff --git a/deps/buildcore/scripts/pybb.py b/deps/buildcore/scripts/pybb.py index cb253ec5..098f378f 100755 --- a/deps/buildcore/scripts/pybb.py +++ b/deps/buildcore/scripts/pybb.py @@ -14,6 +14,7 @@ import os import platform import shutil +import socket import subprocess import sys from typing import List, Optional @@ -115,7 +116,7 @@ def hostname() -> int: def host_env() -> int: - os_name = os.uname().sysname.lower() + os_name = socket.gethostname().lower() arch = platform.machine() if arch == 'amd64': arch = 'x86_64' diff --git a/deps/buildcore/scripts/setup-build.py b/deps/buildcore/scripts/setup-build.py index 3df28cd4..ebbad37e 100755 --- a/deps/buildcore/scripts/setup-build.py +++ b/deps/buildcore/scripts/setup-build.py @@ -84,7 +84,7 @@ def main() -> int: build_dir = f'{project_dir}/{args.build_root}/{build_config}' util.rm(build_dir) cmake_cmd = [ - 'cmake', '-S', project_dir, '-B', build_dir, build_tool, + 'cmake', '-S', project_dir, '-B', build_dir, '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DCMAKE_TOOLCHAIN_FILE={:s}'.format(args.toolchain), '-DCMAKE_BUILD_TYPE={:s}'.format(build_type_arg), @@ -92,6 +92,8 @@ def main() -> int: '-DBUILDCORE_BUILD_CONFIG={:s}'.format(build_config), '-DBUILDCORE_TARGET={:s}'.format(args.target), ] + if build_tool != '': + cmake_cmd.append(build_tool) if qt_path != '': cmake_cmd.append(qt_path) if platform.system() == 'Windows': diff --git a/deps/buildcore/scripts/util.py b/deps/buildcore/scripts/util.py index f87331bd..c37e6332 100644 --- a/deps/buildcore/scripts/util.py +++ b/deps/buildcore/scripts/util.py @@ -28,11 +28,11 @@ def rm(path: str): def get_os() -> str: - return os.uname().sysname.lower() + return platform.system().lower() def get_arch() -> str: arch = platform.machine() - if arch == 'amd64': + if arch.lower() == 'amd64': arch = 'x86_64' return arch