From db64afc5506bf473f20c54aa870008ce4c1773ea Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Thu, 16 Sep 2021 22:00:40 -0400 Subject: [PATCH] Improve Build System --- CMakeLists.txt | 23 ++++----- cmake/arm-toolchain.cmake | 4 +- cmake/arm64-toolchain.cmake | 2 +- cmake/x86_64-toolchain.cmake | 8 +++ images/start.png | Bin 31470 -> 31455 bytes launcher/src/client/launcher.cpp | 3 +- scripts/build-all.sh | 12 ++--- scripts/build.sh | 82 ++++++++----------------------- scripts/package.sh | 2 +- 9 files changed, 49 insertions(+), 87 deletions(-) create mode 100644 cmake/x86_64-toolchain.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fc3d4a47..ef87af9d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,13 +25,11 @@ else() endif() # Use Clang By Default -if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) - if(NOT DEFINED CMAKE_C_COMPILER) - set(CMAKE_C_COMPILER "clang") - endif() - if(NOT DEFINED CMAKE_CXX_COMPILER) - set(CMAKE_CXX_COMPILER "clang++") - endif() +if(NOT DEFINED CMAKE_C_COMPILER) + set(CMAKE_C_COMPILER "clang") +endif() +if(NOT DEFINED CMAKE_CXX_COMPILER) + set(CMAKE_CXX_COMPILER "clang++") endif() # Setup ARM Cross Compilation @@ -39,12 +37,6 @@ if(USE_ARM32_TOOLCHAIN) include(cmake/arm-toolchain.cmake) endif() -# Use LLD When Using Clang -if(CMAKE_C_COMPILER STREQUAL "clang") - add_link_options("-fuse-ld=lld") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld") # Fix try_compile() -endif() - # Utility Functions include(cmake/util.cmake) @@ -92,6 +84,11 @@ add_definitions(-D_GNU_SOURCE) set(CMAKE_C_STANDARD 99) set(CMAKE_CXX_STANDARD 11) +# Use LLD When Using Clang +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + add_link_options("-fuse-ld=lld") +endif() + # Specify Constants if(MCPI_SERVER_MODE) add_definitions(-DMCPI_SERVER_MODE) diff --git a/cmake/arm-toolchain.cmake b/cmake/arm-toolchain.cmake index 64610965f..9ffeceada 100644 --- a/cmake/arm-toolchain.cmake +++ b/cmake/arm-toolchain.cmake @@ -1,8 +1,8 @@ # Compile For ARM -if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64_be" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv8b" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv8l") +if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64_be" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv8b" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv8l") # Force 32-Bit Compile add_compile_options("-m32") -elseif(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "arm") +elseif(NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm") # Use ARM Cross-Compiler include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake") setup_toolchain("arm-linux-gnueabihf") diff --git a/cmake/arm64-toolchain.cmake b/cmake/arm64-toolchain.cmake index ee72cc7df..45cee3cde 100644 --- a/cmake/arm64-toolchain.cmake +++ b/cmake/arm64-toolchain.cmake @@ -1,5 +1,5 @@ # Compile For ARM64 -if(NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64_be" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv8b" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv8l")) +if(NOT (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64_be" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv8b" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv8l")) # Use ARM64 Cross-Compiler include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake") setup_toolchain("aarch64-linux-gnu") diff --git a/cmake/x86_64-toolchain.cmake b/cmake/x86_64-toolchain.cmake new file mode 100644 index 000000000..3ec028647 --- /dev/null +++ b/cmake/x86_64-toolchain.cmake @@ -0,0 +1,8 @@ +# Compile For x86_64 +if(NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + # Use x86_64 Cross-Compiler + include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake") + setup_toolchain("x86_64-linux-gnu") +endif() +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_PROCESSOR "x86_64") diff --git a/images/start.png b/images/start.png index ff3aa47f6cbd84468ad7ad4bfaa79c488aea888c..c56ab7047957f1a8b9113d028be3dc9a65342f8d 100644 GIT binary patch delta 12095 zcmZ`<2|Sc*`_?(9O^cHyMUsdlOC>@$SwcdnCd`mZc4CZuyr)G{*&0jP=GY?3D6)*f zoRB?}b*#;?4kpAHW7hZos?Pb&`M&d?pPwHy=6UYty6^kCuKO8_j7=2Arq@FzK>u6f zTLjvn;v-)pm>X59>dc8s!3J=)`aO8^Xyb8I=JTCBUmr(uYnD$OmN;o+Ix^MhcoXg< z*jpwOc{?U8uo?^nV^h-G`^=orvg13cV`URo@wArA4{TxHXi?O&`IcW!PZNA#P6x?a>5oS5 z{7WeF@eLP=S_`J7m)<5C-!h>_IP>-*Sq6I(aEp$U{)z-sSWw*SdaWJpo1W9KcR%jF zp*vQoi>j!eo|-zMj)S!!`s-zh=aTpzJSI z$8)W_{q7gmUW#IdCjlQ3tFhE?M%|_8nQd`ihpauAI2n3ypo$PMX9HFQ@DqTB!aUNL z{Ml>zSHmJ1d1~+B)T{X`G7q?BcDK9@KA>{OnXncbwtXXb!uU4vubHqm7#u(R^>JZa zxv20i8C~-vWN`E^f{K0_KLx74Z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N1?gn!pz=|xwp!N633#`$vf_?#lGa+@L^i3T+@s+mKNrz_B zJEpp^wC07#*}BINkrf$&_MdlL{bpf0sUlzwCw2`C5xb$lQXVF+g#!wLO%*zoMtRIgLBI8fxuOVMnX%ZjBy=^2@~`hx@0wKBpQOsWp7fC z#S9Vt<(vA2VH?(+xTKkxu{zAR624krWf6xs@BAPMUCZy;Tr!RzqC$yi$xzA75qQ5K z%9;0Q!_Z%V1L8it$u1Gvlu_gAo@9(3*r`MhT#Epdybg#3_Q!!cp@M}imO*1`WdYh` z(a+9wrRSVYFP`--!mkYFb4jfx3i700-FB~@ztJ#+d3Nnk&+*7w(U~dlck7t(%2!LW zKFUGju9#w!*#aVpa_-rg-rVGc`tv~)Jg~y|D4){U|6SEIejA=a{d@g7C56MXr>#i7 z^|aITi&xL$nSX4CzoGJ;4ugY1r%oGee)?n~%;!|0mvt@U*dc50t{inP($>Obx!N4; z^RZeAIr>DXFMquE-#o#qm&p{smD(WL}R0Q;Fa_K{--PHYg;h~>B`t!~GfL2Nf zXjS)7I_(ESe1X}wi5fALz#zXe-i9mU(%$0Ko195%Uj`V=*v15F9y#w2!w zGk+FM2QMBhV2r`TvSU~1*$}ZPsllz~-Gyd=-B0VB z&YM2SpiX8)8Q!GN_xf|k+lmyN*5||CTf2}8_P%Uc&HD7LeWgfg$`;XLo~2hUp;&9A zv(pEd)BXD^C1^7K`$^WZHw!7e1zlEUEx0Rq#=_wKQJj&86R@W5IVG9pjZp5*eM$L4 z3#O26E{CdX24c+?y5w%KnwS8RNeST5wI0Dvj0MS5F%1DOhvIC=9v<|!LnT48=XlQ| zw>^wnFe@_SJh$5Gvh4zx2?WfnsUN9jXVQ;x{sy53xYvDF18oH>O(`P;4k2ixNxT>t<8 diff --git a/launcher/src/client/launcher.cpp b/launcher/src/client/launcher.cpp index 0de64cb41..e4d672392 100644 --- a/launcher/src/client/launcher.cpp +++ b/launcher/src/client/launcher.cpp @@ -137,8 +137,7 @@ int main(int argc, char *argv[]) { // Minecraft Folder { char *minecraft_folder = NULL; - asprintf(&minecraft_folder, "%s/.minecraft-pi", getenv("HOME")); - ALLOC_CHECK(minecraft_folder); + safe_asprintf(&minecraft_folder, "%s/.minecraft-pi", getenv("HOME")); { // Check Minecraft Folder struct stat obj; diff --git a/scripts/build-all.sh b/scripts/build-all.sh index f1223d1df..aa60a3721 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -6,9 +6,9 @@ set -e rm -rf out # Build -./scripts/build.sh native client -./scripts/build.sh native server -./scripts/build.sh arm64 client -./scripts/build.sh arm64 server -./scripts/build.sh arm client -./scripts/build.sh arm server +./scripts/build.sh client x86_64 +./scripts/build.sh server x86_64 +./scripts/build.sh client arm64 +./scripts/build.sh server arm64 +./scripts/build.sh client arm +./scripts/build.sh server arm diff --git a/scripts/build.sh b/scripts/build.sh index e92b65708..6fbc4b929 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,21 +2,22 @@ set -e -# This Script Assumes An x86_64 Host -if [ "$(uname -m)" != "x86_64" ]; then - echo 'Invalid Host Architecture' > /dev/stderr - exit 1 -fi +# Build +build() { + # Find Toolchain + local toolchain_file="$(pwd)/cmake/$2-toolchain.cmake" + if [ ! -f "${toolchain_file}" ]; then + echo "Invalid Architecture: $1" > /dev/stderr + exit 1 + fi -# Build For x86_64 -native_build() { # Create Build Dir - rm -rf build/$1-x86_64 - mkdir -p build/$1-x86_64 - cd build/$1-x86_64 + rm -rf "build/$1-$2" + mkdir -p "build/$1-$2" + cd "build/$1-$2" # Create Prefix - local prefix="$(cd ../../; pwd)/out/$1-x86_64" + local prefix="$(cd ../../; pwd)/out/$1-$2" rm -rf "${prefix}" mkdir -p "${prefix}" @@ -37,45 +38,7 @@ native_build() { # Build Native Components mkdir native cd native - cmake -DMCPI_BUILD_MODE=native "${extra_arg}" ../../.. - make -j$(nproc) - make install DESTDIR="${prefix}" - cd ../ - - # Exit - cd ../../ -} - -# Build For ARM64 -arm64_build() { - # Create Build Dir - rm -rf build/$1-arm64 - mkdir -p build/$1-arm64 - cd build/$1-arm64 - - # Create Prefix - local prefix="$(cd ../../; pwd)/out/$1-arm64" - rm -rf "${prefix}" - mkdir -p "${prefix}" - - # Prepare - local extra_arg='-DMCPI_USE_MEDIA_LAYER_PROXY=ON' - if [ "$1" = "server" ]; then - extra_arg='-DMCPI_SERVER_MODE=ON' - fi - - # Build ARM Components - mkdir arm - cd arm - cmake -DMCPI_BUILD_MODE=arm "${extra_arg}" ../../.. - make -j$(nproc) - make install DESTDIR="${prefix}" - cd ../ - - # Build Native Components - mkdir native - cd native - cmake -DCMAKE_TOOLCHAIN_FILE="$(cd ../../../; pwd)/cmake/arm64-toolchain.cmake" -DMCPI_BUILD_MODE=native "${extra_arg}" ../../.. + cmake -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}" -DMCPI_BUILD_MODE=native "${extra_arg}" ../../.. make -j$(nproc) make install DESTDIR="${prefix}" cd ../ @@ -87,9 +50,9 @@ arm64_build() { # Build For ARM arm_build() { # Create Build Dir - rm -rf build/$1-arm - mkdir -p build/$1-arm - cd build/$1-arm + rm -rf "build/$1-arm" + mkdir -p "build/$1-arm" + cd "build/$1-arm" # Create Prefix local prefix="$(cd ../../; pwd)/out/$1-arm" @@ -112,19 +75,14 @@ arm_build() { } # Verify Mode -if [ "$2" != "client" ] && [ "$2" != "server" ]; then +if [ "$1" != "client" ] && [ "$1" != "server" ]; then echo "Invalid Mode: $2" > /dev/stderr exit 1 fi # Build -if [ "$1" = "native" ]; then - native_build "$2" -elif [ "$1" = "arm64" ]; then - arm64_build "$2" -elif [ "$1" = "arm" ]; then - arm_build "$2" +if [ "$2" = "arm" ]; then + arm_build "$1" else - echo "Invalid Architecture: $1" > /dev/stderr - exit 1 + build "$1" "$2" fi diff --git a/scripts/package.sh b/scripts/package.sh index 8541c0a3e..a99cf141b 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -26,7 +26,7 @@ package() { # Find And Package for dir in out/*; do - # Check If Directory + # Check If Directory Exists if [ -d "${dir}" ]; then # Check If Debian Package Exists pkg="$(basename ${dir})"