updated mingw64 build

This commit is contained in:
2024-01-27 11:51:35 -06:00
parent 2ae22cdb30
commit 7698a62c1f
18 changed files with 1480 additions and 421 deletions

View File

@ -37,7 +37,7 @@ mkdir -p ../${BUILD_ROOT}/${BUILD_FOLDER}
pushd ../${BUILD_ROOT}/${BUILD_FOLDER}
if [ "${IS_MINGW}" == "1" ]; then
TOOLCHAIN=$(realpath ../../cmake/mingw-w64-x86_64.cmake)
TOOLCHAIN=$(realpath /cmake_toolchain.cmake)
CMAKE_ADDITIONAL_OPTS=-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}
fi

View File

@ -1,5 +1,23 @@
#!/bin/bash
# #!/bin/bash
#
# pushd "$(dirname "$0")/.."
# scripts/make_common.sh "${1}" "${2}" 1
# popd
#
BUILD_TYPE=$1
BUILD_CLEAN=$2
pushd "$(dirname "$0")/.."
scripts/make_common.sh "${1}" "${2}" 1
popd
SOURCE_DIR=$(dirname "$0")/..
SOURCE_DIR=$(realpath ${SOURCE_DIR})
NAME=mingw64
BUILD_ARCH=64_bit
docker stop repertory_${NAME}
docker rm repertory_${NAME}
docker build --build-arg NUM_JOBS=${MY_NUM_JOBS} -t repertory:${NAME} - < ${SOURCE_DIR}/docker/${BUILD_ARCH}/${NAME} &&
docker run -td -u $(id -u):$(id -g) --name repertory_${NAME} -w ${SOURCE_DIR} -v ${SOURCE_DIR}:${SOURCE_DIR}:rw,z repertory:${NAME} &&
docker exec repertory_${NAME} /bin/bash -c "${SOURCE_DIR}/scripts/make_common.sh ${BUILD_TYPE} "${BUILD_CLEAN}" 1"
docker stop repertory_${NAME}
docker rm repertory_${NAME}

View File

@ -1,5 +0,0 @@
@echo off
pushd "%~dp0%.."
mingw64 scripts/make_common.sh "%1" "%2" 0 1
popd

View File

@ -1,5 +1,15 @@
#!/bin/bash
NUM_JOBS=${MY_NUM_JOBS}
if [[ -z "${NUM_JOBS}" ]]; then
NUM_JOBS=$(getconf _NPROCESSORS_ONLN 2> /dev/null || getconf NPROCESSORS_ONLN 2> /dev/null || echo 1)
if [ "${NUM_JOBS}" -gt "2" ]; then
NUM_JOBS=$(expr ${NUM_JOBS} - 2)
elif [ "${NUM_JOBS}" -gt "1" ]; then
NUM_JOBS=$(expr ${NUM_JOBS} - 1)
fi
fi
pushd "$(dirname "$0")"
CURRENT_DIR=$(pwd)
@ -14,15 +24,17 @@ else
fi
TAG=repertory_shell
CONTAINER=${TAG}_shell_${NAME}
CONTAINER=${TAG}_${NAME}
docker stop ${CONTAINER}
docker rm ${CONTAINER}
docker build -t ${TAG}:${NAME} - < docker/${TYPE}/${NAME} &&
docker build --build-arg NUM_JOBS=$NUM_JOBS -t ${TAG}:${NAME} - < docker/${TYPE}/${NAME} &&
docker run -itd --device /dev/fuse --cap-add SYS_ADMIN --name ${CONTAINER} -v $(pwd):/mnt ${TAG}:${NAME} &&
# docker run -itd --device /dev/fuse --cap-add SYS_ADMIN --name ${CONTAINER} ${TAG}:${NAME} &&
docker exec -it ${CONTAINER} /bin/bash
docker stop ${CONTAINER}
docker rm ${CONTAINER}
docker system prune -f
fi
popd
popd