From e9777b8779ad6208da8ec0091964760b07073936 Mon Sep 17 00:00:00 2001 From: OleSTEEP Date: Sat, 7 Oct 2023 01:01:11 +0300 Subject: [PATCH] Determining logic cpu count in Darwin --- build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 475e1b2..47d5a09 100755 --- a/build.sh +++ b/build.sh @@ -2,6 +2,10 @@ mkdir output mkdir output/bin python3 -m pip install Nuitka -nuitka3 --jobs=$(nproc) --output-dir=output --follow-imports --output-filename=output/bin/ffmpeg-comp FFMpeg-Compressor/main.py +case "$(uname -s)" in + Linux*) jobs="--jobs=$(nproc)";; + Darwin*) jobs="--jobs=$(sysctl -n hw.ncpu)";; +esac +nuitka3 "${jobs}" --output-dir=output --follow-imports --output-filename=output/bin/ffmpeg-comp FFMpeg-Compressor/main.py cp FFMpeg-Compressor/ffmpeg-comp.toml output/bin/ -nuitka3 --jobs=$(nproc) --output-dir=output --follow-imports --output-filename=output/bin/rendroid-unpack RenPy-Android-Unpack/unpack.py \ No newline at end of file +nuitka3 "${jobs}" --output-dir=output --follow-imports --output-filename=output/bin/rendroid-unpack RenPy-Android-Unpack/unpack.py \ No newline at end of file