Support 'No Docker' run

This commit is contained in:
Jaby 2025-01-05 15:32:23 +01:00
parent 5d746aa6c8
commit 61d403de5e
2 changed files with 11 additions and 1 deletions

View File

@ -32,6 +32,9 @@ JabyEngine relies on linux to be build. For Windows users it uses `wsl` instead
The following environment variables should be set: The following environment variables should be set:
* `JABY_ENGINE_PATH`: The path to the root folder of this repo * `JABY_ENGINE_PATH`: The path to the root folder of this repo
* `PSX_LICENSE_PATH`: The path to a folder containing the PS1 licenses for generating a CD. * `PSX_LICENSE_PATH`: The path to a folder containing the PS1 licenses for generating a CD.
Additionally you can also specify the following optional environment variables:
* `JABY_ENGINE_NO_DOCKER`: Turns off usage of `podman` for build. This is only recommended for specific development.
### Building `JabyEngine` (without VSCode) ### Building `JabyEngine` (without VSCode)
`make` requires the following values to be passed: `make` requires the following values to be passed:

View File

@ -12,5 +12,12 @@ PROJECT_PATH_ARR=(${1//!/ })
PROJECT_PATH=${PROJECT_PATH_ARR[0]} PROJECT_PATH=${PROJECT_PATH_ARR[0]}
PROJECT_WORK_DIR=${PROJECT_PATH_ARR[1]} PROJECT_WORK_DIR=${PROJECT_PATH_ARR[1]}
shift shift
if [[ -z "${JABY_ENGINE_NO_DOCKER}" ]]; then
mkdir -p $JABY_ENGINE_CARGO_FOLDER mkdir -p $JABY_ENGINE_CARGO_FOLDER
podman run --rm -it -v $JABY_ENGINE_CARGO_FOLDER:/root/.cargo/registry -v ${JABY_ENGINE_PATH}:/jaby_engine -v ${PROJECT_PATH}:/project $LICENSE_MOUNT -w /project/$PROJECT_WORK_DIR jaby_engine $@ podman run --rm -it -v $JABY_ENGINE_CARGO_FOLDER:/root/.cargo/registry -v ${JABY_ENGINE_PATH}:/jaby_engine -v ${PROJECT_PATH}:/project $LICENSE_MOUNT -w /project/$PROJECT_WORK_DIR jaby_engine $@
else
echo "WARNING! You are not running in podman"
cd $PROJECT_PATH/$PROJECT_WORK_DIR
$@
fi