From 61d403de5e2d19f98af691da9f39980a9613c551 Mon Sep 17 00:00:00 2001 From: Jaby Date: Sun, 5 Jan 2025 15:32:23 +0100 Subject: [PATCH] Support 'No Docker' run --- readme.md | 3 +++ scripts/podman_jaby_engine.sh | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 24f17151..12d5e7cb 100644 --- a/readme.md +++ b/readme.md @@ -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: * `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. + +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) `make` requires the following values to be passed: diff --git a/scripts/podman_jaby_engine.sh b/scripts/podman_jaby_engine.sh index bb16edf8..c9397534 100755 --- a/scripts/podman_jaby_engine.sh +++ b/scripts/podman_jaby_engine.sh @@ -12,5 +12,12 @@ PROJECT_PATH_ARR=(${1//!/ }) PROJECT_PATH=${PROJECT_PATH_ARR[0]} PROJECT_WORK_DIR=${PROJECT_PATH_ARR[1]} shift + +if [[ -z "${JABY_ENGINE_NO_DOCKER}" ]]; then 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 $@ \ No newline at end of file +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 \ No newline at end of file