Files
Michał Janiszewski a35ad6fa9c Use -maxcpucount option for msbuild (#25947)
|                   | amd64 + LTCG + maxcpucount                                                                                 | amd64 + LTCG                                                                                             | amd64 + maxcpucount                                                                                        | amd64                                                                                                     | arm64 + LTCG + maxcpucount                                                                                 | arm64 + LTCG                                                                                               | arm64 + maxcpucount                                                                                        | arm64                                                                                                      |
|-------------------|------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|
| target arch x86   | [00:08:53.90](https://github.com/janisozaur/OpenRCT2/actions/runs/21666922052/job/62464744933#step:5:2383) | [00:09:53.62](https://github.com/OpenRCT2/OpenRCT2/actions/runs/21650043151/job/62455751416#step:5:2039) | [00:07:23.90](https://github.com/janisozaur/OpenRCT2/actions/runs/21665997160/job/62461589556#step:5:2344) | [00:08:00.19](https://github.com/OpenRCT2/OpenRCT2/actions/runs/21649659716/job/62410763017#step:5:10565) | [00:08:54.78](https://github.com/janisozaur/OpenRCT2/actions/runs/21666238474/job/62462577951#step:7:2778) | [00:09:44.08](https://github.com/janisozaur/OpenRCT2/actions/runs/21666225731/job/62462441917#step:7:2493) | [00:08:07.22](https://github.com/janisozaur/OpenRCT2/actions/runs/21665838804/job/62461046773#step:7:2743) | [00:08:17.69](https://github.com/janisozaur/OpenRCT2/actions/runs/21665946097/job/62461423151#step:7:2481) |
| target arch amd64 | [00:12:03.54](https://github.com/janisozaur/OpenRCT2/actions/runs/21666922052/job/62464744942#step:5:2141) | [00:12:25.64](https://github.com/OpenRCT2/OpenRCT2/actions/runs/21650043151/job/62455751474#step:5:1911) | [00:08:30.25](https://github.com/janisozaur/OpenRCT2/actions/runs/21665997160/job/62461589591#step:5:2108) | [00:08:52.53](https://github.com/OpenRCT2/OpenRCT2/actions/runs/21649659716/job/62410762982#step:5:10437) | [00:11:25.48](https://github.com/janisozaur/OpenRCT2/actions/runs/21666238474/job/62462577944#step:7:2104) | [00:11:11.95](https://github.com/janisozaur/OpenRCT2/actions/runs/21666225731/job/62462441921#step:7:1927) | [00:08:04.81](https://github.com/janisozaur/OpenRCT2/actions/runs/21665838804/job/62461046753#step:7:2067) | [00:08:35.42](https://github.com/janisozaur/OpenRCT2/actions/runs/21665946097/job/62461423099#step:7:1915) |
| target arch arm64 | [00:13:31.38](https://github.com/janisozaur/OpenRCT2/actions/runs/21666922052/job/62464744892#step:5:2114) | [00:14:03.96](https://github.com/OpenRCT2/OpenRCT2/actions/runs/21650043151/job/62455751629#step:5:1877) | [00:08:31.92](https://github.com/janisozaur/OpenRCT2/actions/runs/21665997160/job/62461589600#step:5:2077) | [00:08:49.81](https://github.com/OpenRCT2/OpenRCT2/actions/runs/21649659716/job/62410763054#step:5:1871)  | [00:13:53.18](https://github.com/janisozaur/OpenRCT2/actions/runs/21666238474/job/62462577943#step:7:2098) | [00:15:02.31](https://github.com/janisozaur/OpenRCT2/actions/runs/21666225731/job/62462441912#step:7:1921) | [00:08:09.25](https://github.com/janisozaur/OpenRCT2/actions/runs/21665838804/job/62461046738#step:7:2068) | [00:08:33.33](https://github.com/janisozaur/OpenRCT2/actions/runs/21665946097/job/62461423188#step:7:1915) |
2026-02-04 16:13:33 +01:00

41 lines
1.5 KiB
Python
Executable File

#!/usr/bin/env bash
set -e
# Ensure we are in root directory
if [[ $(uname) == "Darwin" ]]; then
basedir="$(perl -MCwd=abs_path -le 'print abs_path readlink(shift);' `dirname $0`/..)"
else
basedir="$(readlink -f `dirname $0`/..)"
fi
cd $basedir
if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
# Patch version.h
echo -e "\033[0;36mPatching version.h...\033[0m"
fileversion=$OPENRCT2_VERSION.$OPENRCT2_BUILD
productversion="$fileversion-${OPENRCT2_SHA1_SHORT}"
fileversion=${fileversion//./,}
# FILEVERSION in the resource file can only take up to 4 digits in the version string, so we remove the surplus of version numbers
fileversion=$(echo $fileversion | cut -f1-4 -d",")
echo "#define OPENRCT2_FILE_VERSION $fileversion" > "resources/version.h"
echo "#define OPENRCT2_PRODUCT_VERSION \"$productversion\"" >> "resources/version.h"
cat "resources/version.h"
# Build everything
echo -e "\033[0;36mBuilding OpenRCT2 for Windows $CONFIGURATION|$PLATFORM...\033[0m"
vstool msbuild openrct2.proj -t:build -p:Breakpad=true -p:UsePCH=true -maxcpucount
# Create openrct2.exe and openrct2.com with correct subsystem
cp bin/openrct2.exe bin/openrct2.com
vstool editbin //subsystem:console bin/openrct2.com
vstool editbin //subsystem:windows bin/openrct2.exe
else
echo -e "\033[0;36mBuilding OpenRCT2...\033[0m"
mkdir -p bin && cd bin
export DESTDIR=install
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr "$@"
ninja -k0 all install
fi